Skip to main content

Self driving library for python.

Project description

donkeycar: a python self driving library

Build Status CodeCov PyPI version Py versions

Donkeycar is minimalist and modular self driving library for Python. It is developed for hobbyists and students with a focus on allowing fast experimentation and easy community contributions.

NOTE: this package is a non-official build by the AICoE. Please check the upstream project links for official information.

Quick Links

Use Donkey if you want to:

  • Make an RC car drive its self.
  • Compete in self driving races like DIY Robocars
  • Experiment with autopilots, mapping computer vision and neural networks.
  • Log sensor data. (images, user inputs, sensor readings)
  • Drive your car via a web or game controller.
  • Leverage community contributed driving data.
  • Use existing CAD models for design upgrades.

Get driving.

After building a Donkey2 you can turn on your car and go to http://localhost:8887 to drive.

Modify your cars behavior.

The donkey car is controlled by running a sequence of events

#Define a vehicle to take and record pictures 10 times per second.

import time
from donkeycar import Vehicle
from donkeycar.parts.cv import CvCam
from donkeycar.parts.tub_v2 import TubWriter
V = Vehicle()

IMAGE_W = 160
IMAGE_H = 120
IMAGE_DEPTH = 3

#Add a camera part
cam = CvCam(image_w=IMAGE_W, image_h=IMAGE_H, image_d=IMAGE_DEPTH)
V.add(cam, outputs=['image'], threaded=True)

#warmup camera
while cam.run() is None:
    time.sleep(1)

#add tub part to record images
tub = TubWriter(path='./dat', inputs=['image'], types=['image_array'])
V.add(tub, inputs=['image'], outputs=['num_records'])

#start the drive loop at 10 Hz
V.start(rate_hz=10)

See home page, docs or join the Discord server to learn more.

Project details


Download files

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

Source Distribution

aicoe-donkeycar-4.3.0.post1.dev1.tar.gz (424.8 kB view details)

Uploaded Source

Built Distribution

aicoe_donkeycar-4.3.0.post1.dev1-py3-none-any.whl (481.8 kB view details)

Uploaded Python 3

File details

Details for the file aicoe-donkeycar-4.3.0.post1.dev1.tar.gz.

File metadata

  • Download URL: aicoe-donkeycar-4.3.0.post1.dev1.tar.gz
  • Upload date:
  • Size: 424.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for aicoe-donkeycar-4.3.0.post1.dev1.tar.gz
Algorithm Hash digest
SHA256 a47b6b4a94be5e5458a2309242077cedcb1e7b929ef1dcd540d99c7505581357
MD5 7c471b46b2b6a3163ff8fda073514d2c
BLAKE2b-256 004d3c86d04014d2f8250c443b7fb8a742c70220718607d991e55b4407e6a1e6

See more details on using hashes here.

File details

Details for the file aicoe_donkeycar-4.3.0.post1.dev1-py3-none-any.whl.

File metadata

  • Download URL: aicoe_donkeycar-4.3.0.post1.dev1-py3-none-any.whl
  • Upload date:
  • Size: 481.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for aicoe_donkeycar-4.3.0.post1.dev1-py3-none-any.whl
Algorithm Hash digest
SHA256 017a17cfa78f0e63fd922f5221ea82af568ffcf3a3d42e4f1bb824be7fe5565f
MD5 a024bd441f6f7fbfbacc7d1294d2e618
BLAKE2b-256 830d9f4a1ce57c7ca6c13f61172cdf41fa442b01c35420c1e1b8a80d60fbbd46

See more details on using hashes here.

Supported by

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