OATomobile: A research framework for autonomous driving
Overview | Installation | Baselines | Paper
OATomobile is a library for autonomous driving research. OATomobile strives to expose simple, efficient, well-tuned and readable agents, that serve both as reference implementations of popular algorithms and as strong baselines, while still providing enough flexibility to do novel research.
Overview
If you just want to get started using OATomobile quickly, the first thing to know about the framework is that we wrap CARLA towns and scenarios in OpenAI gyms:
import oatomobile
# Initializes a CARLA environment.
environment = oatomobile.envs.CARLAEnv(town="Town01")
# Makes an initial observation.
observation = environment.reset()
done = False
while not done:
# Selects a random action.
action = environment.action_space.sample()
observation, reward, done, info = environment.step(action)
# Renders interactive display.
environment.render(mode="human")
# Book-keeping: closes
environment.close()
Baselines can also be used out-of-the-box:
# Rule-based agents.
import oatomobile.baselines.rulebased
agent = oatomobile.baselines.rulebased.AutopilotAgent(environment)
action = agent.act(observation)
# Imitation-learners.
import torch
import oatomobile.baselines.torch
models = [oatomobile.baselines.torch.ImitativeModel() for _ in range(4)]
ckpts = ... # Paths to the model checkpoints.
for model, ckpt in zip(models, ckpts):
model.load_state_dict(torch.load(ckpt))
agent = oatomobile.baselines.torch.RIPAgent(
environment=environment,
models=models,
algorithm="WCM",
)
action = agent.act(observation)
Installation
We have tested OATomobile on Python 3.5.
-
To install the core libraries (including CARLA, the backend simulator):
# The path to download CARLA 0.9.6. export CARLA_ROOT=... mkdir -p $CARLA_ROOT # Downloads hosted binaries. wget http://carla-assets-internal.s3.amazonaws.com/Releases/Linux/CARLA_0.9.6.tar.gz # CARLA 0.9.6 installation. tar -xvzf CARLA_0.9.6.tar.gz -C $CARLA_ROOT # Installs CARLA 0.9.6 Python API. easy_install $CARLA_ROOT/PythonAPI/carla/dist/carla-0.9.6-py3.5-linux-x86_64.egg
-
To install the OATomobile core API:
pip install --upgrade pip setuptools pip install oatomobile
-
To install dependencies for our PyTorch- or TensorFlow-based agents:
pip install oatomobile[torch] # and/or pip install oatomobile[tf]
Citing OATomobile
If you use OATomobile in your work, please cite the accompanying technical report:
@inproceedings{filos2020can,
title={Can Autonomous Vehicles Identify, Recover From, and Adapt to Distribution Shifts?},
author={Filos, Angelos and
Tigas, Panagiotis and
McAllister, Rowan and
Rhinehart, Nicholas and
Levine, Sergey and
Gal, Yarin},
booktitle={International Conference on Machine Learning (ICML)},
year={2020}
}
Metadata
Release files for oatomobile 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| oatomobile-0.1.0.tar.gz | 62.7 kB | Without provenance | Details for oatomobile-0.1.0.tar.gz |
Release files / oatomobile-0.1.0.tar.gz
| Download URL | oatomobile-0.1.0.tar.gz |
|---|---|
| Size | 62.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
760d4f61f3a9e984d890e2933c3754e311d3ac971f06919d7fab41dff848b018
|
|
BLAKE2b-256 checksum How to use checksums |
964e62d53d32b14e190eb38a132e329c0c583c82c9b8e69ecb3b9704a8aacbbe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.5.9
|
Security for oatomobile 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.