carenv
A simple to set up 2D automated vehicle gym env featuring random problem generation and dynamic observations.
Science Score: 57.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 1 DOI reference(s) in README -
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.7%) to scientific vocabulary
Repository
A simple to set up 2D automated vehicle gym env featuring random problem generation and dynamic observations.
Basic Info
Statistics
- Stars: 13
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
Readme.md
CarEnv
Easy to use gym-Environment for 2D vehicle simulations using dynamic scenes.
Racing scenario
Navigating a randomly generated tightly winding road at speed. The simulated vehicle uses a dynamic single track model with a coupled Dugoff tire model. Throttle, brake and steering are continuous actions, with the vehicle by default using front wheel drive. The agent may learn to control brake balance by applying throttle and brake individually.

Parking scenario
Parallel parking in reverse using a kinematic model. Steering and acceleration (positive through negative) are continuous actoins.

Installation
To install the latest version, simply run:
shell
pip install git+https://github.com/m-schier/CarEnv
You may then create a new gym environment, e.g. on the racing configuration:
```python
from CarEnv import CarEnv, Configs
env = CarEnv(Configs.getstandardenv_config("racing")) ```
However, if you want to modify the environment or run any of our example scripts it may be more convenient to clone this repository and then install using local linking:
shell
pip install -e .
Running as human
Execute scripts/run_human.py. The agent may be controlled by keyboard or by a joystick or
steering wheel if present. You may have to modify the axis and button numbers when using a controller,
see the implementation in CarEnv/Actions/ for available keyword arguments.
Training a Soft Actor-Critic agent
In scripts/train_sac.py you may find an example script on how to train a Soft Actor-Critic
using a Deep Set feature extractor on the parking and racing configurations. This
implementation uses the Stable Baselines 3 library. You must install the reinforcement learning extra requirements, i.e.:
shell
pip install -e .[RL]
Citing
If you find this environment useful, you may cite it by our paper in which it was initially presented:
bibtex
@inproceedings { SchRei2023b,
author = {Schier, Maximilian and Reinders, Christoph and Rosenhahn, Bodo},
title = {Learned Fourier Bases for Deep Set Feature Extractors in Automotive Reinforcement Learning},
booktitle = {2023 IEEE 26th International Conference on Intelligent Transportation Systems (ITSC)},
year = {2023},
pages = {931-938},
doi = {10.1109/ITSC57777.2023.10422233}
}
Owner
- Name: Maximilian Schier
- Login: m-schier
- Kind: user
- Location: Germany
- Company: Leibniz University Hannover, Germany
- Repositories: 1
- Profile: https://github.com/m-schier
Graduate student at Leibniz University Hannover, Germany. Research assistant at the Institute for Information Processing
Citation (Citation.cff)
cff-version: 1.2.0
message: "If you find this software useful in your research, please cite it as below."
authors:
- family-names: "Schier"
given-names: "Maximilian"
orcid: "https://orcid.org/0009-0007-4314-728X"
- family-names: "Reinders"
given-names: "Christoph"
- family-names: "Rosenhahn"
given-names: "Bodo"
orcid: "https://orcid.org/0000-0003-3861-1424"
title: "CarEnv"
version: 1.0
date-released: 2023-09-18
url: "https://github.com/m-schier/CarEnv"
preferred-citation:
type: conference-paper
authors:
- family-names: "Schier"
given-names: "Maximilian"
orcid: "https://orcid.org/0009-0007-4314-728X"
- family-names: "Reinders"
given-names: "Christoph"
- family-names: "Rosenhahn"
given-names: "Bodo"
orcid: "https://orcid.org/0000-0003-3861-1424"
booktitle: "2023 IEEE 26th International Conference on Intelligent Transportation Systems (ITSC)"
month: 9
title: "Learned Fourier Bases for Deep Set Feature Extractors in Automotive Reinforcement Learning"
year: 2023
GitHub Events
Total
- Watch event: 2
- Create event: 1
Last Year
- Watch event: 2
- Create event: 1
Dependencies
- Shapely *
- gym ==0.21.0
- matplotlib >=3.5
- numba >=0.56
- numpy >=1.22
- pycairo *
- pygame *