0

BNO055 Placement
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

BNO055 Placement

by Masu14 on Thu Dec 15, 2016 10:42 am

Hi all,

I need to place vertically my BNO055 and get YAW, PITCH and ROLL but in a simple rotation some axes derives.
Is it possible to place it vertically or i should use one of orientation described in 3.4 of datasheet?


Thank you in advance!
Giovanni M.

Masu14
 
Posts: 7
Joined: Mon Oct 19, 2015 8:17 am

Re: BNO055 Placement

by franklin97355 on Thu Dec 15, 2016 1:20 pm

It is possible to place vertically but I would follow the recommended orientation for best results.

franklin97355
 
Posts: 22168
Joined: Mon Apr 21, 2008 2:33 pm
Location: Lacomb, OR.

Re: BNO055 Placement

by gammaburst on Thu Dec 15, 2016 6:35 pm

I've had good luck using the axis remap registers to compensate for my vertical mounting orientation. I don't know if Adafruit's library provides convenient access to those registers. I don't use the library.

Beware that the BNO055's Euler output is incorrect at moderate to steep pitch and roll orientations. If you plan to tilt the sensor more than about 20 degrees, I recommend using the quaternion output instead.

gammaburst
 
Posts: 591
Joined: Thu Dec 31, 2015 12:06 pm

Re: BNO055 Placement

by Masu14 on Fri Dec 16, 2016 10:33 am

franklin97355 wrote:It is possible to place vertically but I would follow the recommended orientation for best results.


Thank you very much Mr. franklin97355!


gammaburst wrote:I've had good luck using the axis remap registers to compensate for my vertical mounting orientation. I don't know if Adafruit's library provides convenient access to those registers. I don't use the library.

Beware that the BNO055's Euler output is incorrect at moderate to steep pitch and roll orientations. If you plan to tilt the sensor more than about 20 degrees, I recommend using the quaternion output instead.



I've tried to remap registers following bosch's datasheet and Adafruit_BNO055 library; unfortunately sensor holds its default configuration P1.
Do you have any suggestion about this?


In the same way i've tried to read quaternion values and convert them to Eulers but the result is incorrect.
Do you have any suggestion about this?


Thank you in advance!

Masu14
 
Posts: 7
Joined: Mon Oct 19, 2015 8:17 am

Re: BNO055 Placement

by gammaburst on Fri Dec 16, 2016 11:53 pm

"sensor holds its default configuration P1" -- Do you mean that writing AXIS_REMAP_CONFIG and AXIS_REMAP_SIGN had no effect? Perhaps you are writing them at the wrong time - the Bosch documentation is sometimes vague and insufficient.

Here's my BNO055 startup procedure:
- assert RST
- wait one microsecond
- deassert RST
- wait 800 milliseconds
- (optional) write the two axis remap registers
- (optional) write my previously stored calibration profile into registers 0x55-0x6A
- write 0x0C (NDOF mode) into OPR_MODE register
- wait 10 milliseconds
- begin reading sensor and fusion data registers every 10 milliseconds.

Beware the BNO055 datasheet uses two spellings:
- AXIS_MAP_CONFIG and AXIS_MAP_SIGN
- AXIS_REMAP_CONFIG and AXIS_REMAP_SIGN.

Be sure you have the current BNO055 datasheet version 1.4.


How are you testing your quaternion-to-euler conversion? Numbers via the serial port? 3D graphics display? Beware the bunny/Processing example is broken.

Remember to normalize the quaternion.

If you use other people's vector and quaternion equations, beware of different axes conventions. This gets confusing!

During my experiments with Adafruit's BNO055 library I used this code to convert quaternion to Euler. It's one of the fixes that I applied to the bunny/Processing example:

Code: Select all | TOGGLE FULL SIZE
  /* Convert quaternion to Euler, because BNO055 Euler data is broken */
  imu::Quaternion q = bno.getQuat();
  q.normalize();
  float temp = q.x();  q.x() = -q.y();  q.y() = temp;
  q.z() = -q.z();
  imu::Vector<3> euler = q.toEuler();
  Serial.print(F("Orientation: "));
  Serial.print(-180/M_PI * euler.x());  // heading, nose-right is positive, z-axis points up
  Serial.print(F(" "));
  Serial.print(-180/M_PI * euler.y());  // roll, rightwing-up is positive, y-axis points forward
  Serial.print(F(" "));
  Serial.print(-180/M_PI * euler.z());  // pitch, nose-down is positive, x-axis points right
  Serial.println(F(""));
I have also successfully used Wikipedia's info and equations:
https://en.wikipedia.org/wiki/Conversio ... Conversion

Hope that's helpful!

gammaburst
 
Posts: 591
Joined: Thu Dec 31, 2015 12:06 pm

Re: BNO055 Placement

by Masu14 on Mon Dec 19, 2016 11:40 am

Mr. gammaburst at first thank you for your reply, it was very helpfully for me!

Now axis remapping, done during my sensor_init, works very well!
Yes, this isn't explained in the bosch's datasheet...


For quaternion-to-euler conversion i didn't call the .normalize() and i hadn't seen that the unit was radians.



Now my bno works fine!



Thanks again and Best regards!
Giovanni M.

Masu14
 
Posts: 7
Joined: Mon Oct 19, 2015 8:17 am

Re: BNO055 Placement

by Konstantin_BY on Wed Dec 05, 2018 10:59 am

I've tried to remap registers following bosch's datasheet and Adafruit_BNO055 library; unfortunately sensor holds its default configuration P1.
Do you have any suggestion about this?


Axises can be remaped only in OPERATION_MODE_CONFIG state.
Reading and writing calibration data is only possible in this state.

Konstantin_BY
 
Posts: 1
Joined: Wed Dec 05, 2018 3:40 am

Please be positive and constructive with your questions and comments.