Git Product home page Git Product logo

livox-localization's Introduction

Livox-Localization

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.

1. Features

  • 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.

demo

2. Prerequisites

2.1 Dependencies for FAST-LIO

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.

2.2 Dependencies for localization module

sudo apt install ros-$ROS_DISTRO-ros-numpy
pip install open3d
  • numpy
pip install numpy
  • sklearn
pip install sklearn

3. Build

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)

4. Run Localization

4.1 Dataset Requirements

Before running the mapping functionality, please make sure the sensor data are published to the correct rostopic.

  • Livox LiDAR: /livox/lidar
  • IMU: /livox/imu

4.2 Sample Dataset

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.

4.3 Prepare ScanContext information

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.

4.4 Run Localization Module

  1. First, please make sure you're using the Python 2.7 environment;
  2. Provide ScanContext information path. Modify the SC-file path for line 256 of the file global_localization.
  3. 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;

  1. Play the demo rosbag.
rosbag play demo.bag

Related Works

  1. FAST-LIO: A computationally efficient and robust LiDAR-inertial odometry (LIO) package
  2. ikd-Tree: A state-of-art dynamic KD-Tree for 3D kNN search.
  3. FAST-LIO-SLAM: The integration of FAST-LIO with Scan-Context loop closure module.
  4. FAST-LIO-LOCALIZATION: A simple localization framework that can re-localize in built maps based on FAST-LIO.
  5. LIO-SAM_based_relocalization: A simple system that can relocalize a robot on a built map based on LIO-SAM.

Acknowledgments

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.

Contact

  • If you have any questions, contact here please

livox-localization's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

livox-localization's Issues

Localisation in Dynamic Environments

Hi,
Thanks for sharing this project with the open-source community.
I had a question regarding localization in a dynamic environment. Have you had the chance to test this out dynamic environments such as factories and warehouses over time? If yes how was the performance of the solution?

TIA

关于*.odom文件是如何生成的

您好,打扰了,请问*.odom文件是如何生成的?我运行了livox_mapping只生成了.pcd文件和位姿的txt文件。谢谢您,打扰了

why is it waiting for global map? and didn't proceed forwards yet?

I have used the output of the livox_mapping, which is stored in /home/yijing/rosws3/src/startup/data/lio_livox_slam.txt and /home/yijing/rosws3/src/startup/data/PCD/scans_lc_park.pcd, the modified file_path = "/home/yijing/rosws3/src/startup/data" in global_localization.py, then I launched the file by roslaunch livox_localization localization_horizon.launch map:="/home/yijing/rosws3/src/startup/data/scancontext/PCD/scans_lc_park.pcd", then below was the output:
process[laserMapping-1]: started with pid [6317]
process[global_localization-2]: started with pid [6318]
process[transform_fusion-3]: started with pid [6319]
process[map_publishe-4]: started with pid [6335]
process[rviz-5]: started with pid [6336]
[ INFO] [1647249798.080856402]: Recognized the following parameters
[ INFO] [1647249798.081835821]: * file_name: /home/yijing/rosws3/src/startup/data/PCD/scans_lc_park.pcd
[ INFO] [1647249798.081913968]: * interval: 5
[ INFO] [1647249798.081945420]: * frame_id: /map
[ INFO] [1647249798.081969742]: * topic_name: /map
[ INFO] [1647249798.081991141]: * latch: false
Multi thread started
p_pre->lidar_type 1

[INFO] [1647249798.769313, 0.000000]: Transform Fusion Node Inited...
[INFO] [1647249799.000673, 0.000000]: Localization Node Inited...
[WARN] [1647249799.005202, 0.000000]: Waiting for global map......
[ INFO] [1647249818.279778577]: Loaded pointcloud with the following stats
[ INFO] [1647249818.279801678]:  * number of points: 7875638
[ INFO] [1647249818.279806518]:  * total size [bytes]: 126010208
[ INFO] [1647249818.279811704]:  * channel names: x y z intensity
theglobal map didn't com up in the localization rviz. Where did I set it wrong?

重定位时起始点找不准的问题

您好。我们自己录制的rosbag播放从头开始播放,重定位效果很好。但是当我们把rosbag包跳过开头,比如说100秒处开始播放,重定位就没法找到相应的位置,请问是怎么回事?

why is it waiting for global map? and didn't proceed forwards yet?

I have used the output of the livox_mapping by using "around_park_2021-09-24-11-30-54.bag", which is stored in /home/yijing/rosws3/src/startup/data/lio_livox_slam.txt and /home/yijing/rosws3/src/startup/data/PCD/scans_lc_park.pcd, the modified file_path = "/home/yijing/rosws3/src/startup/data" in global_localization.py, then I launched the file by roslaunch livox_localization localization_horizon.launch map:="/home/yijing/rosws3/src/startup/data/scancontext/PCD/scans_lc_park.pcd", then below was the output:
process[laserMapping-1]: started with pid [6317]
process[global_localization-2]: started with pid [6318]
process[transform_fusion-3]: started with pid [6319]
process[map_publishe-4]: started with pid [6335]
process[rviz-5]: started with pid [6336]
[ INFO] [1647249798.080856402]: Recognized the following parameters
[ INFO] [1647249798.081835821]: * file_name: /home/yijing/rosws3/src/startup/data/PCD/scans_lc_park.pcd
[ INFO] [1647249798.081913968]: * interval: 5
[ INFO] [1647249798.081945420]: * frame_id: /map
[ INFO] [1647249798.081969742]: * topic_name: /map
[ INFO] [1647249798.081991141]: * latch: false
Multi thread started
p_pre->lidar_type 1

[INFO] [1647249798.769313, 0.000000]: Transform Fusion Node Inited...
[INFO] [1647249799.000673, 0.000000]: Localization Node Inited...
[WARN] [1647249799.005202, 0.000000]: Waiting for global map......
[ INFO] [1647249818.279778577]: Loaded pointcloud with the following stats
[ INFO] [1647249818.279801678]:  * number of points: 7875638
[ INFO] [1647249818.279806518]:  * total size [bytes]: 126010208
[ INFO] [1647249818.279811704]:  * channel names: x y z intensity
theglobal map didn't com up in the localization rviz. Where did I set it wrong?

Pose6D.h issue when catkin_make

When I catkin_make the project, there is an error happen:
fatal error:fast_lio/Pose6D.h: No such file or directory
#include <fast_lio/Pose6D.h>
compilation terminated

I have successfully build and run fast_lio, but it still output this error, have someone met or fixed this problem?

作者您好,有个问题想请教一下

我在livox_mapping里保存了txt文件,里面有历史位姿数据,但是这个txt,不是**.odom格式,所以想问一下:
1,.odom文件是怎么来的,或者说怎么生成?
2,最后生成的
.odom文件是一个?还是很多个,且数量和历史关键帧数量一样多?
3,另外一个问题,我改了livox_mapping代码,生成的一帧一帧的pcd有2722个,但是位姿txt里的数据有2723行,多了一行,这个就对应不上了,不知道是什么问题,用的你公开的bag包是around_park_2021-09-24-11-36-03.bag

Localization difference

Hello,I have a question that the LIO_Livox has given the position so what are the differences between your Localization and theirs?or what are the advantages over theirs.Thanks.

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.