Skip to content

Software

libbno055-linux

From github.com/lazytatzv/libbno055-linux (opens in a new tab)

  • Perception
  • Driver or SDK
  • MIT

C++17 driver and ROS 2 nodes for the Bosch BNO055 9-axis IMU on Linux, with Python, C and Rust bindings.

Facts

GitHub stars
3read on 28 Nov 2026
Last update
23 Aug 2026Newest commit on main
Maintenance
Maintaineda commit in the last 12 months
Difficulty
Beginner

Checked on GitHub on 28 Nov 2026.

Licenses

Code
MIT (opens in a new tab)

Read by Robotheca from LICENSE (opens in a new tab) (MIT) at commit 1de4ace (opens in a new tab), on 16 Oct 2026.

Commercial use
Yes

At a glance

What it is
In its creator's words: Open the repository on GitHub (opens in a new tab)
Robots on Robotheca
No robot on Robotheca uses it yet.
Licence
MIT. Commercial use: Yes. Where it was read
Maintenance
Maintained, last commit on 23 Aug 2026.

Use it

How to install it, in the creator's words: Open the repository on GitHub (opens in a new tab)

Robotheca doesn't review code. Read it before running it.

Files and versions

Facts read at commit 1de4ace

Robotheca never hosts the code: each link goes to the creator's own page.

The README

The creator's own README, copied as written: README.md by @lazytatzv, at commit 1de4ace, under MIT (opens in a new tab). The original on GitHub (opens in a new tab).

Read the README here

libbno055-linux

(opens in a new tab) (opens in a new tab) (opens in a new tab) (opens in a new tab) (opens in a new tab)

A C++17 driver for the Bosch BNO055 9-axis IMU on Linux, with first-class ROS 2 integration.

BNO055 Visual Dashboard


Components
ComponentDescription
Hardware DriverC++17 I2C/UART driver for the BNO055. Handles initialization, sensor reads, calibration, and transport recovery.
ROS 2 PackageComposable and Lifecycle nodes publishing sensor_msgs/Imu, sensor_msgs/MagneticField, and diagnostics.
Python Bindingspip install libbno055-linux → import libbno055
Rust Cratecargo add libbno055
C APIStable C99 FFI interface (bno055_c.h)
Heading ControllerOptional PID-based straight-line correction for differential-drive robots. See docs/HEADING_CONTROL.md (opens in a new tab).

Quick Start
ROS 2 — IMU Driver Node
ros2 launch libbno055_linux bno055_launch.py

Published topics:

  • /imu/data — sensor_msgs/Imu (quaternion, angular velocity, linear acceleration)
  • /imu/mag — sensor_msgs/MagneticField
  • /diagnostics — diagnostic_msgs/DiagnosticArray

For Nav2 Lifecycle Manager:

ros2 launch libbno055_linux bno055_launch.py node_type:=lifecycle
C++17
#include "libbno055-linux/bno055.hpp"

bno055lib::BNO055 imu(0x28, "/dev/i2c-1");
imu.begin(bno055lib::OpMode::NDOF);

auto quat = imu.getQuaternionNoexcept();
if (quat) {
    // quat->w, quat->x, quat->y, quat->z
}
Python

Note: The pip package name and the Python module name differ. Install: pip install libbno055-linux — Import: import libbno055

pip install libbno055-linux
import libbno055
imu = libbno055.BNO055(address=0x28, device="/dev/i2c-1")
imu.begin(libbno055.OpMode.NDOF)
q = imu.get_quaternion()
Rust
cargo add libbno055

Driver Features
Hardware Driver (C++17)
  • I2C and UART transport backends with POSIX drivers
  • Automatic transport recovery on bus errors and communication failures
  • 18-byte sequential burst read for Accel + Mag + Gyro in a single transaction
  • Stale Data Deduplication Filter — eliminates duplicate frame publishing in ROS 2
  • Configurable sensor output data rates in AMG mode (up to Accel 1 kHz / Gyro 2 kHz ODR)
  • Optional background polling thread for continuous non-blocking reads
  • Calibration management — save and load sensor offsets to/from file

Empirical Benchmark (RDK X5 Hardware Validation)

Tested out-of-the-box on RDK X5 (Sunrise RDK) via standard Linux /dev/i2c-5 interface with zero tuning or custom OS setup:

RDK X5 Hardware Benchmark Results

MetricMeasured ValueTarget / Hardware LimitNote
NDOF Sampling Rate82.57 Hz100 Hz (Hardware Limit)~83% of physical Cortex-M0 fusion limit
I/O Burst Read Latency1.99 ms< 5.0 ms18-byte sequential burst read over default I2C
Timing Jitter (StdDev)0.73 ms< 1.0 msSub-millisecond interval jitter out-of-the-box

For the full API including GPIO interrupts, axis remapping, power modes, and operating modes, see docs/API_REFERENCE.md (opens in a new tab).

ROS 2 Package
  • Composable Component (rclcpp_components) — zero-copy intra-process transport
  • Managed Lifecycle Node (rclcpp_lifecycle) — Nav2 Lifecycle Manager integration
  • Isolated CallbackGroups — sensor publishing isolated from diagnostics and services
  • MultiThreadedExecutor — parallel callback execution
  • Linux SCHED_FIFO support — optional real-time thread priority
  • Dynamic Parameters — update parameters at runtime via ros2 param set

Installation
Option A: apt (ROS 2 binary)
sudo apt update
sudo apt install ros-$ROS_DISTRO-libbno055-linux

The apt binary is updated periodically by ROS Buildfarm. For the latest release (v1.9.0), build from source.

Option B: vcstool (recommended for team/production workspaces)

Add this package to your robot's .repos file:

# robot.repos
repositories:
  libbno055-linux:
    type: git
    url: https://github.com/lazytatzv/libbno055-linux.git
    version: v1.9.0

Then import and build:

cd ~/ros2_ws
vcs import src < robot.repos
rosdep install --from-paths src --ignore-src -r -y
colcon build
source install/setup.bash

To update to a new version, change version: in the .repos file and run vcs import src < robot.repos again.

Option C: colcon (ROS 2 source build)
cd ~/ros2_ws/src
git clone https://github.com/lazytatzv/libbno055-linux.git
cd ~/ros2_ws
rosdep install --from-paths src --ignore-src -r -y
colcon build --packages-select libbno055_linux
source install/setup.bash
Option D: CMake (standalone C++ library)
git clone https://github.com/lazytatzv/libbno055-linux.git
cd libbno055-linux
mkdir build && cd build
cmake ..
make -j$(nproc)
sudo make install

ROS 2 Parameters

Key parameters (see config/bno055_params.yaml (opens in a new tab) for the full list):

ParameterDefaultDescription
device/dev/i2c-1I2C device path
address0x28I2C slave address
publish_rate_hz100Sensor publish rate (Hz)
frame_idimu_linkROS TF frame ID
imu_offset_x0.0Forward physical offset from robot center of mass (m) for Lever Arm / TF
imu_offset_y0.0Leftward physical offset from robot center of mass (m) for Lever Arm / TF
imu_offset_z0.0Upward physical offset from robot center of mass (m) for Lever Arm / TF
...

Documentation

License

MIT License (opens in a new tab)

Robotheca lists software as a reference: nothing is hosted or run here, and every fact links to where it was read.