Skip to content

Latest commit

 

History

History
113 lines (65 loc) · 3.53 KB

README.md

File metadata and controls

113 lines (65 loc) · 3.53 KB

SemanticLoopClosure

Master thesis regarding LiDAR-based semantic loop closure.

Introduction

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.

image-20221101201105328 The place recognition is based on Graph attention neural network.

image-20221101200714176

The optimization is based on GTSAM (factor-graph optimization toolbox)

image-20221101200922875

Place Recognition

The code of place recognition module is located in /src/sgpr_attention .

Environment Setup

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}

Data Preprocess

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.

Files Breakdown

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.

Loop Closure

Experiment Setup

We inherit from repo ISC-LOAM. You can refer to this link

Data Process

We need to convert the SemanticKitti dataset to rosbag. We use this repo.

Quick Start

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

Acknowledgement

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.