Is there a way to reconfigure the NavX to swap the roll and pitch? I cant find anything on doing that. It has autocalibration to swap the vertical axis for yaw, but doesn’t seem to give the ability to change the roll and pitch.
We mounted ours vertically, re-calibrated it (with the button) and it seems that getRoll() is perfectly reliable to detect the charge station. No switching needed.
You would need to change the mounting orientation of your RoboRIO/navX.
Ours is mounted horizontally on top of the RIO and getRoll()
works just fine.
Is there a reason you would like to change them? The two axes are implemented in the same manner underneath, just accessed by different functions.
In theory it should be fine, but I want the ability to reset the Roll which apparently isn’t possible through the API only able to reset the yaw or pitch. And I understand that you could just apply an offset to simulate a zeroing, but its just simpler to have an API call. Plus its just slightly annoying to have to remember to use getRoll() instead of getPitch() when looking for the pitch vs roll.
Yes, with omnimount: https://pdocs.kauailabs.com/navx-mxp/installati
It’s not an api solution, though. You can also create another object that has a getRoll method that calls the gyro getPitch method, or whatever is needed instead.
I create methods like getYawCCW that gives the inverse of getYaw for calculations needing ccw positive values.