Kauai Labs navX2-MXP User Manual page 49

Robotics navigation sensor
Table of Contents

Advertisement

Examples
Automatic Balancing (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.
Finally, the navX-sensor "Pitch" (X-axis) and "Roll" (Y-axis) angles are continuously compared to a
"out of balance" threshold, at which point the corresponding axis motor output value is derived from the
inverse of the sin of that angle, until the time when that same angle falls below the "in balance" threshold.
46

Advertisement

Table of Contents
loading

Related Products for Kauai Labs navX2-MXP

Table of Contents