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
A novel Engagement Detection with Multi-Task Training (ED-MTT) system

A novel Engagement Detection with Multi-Task Training (ED-MTT) system which minimizes MSE and triplet loss together to determine the engagement level of students in an e-learning environment.

Onur Çopur 12 Nov 11, 2022
Keras implementation of AdaBound

AdaBound for Keras Keras port of AdaBound Optimizer for PyTorch, from the paper Adaptive Gradient Methods with Dynamic Bound of Learning Rate. Usage A

Somshubra Majumdar 132 Sep 23, 2022
State-Relabeling Adversarial Active Learning

State-Relabeling Adversarial Active Learning Code for SRAAL [2020 CVPR Oral] Requirements torch = 1.6.0 numpy = 1.19.1 tqdm = 4.31.1 AL Results The

10 Jul 14, 2022
Dealing With Misspecification In Fixed-Confidence Linear Top-m Identification

Dealing With Misspecification In Fixed-Confidence Linear Top-m Identification This repository is the official implementation of [Dealing With Misspeci

0 Oct 25, 2021
🙄 Difficult algorithm, Simple code.

🎉TensorFlow2.0-Examples🎉! "Talk is cheap, show me the code." ----- Linus Torvalds Created by YunYang1994 This tutorial was designed for easily divin

1.7k Dec 25, 2022
Python package for visualizing the loss landscape of parameterized quantum algorithms.

orqviz A Python package for easily visualizing the loss landscape of Variational Quantum Algorithms by Zapata Computing Inc. orqviz provides a collect

Zapata Computing, Inc. 75 Dec 30, 2022
Official Implementation of "Tracking Grow-Finish Pigs Across Large Pens Using Multiple Cameras"

Multi Camera Pig Tracking Official Implementation of Tracking Grow-Finish Pigs Across Large Pens Using Multiple Cameras CVPR2021 CV4Animals Workshop P

44 Jan 06, 2023
Text to image synthesis using thought vectors

Text To Image Synthesis Using Thought Vectors This is an experimental tensorflow implementation of synthesizing images from captions using Skip Though

Paarth Neekhara 2.1k Jan 05, 2023
PaddleBoBo是基于PaddlePaddle和PaddleSpeech、PaddleGAN等开发套件的虚拟主播快速生成项目

PaddleBoBo - 元宇宙时代,你也可以动手做一个虚拟主播。 PaddleBoBo是基于飞桨PaddlePaddle深度学习框架和PaddleSpeech、PaddleGAN等开发套件的虚拟主播快速生成项目。PaddleBoBo致力于简单高效、可复用性强,只需要一张带人像的图片和一段文字,就能

502 Jan 08, 2023
A framework for joint super-resolution and image synthesis, without requiring real training data

SynthSR This repository contains code to train a Convolutional Neural Network (CNN) for Super-resolution (SR), or joint SR and data synthesis. The met

83 Jan 01, 2023
Geometric Vector Perceptrons --- a rotation-equivariant GNN for learning from biomolecular structure

Geometric Vector Perceptron Implementation of equivariant GVP-GNNs as described in Learning from Protein Structure with Geometric Vector Perceptrons b

Dror Lab 142 Dec 29, 2022
🔮 Execution time predictions for deep neural network training iterations across different GPUs.

Habitat: A Runtime-Based Computational Performance Predictor for Deep Neural Network Training Habitat is a tool that predicts a deep neural network's

Geoffrey Yu 44 Dec 27, 2022
[CVPR'21] Learning to Recommend Frame for Interactive Video Object Segmentation in the Wild

IVOS-W Paper Learning to Recommend Frame for Interactive Video Object Segmentation in the Wild Zhaoyun Yin, Jia Zheng, Weixin Luo, Shenhan Qian, Hanli

SVIP Lab 38 Dec 12, 2022
A GPU-optional modular synthesizer in pytorch, 16200x faster than realtime, for audio ML researchers.

torchsynth The fastest synth in the universe. Introduction torchsynth is based upon traditional modular synthesis written in pytorch. It is GPU-option

torchsynth 229 Jan 02, 2023
Data-driven reduced order modeling for nonlinear dynamical systems

SSMLearn Data-driven Reduced Order Models for Nonlinear Dynamical Systems This package perform data-driven identification of reduced order model based

Haller Group, Nonlinear Dynamics 27 Dec 13, 2022
Code to produce syntactic representations that can be used to study syntax processing in the human brain

Can fMRI reveal the representation of syntactic structure in the brain? The code base for our paper on understanding syntactic representations in the

Aniketh Janardhan Reddy 4 Dec 18, 2022
This is a Pytorch implementation of paper: DropEdge: Towards Deep Graph Convolutional Networks on Node Classification

DropEdge: Towards Deep Graph Convolutional Networks on Node Classification This is a Pytorch implementation of paper: DropEdge: Towards Deep Graph Con

401 Dec 16, 2022
Code for "Training Neural Networks with Fixed Sparse Masks" (NeurIPS 2021).

Fisher Induced Sparse uncHanging (FISH) Mask This repo contains the code for Fisher Induced Sparse uncHanging (FISH) Mask training, from "Training Neu

Varun Nair 37 Dec 30, 2022
Job-Recommend-Competition - Vectorwise Interpretable Attentions for Multimodal Tabular Data

SiD - Simple Deep Model Vectorwise Interpretable Attentions for Multimodal Tabul

Jungwoo Park 40 Dec 22, 2022
Code for database and frontend of webpage for Neural Fields in Visual Computing and Beyond.

Neural Fields in Visual Computing—Complementary Webpage This is based on the amazing MiniConf project from Hendrik Strobelt and Sasha Rush—thank you!

Brown University Visual Computing Group 29 Nov 30, 2022