oh_my_loam/README.md

91 lines
2.6 KiB
Markdown
Raw Normal View History

2021-02-23 00:11:19 +08:00
# Oh-My-LOAM
2021-03-10 16:16:57 +08:00
Oh-My-LOAM is a ROS-free implementation of LOAM (J. Zhang and S. Singh. LOAM: Lidar Odometry and Mapping in Real-time).
This implementation is modified from [A-LOAM](https://github.com/HKUST-Aerial-Robotics/A-LOAM).
2021-02-23 00:11:19 +08:00
Comparing with A-LOAM, this implementation has following features:
2021-03-11 17:09:21 +08:00
- ROS-free: it can run without ROS environment
- Multi-threading instead of multi-process: more deterministic
- Higher code quality: more readable and easier to understand/modify
2021-02-23 00:11:19 +08:00
2021-03-10 16:21:17 +08:00
<img src="images/nsh_indoor_outdoor.png" alt="nsh_indoor_outdoor" height="500" align="bottom" />
2021-03-10 16:16:57 +08:00
# How to run
## BUILD
2021-03-10 16:21:17 +08:00
Install dependences (listed below).\
2021-03-10 16:16:57 +08:00
Clone this repository\
Compile:
```bash
mkdir build && cd build
cmake ..
make -j6
```
## Run with ROS bag as input
Although **Oh-My-LOAM** is ROS-free, running it with ROS bag as input is the simplest way.
We'll take *nsh_indoor_outdoor.bag* as example.
You can download this bag from [google drive](https://drive.google.com/file/d/1s05tBQOLNEDDurlg48KiUWxCp-YqYyGH/view) or [baidupan](https://pan.baidu.com/s/1TbfMQ3Rvmmn1hCjFhXSPcQ) (提取码:9nf7).
Launch **Oh-My-LOAM**:
2021-03-10 16:16:57 +08:00
```
./devel/lib/oh_my_loam/main_rosbag ../configs/config_nsh_indoor_outdoor.yaml
```
Play ROS bag (in a new terminal):
2021-03-10 16:16:57 +08:00
```
ros play nsh_indoor_outdoor.bag
```
## Run without ROS support
Launch **Oh-My-LOAM**:
```
./devel/lib/oh_my_loam/main_noros ../configs/config_nsh_indoor_outdoor.yaml xxxxxx
```
Please replace `xxxxxx` with the directory that contains the input point cloud files with tree structure like following:
```
xxxxxx
├── frame00000.pcd
├── frame00001.pcd
├── frame00002.pcd
├── frame00003.pcd
├── frame00004.pcd
├── ...
```
Currently only `.pcd` format is supported.
You can modify `examples/main_noros.cc` to add support for other point cloud formats.
2021-03-10 16:16:57 +08:00
2021-02-23 00:11:19 +08:00
# Dependences
2021-03-11 17:09:21 +08:00
### OS
Tested on ubuntu 16.04/18.04/20.04.
2021-03-10 16:21:17 +08:00
### C++17
2021-03-11 17:09:21 +08:00
If cannot find *std::filesystem* error is encountered during your compiling, please upgrade your compiler.
We recommend `g++-9` (or higher version).
### ROS
Only `examples/main_rosbag.cc` needs ROS. You can exclude it from compiling by modifying `examples/CMakeLists.txt`.
2021-03-10 16:21:17 +08:00
### Eigen: linear algebra, quaternion
2021-03-10 16:16:57 +08:00
```
sudo apt install libeigen3-dev
```
2021-03-10 16:21:17 +08:00
### pcl: point cloud processing
2021-03-10 16:16:57 +08:00
```
sudo apt install libpcl-dev
```
2021-03-10 16:21:17 +08:00
### g3log: logging
2021-03-10 16:16:57 +08:00
Follow [g3log](https://github.com/KjellKod/g3log) to install.
2021-03-10 16:21:17 +08:00
### yaml-cpp: yaml parsing
2021-03-10 16:16:57 +08:00
```
sudo apt install libyaml-cpp-dev
```
2021-03-10 16:21:17 +08:00
### ceres: non-linear optimization
2021-03-10 16:16:57 +08:00
```
sudo apt install libceres-dev
2021-03-11 17:09:21 +08:00
```