Skip to content

Commit a5b44c4

Browse files
committed
initial
0 parents  commit a5b44c4

36 files changed

+10671
-0
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.vscode/*
2+
build
3+
.vscode
4+
.vscode/c_cpp_properties.json
5+
resultsOutput/

CMakeLists.txt

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
cmake_minimum_required(VERSION 3.10)
2+
project(intensity_feature_tracker)
3+
4+
set(CMAKE_BUILD_TYPE "Release")
5+
set(CMAKE_CXX_FLAGS "-std=c++14")
6+
set(CMAKE_CXX_FLAGS_RELEASE " -O3 -Wall -g -pthread -DROSCONSOLE_MIN_SEVERITY=5")
7+
8+
find_package(catkin REQUIRED COMPONENTS
9+
geometry_msgs
10+
nav_msgs
11+
cv_bridge
12+
roscpp
13+
roslib
14+
sensor_msgs
15+
std_msgs
16+
pcl_conversions
17+
tf
18+
tf2
19+
tf2_ros
20+
message_filters
21+
)
22+
find_package(OpenMP REQUIRED)
23+
find_package(PCL REQUIRED)
24+
find_package(OpenCV REQUIRED)
25+
find_package(Eigen3 REQUIRED)
26+
find_package(GTSAM REQUIRED QUIET)
27+
find_package(Ceres REQUIRED)
28+
29+
catkin_package(
30+
INCLUDE_DIRS include
31+
CATKIN_DEPENDS roscpp roslib message_runtime geometry_msgs nav_msgs std_msgs
32+
DEPENDS PCL EIGEN3
33+
INCLUDE_DIRS include
34+
)
35+
set( DBoW3_INCLUDE_DIRS "/usr/local/include" )
36+
set( DBoW3_LIBS "/usr/local/lib/libDBoW3.so" )
37+
38+
include_directories(
39+
SYSTEM
40+
include
41+
${catkin_INCLUDE_DIRS}
42+
${PCL_INCLUDE_DIRS}
43+
${OpenCV_INCLUDE_DIRS}
44+
${GTSAM_INCLUDE_DIR}
45+
${CERES_INCLUDE_DIRS}
46+
)
47+
link_directories(
48+
inlcude
49+
${PCL_LIBRARY_DIRS}
50+
${OpenCV_LIBRARY_DIRS}
51+
${GTSAM_LIBRARY_DIRS}
52+
)
53+
54+
file(GLOB source_files
55+
src/intensity_feature_tracker_node.cpp
56+
src/intensity_feature_tracker.cpp
57+
src/loop_closure_handler.cpp
58+
src/Scancontext.cpp
59+
src/parameters.h
60+
)
61+
62+
add_executable(${PROJECT_NAME}_node ${source_files})
63+
target_compile_options(${PROJECT_NAME}_node PRIVATE ${OpenMP_CXX_FLAGS})
64+
target_link_libraries(${PROJECT_NAME}_node ${CERES_LIBRARIES} ${catkin_LIBRARIES} ${PCL_LIBRARIES} ${OpenCV_LIBRARIES} ${OpenMP_CXX_FLAGS} ${DBoW3_LIBS} Eigen3::Eigen gtsam)
65+
66+
file(GLOB map_source_files
67+
src/mapOptimizationNode.cpp
68+
src/mapOptimization.cpp
69+
src/image_handler.h
70+
src/ikd-Tree/ikd_Tree.cpp
71+
ikd-Tree/ikd_Tree.h
72+
src/parameters.h
73+
74+
)
75+
add_executable(${PROJECT_NAME}_mapping_node ${map_source_files})
76+
target_compile_options(${PROJECT_NAME}_mapping_node PRIVATE ${OpenMP_CXX_FLAGS})
77+
target_link_libraries(${PROJECT_NAME}_mapping_node ${catkin_LIBRARIES} ${PCL_LIBRARIES} ${OpenCV_LIBRARIES} ${OpenMP_CXX_FLAGS} Eigen3::Eigen gtsam ${CERES_LIBRARIES} ${OpenMP_LIBS})
78+
79+
add_executable(ascanRegistration src/scanRegistration.cpp src/intensity_feature_tracker.cpp
80+
src/loop_closure_handler.cpp
81+
src/Scancontext.cpp
82+
src/parameters.h)
83+
target_compile_options(ascanRegistration PRIVATE ${OpenMP_CXX_FLAGS})
84+
target_link_libraries(ascanRegistration ${catkin_LIBRARIES} ${CERES_LIBRARIES} ${PCL_LIBRARIES} ${OpenCV_LIBRARIES} ${OpenMP_CXX_FLAGS} Eigen3::Eigen ${DBoW3_LIBS} gtsam )
85+
86+
add_executable(alaserMapping_node src/laserMapping.cpp)
87+
target_link_libraries(alaserMapping_node ${catkin_LIBRARIES} ${PCL_LIBRARIES} ${CERES_LIBRARIES})
88+
89+
add_executable(alaserOdometry_node src/laserOdometry.cpp)
90+
target_link_libraries(alaserOdometry_node ${catkin_LIBRARIES} ${PCL_LIBRARIES} ${CERES_LIBRARIES})
91+
92+
add_executable(odomHandler_node src/odom_handler_node.cpp)
93+
target_link_libraries(odomHandler_node ${catkin_LIBRARIES})
94+

Dockerfile

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
FROM ros:noetic-ros-base
2+
3+
LABEL Maintainer="Wenqiang Du <[email protected]>"
4+
LABEL intensitySLAM.version="0.1"
5+
6+
RUN apt-get update
7+
8+
RUN apt-get install -y --fix-missing --no-install-recommends git ros-noetic-cv-bridge ros-noetic-image-transport ros-noetic-pcl-ros libpcl-dev wget unzip
9+
10+
RUN mkdir -p /dependencies_ws &&\
11+
cd /dependencies_ws &&\
12+
wget -O /dependencies_ws/ceres.zip https://github.com/ceres-solver/ceres-solver/archive/1.14.0.zip &&\
13+
apt-get install -y cmake libgoogle-glog-dev libgflags-dev libatlas-base-dev libeigen3-dev unzip libsuitesparse-dev &&\
14+
cd /dependencies_ws/ && unzip ceres.zip -d /dependencies_ws/ &&\
15+
cd /dependencies_ws/ceres-solver-1.14.0 &&\
16+
mkdir ceres-bin && cd ceres-bin &&\
17+
cmake .. &&\
18+
make install -j4
19+
20+
RUN apt update && apt install -y --force-yes apt-transport-https && \
21+
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB && \
22+
apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB && \
23+
sh -c 'echo deb https://apt.repos.intel.com/mkl all main > /etc/apt/sources.list.d/intel-mkl.list' && \
24+
apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install cpio intel-mkl-64bit-2018.2-046
25+
# RUN cd /dependencies_ws/ &&\
26+
# git clone https://github.com/borglab/gtsam.git
27+
# RUN cd /dependencies_ws/gtsam &&\
28+
# mkdir build && cd build &&\
29+
# cmake .. &&\
30+
# make install -j4
31+
RUN cd /dependencies_ws/ &&\
32+
wget -O gtsam.zip https://github.com/borglab/gtsam/archive/4.1.0.zip &&\
33+
unzip gtsam.zip -d /dependencies_ws/ &&\
34+
cd /dependencies_ws/gtsam-4.1.0 &&\
35+
mkdir build && cd build &&\
36+
cmake -DGTSAM_BUILD_WITH_MARCH_NATIVE=OFF .. &&\
37+
make install -j4
38+
39+
40+
RUN cd /dependencies_ws/ &&\
41+
git clone https://github.com/rmsalinas/DBow3.git &&\
42+
cd /dependencies_ws/DBow3 &&\
43+
mkdir build && cd build &&\
44+
cmake .. &&\
45+
make &&\
46+
make install -j4
47+
RUN cp /usr/local/lib/libmetis-gtsam.so /usr/lib/
48+
49+
RUN mkdir -p /intensitySLAM/src &&\
50+
cd /intensitySLAM/src &&\
51+
git clone https://github.com/SnowCarter/Intensity_based_LiDAR_SLAM.git &&\
52+
cd /intensitySLAM &&\
53+
. /opt/ros/${ROS_DISTRO}/setup.sh &&\
54+
catkin_make &&\
55+
echo "source /intensitySLAM/devel/setup.bash" >> ~/.bashrc
56+
57+
WORKDIR /intensitySLAM

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 Wenqiang Du
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
2+
# Real-Time Simultaneous Localization and Mapping with LiDAR Intensity
3+
4+
The utilization of LiDAR's intensity image for scan matching addresses the issue of degeneracy.
5+
6+
[![IMAGE ALT TEXT HERE](./config/spot.png)](https://youtu.be/B_JX0q5Cdeg)
7+
8+
9+
10+
## Paper
11+
Thank you for citing our [paper](https://arxiv.org/abs/2301.09257) if you use any of this code or datasets.
12+
```
13+
@article{du2023real,
14+
title={Real-Time Simultaneous Localization and Mapping with LiDAR intensity},
15+
author={Du, Wenqiang and Beltrame, Giovanni},
16+
journal={arXiv preprint arXiv:2301.09257},
17+
year={2023}
18+
}
19+
```
20+
## Authors
21+
22+
- [@Wenqiang Du](http://wenqiangdu.me/)
23+
- [@Linkedin](https://www.linkedin.com/in/wenqiangdu/)
24+
- [@Github](https://github.com/SnowCarter)
25+
- [@Giovanni Beltrame](https://mistlab.ca/people/beltrame/)
26+
- [@Linkedin](https://www.linkedin.com/in/gbeltrame/)
27+
28+
29+
## Installation
30+
### Dependency
31+
32+
* [ROS noetic](http://wiki.ros.org/noetic/Installation/Ubuntu)
33+
* [ceres-solver](https://github.com/ceres-solver/ceres-solver)
34+
```bash
35+
$ mkdir ~/dependencies_ws
36+
$ cd ~/dependencies_ws/
37+
$ wget -O ~/dependencies_ws/ceres.zip https://github.com/ceres-solver/ceres-solver/archive/1.14.0.zip
38+
$ apt-get install -y cmake libgoogle-glog-dev libgflags-dev libatlas-base-dev libeigen3-dev unzip libsuitesparse-dev
39+
$ cd ~/dependencies_ws/ && unzip ceres.zip -d ~/dependencies_ws/
40+
$ cd /dependencies_ws/ceres-solver-1.14.0
41+
$ mkdir ceres-bin && cd ceres-bin
42+
$ cmake ..
43+
$ sudo make install -j4
44+
```
45+
* [GTSAM](https://github.com/borglab/gtsam)
46+
```
47+
$ cd ~/dependencies_ws/
48+
$ wget -O gtsam.zip https://github.com/borglab/gtsam/archive/4.1.0.zip
49+
$ unzip gtsam.zip -d ~/dependencies_ws/
50+
$ cd ~/dependencies_ws/gtsam-4.1.0
51+
$ mkdir build && cd build
52+
$ cmake -DGTSAM_BUILD_WITH_MARCH_NATIVE=OFF ..
53+
$ sudo make install -j4
54+
```
55+
* [DBOW3](https://github.com/rmsalinas/DBow3)
56+
```
57+
$ cd ~/dependencies_ws/
58+
$ git clone https://github.com/rmsalinas/DBow3.git
59+
$ cd DBow3/ && mkdir build && cd build
60+
$ cmake ..
61+
$ make
62+
$ sudo make install
63+
```
64+
### Compile and Launch
65+
- Create workspace
66+
```
67+
mkidr -p catkin_ws/src
68+
```
69+
70+
- Clone the project
71+
72+
```bash
73+
cd catkin_ws/src/
74+
git clone https://github.com/SnowCarter/Intensity_based_LiDAR_SLAM.git
75+
```
76+
77+
- Go to the project workspace directory
78+
79+
```bash
80+
cd ../
81+
```
82+
83+
- Compile
84+
```bash
85+
source /opt/ros/noetic/setup.bash
86+
catkin_make
87+
```
88+
89+
- Launch
90+
91+
```bash
92+
source devel/setup.bash
93+
roslaunch intensity_feature_tracker spot.launch rviz:=1
94+
```
95+
- Play bag file
96+
```
97+
rosbag play xxx.bag --clock
98+
```
99+
100+
## [Docker](https://www.docker.com/) support
101+
#### Building
102+
- Create workspace
103+
104+
```
105+
mkidr -p catkin_ws/src
106+
```
107+
108+
- Clone the project
109+
110+
```bash
111+
cd catkin_ws/src/
112+
git clone https://github.com/SnowCarter/Intensity_based_LiDAR_SLAM.git
113+
```
114+
115+
- Go to the project directory
116+
117+
```bash
118+
cd Intensity_based_LiDAR_SLAM/
119+
```
120+
- Build docker image
121+
```
122+
docker build . -t intensity_lidar_slam
123+
```
124+
125+
#### Launch
126+
- Launch docker images with intensity Lidar SLAM (Terminal 1)
127+
```
128+
docker run --rm -it --net=host --privileged intensity_lidar_slam:latest /bin/bash -i -c 'roslaunch intensity_feature_tracker spot.launch rviz:=0'
129+
```
130+
- Play bag file (Terminal 2)
131+
```
132+
rosbag play xxx.bag --clock
133+
```
134+
- RVIZ (Terminal 3)
135+
```
136+
rosrun rviz rviz -d catkin_ws/src/Intensity_based_LiDAR_SLAM/launch/rviz_setting.rviz
137+
```
138+
139+
## Example Bag file
140+
* [Onedrive](https://polymtlca0-my.sharepoint.com/:u:/g/personal/wenqiang_du_polymtl_ca/EUn0TO3TMLdFvBvRiVFroIUBLXWWzqdy9wXMKtIVT6MCzw?e=MedxZ2)
141+
```
142+
path: spot_corridor.bag
143+
version: 2.0
144+
duration: 8:46s (526s)
145+
start: Aug 12 2022 16:25:24.06 (1660335924.06)
146+
end: Aug 12 2022 16:34:10.95 (1660336450.95)
147+
size: 8.2 GB
148+
messages: 57957
149+
compression: lz4 [5270/5270 chunks; 53.28%]
150+
uncompressed: 15.5 GB @ 30.0 MB/s
151+
compressed: 8.2 GB @ 16.0 MB/s (53.28%)
152+
types: sensor_msgs/Imu [6a62c6daae103f4ff57a132d6f95cec2]
153+
sensor_msgs/PointCloud2 [1158d486dd51d683ce2f1be655c3c181]
154+
topics: /os_cloud_node/imu 52688 msgs : sensor_msgs/Imu
155+
/os_cloud_node/points 5269 msgs : sensor_msgs/PointCloud2
156+
```
157+
158+
## Contributing
159+
160+
Contributions are always welcome!
161+
162+
## License
163+
[MIT](https://choosealicense.com/licenses/mit/)
164+
[![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit/)
165+
166+
167+
## Acknowledgements
168+
- [Robust Place Recognition using an Imaging Lidar](https://github.com/TixiaoShan/imaging_lidar_place_recognition)
169+
- [A-LOAM](https://github.com/HKUST-Aerial-Robotics/A-LOAM)
170+
- [VINS-Mono](https://github.com/HKUST-Aerial-Robotics/VINS-Mono)
171+
- [Scan Context](https://github.com/irapkaist/scancontext)
172+
- [LVI-SAM](https://github.com/TixiaoShan/LVI-SAM)
173+
- [ikd-Tree](https://github.com/hku-mars/ikd-Tree)
174+
## 🚀 About Me
175+
I'm a Ph.D. candidate in [MISTLab](https://mistlab.ca/).
176+
177+
178+
## Support
179+
180+
For support, email [email protected].
181+
182+
![Logo](https://mistlab.ca/images/mistlogo.png)

config/orbvoc.dbow3

47.1 MB
Binary file not shown.

config/spot.png

1.7 MB
Loading

config/spot.stl

2.23 MB
Binary file not shown.

0 commit comments

Comments
 (0)