Repo symbol

lego-loam-ros2 repository

Repo symbol

lego-loam-ros2 repository

Repo symbol

lego-loam-ros2 repository

Repo symbol

lego-loam-ros2 repository

Repository Summary

Description 支持ROS2 Humble版本的LeGO-LOAM
Checkout URI https://github.com/fishros/lego-loam-ros2.git
VCS Type git
VCS Version master
Last Updated 2024-03-30
Dev Status UNKNOWN
Released UNRELEASED
Tags No category tags.
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
lego_loam_sr 1.0.0
cloud_msgs 1.0.0

README

LeGO-LOAM-ROS2

This code is a fork from LeGO-LOAM-SR to migrate LeGO-LOAM algorithm to ROS2 humble.

This code only done minor change to migrate LeGO-LOAM-SR from ROS2 dashing to ROS2 humble, since there are some syntax difference in rclcpp between dashing and humble.

This code does not modify and/or improve the original LeGO-LOAM algorithm.

1. About the original LeGO-LOAM

LeGO-LOAM contains code for a lightweight and ground optimized lidar odometry and mapping (LeGO-LOAM) system for ROS compatible UGVs. The system takes in point cloud from a Velodyne VLP-16 Lidar (palced horizontal) and it outputs 6D pose estimation in real-time. A demonstration of the system can be found here -> https://www.youtube.com/watch?v=O3tz_ftHV48

drawing

2. Dependencies

  wget -O ~/Downloads/gtsam.zip https://github.com/borglab/gtsam/archive/4.0.0-alpha2.zip
  cd ~/Downloads/ && unzip gtsam.zip -d ~/Downloads/
  cd ~/Downloads/gtsam-4.0.0-alpha2/
  mkdir build && cd build
  cmake ..
  sudo make install
  
  sudo apt install python3-colcon-common-extensions
  

3. Compile

You can use the following commands to download and compile the package.

mkdir -p ~/dev_ws/src
cd ~/dev_ws/src
git clone https://github.com/Thuniinae/LeGO-LOAM-ROS2.git
cd ..
colcon build

4. The system

LeGO-LOAM is speficifally optimized for a horizontally placed lidar on a ground vehicle. It assumes there is always a ground plane in the scan.

The package performs segmentation before feature extraction.

drawing

Lidar odometry performs two-step Levenberg Marquardt optimization to get 6D transformation.

drawing

5. New sensor and configuration

To customize the behavior of the algorithm or to use a lidar different from VLP-16, edit the file config/loam_config.yaml.

One important thing to keep in mind is that our current implementation for range image projection is only suitable for sensors that have evenly distributed channels. If you want to use our algorithm with Velodyne VLP-32c or HDL-64e, you need to write your own implementation for such projection.

If the point cloud is not projected properly, you will lose many points and performance.

The IMU has been remove from the original LeGO-LOAM code.

6. Run the package

System can be started using the following command:

echo source /opt/ros/noetic/setup.bash >> .bashrc
echo source /opt/ros/humble/setup.bash >> .bashrc
echo source ~/dev_ws/install/setup.bash >> .bashrc

open another terminal

ros2 launch lego_loam_sr run.launch.py

  • for some unknown reason, launching the package right after sourcing ros and workspace in the same terminal may cause error.

Some sample bags can be downloaded from here.

6.1 Run ROS1 rosbag

To use rosbags from ROS1, plugin rosbag_v2 can be usefull.

Play rosbag using rosbag_v2:

File truncated at 100 lines see the full file

Repo symbol

lego-loam-ros2 repository

Repo symbol

lego-loam-ros2 repository

Repo symbol

lego-loam-ros2 repository

Repo symbol

lego-loam-ros2 repository