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
Code for the paper "On the Power of Edge Independent Graph Models"

Edge Independent Graph Models Code for the paper: "On the Power of Edge Independent Graph Models" Sudhanshu Chanpuriya, Cameron Musco, Konstantinos So

Konstantinos Sotiropoulos 0 Oct 26, 2021
Pytorch implementation of Feature Pyramid Network (FPN) for Object Detection

fpn.pytorch Pytorch implementation of Feature Pyramid Network (FPN) for Object Detection Introduction This project inherits the property of our pytorc

Jianwei Yang 912 Dec 21, 2022
Artificial Intelligence search algorithm base on Pacman

Pacman Search Artificial Intelligence search algorithm base on Pacman Source The Pacman Projects by the University of California, Berkeley. Layouts Di

Day Fundora 6 Nov 17, 2022
GBIM(Gesture-Based Interaction map)

手势交互地图 GBIM(Gesture-Based Interaction map),基于视觉深度神经网络的交互地图,通过电脑摄像头观察使用者的手势变化,进而控制地图进行简单的交互。网络使用PaddleX提供的轻量级模型PPYOLO Tiny以及MobileNet V3 small,使得整个模型大小约10MB左右,即使在CPU下也能快速定位和识别手势。

8 Feb 10, 2022
Noether Networks: meta-learning useful conserved quantities

Noether Networks: meta-learning useful conserved quantities This repository contains the code necessary to reproduce experiments from "Noether Network

Dylan Doblar 33 Nov 23, 2022
Callable PyTrees and filtered JIT/grad transformations => neural networks in JAX.

Equinox Callable PyTrees and filtered JIT/grad transformations = neural networks in JAX Equinox brings more power to your model building in JAX. Repr

Patrick Kidger 909 Dec 30, 2022
SweiNet is an uncertainty-quantifying shear wave speed (SWS) estimator for ultrasound shear wave elasticity (SWE) imaging.

SweiNet SweiNet is an uncertainty-quantifying shear wave speed (SWS) estimator for ultrasound shear wave elasticity (SWE) imaging. SweiNet takes as in

Felix Jin 3 Mar 31, 2022
yolov5 deepsort 行人 车辆 跟踪 检测 计数

yolov5 deepsort 行人 车辆 跟踪 检测 计数 实现了 出/入 分别计数。 默认是 南/北 方向检测,若要检测不同位置和方向,可在 main.py 文件第13行和21行,修改2个polygon的点。 默认检测类别:行人、自行车、小汽车、摩托车、公交车、卡车。 检测类别可在 detect

554 Dec 30, 2022
Bayesian optimisation library developped by Huawei Noah's Ark Library

Bayesian Optimisation Research This directory contains official implementations for Bayesian optimisation works developped by Huawei R&D, Noah's Ark L

HUAWEI Noah's Ark Lab 395 Dec 30, 2022
Elegy is a framework-agnostic Trainer interface for the Jax ecosystem.

Elegy Elegy is a framework-agnostic Trainer interface for the Jax ecosystem. Main Features Easy-to-use: Elegy provides a Keras-like high-level API tha

435 Dec 30, 2022
Python implementation of "Elliptic Fourier Features of a Closed Contour"

PyEFD An Python/NumPy implementation of a method for approximating a contour with a Fourier series, as described in [1]. Installation pip install pyef

Henrik Blidh 71 Dec 09, 2022
Magic tool for managing internet connection in local network by @zalexdev

Megacut ✂️ A new powerful Python3 tool for managing internet on a local network Installation git clone https://github.com/stryker-project/megacut cd m

Stryker 12 Dec 15, 2022
🛰️ List of earth observation companies and job sites

Earth Observation Companies & Jobs source Portals & Jobs Geospatial Geospatial jobs newsletter: ~biweekly newsletter with geospatial jobs by Ali Ahmad

Dahn 64 Dec 27, 2022
Multi-Task Learning as a Bargaining Game

Nash-MTL Official implementation of "Multi-Task Learning as a Bargaining Game". Setup environment conda create -n nashmtl python=3.9.7 conda activate

Aviv Navon 87 Dec 26, 2022
This repository contains various models targetting multimodal representation learning, multimodal fusion for downstream tasks such as multimodal sentiment analysis.

Multimodal Deep Learning 🎆 🎆 🎆 Announcing the multimodal deep learning repository that contains implementation of various deep learning-based model

Deep Cognition and Language Research (DeCLaRe) Lab 398 Dec 30, 2022
Weakly Supervised Scene Text Detection using Deep Reinforcement Learning

Weakly Supervised Scene Text Detection using Deep Reinforcement Learning This repository contains the setup for all experiments performed in our Paper

Emanuel Metzenthin 3 Dec 16, 2022
PixelPyramids: Exact Inference Models from Lossless Image Pyramids (ICCV 2021)

PixelPyramids: Exact Inference Models from Lossless Image Pyramids This repository contains the PyTorch implementation of the paper PixelPyramids: Exa

Visual Inference Lab @TU Darmstadt 8 Dec 11, 2022
Roadmap to becoming a machine learning engineer in 2020

Roadmap to becoming a machine learning engineer in 2020, inspired by web-developer-roadmap.

Chris Hoyean Song 1.7k Dec 29, 2022
Tensorforce: a TensorFlow library for applied reinforcement learning

Tensorforce: a TensorFlow library for applied reinforcement learning Introduction Tensorforce is an open-source deep reinforcement learning framework,

Tensorforce 3.2k Jan 02, 2023
The missing CMake project initializer

cmake-init - The missing CMake project initializer Opinionated CMake project initializer to generate CMake projects that are FetchContent ready, separ

1k Jan 01, 2023