Problem statement: the absolute orientation describes the heading of the robot with respect to north/south/east/west and is usually derived from magnetic field. However, the IMU came with Turtlebot does not have support magnetic field detection.
Solution: disable the orginal Turtlebot IMU and replace it with a new IMU that has magnetic field reading
Materials:
- Jumper wires
- Breadboard
- TTL USB converter
- Adafruit 9-DOF Absolute Orientation IMU Fusion Breakout — BNO055
Changes on Turtlebot:
To disable the Turtlebot IMU, we need to modify OpenCR source code. My modified code is here.
To connect BNO055 to Turtlebot, clone this repo to your Turtlebot, it also includes physical wiring of the sensor.
Once it’s set up, you should be able to launch the sensor in your Terminal
roslaunch ros_imu_bno055 imu.launch serial_port:=/dev/ttyUSB0 operation_mode:=NDOF_FMC_OFF use_magnetometer:=True
Suggestions:
- use dmesg to check the port number of your usb
- You don’t need a Turtlebot to experiment, just plug the sensor into your laptop, install the ROS packages and try it out first