• Stars
    star
    794
  • Rank 57,349 (Top 2 %)
  • Language
    C++
  • License
    BSD 3-Clause "New...
  • Created about 6 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Map handling framework for automated driving

Lanelet2

CI CD Build Status ROS focal/noetic Build Status ROS2 focal/foxy Build Status ROS2 jammy/humble PyPI Downloads

Overview

Lanelet2 is a C++ library for handling map data in the context of automated driving. It is designed to utilize high-definition map data in order to efficiently handle the challenges posed to a vehicle in complex traffic scenarios. Flexibility and extensibility are some of the core principles to handle the upcoming challenges of future maps.

Features:

  • 2D and 3D support
  • Consistent modification: if one point is modified, all owning objects see the change
  • Supports lane changes, routing through areas, etc.
  • Separated routing for pedestrians, vehicles, bikes, etc.
  • Many customization points to add new traffic rules, routing costs, parsers, etc.
  • Simple convenience functions for common tasks when handling maps
  • Accurate Projection between the lat/lon geographic world and local metric coordinates
  • IO Interface for reading and writing e.g. osm data formats (this does not mean it can deal with osm maps)
  • Python bindings for the whole C++ interface
  • Boost Geometry support for all thinkable kinds of geometry calculations on map primitives
  • Released under the BSD 3-Clause license
  • Support for ROS1, ROS2, Docker and Conan (see instructions below)

Lanelet2 is the successor of the old liblanelet that was developed in 2013. If you know Lanelet1, you might be interested in reading this.

Documentation

You can find more documentation in the individual packages and in doxygen comments. Here is an overview on the most important topics:

  • Here is more information on the basic primitives that make up a Lanelet2 map.
  • Read here for a primer on the software architecture of lanelet2.
  • There is also some documentation on the geometry calculations you can do with lanelet2 primitives.
  • If you are interested in Lanelet2's projections, you will find more here.
  • To get more information on how to create valid maps, see here.

Installation

Within ROS

Lanelet2 has been released for ROS. Just install ros-[distribution]-lanelet2, e.g.:

sudo apt install ros-noetic-lanelet2

Without ROS

Outside of ROS, Lanelet2 can be installed from PyPI. Note that currently only Python 3.8-3.11 linux builds are available and that Python 3.10+ is only supported for recent linux distributions such as Ubuntu 20.04+.

pip install lanelet2

Note:

If you receive the error

ERROR: Could not find a version that satisfies the requirement lanelet2 (from versions: none)
ERROR: No matching distribution found for lanelet2

during installation, even when using e.g. python 3.9 or 3.8 on a somewhat recent linux such as Ubuntu 18.04 or newer, your pip version is probably too old, as e.g. the pip version that comes with apt on Ubuntu 20.04 (20.0.2) is not recent enough for the provided package.

In this case you need to simply update pip with

pip3 install -U pip 

Using Docker

There is a Docker container from which you can test things out:

docker build -t lanelet2 .                    # builds a docker image named "lanelet2"
docker run -it --rm lanelet2:latest /bin/bash # starts the docker image
python -c "import lanelet2"                   # quick check to see everything is fine

The docker image contains a link to your local lanelet2, so you can work and see changes (almost) at the same time. Work with two screens, one local and one on docker. Make your code changes locally, then run again catkin build on docker to recompile the code (update python modules).

Manual installation

In case you want to build it in your own way (without the above Docker image) use these instructions.

Lanelet2 relies mainly on Catkin for building and is targeted towards Linux.

At least C++14 is required.

Dependencies

Besides Catkin, the dependencies are

  • Boost (from 1.58)
  • eigen3
  • mrt_cmake_modules, a CMake helper library
  • pugixml (for lanelet2_io)
  • boost-python, python2 or python3 (for lanelet2_python)
  • geographiclib (for lanelet2_projection)
  • rosbash (for lanelet2_examples)

For Ubuntu, the steps are the following:

  • Set up ROS, and install at least rospack, catkin and mrt_cmake_modules (e.g. ros-melodic-rospack, ros-melodic-catkin, ros-melodic-mrt-cmake-modules):
sudo apt-get install ros-melodic-rospack ros-melodic-catkin ros-melodic-mrt-cmake-modules
  • Install the dependencies above:
sudo apt-get install libboost-dev libeigen3-dev libgeographic-dev libpugixml-dev libpython-dev libboost-python-dev python-catkin-tools

