Skip to content

A ROS2 Compatible node that interfaces with the BNO085 IMU sensor via python

License

Notifications You must be signed in to change notification settings

robert-stevenson-1/BNO085-ROS2-Node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BNO085-ROS2-Node

A ROS2 Compatible node that interfaces with the BNO085 IMU sensor via python

Requirements

TODO: Added Requirements.txt

The node communicates with the BNO08x via i2c on the Raspberry Pi and Python. The required software/libraries to run this code:

I2C Setup

The Raspberry Pi hardware I2C implementation doesn't handle clock stretching due to a bug. This is a problem when using the BNO085 (and it's cousins it appears, the BNO55 and BNO080) because it causes the crashes when the sensor is communicating with the Pi's programs.

There are 2 recommended options across the internet:

  • Slow the I2C Clock
    • This didn't work well for me, as continues to crashed the script, or if too low wouldn't even detect the sensor.
    • Also follow the suggestion in this hookup guide and setting the Clock faster @400KHz made it worst and crashed more quickly
  • Configure and Use software I2C instead which supports clock stretching at the cost of a slight increase in CPU usage.
    • Using this guide in addition to the previous link, I update the code the use the software I2C interface with SDA on GPIO23, and SCL on GPIO24 and giving the bus id 3

As an extra: config.txt on ubuntu on the Pi is located in /boot/firmware/config.txt instead of /boot/config.txt

Test Setup

  • Platform: Raspberry Pi 4
  • OS: Ubuntu 22.04.2 LTS
  • ROS: ROS2 Humble
  • Python: 3.10.6

About

A ROS2 Compatible node that interfaces with the BNO085 IMU sensor via python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages