Skip to main content

Machine Learning Applied to Autonomous Driving

Project description

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 with all vehicles are 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")

The ego agent is placed on the right lane and its goal on the left. 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.

Unprotected Left Turn

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

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

A complete 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

bark_ml-0.3.4-cp39-cp39-manylinux2014_x86_64.whl (961.4 kB view details)

Uploaded CPython 3.9

bark_ml-0.3.4-cp38-cp38-manylinux2014_x86_64.whl (961.3 kB view details)

Uploaded CPython 3.8

bark_ml-0.3.4-cp38-cp38-macosx_10_14_x86_64.whl (803.6 kB view details)

Uploaded CPython 3.8macOS 10.14+ x86-64

bark_ml-0.3.4-cp37-cp37m-manylinux2014_x86_64.whl (966.8 kB view details)

Uploaded CPython 3.7m

bark_ml-0.3.4-cp37-cp37m-macosx_10_14_x86_64.whl (802.3 kB view details)

Uploaded CPython 3.7mmacOS 10.14+ x86-64

File details

Details for the file bark_ml-0.3.4-cp39-cp39-manylinux2014_x86_64.whl.

File metadata

  • Download URL: bark_ml-0.3.4-cp39-cp39-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 961.4 kB
  • Tags: CPython 3.9
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for bark_ml-0.3.4-cp39-cp39-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8fbd3db0cde7f70e64168c5a9682a318991116b499ba7d9655a27a17a2f9e495
MD5 131d7dd028d47785300d06cf5e2dd78f
BLAKE2b-256 226d9a593b51900d885a929fa4fdc9107b3920a48f67ac73ec2864ff17552e1f

See more details on using hashes here.

File details

Details for the file bark_ml-0.3.4-cp38-cp38-manylinux2014_x86_64.whl.

File metadata

  • Download URL: bark_ml-0.3.4-cp38-cp38-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 961.3 kB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for bark_ml-0.3.4-cp38-cp38-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 27aea533431850883da1b92a6a335c39a9ec71096ba5b138fc4333d2e1dd36f7
MD5 7a27da34bb83f7ca45028152c06f0e60
BLAKE2b-256 d67e1bfd9f94a54dd745f82cfba844b978e6a3055b72d4fefa83566947636884

See more details on using hashes here.

File details

Details for the file bark_ml-0.3.4-cp38-cp38-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: bark_ml-0.3.4-cp38-cp38-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 803.6 kB
  • Tags: CPython 3.8, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for bark_ml-0.3.4-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 e7ccf7963a7dbff3e46ade2c0bdb7aad1ff68e776dbd01dd467a9d99cbd14016
MD5 a3d5f3a8e3cccb93fc4a0f3865297651
BLAKE2b-256 e5216a2357fb39ababbd4ffd08419f623d8dd2af6de5c4889bde950226afa174

See more details on using hashes here.

File details

Details for the file bark_ml-0.3.4-cp37-cp37m-manylinux2014_x86_64.whl.

File metadata

  • Download URL: bark_ml-0.3.4-cp37-cp37m-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 966.8 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for bark_ml-0.3.4-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3e1fb6ae1a377165f0d0a1821aac553a55cf4fd1bbbaf987febb690d89687aa2
MD5 0bcb79ef64738e8bd38aeba3ec9e278d
BLAKE2b-256 18d18b2c972075050607b4ff00927c6fd7a7d12a857b546bd221847a5d95a40e

See more details on using hashes here.

File details

Details for the file bark_ml-0.3.4-cp37-cp37m-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: bark_ml-0.3.4-cp37-cp37m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 802.3 kB
  • Tags: CPython 3.7m, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for bark_ml-0.3.4-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 10adc27eb0f8076805a99e83fcc2378693d82cc324cec6bd05a09aeb9c7650f4
MD5 9a7b204a79af689168712f690db3b59b
BLAKE2b-256 047980eced4694fadfa8966ef674c26f7e7b2ff0c67eed267b5561bc4a1291d6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page