View Single Post
  #2   Spotlight this post!  
Unread 29-01-2014, 20:49
otherguy's Avatar
otherguy otherguy is offline
sparkE
AKA: James
FRC #2168 (The Aluminum Falcons)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: CT
Posts: 429
otherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to behold
Re: Help in Driving Straight

How severely does it veer to one side?
Does it always veer to the same side?

What are the units of the getDistance methods? There would be a big difference between adjusting your turn if one wheel was ahead of the other by 0.5 feet vs 0.5 inches.

How did you pick your increaseFactor to divide the distance error by 200?
If the increaseFactor is too small your system will not respond quickly enough to compensate for deviations off your desired heading.

For reference, last year our drive straight code would compensate if we were +/- 1 degree off our heading. Our slow wheel's commanded value would be increased by 10%. this yielded good results on our robot at speeds that were pretty close to our top travel speeds.
__________________
http://team2168.org

Last edited by otherguy : 29-01-2014 at 21:23. Reason: changed response, didn't see you were using two encoders in the code block, makes more sense now
Reply With Quote