Quote:
Originally Posted by shawn.schwartz
Thank you for the helpful links!
The main goal I want to accomplish with these resources is to implement a drive straight system with our tank drive code. I am having trouble figuring it out. Essentially I want to use the gyroscope to run and check if the robot is zeroed, (when in a "drivestraight" command), so that if it comes out of alignment, then it will "re-zero" itself, and continue driving straight.
|
This might give you some ideas:
http://www.chiefdelphi.com/media/papers/2438
edit:
I should have mentioned: If your vehicle is not driving straight when so commanded, check the hardware first before trying to correct it in software. Check drivetrain alignment and friction on left & right sides. Check your wiring to make sure you don't have asymmetric voltage drops left vs right. Check the left & right motors to make sure they have similar performance curves.