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

    [email protected]:~/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...

    [email protected]:~/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
Learning Tracking Representations via Dual-Branch Fully Transformer Networks

Learning Tracking Representations via Dual-Branch Fully Transformer Networks DualTFR ⭐ We achieves the runner-ups for both VOT2021ST (short-term) and

phiphi 19 May 04, 2022
Official code repository for the publication "Latent Equilibrium: A unified learning theory for arbitrarily fast computation with arbitrarily slow neurons"

Latent Equilibrium: A unified learning theory for arbitrarily fast computation with arbitrarily slow neurons This repository contains the code to repr

Computational Neuroscience, University of Bern 3 Aug 04, 2022
PyArmadillo: an alternative approach to linear algebra in Python

PyArmadillo is a linear algebra library for the Python language, with an emphasis on ease of use.

Terry Zhuo 58 Oct 11, 2022
Official PyTorch implementation of "Improving Face Recognition with Large AgeGaps by Learning to Distinguish Children" (BMVC 2021)

Inter-Prototype (BMVC 2021): Official Project Webpage This repository provides the official PyTorch implementation of the following paper: Improving F

Jungsoo Lee 16 Jun 30, 2022
Vit-ImageClassification - Pytorch ViT for Image classification on the CIFAR10 dataset

Vit-ImageClassification Introduction This project uses ViT to perform image clas

Kaicheng Yang 4 Jun 01, 2022
Human4D Dataset tools for processing and visualization

HUMAN4D: A Human-Centric Multimodal Dataset for Motions & Immersive Media HUMAN4D constitutes a large and multimodal 4D dataset that contains a variet

tofis 15 Nov 09, 2022
An offline deep reinforcement learning library

d3rlpy: An offline deep reinforcement learning library d3rlpy is an offline deep reinforcement learning library for practitioners and researchers. imp

Takuma Seno 817 Jan 02, 2023
A PyTorch Implementation of Gated Graph Sequence Neural Networks (GGNN)

A PyTorch Implementation of GGNN This is a PyTorch implementation of the Gated Graph Sequence Neural Networks (GGNN) as described in the paper Gated G

Ching-Yao Chuang 427 Dec 13, 2022
Gesture-Volume-Control - This Python program can adjust the system's volume by using hand gestures

Gesture-Volume-Control This Python program can adjust the system's volume by usi

VatsalAryanBhatanagar 1 Dec 30, 2021
Reinforcement Learning Theory Book (rus)

Reinforcement Learning Theory Book (rus)

qbrick 206 Nov 27, 2022
A PyTorch Reimplementation of TecoGAN: Temporally Coherent GAN for Video Super-Resolution

TecoGAN-PyTorch Introduction This is a PyTorch reimplementation of TecoGAN: Temporally Coherent GAN for Video Super-Resolution (VSR). Please refer to

165 Dec 17, 2022
PFFDTD is an open-source FDTD simulator for 3D room acoustics

PFFDTD is an open-source FDTD simulator for 3D room acoustics

Brian Hamilton 34 Nov 24, 2022
Implementation of 'lightweight' GAN, proposed in ICLR 2021, in Pytorch. High resolution image generations that can be trained within a day or two

512x512 flowers after 12 hours of training, 1 gpu 256x256 flowers after 12 hours of training, 1 gpu Pizza 'Lightweight' GAN Implementation of 'lightwe

Phil Wang 1.5k Jan 02, 2023
Supporting code for short YouTube series Neural Networks Demystified.

Neural Networks Demystified Supporting iPython notebooks for the YouTube Series Neural Networks Demystified. I've included formulas, code, and the tex

Stephen 1.3k Dec 23, 2022
Sentiment analysis translations of the Bhagavad Gita

Sentiment and Semantic Analysis of Bhagavad Gita Translations It is well known that translations of songs and poems not only breaks rhythm and rhyming

Machine learning and Bayesian inference @ UNSW Sydney 3 Aug 01, 2022
PyTorch implementation of HDN(Homography Decomposition Networks) for planar object tracking

Homography Decomposition Networks for Planar Object Tracking This project is the offical PyTorch implementation of HDN(Homography Decomposition Networ

CaptainHook 48 Dec 15, 2022
[NeurIPS 2021] Galerkin Transformer: a linear attention without softmax

[NeurIPS 2021] Galerkin Transformer: linear attention without softmax Summary A non-numerical analyst oriented explanation on Toward Data Science abou

Shuhao Cao 159 Dec 20, 2022
Offline Reinforcement Learning with Implicit Q-Learning

Offline Reinforcement Learning with Implicit Q-Learning This repository contains the official implementation of Offline Reinforcement Learning with Im

Ilya Kostrikov 126 Jan 06, 2023
PyTorch implementation of Convolutional Neural Fabrics http://arxiv.org/abs/1606.02492

PyTorch implementation of Convolutional Neural Fabrics arxiv:1606.02492 There are some minor differences: The raw image is first convolved, to obtain

Anuvabh Dutt 25 Dec 22, 2021
This project provides an unsupervised framework for mining and tagging quality phrases on text corpora with pretrained language models (KDD'21).

UCPhrase: Unsupervised Context-aware Quality Phrase Tagging To appear on KDD'21...[pdf] This project provides an unsupervised framework for mining and

Xiaotao Gu 146 Dec 22, 2022