idsc-frazzoli / dg-commons

Driving games common tools
GNU General Public License v3.0
24 stars 6 forks source link
motion-planning multi-agent robotics simulation

dg-commons (Driving Games common tools)

CircleCI codecov PyPI version PyPI - Downloads Code style: black pre-commit

This package contains common tools that ease the development and quick prototyping of autonomous vehicles with a focus on multi-agent planning and decision-making.

Few Highlights

![solutions-multilaneint5psets-solutions-solver2puresecuritymNEfact2noextra-joint-joint-0](https://user-images.githubusercontent.com/18750753/162696592-3ad8801d-21d8-4b5d-856f-fd799278a5bb.gif) [Multi-agent simulation](#multi-agent-simulation) ![collision_gif](https://user-images.githubusercontent.com/18750753/172162568-71a557c5-7e38-4a87-929d-cbc96ba4ef2f.gif) [Collision resolution](#collision-resolution) ![ezgif com-gif-maker (1)](https://user-images.githubusercontent.com/18750753/162698234-cdbee571-2a84-462e-95e8-d6f8b7cdad09.gif) [Probabilistic sensors](#probabilistic-sensors)

Simulator

The simulator builds on a clear distinction between the concept of an "agent" and its corresponding physical "model".

An agent receives observations and returns commands to the simulator. A model instead represents the physical instance of the agent in the simulation. The received commands from the agent are used to update its state according to the multi-agent simulation.

Collision resolution

Collision detection is performed at each step of the physical simulation, typically higher rate than the agents' updates. The framework provides also a basic collision resolution subroutine for the models. This is based on the impulse response technique among rigid bodies used in game engines. More references are provided in the corresponding location in the docs.

Commonroad integration

Most of the scenario tools natively integrate with the [Commonroad project](). Few scenarios used mainly for testing are available in the scenarios folder. For more scenarios consider cloning the Commonroad scenarios repository. For internal use (private) consider also dg-scenarios.

Installation

The package is distributed on PyPI. You can simply install it via

pip install dg-commons

to install also the developer tools use pip install dg-commons["all"].

Pre-commit hook (for developers)

Install pre-commit with

pip install pre-commit
pre-commit install

Run pre-commit with

pre-commit run --all-files

Compatibility

From version 0.30 onwards the package is tested against python 3.9, 3.10, 3.11. It might work also for other versions, but it is not tested.

Publications

The tools contained in this package have contributed to the following publications:

Use and contributions

If you find some of the tools provided in this repository useful, consider citing it in your research via the provided github citation. If you want to contribute with new functionalities or need help in using the provided tools consider please feel free to open an issue.