On 16.04 and below, mrt_cmake_modules is not available in ROS and you have to clone it into your workspace (git clone https://github.com/KIT-MRT/mrt_cmake_modules.git).

Building

As usual with Catkin, after you have sourced the ros installation, you have to create a workspace and clone all required packages there. Then you can build.

source /opt/ros/$ROS_DISTRO/setup.bash
mkdir catkin_ws && cd catkin_ws && mkdir src
catkin init
catkin config --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo # build in release mode (or whatever you prefer)
cd src
git clone https://github.com/fzi-forschungszentrum-informatik/lanelet2.git
cd ..
catkin build

If unsure, see the Dockerfile or the travis build log. It shows the full installation process, with subsequent build and test based on a docker image with a clean Ubuntu installation.

Manual, experimental installation using conan

For non-catkin users, we also offer a conan based install process. Its experimental and might not work on all platforms, especially Windows. Since conan handles installing all C++ dependencies, all you need is a cloned repository, conan itself and a few python dependencies:

pip install conan catkin_pkg numpy
conan remote add bincrafters https://bincrafters.jfrog.io/artifactory/api/conan/public-conan # required for python bindings
conan config set general.revisions_enabled=1 # requried to use bincrafters remote
git clone https://github.com/fzi-forschungszentrum-informatik/lanelet2.git
cd lanelet2

From here, just use the default conan build/install procedure, e.g.:

conan source .
conan create . lanelet2/stable --build=missing

Different from the conan defaults, we build lanelet2 and boost as shared libraries, because otherwise the lanelet2's plugin mechanisms as well as boost::python will fail. E.g. loading maps will not be possible and the python API will not be usable.

To be able to use the python bindings, you have to make conan export the PYTHONPATH for lanelet2:

conan install lanelet2/0.0.0@lanelet2/stable --build=missing -g virtualenv # replace 0.0.0 with the version shown by conan
source activate.sh
python -c "import lanelet2" # or whatever you want to do
source deactivate.sh

Python3

The python bindings are build for your default python installation by default (which currently is python2 on most systems). To build for python3 instead of python2, create a python3 virtualenv before initializing the workspace with catkin init. The command python should point to python3.

After catkin init run catkin config --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo -DPYTHON_VERSION=3.6 to make sure that the correct python version is used. Then build and use as usual.

Note: With bionic and beyond, the apt package python3-catkin-tools conflicts with ROS melodic and should not be used. Use either the python2 version or use pip to install the python3 version.

Examples

Examples and common use cases in both C++ and Python can be found here.

Packages

  • lanelet2 is the meta-package for the whole lanelet2 framework
  • lanelet2_core implements the basic library with all the primitives, geometry calculations and the LanletMap object
  • lanelet2_io is responsible for reading and writing lanelet maps
  • lanelet2_traffic_rules provides support to interpret the traffic rules encoded in a map
  • lanelet2_projection for projecting maps from WGS84 (lat/lon) to local metric coordinates
  • lanelet2_routing implements the routing graph for routing or reachable set or queries as well as collision checking
  • lanelet2_maps provides example maps and functionality to visualize and modify them easily in JOSM
  • lanelet2_matching provides functions to determine in which lanelet an object is/could be currently located
  • lanelet2_python implements the python interface for lanelet2
  • lanelet2_validation provides checks to ensure a valid lanelet2 map
  • lanelet2_examples contains tutorials for working with Lanelet2 in C++ and Python

Citation

If you are using Lanelet2 for scientific research, we would be pleased if you would cite our publication:

@inproceedings{poggenhans2018lanelet2,
  title     = {Lanelet2: A High-Definition Map Framework for the Future of Automated Driving},
  author    = {Poggenhans, Fabian and Pauls, Jan-Hendrik and Janosovits, Johannes and Orf, Stefan and Naumann, Maximilian and Kuhnt, Florian and Mayr, Matthias},
  booktitle = {Proc.\ IEEE Intell.\ Trans.\ Syst.\ Conf.},
  year      = {2018},
  address   = {Hawaii, USA},
  owner     = {poggenhans},
  month     = {November},
  Url={http://www.mrt.kit.edu/z/publ/download/2018/Poggenhans2018Lanelet2.pdf}
}

More Repositories

1

cartesian_controllers

A set of Cartesian controllers for the ROS1 and ROS2-control framework.
C++
374
star
2

gpu-voxels

GPU-Voxels is a CUDA based library which allows high resolution volumetric collision detection between animated 3D models and live pointclouds from 3D sensors of all kinds.
C++
303
star
3

TSInterpret

An Open-Source Library for the interpretability of time series classifiers
Python
117
star
4

vdb_mapping

Performantes 3D Kartierungs-Framework auf Basis von OpenVDB
C++
42
star
5

liblanelet

Library for handling lanelet maps in C++
C++
37
star
6

cartesian_ros_control

DEPRECATED: A set of packages to bring Cartesian control functionality to the ROS-control framework.
C++
35
star
7

robot_folders

robot_folders helps you managing multiple source projects with their own workspaces mainly around the ROS ecosystem.
Python
33
star
8

ros_bt_py

This is a Behavior Tree library meant to be an alternative to SMACH, FlexBE and the like. It includes a ReactJS-based web GUI and all the building blocks you need to build moderately advanced mission control Behavior Trees without writing a single line of code! Its claim to fame is the ability to shove, or transparently remote-execute, parts of a Behavior Tree. This implementation of Behavior trees was primarily done by Nils Berg in his thesis Distributed Execution of Behavior Trees using Heterogeneous Robot Teams. It was then improved and heavily upgraded by Kai-Uwe Hermann first with his thesis On-Line task allocation in an ad-hoc network of complex robots, currently as part of his research work. These works and the capability concept are part of Georg Heppners ongoing PhD Thesis Fähigkeitsbasierte Kooperation von Heterogenen Robotersystemen.
Python
30
star
9

ros2_ros_bt_py

This is a Behavior Tree library meant to be an alternative to SMACH, FlexBE and the like. It includes a ReactJS-based web GUI and all the building blocks you need to build moderately advanced mission control Behavior Trees without writing a single line of code!
Python
24
star
10

oadrive

Open Autonomous Driving Library (CDDL License)
C++
21
star
11

fzi_robot_interface_proposal

Design documentation for adding Cartesian robot interfaces to ROS
Python
17
star
12

schunk_svh_driver

Driver package for the SCHUNK SVH Five-Finger-Hand.
CMake
16
star
13

vdb_mapping_ros

ROS1 Wrapper für vdb_mapping
C++
15
star
14

NNAD

Neural Networks for Automated Driving
14
star
15

aadc2016

Code basis used by Team KACADU for the Audi Autonomous Driving Cup 2016
JavaScript
13
star
16

P3IV

Probabilistic Prediction and Planning for Intelligent Vehicles (P3IV) Simulator
Python
13
star
17

schunk_canopen_driver

Driver package for the SCHUNK LWA4P and other CanOpen enabled devices.
C++
13
star
18

corner_case_ontology

The repository provides a template ontology and scripts to create OpenSCENARIO-compatible corner case scenarios in simulation.
Python
12
star
19

PRIVACY-AVARE

Java
10
star
20

aadc2018

Code basis used by Team AlpaKa for the Audi Autonomous Driving Cup 2018
9
star
21

vdb_mapping_ros2

vdb_mapping_ros2 dient als Schnittstelle zu ROS2 und bietet die Möglichkeit ROS2 Nachrichten Typen einfach und schnell zu nutzen um auf deren Basis eine 3D Kartierung durchzuführen.
C++
9
star
22

BEMCom

BEMCom, the Building Energy Management Communication framework, is a tool for the rapid implementation of hardware abstraction layers, i.e. software that allows communication with diverse devices over a unified API.
Python
9
star
23

schunk_svh_ros_driver

DEPRECATED: A ROS1/ROS2 compatible driver for the Schunk SVH 5-Finger hand
C++
8
star
24

robotiq_2f_urcap_adapter

ROS2 node zur Ansteuerung der Robotiq 2F Greifer über URCap
Python
7
star
25

unity-burst-inverse-kinematics

An inverse kinematics solution for Unity using the Burst compiler with support for arbitrarily long joint chains.
C#
7
star
26

Semantic_Scene_Graph_Computation

Creates a semantic scene graph from a traffic scene.
Python
7
star
27

anovox

Multimodaler Anomalie-Detektions Benchmark für simulierte Szenarien
Python
6
star
28

mrf

Funktionen zum Upsampling von 3D-Lasermessungen unter Zuhilfenahme von aus Bildern extrahierten Features
C++
6
star
29

ros2_ros_bt_py_web_gui

This is the development version of the Web GUI shipped with ros2_ros_bt_py. It displays the current Behavior Tree loaded in the ROS-Node and allows the user to edit and run the BT.
TypeScript
6
star
30

scene-fingerprint

Berechnung mehrere Kritikalitätsmetriken zur Bewertung von Szenen und Szenarien.
Python
5
star
31

adtf_ros

Bridge between ROS and ADTF
C++
5
star
32

test-area-autonomous-driving-dataset

Datensätze des Testfelds Autonomes Fahren Baden-Württemberg
5
star
33

tropical_precooling_environment

Eine Simulationsumgebung zur Evaluierung und Bechmarking von Algorithmen zur Gebäudeenergieoptimierung.
Python
5
star
34

fzi_icl_can

CMake
4
star
35

quantification_road_user_behavior

The repository provides scripts to extract road user behavior distribution out of datasets.
Python
4
star
36

dream-ploc

Pocket Library for Open Content (ploc) / Demonstrator aus dem BMBF-geförderten Projekt DREAM (Digital Research Mining)
Java
4
star
37

muvo

A Multimodal Generative World Model for Autonomous Driving with Geometric Representations
Python
4
star
38

iterative-yolo-pruning

Iterative Filter Pruning for Concatenation-Based CNN Architectures
Jupyter Notebook
3
star
39

fzi-driver

Fahrermodell, welches im Projekt SETLevel entwickelt wurde.
C++
3
star
40

icmaker

IcMaker - The build system for the interchange libraries
CMake
3
star
41

energy_management_panel

Grundlegende Funktionen zur Entwicklung von webbasierten User Interfaces zur Interaktion zwischen Menschen und einem Gebäudeenergiemanagementsystem
Python
3
star
42

informed_rl

Informed Reinforcement Learning for Situation-Aware Traffic Rule Exceptions
Python
3
star
43

eg4u

EG4U - Environment Generator for Unreal: Plugin for UnrealEngine 4.26 to create virtual environments from OpenDRIVE and OpenStreetMap
C++
3
star
44

ArNe

A skill recording and generalization framework for assistive manipulators with ROS.
Python
2
star
45

schunk_svh_library

DEPRECATED: A C++ library for controlling the Schunk SVH 5-Finger hand
C++
2
star
46

icl_core

C++
2
star
47

automated_driving_msgs

ROS messages for automated driving.
CMake
2
star
48

oadrive-bsd

Open Autonomous Driving Library (BSD License)
JavaScript
2
star
49

top_uav_py

Software-Tool zur analytischen Bestimmung zeitoptimaler Trajektorien für Multikopterdrohnen unter Berücksichtigung von maximaler Geschwindigkeit und Beschleunigung.
Python
2
star
50

dream-gozer

Pocket Library for Open Content (ploc) / Demonstrator aus dem BMBF-geförderten Projekt DREAM (Digital Research Mining) / Backend Service
Go
2
star
51

top_uav_cpp

Software-Tool zur analytischen Bestimmung zeitoptimaler Trajektorien für Multikopterdrohnen unter Berücksichtigung von maximaler Geschwindigkeit und Beschleunigung.
C++
2
star
52

ros_oadrive

ROS package for using oadrive in ROS
C++
1
star
53

fzi_icl_core

C++
1
star
54

cdcstream

CDCStream - Change Detection in Categorical Evolving Data Streams
Python
1
star
55

mongeu

RESTful HTTP-Service zur Ermittlung des Energieverbrauchs von GPUs
Rust
1
star
56

catkin_doc

Tool for automatic ROS-API documentation generation
Python
1
star
57

schunk_svh_ros_driver-release

schunk_svh_ros_driver-release
1
star
58

taf-viewer

Erstellt einen Webserver, der den Datensatz des Testfeld autonomes Fahren BW visualisiert.
1
star
59

lanelet2-release

ROS release of Lanelet2
1
star
60

CSV_Motion_Dataset_Loader

Reads in .csv files in either TAF or inD format and creates an object structure.
Python
1
star
61

circt

Circuit IR Compilers and Tools
C++
1
star
62

dam4kmu

Modular software supporting various processes within the context of requirements management.
JavaScript
1
star
63

RealWork-WebApp

Die Software RealWork-WebApp, entstanden innerhalb des Projekts RealWork, ermittelt optimale Standorte für Coworking Spaces im ländlichen Raum, basierend auf der Minimierung der Netto-Pendelzeit von Arbeitnehmer*innen.
Python
1
star
64

energy-service-generics

A framework for the implementation of web-services that provide forecasting and optimization algorithms for energy management applications at scale.
Python
1
star
65

TBMEnv

An environment to assess the accuracy of thermal building models under realistic conditions.
Jupyter Notebook
1
star
66

eg4u-content

EG4U Base Assets: Base Assets for UE4 Environment Generator
1
star