![Kauai Labs navX2-MXP User Manual Download Page 46](http://html1.mh-extra.com/html/kauai-labs/navx2-mxp/navx2-mxp_user-manual_3634856046.webp)
Examples
Rotate to Angle (FRC)
Teleop.vi
The Teleop.vi is modified to feed the current navX-sensor “Yaw” angle reading to the Holonomic Drive
VI, which rotates the joystick X/Y coordinates by the gyro angle (and thus implements FieldCentric drive
control). Additionally, if a driver joystick button is pressed, the navX-sensor “Yaw” angle is reset to zero.
This example also includes a “Rotate to angle” feature, using a PID controller; note that if “Rotate to
Angle is used while in motion, it causes the robot to drive in a straight line, correcting for lateral drift.
43