Skip to content

IMU Driver and Visualization

Hint

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

  • OriginBot Robot(Navigation Version)
  • PC:Ubuntu (≥20.04) + ROS2 (≥Foxy)

IMU driver

After the SSH connection to OriginBot is successful, enter the following commands 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 visual IMU information, and when you shake the robot, the coordinate system in Rviz will also follow the motion. img

Hint

Make sure that the Ubuntu+ROS2 system has been installed on the PC, and the download and compilation of the originbot_desktop code repository have been completed. In addition, you can also use "ros2 run rviz2 rviz2" to start Rivz2 independently, manually configure the Fixed Frame to select the base_link, add imu display items, and subscribe to imu topics, you can also achieve a similar effect.

图片1