Quote:
Originally Posted by nandeeka
The NavX MXP is probably less useful in teleop, where a person can correct for any inaccuracies in the robot's travel. If you wanted to implement a button that makes the robot just go straight forward/back or turn a certain amount it could be useful.
|
Team 2465 has added four buttons to our driver station:
- Rotate to 0 degrees
- Rotate to -90 degrees
- Rotate to 180 degrees
- Rotate to 90 degrees
While we use a holonomic drive system (Mecanum), as long as your robot can spin, you can use during this during teleop when your robot is standing still. And you can get that to work while driving (to, say, ensure you are driving in a straight line) by working out the commands to your drive class that would cause it to turn a bit while driving in the current direction.
I'm not aware of any drop-in code for these features on a tank-drive style robot.
However, if you think it'd be helpful, I can point you to some FTC code that uses navX-Micro to control a two-wheeled tank-drive robot to "drive straight" using a PID controller - just let me know if you think that might be helpful. With some work, you might be able to port that to a FRC robot using the WPI Library.