ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A answers.ros.org

ROS2 BNO055 driver

I’m working on a Raspberry Pi quadcopter on ROS2 (more on that in a later post) and I selected the popular BNO055 sensor as the IMU. It has good support and seems to be quite widely used in the hobby community.

There are already ROS1 drivers (mdrwiega, dheera and joeyjyyang), a non-ROS driver (fm4dd) and also a ROS2 driver by flynneva (python-based, UART using pyserial) but there are no ROS2 C++ drivers using the official Bosch Sensortec package.

The driver can be found here. It uses I2C, but could easily be expanded to support UART communication (the Sensortec package supports both). The driver doesn’t support calibration or reset at the moment. Contributions are welcome.

In particular I could do with some help with an issue I’ve found. At the moment the Euler angles (RPY) produced by the EKF seem inconsistent with the Quaternion output [link].

3 Likes

Nice idea.

I’d like to get involved! I’ll move the conversation to the issue you linked when I get to it.

Hi @Brian_Holt !

In general there is not a unique definition of RPY/Euler Angles and how they are mapped to Rotation matrices/quaternion across different domains, so specific care in actually determining the semantics of the information provided by the sensor/software and not blindly assuming that it follows the same RPY convention used in ROS is tipically required. and that is unfortunatly the case even with the BNO055 .

You can find some information on the output format supported by the BNO055 in the section 3.6.2 (see https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bno055-ds000.pdf), but unfortunatly the description of the provided Euler angles is not mathematically complete and unambigous. We had the exact same problem on the iCub robot, and what we did in practice was just to inspect the provided data and found a way to convert the BNO055 default Euler Angles rappresentation to the one used in YARP (that fortunatly is the same used also in ROS and OPC UA).

In practice the mapping that is now implemented on the iCub firmware driver for bno055 is the one that you can find in icub-firmware/embot_app_application_theIMU.cpp at v1.20.0 · robotology/icub-firmware · GitHub, but I guess also this needs to be checked again on the ROS driver instead of assuming blindly that it applies also there, even if it seems that this is consistent with the conclusion that you found in Published Euler angles are inconsistent with published quaternion · Issue #3 · bdholt1/ros2_bno055_sensor · GitHub .

You can find some references to this in:

2 Likes