crgeo

Contains basic functionality for facilitating research on graph neural networks for autonomous driving and provides an interface between CommonRoad and Pytorch Geometric.


Keywords
autonomous-vehicles, deep-learning, graph-neural-networks, pytorch
License
BSD-3-Clause
Install
pip install crgeo==2023.1

Documentation

Introduction

commonroad-geometric (crgeo) is a Python framework that facilitates deep-learning based research projects in the autonomous driving domain, e.g. related to behavior planning and state representation learning.

At its core, it provides a standardized interface for heterogeneous graph representations of traffic scenes using the PyTorch-Geometric framework.

The package aims to serve as a flexible framework that, without putting restrictions on potential research directions, minimizes the time spent on implementing boilerplate code. Through its object-oriented design with highly flexible and extendable class interfaces, it is meant to be imported via pip install and utilized in a plug-and-play manner.

Highlighted features

  • A framework for PyTorch Geometric-based heterogeneous graph data extraction from traffic scenes and road networks supporting user-made feature computers and edge drawers.
  • Built-in functionality for collection and storing of graph-based traffic datasets as PyTorch datasets.
  • Fully customizable live rendering support for showcasing and debugging.
  • High-level training infrastructure for crgeo research projects.

Getting started

The easiest way of getting familiar with the framework is to consult the tutorial directory, which contains a multitude of simple application demos that showcase the intended usage of the package.

Research guidelines:

  • It is highly recommended to incorporate the package's extendable rendering capabilities as an integral part of your development workflow. This allows you to visualize what is going on in your experiment, greatly simplifying debugging efforts.
  • If you ever find yourself in a situation where you have to modify the internals of this package while working on your research project, it probably means that commonroad-geometric is not flexible enough - please create a corresponding issue.

Design principles and developer guidelines:

  • Frequent use of abstraction classes for a modular and clean framework.
  • Class interfaces should be understandable and well-documented. We use the Google style docstring format across the package (see PyCharm, VSCode).
  • As a general rule, everything should be configurable and externalized through class APIs. While ensuring flexibility, however, make sure to provide reasonable defaults for most things to avoid unnecessary overhead for users.
  • Add tutorial scripts to the tutorials/ directory for easy testing, reviewing and showcasing of new functionality.
  • Use type hinting everywhere - it enhances readability and makes the IDE developer experience a lot smoother. Perform static type checking with mypy (pip install mypy + /commonroad-geometric$ mypy) for easily discovering inconsistent typing (see PyCharm extension, VS Code extension).
  • Create issues for new tasks with appropriate priority and category labels as well as a corresponding branch. Create a merge request to the develop branch afterwards.
  • Adhere to PEP8.

Installation

The installation script scripts/create-dev-environment.sh installs the commonroad-geometric package and all its dependencies into a conda environment:

Execute the script inside the directory which you want to use for your development environment.

Note: make sure that the CUDA versions are compatible with your setup.

Note: Headless rendering

If you want to export the rendering frames without the animation window popping up, please use the command given below.

echo "export PYGLET_HEADLESS=..." >> ~/.bashrc

You can replace .bashrc with .zshrc, if you use zsh