# 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 horizontally) 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
<!--
[![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>
## Lidar-inertial Odometry
An updated lidar-initial odometry package, [LIO-SAM](https://github.com/TixiaoShan/LIO-SAM), has been open-sourced and available for testing.
## Dependency
- [ROS](http://wiki.ros.org/ROS/Installation) (tested with indigo, kinetic, and melodic)
- [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
cd ~/Downloads/ && unzip gtsam.zip -d ~/Downloads/
cd ~/Downloads/gtsam-4.0.0-alpha2/
mkdir build && cd build
cmake ..
sudo make install
```
## Compile
You can use the following commands to download and compile the package.
```
cd ~/catkin_ws/src
git clone https://github.com/RobustFieldAutonomyLab/LeGO-LOAM.git
cd ..
catkin_make -j1
```
When you compile the code for the first time, you need to add "-j1" behind "catkin_make" for generating some message types. "-j1" is not needed for future compiling.
## The system
LeGO-LOAM is speficifally optimized for a horizontally placed VLP-16 on a ground vehicle. It assumes there is always a ground plane in the scan. The UGV we are using is Clearpath Jackal. It has a built-in IMU.
<p align='center'>
<img src="/LeGO-LOAM/launch/jackal-label.jpg" alt="drawing" width="400"/>
</p>
The package performs segmentation before feature extraction.
<p align='center'>
<img src="/LeGO-LOAM/launch/seg-total.jpg" alt="drawing" width="400"/>
</p>
Lidar odometry performs two-step Levenberg Marquardt optimization to get 6D transformation.
<p align='center'>
<img src="/LeGO-LOAM/launch/odometry.jpg" alt="drawing" width="400"/>
</p>
## New Lidar
The key thing to adapt the code to a new sensor is making sure the point cloud can be properly projected to an range image and ground can be correctly detected. For example, VLP-16 has a angular resolution of 0.2° and 2° along two directions. It has 16 beams. The angle of the bottom beam is -15°. Thus, the parameters in "utility.h" are listed as below. When you implement new sensor, make sure that the ground_cloud has enough points for matching. Before you post any issues, please read this.
```
extern const int N_SCAN = 16;
extern const int Horizon_SCAN = 1800;
extern const float ang_res_x = 0.2;
extern const float ang_res_y = 2.0;
extern const float ang_bottom = 15.0;
extern const int groundScanInd = 7;
```
Another example for Velodyne HDL-32e range image projection:
```
extern const int N_SCAN = 32;
extern const int Horizon_SCAN = 1800;
extern const float ang_res_x = 360.0/Horizon_SCAN;
extern const float ang_res_y = 41.333/float(N_Scan-1);
extern const float ang_bottom = 30.666666;
extern const int groundScanInd = 20;
```
**New**: a new **useCloudRing** flag has been added to help with point cloud projection (i.e., VLP-32C, VLS-128). Velodyne point cloud has "ring" channel that directly gives the point row id in a range image. Other lidars may have a same type of channel, i.e., "r" in Ouster. If you are using a non-Velodyne lidar but it has a similar "ring" channel, you can change the PointXYZIR definition in utility.h and the corresponding code in imageProjection.cpp.
For **KITTI** users, if you want to use our algorithm with **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.
If you are using your lidar with an IMU, make sure your IMU is aligned properly with the lidar. The algorithm uses IMU data to correct the point cloud distortion that is cause by sensor motion. If the IMU is not aligned properly, the usage of IMU data will deteriorate the result. Ouster lidar IMU is not supported in the package as LeGO-LOAM needs a 9-DOF IMU.
## Run the package
1. Run the launch file:
```
roslaunch lego_loam run.launch
```
Notes: The parameter "/use_sim_time" is set to "true" for simulation, "false" to real robot usage.
2. Play existing bag files:
```
rosbag play *.bag --clock --topic /velodyne_points /imu/data
```
Notes: Though /imu/data is optinal, it can improve estimation accuracy greatly if provided. Some sample bags can be downloaded from [here](https://github.com/RobustFieldAutonomyLab/jackal_dataset_20170608).
## 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.
<p align='center'>
<img src="/LeGO-LOAM/launch/dataset-demo.gif" alt="drawing" width="600"/>
</p>
<p align='center'>
<img src="/LeGO-LOAM/launch/google-earth.png" alt="drawing" width="600"/>
</p>
## Cite *LeGO-LOAM*
Thank you for citing [our *LeGO-LOAM* paper](./Shan_Englot_IROS_2018_Preprint.pdf) if you use any of this code:
```
@inproceedings{legoloam2018,
title={LeGO-LOAM: Lightweight and Ground-Optimized Lidar Odometry and Mapping on Variable Terrain},
author={Shan, Tixiao and Englot, Brendan},
booktitle={IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)},
pages={4758-4765},
year={2018},
organization={IEEE}
}
```
## Loop Closure
The loop-closure method implemented in this package is a naive ICP-based method. It often fails when the odometry drift is too large. For more advanced loop-closure methods, there is a package called [SC-LeGO-LOAM](https://github.com/irapkaist/SC-LeGO-LOAM), which features utilizing point cloud descriptor.
## Speed Optimization
An optimized version of LeGO-LOAM can be found [here](https://github.com/facontidavide/LeGO-LOAM/tree/speed_optimization). All credits go to @facontidavide. Improvements in this directory include but not limited to:
+ 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.
+ As a consequence of the previous point, creating unit and regression tests will be easier.
没有合适的资源?快使用搜索试试~ 我知道了~
lego-loam功能包
共142个文件
sample:11个
head:4个
cpp:4个
需积分: 5 2 下载量 16 浏览量
2022-04-01
14:18:56
上传
评论 1
收藏 53.71MB ZIP 举报
温馨提示
lego-loam功能包
资源详情
资源评论
资源推荐
收起资源包目录
lego-loam功能包 (142个子文件)
01013e220caf8a165e0c10b15ae59f757d0c13 562B
01479a5dad115dbebd5c012fca5b65619ed9bf 311B
088327c7c4ce62f893310ea5db8dcc48264478 16KB
0de9e3989559c6f53b62c6bf39be781eed2b11 6KB
13827f9ca5e2285d1e6146377e2dafd728c5cd 2KB
166f885cdcc6afbc66064259fc17eb582ef872 246B
16c56aebeb8d5e9295bcca2fafba6d71021317 572B
1704fd9f02ea960099d6aa37ca853d76e21310 316B
1b97f200e4612022833c6be19d34cbcd055871 551B
1e5ddebdd0d6ef4badfd5aea7abcbc85ad8722 246B
1f8b2cdf11bb2727c566d262eb458bfaebafc4 3KB
1fbfa31098ff2dcc1a7f9260d5c376aade0076 245B
20b1b15a0095bcd55b2ee6218227dd3ffd56b8 30KB
23fb5a9d8ba617e7d77a55f8ae5bfc1e46f8fc 347B
255d4636ab16b44cf52fe6723df38169186728 3KB
2bb17033126042fbaec1e1d80065b21c2732bf 133KB
3036a2d205b15586cb7034c1d3e61e595d9821 4.32MB
304176981db80980e59b778b7be689da32ed38 247B
30705e56ff674c489a4c520a06dcbfe64aa853 185B
318e9fc131d6512dedf8e46e82b58ed286ad91 59B
3447f8f7fc27f435e52a5da7ff8f99aef65d3a 15KB
3718a03bbf8519c37be452388e3292f9a30f25 3KB
37d0a9553f94ec5c59755cf5fb0a15f84a53f4 552B
3ac9f2d89257057ab075d46bbf673205e726a3 549B
4254789c91ebe4851b4678be2c9f97e2f56c27 543B
4519c9cf5e087eae74ed0be1f1701dc979035f 336B
454ca2105a32b9a51163097250a9d259a77556 176B
476bc7c41ef9775030a90801eb6de750b1f573 553B
4ac1e2bf649f197150e0d8ed79d37356a963d7 246B
4bdde7253502e7b6f54e96cdd9e2e925e01c34 176B
51fa5f7f77732a6f82f0dfd0c9fcf1f6400d24 54B
52073dc2b1884413b8dc0be8793740063484df 549B
608250e4849a1bd153ad7b0ea787e27dade024 176B
62f26d77f277d2a1d94b06427f5670702f65d3 245B
6a7a95a8bc510b76819d4cc48707e344bad621 553B
6c9a9ba1193d1bcb91fc66651a144f67133ff7 246B
6e899a170bb02082cdaff53ee5cde1ba3e9595 245B
7168f46936e5ce97cce773463ab8ef227d8dc4 15KB
7244c67ceb6df2176420a79f737ca74e5a7cc2 54B
72cce7da31329f2342f3e22849698d33f09db9 245B
7d7dca2dd3cce296c37c083fc61fb71cefbd6d 289B
80b96548ca925b89e60a923f5efbc8168ee2c4 185B
80e6ff48a8cae6e5ac8ed61ff8070cf451d231 15KB
840bce9644873b9af16a86d38fde9c3e36917b 245B
8812c128a4ce41b3ad4afc305e7514855b6ea2 3.41MB
8cd62dd79afd2c255c14010cfae52ef31d9b8b 186B
8d3bcb2fb03be16bd35adf0968bd4e0e7aeb77 15KB
908f6e83170facbca3003d192093393ed31e84 185B
948e74eacc1d7960025122d86959bc9ad47df7 650B
9624b3af0a4059297754a2e3c249cf18487494 183B
971197d529064fc8541122274d1054b22d9f4d 185B
9b307ab0f243b8083a971e1f89f4137901d192 176B
9c8ceb18e18c3f12fbc7ba583e3f09924893a3 246B
9d6567a0109898b859a48eed401a98ac46c134 3KB
9db0ebebeaa8aa7d92e4253e9fcfcce9c4063b 185B
a5a543cba44cd2f489bf61b43cc69910b234e0 385B
a5ffc13cc2236d6d4807f7649bcdeab9cd25ce 6KB
af11c10f3c9c9068eadc9bd7cef5b20bbac65e 562B
af4a4666ff7dd2bcb75e5b71bfb876d5658f5c 54B
afefe9910e0607dcacd038bc6fc86fba22a15f 6KB
b29760f12526ec78ce543d0784302da9c4836a 336B
b46e47c1f602abd54ecb11a40f0c1380163ffb 3KB
b4cb0c372c4029c446ec3d6b471eb26a2c5af3 3KB
b50299416dc56610dc046f988ed9891759e5d4 16KB
b74a6a5369549f4ebc3a0267bae3aa625233a9 401B
b96477f6230e9e73252f2a2b820f8a5296e8bb 246B
bc4764dc9440642235673b27639e04b624d684 246B
bf0ec332b5259ac4a7c01023687834ba7a257a 552B
bf7b8c944f6ea15eb946cf61dc82de93c12284 17.87MB
c1fe4a2d0ce844fc586d4e6ddfd3337acd5094 2KB
c20e4bae4f84a2980ecaa0437db6ba2492cf27 245B
c26259662164740c12490d43577e5fc1e74227 279B
c8aae9499d235e77e364a14f52212c00cb2b05 3KB
c9018f3826acc8cf5af0710d4a0b4594356c33 54B
cb03e0450076464ca74b7409f585fe5803d93a 245B
cb78daa6d58d7e6a3fd0539235d34a1bf8126a 6KB
config 280B
featureAssociation.cpp 73KB
mapOptmization.cpp 69KB
imageProjection.cpp 21KB
transformFusion.cpp 12KB
d1fc75308538f31ba6ae076f608daeac7df010 176B
d41f2ba476617917f48db55e101aff8fe1c270 3KB
d43b47719b53dccc46bb8cd9e1e60da912a7c6 837B
d5104d4ee004a32df00721ea9c201ebadbb319 191B
d9a74b5643fd8cf2fa8fcf3bb27cf565414683 176B
dd23702fa36da5b1c3a4e1be40b64db9ac8a2d 19KB
description 73B
e4b66cd439e37e09bc16b9ec4f926a4243a04a 926KB
e6659896737d706e980b5b9f04b9f1f00d445e 185B
ebe5b3547160f0f9fb18a59f217e8a23592b68 564B
efa8aec24b6cfa3de21bad7fb5a366a9992b6f 31KB
exclude 240B
f087c06b8832c49760d0de54ce74321f5bcc3f 631B
f18c571cc22217ac22b45605a118a97b18fc42 2KB
f299114ab6bcb20b3072ea35e99dc8d9cb84ae 3KB
f3a0c12a6c701628ecb77451d1eacac18f8bf1 124B
f6563218bd0fe4f7b1a36170801bdf982f12c9 347B
f7eba0dd5e93a916915e06ce0750a00d4c483b 3KB
f87ea41d357300cab609985db30709ce552e08 246B
共 142 条
- 1
- 2
Serinus_Z
- 粉丝: 19
- 资源: 5
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0