Yarp: imuBoschBNO055 has wrong conversion formulas for gyro and magnetometer

Created on 5 Jun 2019  路  5Comments  路  Source: robotology/yarp

In the imuBoschBNO055 implementation there are these conversion formulas:

        // Fill in accel values
        data_tmp[3] = (double)raw_data[0] / 100.0;
        data_tmp[4] = (double)raw_data[1] / 100.0;
        data_tmp[5] = (double)raw_data[2] / 100.0;


        // Fill in Gyro values
        data_tmp[6] = (double)raw_data[6] / 100.0;
        data_tmp[7] = (double)raw_data[7] / 100.0;
        data_tmp[8] = (double)raw_data[8] / 100.0;

        // Fill in Magnetometer values
        data_tmp[9]  = (double)raw_data[3] / 100.0;
        data_tmp[10] = (double)raw_data[4] / 100.0;
        data_tmp[11] = (double)raw_data[5] / 100.0;

Looking in the Bosch documentation the unit measure are for gyro:
image

and for magnetometer:
image

Then it seems that the values have to be divided by 16.0 instead 100.0.

I ran a simple test moving the joint 0 of the head up to 20 deg @ 20 deg/s recording the gyro

BEFORE (using 100 as scaling factor)

image

AFTER (using 16 as scaling factor)

image

YARP v3.1.2 Devices YARP v3.2.0 Bug Fixed Release Blocker

All 5 comments

How do you know that the AFTER plot is correct?

Ah, I got it. The average speed of the min jerk movement is 20 deg/s, so the peak needs to be greater of that.

cc @prashanthr05 @nunoguedelha

This bug affects all the iCub robots containing an imuBosch_BNO055. In particular, the gyro and magnetometer data contained in /icub/inertial have been always not correct, for all YARP/icub-main releases.
The problem does not affect older iCub that use an XSens IMU.

Another confirmation using the iKinGazeCtrl:

BEFORE

ezgif com-video-to-gif(2)

AFTER

ezgif com-video-to-gif(6)

There are a few issue that could be actually caused by this:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

traversaro picture traversaro  路  3Comments

diegoferigo picture diegoferigo  路  3Comments

CarlottaSartore picture CarlottaSartore  路  3Comments

xEnVrE picture xEnVrE  路  3Comments

jeljaik picture jeljaik  路  3Comments