Master thesis regarding LiDAR-based semantic loop closure.
Loop closure is composed of place recognition (loop detection) and optimization. We use F-LOAM as the front end. The pipeline is shown in the following image.
The place recognition is based on Graph attention neural network.
The optimization is based on GTSAM (factor-graph optimization toolbox)
The code of place recognition module is located in /src/sgpr_attention
.
Ubuntu 20.04.3 LTS
Nvidia Driver: 470.57.02
CUDA: 11.4
conda env create -f environment.yml && conda activate sgpr
cd src/sgpr_attention
### train the model
python3 train.py --config configs/sgpr_geo_attention_attention_fusion.yml --version {VERSION_NAME}
### evaluate the model
python3 evaluate_batch.py --config configs/sgpr_geo_attention_attention_fusion.yml --version {VERSION_TO_TEST}
The data preprocessing is quite complicated. You can check SGPR repo for details. The biggest difference between it and ours is we add bounding box into the dictionary and we load data from .npz
to speed up training. You can directly download preprocessed data here. Remember to change the parameters in config file.
configs
store the different model configuration. You can adjust the model parameters and adjust data path here.
src
the core of the model.
-dataset
dataloader of different datasets and utility functions to load data.
-model
model realizations.
experiments
store checkpoints during training.
We inherit from repo ISC-LOAM. You can refer to this link
We need to convert the SemanticKitti dataset to rosbag. We use this repo.
mkdir ~/your_workspace && cd your_workspace
mkdir src && cd src
git clone https://github.com/crepuscularlight/SemanticLoopClosure.git
git clone https://github.com/MoriKen254/timed_roslaunch.git
cd .. && catkin_make
source devel/setup.bash
#change data directory in the configs.
#First change the launch/iscloam.launch file (line 4)
#Second change the src/sgpr_attention/configs/sgpr_geo_attention.yml (line #7,8,9,32,33)
#To change checkpoint, adjust in file src/SGPR.py (line 36,37)
#with GPU
#change iscOptimizationNode.cpp (line 257) topic name loop_closure_python
roslaunch iscloam iscloam_sgpr.launch
#without GPU
#change iscOptimizationNode.cpp (line 257) topic name loop_closure
roslaunch iscloam iscloam.launch
We are inspired by two excellent and amazing work ISC-LOAM and SGPR. On the foundation of them, we develop the semantic method to solve loop closure issue.