C++ VEXCode V5 Text Tutorials - Autonomous PID and Multitasking

Поделиться
HTML-код
  • Опубликовано: 11 сен 2024

Комментарии • 57

  • @sangamchapagain160
    @sangamchapagain160 4 года назад +13

    Thank You so much. Your videos are the best to program VEX v5 Robots. I would love to see some videos of autonomous and driver control for actual competition robots that have 4 motors drivetrain, two intake rollers, a lift, and a tilter.

  • @virto716
    @virto716 3 года назад +12

    Thanks. But can you please zoom in? With control+up/down

  • @drftghjn-nr9qn
    @drftghjn-nr9qn Месяц назад

    This made a lot of sense. Can you please try to speak slower in the future videos? Thanks so much!

  • @deuseldorfgaming1270
    @deuseldorfgaming1270 4 года назад +4

    if I'm trying to do this with 4 motors do I create a new value of leftSidePosition and make it an average of the two motors? And does that go inside of the drive PID or outside of it?

    • @aaravdoshi7294
      @aaravdoshi7294 3 года назад

      Did you figure this out? I'm wondering the same thing.

  • @arete1776
    @arete1776 2 года назад +3

    Hi! Is there any way I could use an inertial sensor instead of the build in motor encoders for the turning PID? Thanks!

    • @adamsalem-s
      @adamsalem-s 2 года назад

      Yes! Don’t get stuck on watching tutorials forever just modify the code yourself! See if it works

  • @rz-zl4vk
    @rz-zl4vk 2 года назад +2

    I am wondering if it is possible to do this in v5 text instead of pro

  • @paulbunyan3drc251
    @paulbunyan3drc251 2 года назад

    So i downloaded your latest version of this on the forum and tried to use it. When I run auto nothing happens. Any idea why?

  • @ExpertPlumYee
    @ExpertPlumYee 2 года назад +1

    I was wondering what some other people values were for KP KI and KD. I understand they will likely vary for everyone but I just want to see what others have had in the past

  • @desiama9764
    @desiama9764 4 года назад +2

    Had a question. If i were to do degrees than voltage i would just /360 instead of 12 right?. would that be the only change.

  • @XXestential-crisis
    @XXestential-crisis 4 года назад +6

    Could you explain to me the difference between bool, int, void, and double? Thanks!

    • @rahilshah6337
      @rahilshah6337 4 года назад +4

      bool is a variable that is assigned either true or false
      int is a function that returns a number
      void a function that actually makes the robot do something
      double is a variable that is assigned a number

    • @TVA1814DeltaIII
      @TVA1814DeltaIII  3 года назад

      ruclips.net/video/wv89hHjXM0Y/видео.html

    • @anishshirodkar484
      @anishshirodkar484 8 месяцев назад

      @@rahilshah6337 it's been 3 years, but double also can go into decimal points, where as integer cannot

  • @rocky6344
    @rocky6344 2 года назад

    how do you convert the units, like how do you know how long it goes

  • @luisserranolaguna1610
    @luisserranolaguna1610 9 месяцев назад

    is a sleep a task_delay for PROS?

  • @sripadsirikonda9213
    @sripadsirikonda9213 Год назад

    @TVA1814DeltaIII
    can you explain how to tune the robot more in depth?

  • @thepenguincolony6039
    @thepenguincolony6039 9 месяцев назад

    Great video

  • @inventor2990
    @inventor2990 2 года назад +1

    I know this is late to the party but what is desired value? Is it related to odometry?

    • @axl-pt3ou
      @axl-pt3ou 2 года назад

      Desired value is where you want the robot to go (please correct me if im wrong).

    • @KlimVoroshilov-vg8wz
      @KlimVoroshilov-vg8wz 2 года назад

      Basically how much you want the motors to spin for

  • @cameronconger385
    @cameronconger385 4 года назад +1

    i am new can i get help for my robot

  • @waffles._.25
    @waffles._.25 2 года назад

    Would this PID still work on a four motor drive, if I pair the 2 motors on the left as a motor group and pair the 2 motors on the right as well? Or would I need to make new modifications from this program?

    • @valeriaramirez9419
      @valeriaramirez9419 2 года назад +1

      Yeah, you could do it. You don't even necessarily need to make it a group, just do the exact same thing to its respective side. So like :
      leftFront.spin(forward, lateralMotorPower + turnMotorPower, voltageUnits::volt);
      leftBack.spin(forward, lateralMotorPower + turnMotorPower, voltageUnits::volt);
      rightFront.spin(forward, lateralMotorPower - turnMotorPower, voltageUnits::volt);
      rightBack.spin(forward, lateralMotorPower - turnMotorPower, voltageUnits::volt);
      instead of the individual left and right sides and then also make sure getting the positions for all four motors, and resetting the sensors for all four motors, but other then that it should be almost identical.

    • @waffles._.25
      @waffles._.25 2 года назад

      @@valeriaramirez9419 oh thank you. But if use individual motors, what should I write for the error?

  • @waffles._.25
    @waffles._.25 2 года назад +1

    One question, how would I convert the motor ticks into mm? Great video btw :)

    • @aztro8323
      @aztro8323 2 года назад +1

      1 rotation of your wheel would mean going the diameter of your wheel forward/backwards
      Distance = diameter * gearRatio * rotations

  • @nicholaspankow9225
    @nicholaspankow9225 4 года назад

    when will be your next video adn what will it be on??

  • @haojinli
    @haojinli 4 года назад

    Thank you so much!

  • @e--5
    @e--5 2 года назад

    I dont quite know how to actually make my robot move forward with this. Changing the desired value seems to do nothing and driving it normally in auton i cant notice a difference even with the gains set really high or low.

    • @yangelina0_0
      @yangelina0_0 Год назад

      just wondering if you have figured this out? I am having the same problem also.

  • @255Moon
    @255Moon 2 года назад

    Is the left and right motor the motors for the drivetrain?

    • @amongus4543
      @amongus4543 2 года назад

      if you called them like that in your code then yes

  • @4realofficial843
    @4realofficial843 4 года назад +1

    How would you do this for a single motor?

    • @TVA1814DeltaIII
      @TVA1814DeltaIII  4 года назад

      ^ Answers the question

    • @RohanI0969
      @RohanI0969 4 года назад

      @@TVA1814DeltaIII would you be able to send this so i can dissect this further

  • @a.c.2659
    @a.c.2659 2 года назад

    How could i modify this code so that it accepts inches or mm?

    • @a.c.2659
      @a.c.2659 2 года назад

      It is urgent any help will be appreciated

  • @jaydannorr7859
    @jaydannorr7859 3 года назад

    Okay so if I wanted to use PID but using Rotations what would I need to change in this code?

    • @aaravdoshi7294
      @aaravdoshi7294 3 года назад

      Hello! I was just wondering if you figured this out since I'm trying to do the same thing? Thanks!

    • @zehderp5451
      @zehderp5451 3 года назад

      Well I mean, say you wished to move 500 rotations with your motor. Tare your encoders, set 500 encoderunits as your target, and while the current encoder reading of the motor does not come within some amount of the target, run the PID loop.

  • @bynexuz4994
    @bynexuz4994 4 года назад

    Why you add the results of the both pid in the motor code?

    • @rahilshah6337
      @rahilshah6337 4 года назад +3

      if you say that you set desiredValue to 300 and then desiredTurnValue to 300, then the robot will drive in a sort of curved line, not straight. If you set desiredValue to 300 and desiredTurnValue to 0, then the robot will drive in a straight line. If you set desiredValue to 0 and desiredTurnValue to 300, then the robot will point turn.

  • @haitaolyu6927
    @haitaolyu6927 2 года назад

    enableDriverPID is true, and while(enableDriverPID) {} will be a dead loop. I wonder when the loop should be stopped.

    • @amongus4543
      @amongus4543 2 года назад

      loop is stopped when you set enableDriverPID = false; when driver control starts

  • @borasaltk7702
    @borasaltk7702 2 года назад

    I just want to rotate my robot 90 degrees with pid, how can I do that basically? can you share the code with me?

    • @amongus4543
      @amongus4543 2 года назад

      you find out how many ticks/degrees/... the motors have to turn the robot rotate 90 degrees (do the algebra with your gear ratio), then you set turnDesiredValue to that

    • @borasaltk7702
      @borasaltk7702 2 года назад

      @@amongus4543 actually i just have an inertial sensor and i don't know how can i do this. could you explain that specifically?

    • @amongus4543
      @amongus4543 2 года назад

      @@borasaltk7702 well, I you have to set the turnDesiredAngle to whatever absolute angle (in relation to the orientation you had while initializing) you want. The actual turn position is then your Inertial sensor's rotation value

  • @liamearnest315
    @liamearnest315 4 года назад

    How would I adapt this to a set amount of distance in autonomous?

    • @shivanigautam670
      @shivanigautam670 Год назад

      you would calculate how many rotation of your wheel the distance would be, and the use the number of rotations, or convert that to whatever measurement you want like degrees.

  • @f4llvortex576
    @f4llvortex576 3 года назад +1

    Hey man I want the full auton code rn

  • @ijiwdjidjwjdiowjdioj1615
    @ijiwdjidjwjdiowjdioj1615 11 месяцев назад

    12:29

  • @tAP08991
    @tAP08991 Год назад

    hi~ I want to seek cooperation with you!
    Is there any way I can talk to you?
    Discord?