vectr-ucla / direct_lidar_inertial_odometry

[IEEE ICRA'23] A new lightweight LiDAR-inertial odometry algorithm with a novel coarse-to-fine approach in constructing continuous-time trajectories for precise motion correction.
MIT License
521 stars 101 forks source link

Add ROS2 support #16

Closed shrijitsingh99 closed 11 months ago

shrijitsingh99 commented 11 months ago

Ported over the entire code to ROS2 Major changes:

kennyjchen commented 11 months ago

Awesome -- thanks @shrijitsingh99 for porting DLIO to ROS2, it looks great! I've gone ahead and changed the base branch to feature/ros2. Thanks for the contribution :^)

juliangaal commented 11 months ago

Have you considered the changes to the sensor / lidar frame when working with Ouster data? @shrijitsingh99

Some recent discussions about it here: https://github.com/ouster-lidar/ouster-ros/issues/33

shrijitsingh99 commented 11 months ago

I don't think any changes are needed here. From the discussion my understanding is that the data is by default published in sensor frame which the default extrinsics in the yaml reflect. If some user changes the frames they would need to update the extrinsic in the config file here.

The frame_id in the point cloud message itself doesn't affect the algorithm.

yashmewada9618 commented 4 months ago

System: Ubuntu 22 ROS Version: Humble

Hello, I used DLIO's ROS Noetic version, and it worked perfectly in the first run. However, when I converted the same bag file to ROS 2, things did not work out. After initializing the node, it worked for a short while, but as soon as the robot started moving, the pose estimation got messed up which I think is due to IMU's integration and pose estimation. The local maps from DLIO started moving in the Z direction instead of the correct forward motion. I tried changing the frames (as the Ouster lidar frame and sensor frames are rotated by 180 degrees), and calibration time, but it did not help. I noticed a notable change when I modified the gravity bias from 9.8 to -9.8 in the config file, where the pose estimation translated correctly, but the orientation was wrong. Has anyone else experienced this issue with the ros2 branch of this code?

Thanks.