Kauai Labs navX2-MXP User Manual page 46

Robotics navigation sensor
Table of Contents

Advertisement

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

Advertisement

Table of Contents
loading

Related Products for Kauai Labs navX2-MXP

Table of Contents