Giter VIP home page Giter VIP logo

donkey's Introduction

donkeycar: a python self driving library

build status

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

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 different driving methods.
  • Add parts and sensors to your car.
  • Log sensor data. (images, user inputs, sensor readings)
  • Drive your car via a web or game controler.
  • Leverage community contributed driving data.
  • Use existing hardware CAD designs for upgrades.

Getting started.

After building a Donkey2, here are the steps to start driving.

install donkey

git clone https://github.com/wroscoe/donkey donkeycar
pip install -e donkeycar

Create a car folder.

donkey createcar --path ~/d2

Start your car.

python ~/d2/manage.py drive

Now you can control your car by going to <ip_address_of_your_pi>:8887/drive

donkey's People

Contributors

adammconway avatar adrianco avatar alanswx avatar alanwells avatar apiltamang avatar arunderwood avatar bleyddyn avatar blown302 avatar bukiadeniji avatar burritothief avatar jaredjxyz avatar kennethjiang avatar michaelbanfield avatar mw46d avatar perlinwarp avatar tawnkramer avatar vogonistic avatar wroscoe avatar yconst avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

donkey's Issues

Failed training plot for a linear model

A recent change to train.py added a plot for steering accuracy, but that fails on linear models that can't calculate accuracy.

I have a quick, hacky fix that can be copied over or I can turn it into a PR: https://github.com/Bleyddyn/donkey/commit/33f7da604d76e461b1ca545dff58368aa8e6994f.

Probably a better long term solution is to have each KerasPilot sub-class return a list of dictionaries with parameters for each relevant plot: title, axis labels, legend label(s), history key(s). Adding a plot method to KerasPilot would also work, but then keras.py would need to become dependent on matplotlib.

Install dependencies not working

If I try to run the following command on my Raspberry PI 4B out from the docs:

sudo apt-get install build-essential python3 python3-dev python3-pip python3-virtualenv python3-numpy python3-picamera python3-pandas python3-rpi.gpio i2c-tools avahi-utils joystick libopenjp2-7-dev libtiff5-dev gfortran libatlas-base-dev libopenblas-dev libhdf5-serial-dev libgeos-dev git ntp

Get the following errors. Could somebody of you fix the broken versions or just tell me what to do to fix it on my Rasberry ?
Thanks a lot.

