Skip to content

IMU Driver and Visualization

Hint

The operating environment and software and hardware configurations are as follows:

  • OriginBot Pro
  • PC:Ubuntu (≥22.04) + ROS2 (≥humble)

IMU driver

After successfully connecting to OriginBot through SSH, enter the following command in the terminal to start the robot chassis and IMU:

ros2 launch originbot_bringup originbot.launch.py use_imu:=true

image-20220822150712051

Data visualization

On the PC side of the same network, install the IMU plug-in in Rivz:

sudo apt install ros-${ROS_DISTRO}-rviz-imu-plugin

Then start the host computer visualization software:

ros2 launch originbot_viz display_imu.launch.py

You can see the visualized IMU information. If you shake the robot, the coordinate system in Rviz will also move accordingly. img

Hint

Make sure that Ubuntu+ROS2 system has been installed on the PC, and the originbot_desktop code repository has been downloaded and compiled. In addition, you can also use "ros2 run rviz2 rviz2" to start Rivz2 separately, manually configure Fixed Frame to select base_link, add imu display items, and subscribe to imu topics to achieve similar effects.

图片1