Range Image-based LiDAR Localization for Autonomous Vehicles Using Mesh Maps

Overview

Range Image-based 3D LiDAR Localization

This repo contains the code for our ICRA2021 paper: Range Image-based LiDAR Localization for Autonomous Vehicles.

Developed by Xieyuanli Chen, Ignacio Vizzo, Thomas Läbe and Jens Behley.

It uses a novel sensor model with MCL to achieve 3D LiDAR global localization and pose tracking. The sensor model compares the range image of the current LiDAR scan to the synthetic range images rendered from the triangular mesh to update the weight of particles. This method is simple but can be used with different types of LiDAR scanners in different datasets and environments without fine-tuning.

Online localization demo.

Visualizations: Left: the triangular mesh and the localization results; Right: Sub-tile maps

Table of Contents

  1. Introduction
  2. Publication
  3. Dependencies
  4. How to use
  5. Related work
  6. License

Publication

If you use our implementation in your academic work, please cite the corresponding paper:

@inproceedings{chen2021icra,
	author = {X. Chen and I. Vizzo and T. L{\"a}be and J. Behley and C. Stachniss},
	title = {{Range Image-based LiDAR Localization for Autonomous Vehicles}},
	booktitle = icra,
	year = 2021,
	url = {http://www.ipb.uni-bonn.de/pdfs/chen2021icra.pdf},
	codeurl = {https://github.com/PRBonn/range-mcl}
}

Dependencies

The code was tested with Ubuntu 20.04 with its standard python version 3.8.

We are using OpenGL to do achieve fast rendering, so you will need an OpenGL capable graphics card (we use Nvidia cards, e.g. 2080Ti) to be fast.

  • System dependencies related to OpenGL:

    sudo apt-get update 
    sudo apt-get install libgl1-mesa-glx
  • Other system dependencies:

    sudo apt-get update 
    sudo apt-get install libusb-1.0   # open3d 0.12.0 dependency
    sudo apt-get install -y python3-pip
    sudo -H pip3 install --upgrade pip
  • Python dependencies (may also work with different versions than mentioned in the requirements file)

    sudo -H pip3 install -r requirements.txt

How to use

Quick use

For a quick demo, one could download the mesh map and LiDAR data, extract the them in the /data folder following the recommended data structure, and then run:

cd src/
python3 main_range_mcl.py

One could then get the online visualization of range-based MCL as shown in the gif.

More detailed usage

Here, we provide more detailed information about our range-image-based LiDAR localization method, including building mesh maps, evaluating the localization results and more pre-built maps of different datasets.

Build mesh map

To build a mesh map, we use the Poisson surface reconstruction provided by the Open3D library. One need to download the LiDAR data, extract the them in the /data folder following the recommended data structure, and then run:

python3 build_mesh_map.py

Notice that, we used our moving object segmentation method (coming soon) cleaned the scans before building the map. One could also use other methods to clean the map.

For fast calculating and generating range and normal data for LiDAR scans, one could find more details here.

Evaluation

Once finished the localization process, one would get the localization results at /results. To evaluate the localization results, one could check the evaluation.py. For a quick demo, one just need to run

python3 evaluation.py

Collection of mesh maps

Notice that, the mesh maps were generated using the data from KITTI dataset, MulRan dataset and Apollo dataset. Please register on their official website to apply for the original data.

Related work

Puma: Poisson Surface Reconstruction for LiDAR Odometry and Mapping

We also released the implementation of the algorithms described in our paper Poisson Surface Reconstruction for LiDAR Odometry and Mapping. This is a LiDAR Odometry and Mapping pipeline that uses the Poisson Surface Reconstruction algorithm to build the map as a triangular mesh online.

Overlap-localization: Overlap-based 3D LiDAR Monte Carlo Localization

We previously also proposed a learning-based global localization method, called overlap localization. It uses the OverlapNet to train an observation model for Monte Carlo Localization and achieves global localization with 3D LiDAR scans.

License

Copyright 2021, Xieyuanli Chen, Ignacio Vizzo, Thomas Läbe, Jens Behley, Cyrill Stachniss, Photogrammetry and Robotics Lab, University of Bonn.

This project is free software made available under the MIT License. For details see the LICENSE file.

Comments
  • some problem

    some problem

    image

    XXX@ubuntu:~/range-mcl/src$ python3 main_range_mcl.py INFO - 2021-06-24 00:21:08,437 - acceleratesupport - OpenGL_accelerate module loaded INFO - 2021-06-24 00:21:08,451 - arraydatatype - Using accelerated ArrayDatatype Load mesh map and initialize map module... lower bound: [-137.51303435084705, -53.88607274849302] upper bound: [170.8931181474161, 237.73366404891496] number of tiles = 8 total number of triangles: 4282269 WARNING - 2021-06-24 00:21:21,473 - numpymodule - Unable to load numpy_formathandler accelerator from OpenGL_accelerate Monte Carlo localization initializing... 段错误 (核心已转储)

    opened by conancheng 2
  • Regd. CARLA data

    Regd. CARLA data

    Hi,

    Thank you for your work and the open source release. I was wondering if you have released the CARLA sequence (mesh map, odometry etc.) from your experiments somewhere?

    opened by karnikram 0
  • Error with the DISPLAY environment variable

    Error with the DISPLAY environment variable

    Hi there, thanks for providing the code to test. However, I got an issue running the code.

    ==================================================================

    Message=index 0 is out of bounds for axis 0 with size 0 Source=F:\Capstone\algorithms\range_mcl\src\utils.py StackTrace: File "F:\Capstone\algorithms\range_mcl\src\utils.py", line 340, in load_poses_kitti inv_frame0 = np.linalg.inv(poses[0]) File "F:\Capstone\algorithms\range_mcl\src\main_range_mcl.py", line 49, in (Current frame) map_poses = load_poses_kitti(map_pose_file, map_calib_file)

    ======================================================================

    I tried to search for the GLFWError 65544 but none of the solutions seems to work. Is there anything idea what is happening?

    Regards Jimmy

    opened by GinWeng 1
  • 20.04 python3.8 can't be running...

    20.04 python3.8 can't be running...

    conan@conan-Lenovo-Legion-Y7000P-2020H:~/range-mcl-main/src$ python3 main_range_mcl.py INFO - 2021-08-06 11:42:08,929 - acceleratesupport - OpenGL_accelerate module loaded INFO - 2021-08-06 11:42:08,931 - arraydatatype - Using accelerated ArrayDatatype Load mesh map and initialize map module... lower bound: [-137.51303435084705, -53.88607274849302] upper bound: [170.8931181474161, 237.73366404891496] number of tiles = 8 total number of triangles: 4282269 WARNING - 2021-08-06 11:42:12,640 - numpymodule - Unable to load numpy_formathandler accelerator from OpenGL_accelerate Monte Carlo localization initializing... 段错误 (核心已转储) 2021-08-06 14-09-58屏幕截图

    2021-08-06 14-09-33屏幕截图

    opened by conancheng 4
  • How the algorithm runs in real time and its compatibility with solid-state lidar positioning?

    How the algorithm runs in real time and its compatibility with solid-state lidar positioning?

    The work is excellent and I'm honor to study for it.But I have two questions about it: 1、how the algorithm runs in real time not need "velodyne_bin" 2、its compatibility with solid-state lidar ,such as livox I'm looking forward to your answers,thank you Yours sincerely

    opened by PigletPh 8
  • python main_range_mcl.py problem

    python main_range_mcl.py problem

    OS: ubuntu2004 python: Python 3.8.5 gpu: GeForce GTX 1060 drive NVIDIA-SMI 460.56 Driver Version: 460.56 CUDA Version: 11.2

    $ python main_range_mcl.py ... finished frame 1099 with time of: 7.22408e-05 s finished frame 1100 with time of: 5.55515e-05 s Average runtime after convergence: 0.16806003594713895 save the localization results at: ../results/demo_loc_results.npz Exception ignored in: <function GlBuffer.del at 0x7efcd4e45790> Traceback (most recent call last): File "/home/xxx/range-mcl/src/map_renderer/glow.py", line 75, in del AttributeError: 'NoneType' object has no attribute 'glDeleteBuffers' Exception ignored in: <function GlBuffer.del at 0x7efcd4e45790> Traceback (most recent call last): File "/home/xxx/range-mcl/src/map_renderer/glow.py", line 75, in del AttributeError: 'NoneType' object has no attribute 'glDeleteBuffers' Exception ignored in: <function GlProgram.del at 0x7efcd4e4e160> Traceback (most recent call last): File "/home/xxx/range-mcl/src/map_renderer/glow.py", line 482, in del AttributeError: 'NoneType' object has no attribute 'glDeleteProgram' Exception ignored in: <function GlTextureBuffer.del at 0x7efcd4e45ca0> Traceback (most recent call last): File "/home/xxx/range-mcl/src/map_renderer/glow.py", line 128, in del AttributeError: 'NoneType' object has no attribute 'glDeleteBuffers' Exception ignored in: <function GlBuffer.del at 0x7efcd4e45790> Traceback (most recent call last): File "/home/xxx/range-mcl/src/map_renderer/glow.py", line 75, in del AttributeError: 'NoneType' object has no attribute 'glDeleteBuffers' Exception ignored in: <function GlProgram.del at 0x7efcd4e4e160> Traceback (most recent call last): File "/home/xxx/range-mcl/src/map_renderer/glow.py", line 482, in del AttributeError: 'NoneType' object has no attribute 'glDeleteProgram' Exception ignored in: <function GlProgram.del at 0x7efcd4e4e160> Traceback (most recent call last): File "/home/xxx/range-mcl/src/map_renderer/glow.py", line 482, in del AttributeError: 'NoneType' object has no attribute 'glDeleteProgram' Exception ignored in: <function GlTexture2D.del at 0x7efcd4e4c280> Traceback (most recent call last): File "/home/xxx/range-mcl/src/map_renderer/glow.py", line 229, in del AttributeError: 'NoneType' object has no attribute 'glDeleteTextures' Exception ignored in: <function GlTexture2D.del at 0x7efcd4e4c280> Traceback (most recent call last): File "/home/xxx/range-mcl/src/map_renderer/glow.py", line 229, in del AttributeError: 'NoneType' object has no attribute 'glDeleteTextures' Exception ignored in: <function GlTexture2D.del at 0x7efcd4e4c280> Traceback (most recent call last): File "/home/xxx/range-mcl/src/map_renderer/glow.py", line 229, in del AttributeError: 'NoneType' object has no attribute 'glDeleteTextures' Exception ignored in: <function GlFramebuffer.del at 0x7efcd4e4e9d0> Traceback (most recent call last): File "/home/xxx/range-mcl/src/map_renderer/glow.py", line 624, in del AttributeError: 'NoneType' object has no attribute 'glDeleteFramebuffers' Exception ignored in: <function GlTexture2D.del at 0x7efcd4e4c280> Traceback (most recent call last): File "/home/xxx/range-mcl/src/map_renderer/glow.py", line 229, in del AttributeError: 'NoneType' object has no attribute 'glDeleteTextures' Exception ignored in: <function GlTexture2D.del at 0x7efcd4e4c280> Traceback (most recent call last): File "/home/xxx/range-mcl/src/map_renderer/glow.py", line 229, in del AttributeError: 'NoneType' object has no attribute 'glDeleteTextures' Exception ignored in: <function GlTexture2D.del at 0x7efcd4e4c280> Traceback (most recent call last): File "/home/xxx/range-mcl/src/map_renderer/glow.py", line 229, in del AttributeError: 'NoneType' object has no attribute 'glDeleteTextures' Exception ignored in: <function GlRenderbuffer.del at 0x7efcd4e4e5e0> Traceback (most recent call last): File "/home/xxx/range-mcl/src/map_renderer/glow.py", line 591, in del AttributeError: 'NoneType' object has no attribute 'glDeleteRenderbuffers'

    opened by improve100 3
Releases(v1.0)
Owner
Photogrammetry & Robotics Bonn
Photogrammetry & Robotics Lab at the University of Bonn
Photogrammetry & Robotics Bonn
Local trajectory planner based on a multilayer graph framework for autonomous race vehicles.

Graph-Based Local Trajectory Planner The graph-based local trajectory planner is python-based and comes with open interfaces as well as debug, visuali

TUM - Institute of Automotive Technology 160 Jan 4, 2023
GndNet: Fast ground plane estimation and point cloud segmentation for autonomous vehicles using deep neural networks.

GndNet: Fast Ground plane Estimation and Point Cloud Segmentation for Autonomous Vehicles. Authors: Anshul Paigwar, Ozgur Erkent, David Sierra Gonzale

Anshul Paigwar 114 Dec 29, 2022
Mesh Graphormer is a new transformer-based method for human pose and mesh reconsruction from an input image

MeshGraphormer ✨ ✨ This is our research code of Mesh Graphormer. Mesh Graphormer is a new transformer-based method for human pose and mesh reconsructi

Microsoft 251 Jan 8, 2023
An extremely simple, intuitive, hardware-friendly, and well-performing network structure for LiDAR semantic segmentation on 2D range image. IROS21

FIDNet_SemanticKITTI Motivation Implementing complicated network modules with only one or two points improvement on hardware is tedious. So here we pr

YimingZhao 54 Dec 12, 2022
Kaggle Lyft Motion Prediction for Autonomous Vehicles 4th place solution

Lyft Motion Prediction for Autonomous Vehicles Code for the 4th place solution of Lyft Motion Prediction for Autonomous Vehicles on Kaggle. Discussion

null 44 Jun 27, 2022
Open source simulator for autonomous vehicles built on Unreal Engine / Unity, from Microsoft AI & Research

Welcome to AirSim AirSim is a simulator for drones, cars and more, built on Unreal Engine (we now also have an experimental Unity release). It is open

Microsoft 13.8k Jan 5, 2023
AI Face Mesh: This is a simple face mesh detection program based on Artificial intelligence.

AI Face Mesh: This is a simple face mesh detection program based on Artificial Intelligence which made with Python. It's able to detect 468 different

Md. Rakibul Islam 1 Jan 13, 2022
chen2020iros: Learning an Overlap-based Observation Model for 3D LiDAR Localization.

Overlap-based 3D LiDAR Monte Carlo Localization This repo contains the code for our IROS2020 paper: Learning an Overlap-based Observation Model for 3D

Photogrammetry & Robotics Bonn 219 Dec 15, 2022
Python scripts performing class agnostic object localization using the Object Localization Network model in ONNX.

ONNX Object Localization Network Python scripts performing class agnostic object localization using the Object Localization Network model in ONNX. Ori

Ibai Gorordo 15 Oct 14, 2022
Uncertainty-aware Semantic Segmentation of LiDAR Point Clouds for Autonomous Driving

SalsaNext: Fast, Uncertainty-aware Semantic Segmentation of LiDAR Point Clouds for Autonomous Driving Abstract In this paper, we introduce SalsaNext f

null 308 Jan 4, 2023
A repo that contains all the mesh keys needed for mesh backend, along with a code example of how to use them in python

Mesh-Keys A repo that contains all the mesh keys needed for mesh backend, along with a code example of how to use them in python Have been seeing alot

Joseph 53 Dec 13, 2022
CoSMA: Convolutional Semi-Regular Mesh Autoencoder. From Paper "Mesh Convolutional Autoencoder for Semi-Regular Meshes of Different Sizes"

Mesh Convolutional Autoencoder for Semi-Regular Meshes of Different Sizes Implementation of CoSMA: Convolutional Semi-Regular Mesh Autoencoder arXiv p

Fraunhofer SCAI 10 Oct 11, 2022
Given a 2D triangle mesh, we could randomly generate cloud points that fill in the triangle mesh

generate_cloud_points Given a 2D triangle mesh, we could randomly generate cloud points that fill in the triangle mesh. Run python disp_mesh.py Or you

Peng Yu 2 Dec 24, 2021
DLL: Direct Lidar Localization

DLL: Direct Lidar Localization Summary This package presents DLL, a direct map-based localization technique using 3D LIDAR for its application to aeri

Service Robotics Lab 127 Dec 16, 2022
PyTorch implementations of the paper: "Learning Independent Instance Maps for Crowd Localization"

IIM - Crowd Localization This repo is the official implementation of paper: Learning Independent Instance Maps for Crowd Localization. The code is dev

tao han 91 Nov 10, 2022
This YoloV5 based model is fit to detect people and different types of land vehicles, and displaying their density on a fitted map, according to their coordinates and detected labels.

This YoloV5 based model is fit to detect people and different types of land vehicles, and displaying their density on a fitted map, according to their

Liron Bdolah 8 May 22, 2022
Vehicles Counting using YOLOv4 + DeepSORT + Flask + Ngrok

A project for counting vehicles using YOLOv4 + DeepSORT + Flask + Ngrok

Duong Tran Thanh 37 Dec 16, 2022
Industrial Image Anomaly Localization Based on Gaussian Clustering of Pre-trained Feature

Industrial Image Anomaly Localization Based on Gaussian Clustering of Pre-trained Feature Q. Wan, L. Gao, X. Li and L. Wen, "Industrial Image Anomaly

smiler 6 Dec 25, 2022
This repository is an open-source implementation of the ICRA 2021 paper: Locus: LiDAR-based Place Recognition using Spatiotemporal Higher-Order Pooling.

Locus This repository is an open-source implementation of the ICRA 2021 paper: Locus: LiDAR-based Place Recognition using Spatiotemporal Higher-Order

Robotics and Autonomous Systems Group 96 Dec 15, 2022