This repository implements a point-cloud map based localization framework. The odometry information is published with FAST-LIO. And the initial localization information is obtained with ScanContext and its python-implementation PyICP-SLAM. The main idea is inspired by the FAST-LIO-LOCALIZATION. This repository is the extension of our mapping module: Livox-Mapping, where you can get an accurate point-cloud map.
- Realtime 3D global localization in a pre-built point cloud map.
- The initial localization pose can be obtained with ScanContext which store the history point cloud collection information.
Technically, if you have built and run FAST-LIO before, you may skip section 2.1.
This part of dependency is consistent with FAST-LIO, please refer to the documentation [Link].
Also, we have provided you the Docker Image (For Cpp-Dependencies) for a quick usage, please check DockerHub. For specific information, please refer to the document described in Livox-Mapping.
-
python 2.7
sudo apt install ros-$ROS_DISTRO-ros-numpy
pip install open3d
- numpy
pip install numpy
- sklearn
pip install sklearn
Clone the repository and catkin_make:
cd ~/$A_ROS_DIR$/src
git clone https://github.com//SiyuanHuang95/Livox-Localization.git
cd Livox-Localization
git submodule update --init
cd ../..
catkin_make
source devel/setup.bash
- Remember to source the livox_ros_driver before build (follow livox_ros_driver)
Before running the mapping functionality, please make sure the sensor data are published to the correct rostopic.
- Livox LiDAR: /livox/lidar
- IMU: /livox/imu
For the ease of usage, we are providing several test rosbags collected in one industrial park located in Shanghai. Please be aware that all codes and datasets included in this repository are for academic research purposes only. Other usages are NOT encouraged, and it is at your own risk. If You have any concerns including privacy, please contact us by sending an e-mail to [email protected]
The dataset can be downloaded through the Baidu Netdisk with:
Link:https://pan.baidu.com/s/17ElBOWiFVr68975FtXY8ZA
Passwort:pjop
The pre-built point-cloud map and its corresponding extracted history information represented with Ring Key, Scan Context and the pose file could be found in one zip file saved in the Baidu Netdisk.
Before run the localization module, you have to prepare the ScanContext related files, which store the history odometry information during the collection activity. Here, we assume that the odometry information has been store in the format of interactive_slam. That format is also the output representation of our former work Livox-Mapping.
We provide the function livox_load_pc_make_sc in our ScanContextManager class, you can refer to the file livox_scan_context_test.py for the usage demonstration.
- First, please make sure you're using the Python 2.7 environment;
- Provide ScanContext information path. Modify the SC-file path for line 256 of the file global_localization.
- Run localization, here we take Livox Horizion as an example:
roslaunch livox_localization localization_horizon.launch map:=/path/to/your/map.pcd
Please modify /path/to/your/map.pcd
to your own map point cloud file path.
Wait for 3~5 seconds until the map cloud shows up in RVIZ;
- Play the demo rosbag.
rosbag play demo.bag
- FAST-LIO: A computationally efficient and robust LiDAR-inertial odometry (LIO) package
- ikd-Tree: A state-of-art dynamic KD-Tree for 3D kNN search.
- FAST-LIO-SLAM: The integration of FAST-LIO with Scan-Context loop closure module.
- FAST-LIO-LOCALIZATION: A simple localization framework that can re-localize in built maps based on FAST-LIO.
- LIO-SAM_based_relocalization: A simple system that can relocalize a robot on a built map based on LIO-SAM.
Thanks for the authors of FAST-LIO, FAST-LIO-LOCALIZATION and LIO-SAM_based_relocalization. We also use the tools from PyICP-SLAM and kd-tree.