Skip to content

[ROS][feat] Enable IMU sensor

Tong Fu requested to merge ROS/feat/EnableImuSensor into master

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.

gravity

What remains to solve

Edited by Tong Fu

Merge request reports