Quote:
Originally Posted by jakemochas
Unlike last year, however, this year we used a gyro to make the controls for the drive field-centric. If our driver pushes the joystick away from himself, the robot moves away from him regardless of the robot’s orientation.
|
Thanks for giving the layout and it makes sense given that it is possible to drive field centric.
I have to ask... what language are you using to program?
I looked into the gyro class (I use c++ wind-river) and found this:
Code:
/**
* Reset the gyro.
* Resets the gyro to a heading of zero. This can be used if there is significant
* drift in the gyro and it needs to be recalibrated after it has been running.
*/
void Gyro::Reset()
How did you solve the problem for potential drift? Is there something you calibrated against to keep it in line? How reliable can it keep its heading? Does it matter where the gyro is placed on the robot?
Also I want to make a correction from the last entry... "spin and pivot" is different from "slide turns". Watch this video (sorry some of you have seen this before).
www.termstech.com/files/SwerveDriveDemo.wmv
The slide turns... are turns made in slide mode where slide mode is a toggle button pressed. This is robot-centric and does not require a gyro... the way it works is that there is a fundamental desired linear and angular velocity that get translated. The slide mode is a simpler case of not applying centripetal force to keep the robot driving in a straight line. It is like playing asteroids using the thrust button. Since we apply force for centripetal force we can be aware of how much force is applied at all times and dampen the overall velocity (without sacrificing direction) to stay within a limited amount of force. This helps prevent the robot from an accidental tip over... and with our high CG this year... that comes in handy.