Err:1 http://raspbian.raspberrypi.org/raspbian buster/main armhf libavahi-client3 armhf 0.7-4+b1
404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
Err:2 http://raspbian.raspberrypi.org/raspbian buster/main armhf avahi-utils armhf 0.7-4+b1
404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
Err:3 http://raspbian.raspberrypi.org/raspbian buster/main armhf libcurl3-gnutls armhf 7.64.0-4
404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
Err:4 http://raspbian.raspberrypi.org/raspbian buster/main armhf git-man all 1:2.20.1-2+deb10u1
404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
Err:5 http://raspbian.raspberrypi.org/raspbian buster/main armhf git armhf 1:2.20.1-2+deb10u1
404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
Err:6 http://raspbian.raspberrypi.org/raspbian buster/main armhf libsndfile1 armhf 1.0.28-6
404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
Err:7 http://raspbian.raspberrypi.org/raspbian buster/main armhf libx11-xcb1 armhf 2:1.6.7-1
404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
Err:8 http://raspbian.raspberrypi.org/raspbian buster/main armhf libjpeg62-turbo-dev armhf 1:1.5.2-2+b1
404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
Err:9 http://raspbian.raspberrypi.org/raspbian buster/main armhf libjpeg-dev all 1:1.5.2-2
404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
Err:10 http://raspbian.raspberrypi.org/raspbian buster/main armhf libjs-jquery all 3.3.1dfsg-3
404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
Err:11 http://raspbian.raspberrypi.org/raspbian buster/main armhf libopenjp2-7 armhf 2.3.0-2+deb10u1
404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
Err:12 http://raspbian.raspberrypi.org/raspbian buster/main armhf libopenjp2-7-dev armhf 2.3.0-2+deb10u1
404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
Err:13 http://raspbian.raspberrypi.org/raspbian buster/main armhf libpython3.7-dev armhf 3.7.3-2+deb10u1
404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
Err:14 http://raspbian.raspberrypi.org/raspbian buster/main armhf libwebp6 armhf 0.6.1-2
404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
Err:15 http://raspbian.raspberrypi.org/raspbian buster/main armhf libtiff5 armhf 4.1.0+git191117-2
deb10u1
404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
Err:16 http://raspbian.raspberrypi.org/raspbian buster/main armhf libtiffxx5 armhf 4.1.0+git191117-2deb10u1
404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
Err:17 http://raspbian.raspberrypi.org/raspbian buster/main armhf libtiff-dev armhf 4.1.0+git191117-2
deb10u1
404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
Err:18 http://raspbian.raspberrypi.org/raspbian buster/main armhf libtiff5-dev armhf 4.1.0+git191117-2~deb10u1
404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
Err:19 http://raspbian.raspberrypi.org/raspbian buster/main armhf libwebpdemux2 armhf 0.6.1-2
404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
Err:20 http://raspbian.raspberrypi.org/raspbian buster/main armhf libwebpmux3 armhf 0.6.1-2
404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
Err:21 http://raspbian.raspberrypi.org/raspbian buster/main armhf python3.7-dev armhf 3.7.3-2+deb10u1
404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
Err:22 http://raspbian.raspberrypi.org/raspbian buster/main armhf python3-lxml armhf 4.3.2-1
404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
Err:23 http://raspbian.raspberrypi.org/raspbian buster/main armhf python3-pil armhf 5.4.1-2
404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/a/avahi/libavahi-client3_0.7-4+b1_armhf.deb 404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/a/avahi/avahi-utils_0.7-4+b1_armhf.deb 404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/c/curl/libcurl3-gnutls_7.64.0-4_armhf.deb 404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/g/git/git-man_2.20.1-2+deb10u1_all.deb 404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/g/git/git_2.20.1-2+deb10u1_armhf.deb 404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/libs/libsndfile/libsndfile1_1.0.28-6_armhf.deb 404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/libx/libx11/libx11-xcb1_1.6.7-1_armhf.deb 404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/libj/libjpeg-turbo/libjpeg62-turbo-dev_1.5.2-2+b1_armhf.deb 404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/libj/libjpeg-turbo/libjpeg-dev_1.5.2-2_all.deb 404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/j/jquery/libjs-jquery_3.3.1~dfsg-3_all.deb 404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/o/openjpeg2/libopenjp2-7_2.3.0-2+deb10u1_armhf.deb 404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/o/openjpeg2/libopenjp2-7-dev_2.3.0-2+deb10u1_armhf.deb 404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/p/python3.7/libpython3.7-dev_3.7.3-2+deb10u1_armhf.deb 404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/libw/libwebp/libwebp6_0.6.1-2_armhf.deb 404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/t/tiff/libtiff5_4.1.0+git191117-2~deb10u1_armhf.deb 404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/t/tiff/libtiffxx5_4.1.0+git191117-2~deb10u1_armhf.deb 404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/t/tiff/libtiff-dev_4.1.0+git191117-2~deb10u1_armhf.deb 404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/t/tiff/libtiff5-dev_4.1.0+git191117-2~deb10u1_armhf.deb 404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/libw/libwebp/libwebpdemux2_0.6.1-2_armhf.deb 404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/libw/libwebp/libwebpmux3_0.6.1-2_armhf.deb 404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/p/python3.7/python3.7-dev_3.7.3-2+deb10u1_armhf.deb 404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/l/lxml/python3-lxml_4.3.2-1_armhf.deb 404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/p/pillow/python3-pil_5.4.1-2_armhf.deb 404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Recording during AI?

In config.py I have RECORD_DURING_AI = False set yet I am seeing:

/home/pi/env/lib/python3.5/site-packages/picamera/encoders.py:544: PiCameraResolutionRounded: frame size rounded up from 160x120 to 160x128
width, height, fwidth, fheight)))
recorded 10 records
recorded 20 records
recorded 30 records
recorded 40 records
recorded 50 records etc

ERROR: moviepy 1.0.0 has requirement imageio<3.0,>=2.5, but you'll have imageio 2.4.1 which is incompatible.

Hi Tawn,
First off, THANK YOU for creating this version of donkeycar. I have tried for hours to get a bluetooth gamepad to work with original donkey repo and with your code and instructions it worked first time! Thanks again.

My problem right now is setting up the donkey code on the PC (Mac in my case). I am following instructions at:

