Skip to main content

Gym Environments and Agents for Autonomous Driving

CI Build Github Contributors Downloads Python Versions Package Versions Package Versions Codacy Badge Environments

BARK-ML

Try it on Google Colab! Open In Colab

BARK-ML offers various OpenAI-Gym environments and reinforcement learning agents for autonomous driving.

Install BARK-ML using pip install bark-ml.

Gym Environments

Highway Scenario

env = gym.make("highway-v0")

The highway scenario is a curved road with four lanes where all vehicles are being controlled by the intelligent driver model (IDM). For more details have a look here.

Available environments:

  • highway-v0: Continuous highway environment
  • highway-v1: Discrete highway environment

BARK-ML Highway Scenario
The highway-v0 environment.

Merging Scenario

env = gym.make("merging-v0")

In the merging scenario, the ego vehicle is placed on the right and its goal is placed on the left lane. All other vehicles are controlled by the MOBIL model. For more details have a look here.

Available environments:

  • merging-v0: Continuous merging environment
  • merging-v1: Discrete merging environment

BARK-ML Merging Scenario
The merging-v0 environment.

Intersection / Unprotected Left Turn

env = gym.make("intersection-v0")

In the intersection scenario, the ego vehicle starts on the bottom-right lane and its goal is set on the top-left lane (unprotected left turn). For more details have a look here.

Available environments:

  • intersection-v0: Continuous intersection environment
  • intersection-v1: Discrete intersection environment

BARK-ML Intersection Scenario
The intersection-v0 environment.

Getting Started

An example using the OpenAi-Gym interface can be found here:

import gym
import numpy as np
# registers bark-ml environments
import bark_ml.environments.gym  # pylint: disable=unused-import

env = gym.make("merging-v0")

initial_state = env.reset()
done = False
while done is False:
  action = np.array([0., 0.]) # acceleration and steering-rate
  observed_state, reward, done, info = env.step(action)
  print(f"Observed state: {observed_state}, "
        f"Action: {action}, Reward: {reward}, Done: {done}")

Building From Source

Clone the repository using git clone https://github.com/bark-simulator/bark-ml, install the virtual python environment and activate it afterwards using:

bash utils/install.sh
source utils/dev_into.sh

Now - once in the virtual python environment - you can build any of the libraries or execute binaries within BARK-ML using Bazel. To run the getting started example from above, use the following command: bazel run //examples:continuous_env.

Documentation

Read the documentation online.

Publications

License

BARK-ML code is distributed under MIT License.

Metadata

Release files for bark-ml 0.4.32

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for bark-ml 0.4.32
File Actions
bark_ml-0.4.32-cp39-cp39-manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details for bark_ml-0.4.32-cp39-cp39-manylinux2014_x86_64.whl
bark_ml-0.4.32-cp39-cp39-macosx_10_14_x86_64.whl CPython 3.9 CPython 3.9 macOS 10.14+ x86-64 Details for bark_ml-0.4.32-cp39-cp39-macosx_10_14_x86_64.whl
bark_ml-0.4.32-cp38-cp38-manylinux2014_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.17+ x86-64 Details for bark_ml-0.4.32-cp38-cp38-manylinux2014_x86_64.whl
bark_ml-0.4.32-cp38-cp38-macosx_10_14_x86_64.whl CPython 3.8 CPython 3.8 macOS 10.14+ x86-64 Details for bark_ml-0.4.32-cp38-cp38-macosx_10_14_x86_64.whl
bark_ml-0.4.32-cp37-cp37m-manylinux2014_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64 Details for bark_ml-0.4.32-cp37-cp37m-manylinux2014_x86_64.whl
bark_ml-0.4.32-cp37-cp37m-macosx_10_14_x86_64.whl CPython 3.7 CPython 3.7 pymalloc macOS 10.14+ x86-64 Details for bark_ml-0.4.32-cp37-cp37m-macosx_10_14_x86_64.whl

Total release size: 5.7 MB

Release files / bark_ml-0.4.32-cp39-cp39-manylinux2014_x86_64.whl

Download URL bark_ml-0.4.32-cp39-cp39-manylinux2014_x86_64.whl
Size 1.0 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
30273f97dffa739a15a4e27ad3c9f980e40a459dece5eeddd212a79f6b2ab6ae
BLAKE2b-256 checksum
How to use checksums
ed00c8b14e96191bb6a789206ad4f2a3dffe4ba1ff8842faa65d17938a5f57a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.4

Release files / bark_ml-0.4.32-cp39-cp39-macosx_10_14_x86_64.whl

Download URL bark_ml-0.4.32-cp39-cp39-macosx_10_14_x86_64.whl
Size 868.6 kB
Tags CPython 3.9 macOS 10.14+ x86-64
SHA-256 checksum
How to use checksums
41578a46affb10d601f20c348a62035da4d3948129c6db8e879f02db7cf8a62d
BLAKE2b-256 checksum
How to use checksums
e5c2a2773bee5bdb3fa9258fd204c9065ff41062fa203c93f8fd10b429392408
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.4

Release files / bark_ml-0.4.32-cp38-cp38-manylinux2014_x86_64.whl

Download URL bark_ml-0.4.32-cp38-cp38-manylinux2014_x86_64.whl
Size 1.0 MB
Tags CPython 3.8 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
eaddc82c4f12bcda0afad2f97941fd822807ece35792e851bb88801a4dbc6e70
BLAKE2b-256 checksum
How to use checksums
08b9f314f68bdf5eab24a9a1b4c21bddde95e7288d2fc2101470065cb239a806
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.4

Release files / bark_ml-0.4.32-cp38-cp38-macosx_10_14_x86_64.whl

Download URL bark_ml-0.4.32-cp38-cp38-macosx_10_14_x86_64.whl
Size 868.6 kB
Tags CPython 3.8 macOS 10.14+ x86-64
SHA-256 checksum
How to use checksums
8bdcf1f0a7c01545b0f7740f31b4df2478c16169a6bdc822050dd6e7686f1b8f
BLAKE2b-256 checksum
How to use checksums
fdf9099efafbbdf3d9e5ecb012a78a2fdeacfa511116fa98a91b02665b577d91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.4

Release files / bark_ml-0.4.32-cp37-cp37m-manylinux2014_x86_64.whl

Download URL bark_ml-0.4.32-cp37-cp37m-manylinux2014_x86_64.whl
Size 1.0 MB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
958ed561b7c4053b81bc1e99e126116dda319731020f5f23cb8793404120b18c
BLAKE2b-256 checksum
How to use checksums
0eee6bbd1f870f7f8bfa9d92164725499910309cd45250450573e1f02482bbdf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.4

Release files / bark_ml-0.4.32-cp37-cp37m-macosx_10_14_x86_64.whl

Download URL bark_ml-0.4.32-cp37-cp37m-macosx_10_14_x86_64.whl
Size 867.2 kB
Tags CPython 3.7 CPython 3.7 pymalloc macOS 10.14+ x86-64
SHA-256 checksum
How to use checksums
3bf71f29b874e94ad1edb115678879b5dead39e9d9f12f0f83d060029d2f1f41
BLAKE2b-256 checksum
How to use checksums
408d1dad01fbd21d4a4ea6a49f5aa3f9a4d0a3ca453d8201fb9c2a3a601d7bed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.4

Security for bark-ml 0.4.32

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.

Release history Release notifications | RSS feed

This release

0.4.32 This release

6 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page