[ROS][feat] Enable IMU sensor
Goal
Enable the reception of IMU messages so that the gravity constraint can be used in ros wrapping.
Changes
- A function called
ImuCallback
is added to LidarSlamNode in ros wrapping. It adds imu accelerations into GravityManager.
Results
Commands to reproduce the results
- Change the parameters :
- imu/enable=true
- imu/gravity_weight=100.
roslaunch lidar_slam slam_ouster.launch
rosbag play --clock path/to/ouster_bag_with_imu.bag
Note: when play the rosbag, check the topic name of points and imu. If they are different from /ouster/points
and /imu
, change the topic name by using the following command:
rosbag play --clock path/to/ouster_bag_with_imu.bag /os_cloud_node/points:=/ouster/points /os_cloud_node/imu:=/imu
Results
- Here is an image to show an acceleration vector on axis_Z dans frame
gravity
. The direction of this vector is perpendicular to the floor.
What remains to solve
-
Edit ROS1/ROS2 issue
Edited by Tong Fu