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.
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://www.jianguoyun.com/p/DWsN36kQzcSTBxiCn-kD (Access Password:nrsl2021)
2020-11-05-demo.bag
https://www.jianguoyun.com/p/Df4eWSQQzcSTBxiHn-kD (Access Password:nrsl2021)
1 Settings
- System: ubuntu 16.04
- C++ version: c++17
- g++/gcc >= 7.0
- cmake >= 3.10
2 Build
2.1 Install dependencies
Please take a look the README in long-term-localization/src/common
folder.
2.2 Build
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
roslaunch lio_sam run.launch
# terminal 2
./sh/record.sh
# terminal 3
rosbag play 2020-10-14-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.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
# 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-13-demo.bag) need to run the process in 3.1 Semantic Processing to extract the semantic cluster, and then used for matching and localization.
3.3.1 Semantic Processing
# terminal 1
roslaunch lio_sam run.launch
# terminal 2
./sh/record.sh
# terminal 3
rosbag play 2020-11-13-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
# copy pole cluster map to folder "src/long_term_relocalization/maps".
cp src/long_term_relocalization/maps/clusters_map.bin /tmp/
# launch relocalization nodes.
roslaunch long_term_relocalization relocalization.launch
Then play the processed bag to match with "clusters_map.bin".
cd ~/offline_process/sequences/00
rosbag play semantic.bag --clock