How do we zero the yaw (and other parameters for that matter) on the NavX board? We tried using the Z900_NavX_set_zeroyaw.vi but nothing happens. We run the vi at the beginning of our autonomous code to try to reset our robot position before we drive.
In general, Zeroing the Yaw does not take effect until the board has completed it’s Initial Yaw Offset calibration, which is described in the navX-MXP Calibration Process documentation.
Once calibration completes, the yaw can be zeroed at any time.
In addition, a resolution was just release for an issue in the LabVIEW Library in this area. If an attempt was made to zero the yaw immediately after opening it, failures might occur. The updated library that resolves this issue is here: Release navX Library v2.0.5.0 · FRC900/navX-MXP-LabVIEW · GitHub
Is there a way to tell when the start-up calibration is complete? We are just now revisiting the Navx for autonomous and we’re unable to zero any parameters. Are we not waiting long enough before resetting them to zero? Does the start-up calibration happen every time the RoboRio restarts code after a download or only on power-up?
In fact we’re even getting very strange results from ‘displacement’ as well. Not a continuously increasing value when the robot drives forward but almost a velocity reading.
As long as you’re running navX-MXP firmware version 2.0 or higher and you are using the 2.0 LabVIEW Library, you can check whether calibration is complete via the Z900_navX_Get_SystemInformation_Status.vi. This VI outputs a status cluster with a “Calibration Status” indicator; calibration is complete when it’s value is IMU_CAL_STATE_COMPLETE.
The estimated displacement values are not accurate enough for tracking robot position to the accuracy typically needed for FRC robotics. There’s more information on this at the navX-MXP Frequently Asked Questions page.
We’re now using the Z900_navX_Get_SystemInformation_Status.vi to check for IMU_CAL_STATE_COMPLETE. That works. Initially we still couldn’t zero the YAW though until we noticed a strange phenomenon. If we invoke the SET_YAW_ZERO.vi twice in a row the YAW value zeroes perfectly every time . I have no explanation for that but it appears to be solid. We will do more testing on that tonight.