https://github.com/tawnkramer/donkey/blob/master/docs/guide/install_software.md#install-donkeycar-on-mac.

All is well until I get to 'pip install -e .[pc]'. Here I am seeing the following error which seems to prevent further steps too:

ERROR: moviepy 1.0.0 has requirement imageio<3.0,>=2.5, but you'll have imageio 2.4.1 which is incompatible.

Please help :-)

training with prune throws exception

Tom, training with prune enabled, all options set to default, I eventually hit this exception:

note, I do have the latest kerassurgeon from source, not pip package install.

Here's just the exception part. I will include the entire log separately.
train_log.txt

++++++++++++++++++++++++++

Deleting 3/24 channels from layer: conv2d_1
Traceback (most recent call last):
File "D:\Miniconda3\envs\donkey\lib\site-packages\keras\engine\base_layer.py", line 279, in assert_input_compatibility
K.is_keras_tensor(x)
File "D:\Miniconda3\envs\donkey\lib\site-packages\keras\backend\tensorflow_backend.py", line 474, in is_keras_tensor
str(type(x)) + '. ' ValueError: Unexpectedly found an instance of type <class 'NoneType'>`. Expected a symbolic tensor instance.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "manage.py", line 524, in
multi_train(cfg, tub, model, transfer, model_type, continuous, aug)
File "D:\d2\train.py", line 875, in multi_train
train_fn(cfg, tub, model, transfer, model_type, continuous, aug)
File "D:\d2\train.py", line 520, in train
go_train(kl, cfg, train_gen, val_gen, gen_records, model_name, steps_per_epoch, val_steps, continuous, verbose, save_best)
File "D:\d2\train.py", line 607, in go_train
model, channels_deleted = prune(kl.model, prune_gen, 1, cfg)
File "D:\d2\train.py", line 885, in prune
model = prune_model(model, apoz_df, n_channels_delete)
File "D:\d2\train.py", line 911, in prune_model
return surgeon.operate()
File "c:\cygwin\home\tkramer\projects\keras-surgeon\src\kerassurgeon\surgeon.py", line 158, in operate
self._mod_func_map[node](node, outputs, output_masks, **kwargs)
File "c:\cygwin\home\tkramer\projects\keras-surgeon\src\kerassurgeon\surgeon.py", line 323, in _delete_channels
temp_layer(utils.single_element(inputs))
File "D:\Miniconda3\envs\donkey\lib\site-packages\keras\engine\base_layer.py", line 414, in call
self.assert_input_compatibility(inputs)
File "D:\Miniconda3\envs\donkey\lib\site-packages\keras\engine\base_layer.py", line 285, in assert_input_compatibility
str(inputs) + '. All inputs to the layer '
ValueError: Layer conv2d_3 was called with an input that isn't a symbolic tensor. Received type: <class 'NoneType'>. Full input: [None]. All inputs to the layer should be tensors.

--model parameter ends training wit error: IsADirectoryError: [Errno 21]

When I append the --model ./models/modelName" option to a "donkey train" command the process ends with the following error message.

donkey train --model ./models/myPilote --tub ./data
...
Traceback (most recent call last):
File "/Users/Roy/opt/miniconda3/envs/donkey/bin/donkey", line 33, in
sys.exit(load_entry_point('donkeycar', 'console_scripts', 'donkey')())
File "/Users/Roy/dc_projects/donkeycar/donkeycar/management/base.py", line 497, in execute_from_command_line
c.run(args[2:])
File "/Users/Roy/dc_projects/donkeycar/donkeycar/management/base.py", line 458, in run
args.comment)
File "/Users/Roy/dc_projects/donkeycar/donkeycar/pipeline/training.py", line 149, in train
keras_model_to_tflite(model_path, tf_lite_model_path)
File "/Users/Roy/dc_projects/donkeycar/donkeycar/parts/interpreter.py", line 21, in keras_model_to_tflite
keras_to_tflite(model, out_filename, data_gen)
File "/Users/Roy/dc_projects/donkeycar/donkeycar/parts/interpreter.py", line 50, in keras_to_tflite
open(out_filename, "wb").write(tflite_model)
IsADirectoryError: [Errno 21] Is a directory: '/Users/Roy/mycar4.3/backupOutside/models/myPilote.tflite'

This happens in Version 4.2.1 (linux) and 4.3 (mac).
When I omit --model ./models/myPilote everything works fine.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.