Code Monkey home page Code Monkey logo

long-term-localization's Introduction

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   

long-term-localization's People

Contributors

lisilin013 avatar nixwang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.