98Xiao / long-term-localization

Pole-like Objects Mapping and Long-Term Robot Localization in Dynamic Urban Scenarios

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Long Term Localization

Pole-like Objects Mapping and Long-Term Robot Localization is an algorithm that makes robot or UAV locate itself in Dynamic Urban Scenarios robustly and accurately by correcting the real time Lidar odometry.

avatar

If you use Long Term Localization, please cite:

@misc{2103.13224,
Author = {Zhihao Wang, Silin Li, Ming Cao, Haoyao Chen and Yunhui Liu},
Title = {Pole-like Objects Mapping and Long-Term Robot Localization in Dynamic Urban Scenarios},
Year = {2021},
Eprint = {arXiv:2103.13224},
}

0 Download Self-made Dataset

2020-10-12-demo.bag

https://drive.google.com/file/d/1cF6FoB6OEIBzl4U96_YxJtfJn8tEVwIr/view?usp=sharing

2020-11-05-demo.bag

https://drive.google.com/file/d/1GTiFdtKle1ydBWt5SqTHwGaCLaXfB3-3/view?usp=sharing

1 Settings

2 Build

2.1 Install dependencies

Please take a look the README in long-term-localization/src/common folder. And the size of the model file is too big, the training process can refer to the range-net++ in "long-term-localization/src/other_pkgs/lidar-bonnetal/" folder.

2.2 build lio_sam

cd ~
mkdir -p lio_sam_ws/src
cd lio_sam_ws/src
git clone https://github.com/nixwang/lio_sam.git
cd ../
catkin_make

2.3 Build

cd ~
git clone https://github.com/HITSZ-NRSL/long-term-localization.git
cd long-term-localization/src
git clone https://github.com/lisilin013/third_parities.git

cd ..
# When you build this ws for the first time, it may take a long time, be patient please.
catkin build

3 Run

3.1 Semantic Processing

# terminal 1
cd ~/lio_sam_ws
roslaunch lio_sam run.launch 

# terminal 2
cd long-term-localization
./sh/record.sh

# terminal 3
rosbag play 2020-10-12-demo.bag --clock 

When the bag run over, shut down the terminal 2 and 3;

Then run below code to extract the semantic.

pytorch version necessary:

pytorch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 cudatoolkit=10.1

The trained CNN model can be download here.

https://www.jianguoyun.com/p/DUoZpFUQ84SvCRjL2OsD (Access Password:nros2021)

and unzip the model file in "long-term-localization/src/other_pkgs/lidar-bonnetal", then run below sh file.

cd long-term-localization
./sh/offline_process.sh

3.2 Mapping

Modify the following code in config file src/long_term_relocalization/config/long_term_relocalization_params.yaml change to localizaion mode.

relocalization:
  mode: localization
# play bag
cd ~/offline_process/sequences/00
rosbag play semantic.bag --clock

# launch mapping nodes.
roslaunch long_term_relocalization mapping.launch

# when you want to save pole cluster map, open another terminal and run the following cmd.
rosrun long_term_relocalization save_cluster_map 

The cluster_map will be saved in "\tmp\clusters_map.bin"

3.3 Localization

  • Notes: The bag to be matched (2020-11-05-demo.bag) need to run the process in 3.1 Semantic Processing to extract the semantic cluster, and then used for matching and relocalization.

3.3.1 Semantic Processing

# terminal 1
roslaunch lio_sam run.launch 

# terminal 2
./sh/record.sh

# terminal 3
rosbag play 2020-11-05-demo.bag --clock 

When the bag run over, shut down the terminal 2 and 3;

Then run below code to extract the semantic.

./sh/offline_process.sh

3.3.2 Localization

Modify the following code in config file src/long_term_relocalization/config/long_term_relocalization_params.yaml change to relocalization mode.

relocalization:
  mode: relocalization
# launch relocalization nodes.
roslaunch long_term_relocalization relocalization.launch

Then play the processed bag (by 2020-11-05-demo.bag) to match with "clusters_map.bin".

cd ~/offline_process/sequences/00
rosbag play semantic.bag --clock   

About

Pole-like Objects Mapping and Long-Term Robot Localization in Dynamic Urban Scenarios


Languages

Language:C++ 50.9%Language:Python 30.4%Language:CMake 14.2%Language:GLSL 2.2%Language:Shell 1.4%Language:Makefile 0.4%Language:C 0.3%Language:EmberScript 0.2%