Skip to main content

Self driving library for python.

Project description

Donkeycar: a python self driving library

Build Status Lint Status Release

All Contributors Issues Pull Requests Forks Stars License

Discord

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.

Quick Links

donkeycar

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 or RC 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

donkeycar-5.0.0.tar.gz (588.5 kB view details)

Uploaded Source

Built Distribution

donkeycar-5.0.0-py3-none-any.whl (657.8 kB view details)

Uploaded Python 3

File details

Details for the file donkeycar-5.0.0.tar.gz.

File metadata

  • Download URL: donkeycar-5.0.0.tar.gz
  • Upload date:
  • Size: 588.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for donkeycar-5.0.0.tar.gz
Algorithm Hash digest
SHA256 b0ac0d0b43234fbd3f5a4eafb214c1f231fb1d0ab0e7da3c33eedbc680409554
MD5 e2d67996e042968e78ab77de8bbd066a
BLAKE2b-256 9585bd51b486099cfea402dc36ee2b4184c14e9c8ca7d7d32b7e955f3025f851

See more details on using hashes here.

File details

Details for the file donkeycar-5.0.0-py3-none-any.whl.

File metadata

  • Download URL: donkeycar-5.0.0-py3-none-any.whl
  • Upload date:
  • Size: 657.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for donkeycar-5.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 20e4437dd8095fc5d833f419443dab4ef7588ea5b45797baf899c231063dae17
MD5 ae130b3ce59f3bcbed42b1b939627fb6
BLAKE2b-256 f80565dc442a1ffa2539f68e9232da6f132078fc5a4fbb7847ca916872358e6e

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