Making Robot Move straight

  1. last week

    Joshua_L

    Dec 7 Virginia 80708X

    What methods do you guys use for making the robot move as straight as possible? Currently we're using a comparative p controller that adjusts the left and right side speed based off their difference in encoder value.

  2. Got a Screw Loose

    Dec 7 Ohio 44833B
    Edited last week by Got a Screw Loose

    Make sure the friction on each side is as similar as possible. And, it probably won't make much of a difference, but I've used the same size wires to ensure constant loss of current on both sides. But it can't be a big deal across such short wires.

  3. InsertString

    Dec 7 Vancouver, BC, Canada 2D

    @Joshua_L my team uses the gyro sensor to measure any change in angle and correct it with a p controller.

  4. Lukyan_1

    Dec 8 Woodbridge, VA 4303A

    @Joshua_L We use SlEwrAtE and it doesn't veer

  5. Xenon

    Dec 8 Long Beach, California 99999V

    we honestly don't do anything. never have any issues with it, it really doesn't ever veer enough to be a problem.

  6. Ashwin_D.

    Dec 8 California 2496J

    In skills we would use encoder straightening + PID while in auton we use gyro straightening + PID

  7. Joshua_L

    Dec 8 Virginia 80708X

    @Lukyan_1 @Joshua_L We use SlEwrAtE and it doesn't veer

    @Xenon we honestly don't do anything. never have any issues with it, it really doesn't ever veer enough to be a problem.

    Lucky, for some reason we have a massive veer (6 inches left over 5 feet). Our drive has pretty equal friction so idk whats causing it to veer. And the frustrating part is that it still veers, whether we use gyro or encoders to correct it.

  8. Lukyan_1

    Dec 8 Woodbridge, VA 4303A

    @Joshua_L Prob not the case but are all of your motors at the same gear setting?

  9. The Electrobotz

    Dec 9 Virginia 20181X

    I'm going to assume that you're talking about veering during autonomous and not driver control since most teams don't do encoder speed adjustments in driver control.

    There are a lot of things that could be causing this. If you're able to drive straight in driver control, it is definitely a code thing. If it doesn't drive straight in driver control either, it could be a friction thing as well. If you believe it's a programming thing, I would make sure that you are starting all of your motors. You may be starting only some of the motors (3 out of 4, or some other combo).
    Another option could be that your math is incorrect. If you're doing any calculation to determine the speed, you might be calculating the speed of the side that is slower incorrectly.

  10. 6 days ago

    tabor473

    Dec 9 V5 Beta Tester OYES, WPI

    @Joshua_L Lucky, for some reason we have a massive veer (6 inches left over 5 feet). Our drive has pretty equal friction so idk whats causing it to veer. And the frustrating part is that it still veers, whether we use gyro or encoders to correct it.

    Ya you are probably just not doing a good enough job of correcting it. I usually run 2 PID loops, 1 for straight distance and 1 for course correction. Then it is as easy as increasing kp on the course correction controller until it is stable.

 

or Sign Up to reply!