Quote:
Originally Posted by baronep
Does anyone have any ideas as to how to do this?
|
The basic idea is pretty simple. Use the yaw rate sensor to derive a "current heading" measurement value; the gyro support in the library does that for you. Maintain a "desired heading" control value, using joystick input to change the desired value. Tie the two of them together as the feedback and control parameters of a PID system, using the output of the PID as the "rotation" input of the mecanum drive.
I hope enough of that makes sense to give you a place to start.