Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Eduardo Perdices committed Mar 10, 2020
1 parent b64c06a commit 3ab1a73
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 75 deletions.
Binary file removed LeGO-LOAM/launch/jackal-label.jpg
Binary file not shown.
123 changes: 48 additions & 75 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,72 +1,23 @@
# LeGO-LOAM-SR

LeGO-LOAM migrated to ROS2
This code is a fork from [LeGO-LOAM-BOR](https://github.com/facontidavide/LeGO-LOAM-BOR) to migrate [LeGO-LOAM](https://github.com/RobustFieldAutonomyLab/LeGO-LOAM) algorithm to ROS2.

## 1. Run code with Rosbag
This code does not modify and/or improve the original [LeGO-LOAM](https://github.com/RobustFieldAutonomyLab/LeGO-LOAM) algorithm.

Shell 1:
## 1. About the original LeGO-LOAM

```
source /opt/ros/melodic/setup.bash
roscore &
rosbag play *.bag --clock --topic /velodyne_points
```

Shell 2:
```
source /opt/ros/melodic/setup.bash
source /opt/ros/dashing/setup.bash
export ROS_MASTER_URI=http://localhost:11311
ros2 run ros1_bridge dynamic_bridge
```

Shell 3:
```
source /opt/ros/dashing/setup.bash
source ~/dev_ws/install/setup.bash
ros2 launch lego_loam_sr run.launch.py
```

# LeGO-LOAM-BOR

This is a fork of the original [LeGO-LOAM](https://github.com/RobustFieldAutonomyLab/LeGO-LOAM).

This is a "friendly fork", in other words, we will be happy to work with the original authors to merge
these improvements with the original LeGO-LOAM... if they want to!

The original author deserves all the credits, we just use good software engineering practices to
make the code more readable and efficient.

The purpose of this fork is:

- To improve the quality of the code, making it more readable, consistent and easier to understand and modify.
- To remove hard-coded values and use proper configuration files to describe the hardware.
- To improve performance, in terms of amount of CPU used to calculate the same result.
- To convert a multi-process application into a single-process / multi-threading one; this makes the algorithm
more deterministic and slightly faster.
- To make it easier and faster to work with rosbags: processing a rosbag should be done at maximum
speed allowed by the CPU and in a deterministic way (usual speed improvement in the order of 5X-10X).
- As a consequence of the previous point, creating unit and regression tests will be easier.

The purpose of this fork (for the time being) is **not** to modify and/or improve the original algorithm.

Please do not submit to this repository any issue related to the algorithm, since we are focusing on the
software implementation.

# About the original LeGO-LOAM
This repository 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 optional IMU data as inputs.
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
[LeGO-LOAM](https://github.com/RobustFieldAutonomyLab/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
<!--
[![Watch the video](/LeGO-LOAM/launch/demo.gif)](https://www.youtube.com/watch?v=O3tz_ftHV48)
-->
<p align='center'>
<img src="/LeGO-LOAM/launch/demo.gif" alt="drawing" width="800"/>
</p>

## Dependency
## 2. Dependencies

- [ROS](http://wiki.ros.org/ROS/Installation) (tested with indigo and kinetic)
- [ROS2](https://index.ros.org/doc/ros2/Installation/Dashing/) (tested with dashing)
- [gtsam](https://github.com/borglab/gtsam/releases) (Georgia Tech Smoothing and Mapping library, 4.0.0-alpha2)
```
wget -O ~/Downloads/gtsam.zip https://github.com/borglab/gtsam/archive/4.0.0-alpha2.zip
Expand All @@ -77,24 +28,20 @@ It outputs 6D pose estimation in real-time. A demonstration of the system can be
sudo make install
```

## Compile
## 3. Compile

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

```
cd ~/catkin_ws/src
git clone https://github.com/facontidavide/LeGO-LOAM-BOR.git
cd ~/dev_ws/src
git clone https://github.com/eperdices/LeGO-LOAM-SR.git
cd ..
catkin_make
colcon build
```

## The system
## 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 UGV we are using is Clearpath Jackal.

<p align='center'>
<img src="/LeGO-LOAM/launch/jackal-label.jpg" alt="drawing" width="400"/>
</p>
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.

Expand All @@ -108,7 +55,7 @@ Lidar odometry performs two-step Levenberg Marquardt optimization to get 6D tran
<img src="/LeGO-LOAM/launch/odometry.jpg" alt="drawing" width="400"/>
</p>

## New sensor and configuration
## 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**.

Expand All @@ -117,22 +64,48 @@ If you want to use our algorithm with Velodyne VLP-32c or HDL-64e, you need to w

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

**The IMU has been remove from the original code.** Deal with it.
**The IMU has been remove from the original LeGO-LOAM code.**

## Run the package
## 6. Run the package

You may process a rosbag using the following command:
System can be started using the following command:

```
roslaunch lego_loam_sr run.launch rosbag:=/path/to/your/rosbag lidar_topic:=/velodyne_points
ros2 launch lego_loam_sr run.launch.py
```

Change the parameters `rosbag`, `lidar_topic` as needed.
Some sample bags can be downloaded from [here](https://github.com/RobustFieldAutonomyLab/jackal_dataset_20170608).

### 6.1 Run ROS1 rosbag

Some sample bags can be downloaded from [here](https://github.com/RobustFieldAutonomyLab/jackal_dataset_20170608).
To use rosbags from ROS1, you need to use a [bridge](https://github.com/ros2/ros1_bridge) between ROS1 and ROS2.

Play rosbag using ROS1:

```
source /opt/ros/melodic/setup.bash
roscore &
rosbag play *.bag --clock --topic /velodyne_points
```

Create the bridge in another terminal:

```
source /opt/ros/melodic/setup.bash
source /opt/ros/dashing/setup.bash
export ROS_MASTER_URI=http://localhost:11311
ros2 run ros1_bridge dynamic_bridge
```

Finally, run ROS2 code:

```
source /opt/ros/dashing/setup.bash
source ~/dev_ws/install/setup.bash
ros2 launch lego_loam_sr run.launch.py
```

## New data-set
### 6.2 New data-set

This dataset, [Stevens data-set](https://github.com/TixiaoShan/Stevens-VLP16-Dataset), is captured using a Velodyne VLP-16, which is mounted on an UGV - Clearpath Jackal, on Stevens Institute of Technology campus.
The VLP-16 rotation rate is set to 10Hz. This data-set features over 20K scans and many loop-closures.
Expand All @@ -144,7 +117,7 @@ The VLP-16 rotation rate is set to 10Hz. This data-set features over 20K scans a
<img src="/LeGO-LOAM/launch/google-earth.png" alt="drawing" width="600"/>
</p>

## Cite *LeGO-LOAM*
## 7. Cite *LeGO-LOAM*

Thank you for citing our *LeGO-LOAM* paper if you use any of this code:
```
Expand Down

0 comments on commit 3ab1a73

Please sign in to comment.