Kauai Labs navX-MXP User Manual page 51

Robotics navigation sensor
Table of Contents

Advertisement

Examples
Collision Detection (FRC)
In the sample code shown below, both the X axis and the Y axis jerk are calculated, and if either
exceeds a threshold, then a collision has occurred.
The "collision threshold" used in these samples will likely need to be tuned for your robot,
since the amount of jerk which constitutes a collision will be dependent upon the robot mass
and expected maximum velocity of either the robot, or any object which may strike the robot.
FRC C++ Example
Full C++ Source Code
FRC Java Example
Full Java Source Code
FRC LabView Example
The navX-MXP AutoBalance LabView example shows how to make small modifications to the
LabView "FRC RoboRIO Robot Project" using the "Mecanum Robot" configuration to
implement collision detection.
RobotMain.vi
Place the NavX main vi on the block diagram and set it up to your needs. The default sample
48

Hide quick links:

Advertisement

Table of Contents
loading

Related Products for Kauai Labs navX-MXP

Table of Contents