-
Notifications
You must be signed in to change notification settings - Fork 298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added setAxisRemap and setAxisSign functions #38
Conversation
Added these two functions to allow remapping of the axis and reversal of their direction also. The developer can then use the macros already provided in the original header.
Argh just realised this was already implemented! |
Axis and sign remapping is implemented, but how to call it as |
@ronzeiller are you having a problem with a specific function? Can you give a code snippet or example? |
@mrkaroshi
This is perfect and exactly what I was looking for:
but I cannot find these functions in the official library. And nothing similar? And, btw do you know if other axis remappings e.g. for upright use of the sensor are also ok? |
@ronzeiller if by 'upright' you mean remapping, say X to Z and Z to X, then the datasheet (on page 25) implies you can only have the sensor face down or face up. Technically, if you imagine rotating the sensor around the X axis, you could just read the data from the Y axis into your Z variable, then invert the Z axis values before putting them into your Y variable. If you do something like that, however, remember to apply offsets to your accelerometer accordingly (page 31) so that gravity is removed from Y instead of Z (for my specific example). Does that answer your question ok? |
Agree with this
OK, this is clear so far
This I do not understand. I thought the offsets are done automatically by the sensor fusion. Thank You for your effort, but even in the Bosch default's position this sensor does not work for me. Wanted to use it as compass for boating, but the heading is inferior and even when laying somewhere without any movement you can watch the value turning..... |
@ronzeiller which axis drifts? Is the sensor near any sources of interference? Have you tried putting the BNO into Compass mode? I know magnetometers are mainly used for heading, depending on the sensor fusion balance, but they can be influenced by electromagnetic fields etc That last part is about compensating the accelerometer to account for an orientation the BNO isn’t really designed for, even though it has a pretty robust fusion algorithm it’s still getting data from three sensors simultaneously - if one of them is accumulating noise, or worse drifting, your final orientation value will shift over time also. Page 43 of the datasheet explains a calibration procedure you can go through to get the best from the individual sensors, but also a register you can check to make sure the device has finished calibrating before you start using it's data. This video shows a few examples of interference and their effect on a hobbyist-grade navigation system. |
Now the sensor was laying without any movement, fully calibrated, without any changes of things nearby. Any ideas what is wrong with it? |
Added these two functions to allow remapping of the axis and reversal of their direction also. The developer can then use the macros already provided in the original header.