-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Nicla Sense ME Orientation values #53
Comments
Hi @xamix, you are using the wrong SensorClass. SensorOrientation class has been created for |
Hi, Ho okay I will test that, https://docs.arduino.cc/tutorials/nicla-sense-me/getting-started#sensororientation Is it an error in the docs? |
Yes, it is definitely an error and thanks for spotting it. We will fix it asap. |
@giulcioffi Yes I will fix it. Thanks for letting us know! |
Also I have some questions:
|
Do you confirm that the current firmware (to be sure, you could use the sketch https://github.com/arduino/nicla-sense-me-fw/tree/main/Arduino_BHY2/examples/BHYFirmwareUpdate to update the latest BHI260 Firmware) in BHI260AP is 9Dof (it take magnetometer data) and not only 6Dof?
Is it possible to send calibration data or do some calibration for Accelerometer, Gyroscope and Magnetometer (offsets and soft iron) to set into the BHI260AP?
let me know if this helps. |
Hi @bstbud, Thank you very much for all the informations, I already used the https://github.com/arduino/nicla-sense-me-fw/tree/main/Arduino_BHY2/examples/BHYFirmwareUpdate sketch, and thank you to confirm that it's usefull. You said:
But what if the board is powered-up while moving, those offsets calibration will be wrong?? For the So I don't know the format of data to send... You maybe have more informations on the format? |
@BenjaminDannegard |
@xamix
is this what you are asking for?
|
Yes it answer to my question Finally what do you suggest to use (which Sensor) in order to create a compass application which will continuously indicate the North. I need to get the position of the North at any time, maybe the use of Thank you for all your help! |
@xamix With the 9Dof, you get best performance (accuracy, magnetic distortion rejection, better dynamics etc) and fast calibration because of contribution from the gyro at the cost of higher power consumption from the gyro and additional computation. |
For the id (43) Euler, it output Heading in degrees but it seem it is relative to the start position (Heading is 0°after each reboot of the board, position independant), not to the North, so how to offset this to get the North position? |
@xamix there is possibility to reload calibration profiles saved from last calibration if needed and there are APIs to do that. |
Hello @xamix and @bstbud , I am not sure where to start with all the available classes and data format. Is there an example sketch somewhere that reads and prints the Nicla’s absolute orientation? @xamix, do you have by any chance a snippet of code for the compass value? Thanks! |
Hi
In loop()
Hope this helps. |
Hi bstbud, thanks for your answer and advice, thanks to that I can get the euler orientation which is a good starting point! The orientation value works as expected as long as I keep the Nicla flat horizontally, but when I tilt it (along the pitch or roll axis) it’s hard to tell whether it keeps telling north. But I am guessing that’s what 9DOF suggests, it integrates the accelerometer/gyroscope to always show north even under various position/rotation? I’d like to attach the Nicla to a smartphone and stream the heading values over Bluetooth to my location based webapp. I’d like to compare the nicla’s compass to that of a smartphone to see if it gives more accurate results. Thank you for your help. |
Assuming you have done the calibration, when you are tilting the device, the Euler orientation still gives you north, with some restrictions, i.e., you can only tilt or pitch the device less than 90 degrees, and this is due to an intrinsic limitation with Euler representation of orientation. You could learn more info about gimbal lock issue (e.g.: from wikipedia). This restriction exists as long as you are using Euler, and it has nothing to do with 9DOF. 9DOF does bring a lot of advantages such as faster calibration, better dynamics (less delays), better accuracies and stabilities (such as disturbance rejections), but it won't overcome the gimbal lock issue governed by math/physic laws. With quaternion representation of the same orientation, you don't have such a limitation. The quaternion is not as human friendly because it's kind of hard to interpret just by human eyes. However, it's friendly to machines/3D rendering engines. The other point you want to keep in mind is that, when you attaching the Nicla to the phone, there are many sources of magnetic disturbances from different components from the phone such as camera, speaker, charging coil etc and they may disturb or distort the mag flux and hence the orientation result around the Nicla. So you have to note about that. |
Description of defect
The orientation sensor on Nicla Sense ME board output bad values.
Target(s) affected by this defect ?
Nicla Sense ME
Toolchain(s) (name and version) displaying this defect ?
Arduino 2.0.0-Rc5
What version of Mbed-os are you using (tag or sha) ?
3.0.1 Arduino OS Nicla Boards
1.0.4 Arduino_BPHY2
What version(s) of tools are you using. List all that apply (E.g. mbed-cli)
3.0.1 Arduino OS Nicla Boards
1.0.4 Arduino_BPHY2
How is this defect reproduced ?
Running the following program lead to output bad values on PITCH ROLL and YAW (the values barrely change):
Output:
Is there anything to do in order to get it work?
Regards.
The text was updated successfully, but these errors were encountered: