README.md 2.24 KB
Newer Older
Will Roscoe's avatar
Will Roscoe committed
# Donkey: a self driving library for small scale DIY vehicles. 
Will Roscoe's avatar
Will Roscoe committed

Will Roscoe's avatar
Will Roscoe committed
Donkey is minimalist and modular self driving library written in Python. It is developed with a focus on being easily accessable and allowing fast experimentation. 
Will Roscoe's avatar
Will Roscoe committed

Will Roscoe's avatar
Will Roscoe committed
Use Donkey if you want to:
* quickly [build your own self driving RC Car]((docs/get_started.md) with a Raspbery Pi.
* test out your self driving idea 
Will Roscoe's avatar
Will Roscoe committed

Will Roscoe's avatar
Will Roscoe committed

Will Roscoe's avatar
Will Roscoe committed
Guiding Principles
* **Modularity**: A self driving system is composed of standalone, independently configurable modules that can be connected modules.
Will Roscoe's avatar
Will Roscoe committed

Will Roscoe's avatar
Will Roscoe committed
* **Minimalism**: Each component should be kept short (<100 lines of code). Each peice of code should be transparent apon first reading. No black magic, it slows the speed of innovation. 
Will Roscoe's avatar
Will Roscoe committed
* **Extensiblity**: New components should be simple to create by following a template. 

* **Python**: Keep it simple. 

*** These guidelines are nearly copied from Keras because they are so good *** 



### How to use.
After you've 
Will Roscoe's avatar
Will Roscoe committed

Will Roscoe's avatar
Will Roscoe committed
1. Start driving mode. 
```
python manage.py drive --session firstdrive
Will Roscoe's avatar
Will Roscoe committed
```
Will Roscoe's avatar
Will Roscoe committed

Will Roscoe's avatar
Will Roscoe committed
2. Go to `<pi_ip_address>:8889` in your browser to control the car.
Will Roscoe's avatar
Will Roscoe committed

Will Roscoe's avatar
Will Roscoe committed

### Create a predictor for the route. 
Will Roscoe's avatar
Will Roscoe committed

Train predictors from recorded data
Will Roscoe's avatar
Will Roscoe committed

```
Will Roscoe's avatar
Will Roscoe committed
python manage.py train --session firstdrive --model firstmodel
Will Roscoe's avatar
Will Roscoe committed
```
Will Roscoe's avatar
Will Roscoe committed

Will Roscoe's avatar
Will Roscoe committed
### Test out the self driving. 

1. Start the donkey so data is recorded in a different session and load the predictor you trained. 
Will Roscoe's avatar
Will Roscoe committed
```
Will Roscoe's avatar
Will Roscoe committed
python manage.py drive --session seconddrive --model firstmodel
Will Roscoe's avatar
Will Roscoe committed
```
Will Roscoe's avatar
Will Roscoe committed
2. Go to `<pi_ip_address>:8889` and click **Start Self Driving** button. Your dokney should now drive it's self based on what you taught it. 


##Next Steps
Will Roscoe's avatar
Will Roscoe committed
Try changing or creating your own predictor. 
Will Roscoe's avatar
Will Roscoe committed
##TODO: 
Will Roscoe's avatar
Will Roscoe committed

- [x] Threadsafe image capture (for webserver + recorder) 
- [ ] Create togle on LocalWebControler to togle autonomous mode. (Will)
- [ ] Create `manage.py serve` command to run local server to act as a remote Recorder and Predictor. (Will)
- [ ] Separate Keras Predictors so they don't need to be run on the Pi.
Will Roscoe's avatar
Will Roscoe committed
- [ ] Write Tests
- [ ] Update vehicle to drive given manual input. (Adam)
- [ ] Try loading tensor flow on Raspberry Pi (Will)
- [ ] Train Convolution network from numpy arrays (Will)
Refactor Worthy
Will Roscoe's avatar
Will Roscoe committed
- [ ] Get rid of all the global variables (GLB)