![]() |
Reset navX roll
Is there a way to zero the navx roll midgame?
|
Re: Reset navX roll
Quote:
Roll and Pitch (x and y axis rotation angles): no See this page for detailed description of these terms. Roll/Pitch angle does not drift over time - can you please explain why you would like to reset it, and what you would reset it to? |
Re: Reset navX roll
While I don't think it's supported by navx, you can get around and effectively reset. I would do this by having a reset method which reads the current roll and sets it to a variable (lets say lastResetRoll). Then just subtract lastResetRoll from the current roll whenever you access roll and you have an effectively "reset" roll.
|
Re: Reset navX roll
Quote:
|
Re: Reset navX roll
Quote:
The NavX is performing a sensor fusion algorithm which combines accelerometer and gyro data. When the robot is not moving, the accelerometers will read a constant 1G vector due to gravity, and this vector can be used to trim the pitch/roll readings even with zero gyro movement so they are exact. While moving, the estimated pitch/roll reading can be used to subtract gravity and get vehicle accelerations from an accelerometer reading both gravity and vehicle accelerations. The 'drift' you're seeing is probably the error in the gyros being slowly corrected by the accelerometers. There's also the possibility that you aren't truly flat on the ground, since e.g. a 6wd drop center will have a few degrees of normal chassis rock. |
Re: Reset navX roll
Here, try something like this.
|
| All times are GMT -5. The time now is 00:57. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi