add lines in README
parent
6f36f6170e
commit
53af1a97e9
|
@ -1,7 +1,7 @@
|
|||
cmake_minimum_required(VERSION 3.10)
|
||||
project(oh_my_loam)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "-std=c++17 -Wall -lpthread")
|
||||
set(CMAKE_CXX_FLAGS "-std=c++17 -Wall")
|
||||
set(CMAKE_BUILD_TYPE "Release")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
|
||||
|
||||
|
@ -10,48 +10,15 @@ find_package(PCL QUIET)
|
|||
find_package(g3log REQUIRED)
|
||||
find_package(yaml-cpp REQUIRED)
|
||||
|
||||
find_package(catkin REQUIRED COMPONENTS
|
||||
geometry_msgs
|
||||
nav_msgs
|
||||
sensor_msgs
|
||||
roscpp
|
||||
rospy
|
||||
rosbag
|
||||
std_msgs
|
||||
)
|
||||
|
||||
include_directories(SYSTEM
|
||||
${catkin_INCLUDE_DIRS}
|
||||
${PCL_INCLUDE_DIRS}
|
||||
${G3LOG_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
catkin_package(
|
||||
CATKIN_DEPENDS geometry_msgs nav_msgs roscpp rospy std_msgs
|
||||
DEPENDS EIGEN3 PCL
|
||||
INCLUDE_DIRS oh_my_loam common
|
||||
)
|
||||
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
add_subdirectory(common)
|
||||
add_subdirectory(oh_my_loam)
|
||||
|
||||
add_executable(main main.cc)
|
||||
target_link_libraries(main
|
||||
${catkin_LIBRARIES}
|
||||
${PCL_LIBRARIES}
|
||||
${G3LOG_LIBRARIES}
|
||||
${YAML_CPP_LIBRARIES}
|
||||
common
|
||||
oh_my_loam
|
||||
extractor
|
||||
odometer
|
||||
mapper
|
||||
solver
|
||||
${CERES_LIBRARIES}
|
||||
visualizer
|
||||
base
|
||||
)
|
||||
add_subdirectory(examples)
|
||||
|
|
64
README.md
64
README.md
|
@ -1,18 +1,68 @@
|
|||
# Oh-My-LOAM
|
||||
|
||||
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).
|
||||
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).
|
||||
|
||||
Comparing with A-LOAM, this implementation has following features:
|
||||
|
||||
- it's ROS-free
|
||||
- it's more readable and easier to understand/modify
|
||||
|
||||
<img src="images/nsh_indoor_outdoor.png" alt="" height="500" align="bottom" />
|
||||
|
||||
# How to run
|
||||
## BUILD
|
||||
|
||||
Install dependences (lsted below).\
|
||||
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:
|
||||
```
|
||||
./devel/lib/oh_my_loam/main_rosbag ../configs/config_nsh_indoor_outdoor.yaml
|
||||
```
|
||||
Play bag:
|
||||
```
|
||||
ros play nsh_indoor_outdoor.bag
|
||||
```
|
||||
|
||||
## Run without ROS support
|
||||
You can write by yourself.
|
||||
|
||||
# Dependences
|
||||
|
||||
- Eigen: linear algebra, quaternion
|
||||
- pcl: point cloud processing
|
||||
- g3log: logging
|
||||
- yaml-cpp: yaml parsing
|
||||
- ceres: non-linear optimization
|
||||
- c++17
|
||||
### 1. C++17
|
||||
### 2. Eigen: linear algebra, quaternion
|
||||
```
|
||||
sudo apt install libeigen3-dev
|
||||
```
|
||||
|
||||
### 3. pcl: point cloud processing
|
||||
```
|
||||
sudo apt install libpcl-dev
|
||||
```
|
||||
|
||||
### 4. g3log: logging
|
||||
Follow [g3log](https://github.com/KjellKod/g3log) to install.
|
||||
|
||||
### 5. yaml-cpp: yaml parsing
|
||||
```
|
||||
sudo apt install libyaml-cpp-dev
|
||||
```
|
||||
|
||||
### 6. ceres: non-linear optimization
|
||||
```
|
||||
sudo apt install libceres-dev
|
||||
```
|
||||
|
||||
### ROS (optional)
|
||||
|
|
|
@ -66,4 +66,4 @@ class Registerer {
|
|||
__attribute__((constructor)) void Register##derived_class() { \
|
||||
::common::Registerer<base_class>::Register<derived_class>(#derived_class); \
|
||||
} \
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
|
|
@ -3,7 +3,6 @@ lidar: VLP16
|
|||
log_to_file: false
|
||||
log_path: /data/log/oh_my_loam
|
||||
vis: true
|
||||
save_map: true
|
||||
save_map_path: /data/log/oh_my_loam.pcd
|
||||
|
||||
# configs for extractor
|
|
@ -0,0 +1,34 @@
|
|||
find_package(catkin REQUIRED COMPONENTS
|
||||
geometry_msgs
|
||||
nav_msgs
|
||||
sensor_msgs
|
||||
roscpp
|
||||
rospy
|
||||
rosbag
|
||||
std_msgs
|
||||
)
|
||||
|
||||
include_directories(SYSTEM
|
||||
${catkin_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
catkin_package(
|
||||
CATKIN_DEPENDS roscpp rospy std_msgs
|
||||
)
|
||||
|
||||
add_executable(main_rosbag main_rosbag.cc)
|
||||
target_link_libraries(main_rosbag
|
||||
${catkin_LIBRARIES}
|
||||
${PCL_LIBRARIES}
|
||||
${G3LOG_LIBRARIES}
|
||||
${YAML_CPP_LIBRARIES}
|
||||
common
|
||||
oh_my_loam
|
||||
extractor
|
||||
odometer
|
||||
mapper
|
||||
solver
|
||||
${CERES_LIBRARIES}
|
||||
visualizer
|
||||
base
|
||||
)
|
|
@ -4,10 +4,10 @@
|
|||
<version>0.0.0</version>
|
||||
|
||||
<description>
|
||||
Reimplementation of LOAM.
|
||||
A ROS-free implementation of LOAM.
|
||||
</description>
|
||||
|
||||
<maintainer email="fei-china@139.com">qintong</maintainer>
|
||||
<maintainer email="fei-china@139.com">feixyz</maintainer>
|
||||
|
||||
<license>BSD</license>
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 84 KiB |
|
@ -44,6 +44,7 @@ void OhmyloamVisualizer::KeyboardEventCallback(
|
|||
}
|
||||
is_updated_ = true;
|
||||
} else if (event.getKeySym() == "s" && event.keyDown()) {
|
||||
if (save_path_.empty()) return;
|
||||
auto frame = GetCurrentFrame<OhmyloamVisFrame>();
|
||||
PointCloud cloud;
|
||||
cloud.reserve(frame.cloud_map_surf->size() + frame.cloud_map_surf->size());
|
||||
|
|
Loading…
Reference in New Issue