![]() |
Help in Driving Straight
Greetings,
Our robot does not drive straight with the current code we have. We are using different methods to make it drive straight with encoders and gyros. However, these methods are causing it to veer to one side. Code:
public class AutonomousDrive extends CommandBase { |
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. |
Re: Help in Driving Straight
Quote:
|
Re: Help in Driving Straight
2 problems our team found:
As mentioned before, calibrate your talons (if that's what you're using). Second, make sure the bearings flanges inside of your gearbox is in the right orientation, so they're not grinding together, slowing one side down. |
Re: Help in Driving Straight
Quote:
|
Re: Help in Driving Straight
How do you calibrate a Talon?
|
Re: Help in Driving Straight
Quote:
|
Re: Help in Driving Straight
The calibration sounds easy. Thank you.
|
| All times are GMT -5. The time now is 17:59. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi