|
Re: Accurately "Arcing" in Auton/Hybrid Mode
One way to look at it is that you're constantly trying to maintain a ratio between your left and right sides.
When you're going straight, the encoders/GTS's on your left and right sides should maintain a 1:1 ratio. If substantially less or more, you need to adjust.
When you're turning, you can determine the ratio based on the radius of the turn you want and the width of your robot, which can be dynamic and fed to the system by your robocoach.
Then you can use a PID feedback loop to determine the correct PID values to maintain the desired ratio.
One thing I found while coding 1281's auto mode though, is that motor glide is a problem. I coded a turn that was about the radius in the pits when run while the robot was stopped, but since the robot carried a lot of speed into the turn, the same corner voltages resulted in a barely perceptible left turn. I recommend putting the victors into BRAKE mode instead of GLIDE mode, that might help (don't know if it actually would, I didn't get to test that theory). Another issue we had was our gear tooth sensors seemed to only count about 60% of the gear teeth when the robot was running at high speed, but worked fine in the pits if we many turned the wheels slowly.
|