-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from wroscoe/dev
Add differential drive and update docs.
- Loading branch information
Showing
42 changed files
with
1,200 additions
and
634 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,101 +1,3 @@ | ||
# Get Started | ||
This doc will walk you through how to setup your donkey. | ||
|
||
|
||
## Bill of Materials. | ||
#### Required | ||
* Raspberry Pi 3 B ($35) | ||
* Raspberry Pi Camera ($15) | ||
* Micro USB power adapter. ($9) | ||
* USB Battery Pack ($15) | ||
* USB Keyboard | ||
* USB Mouse | ||
* Monitor | ||
* HDMI cable (to connect monitor to PI) ($7) | ||
* Micro SD Card (campatible with Raspberry Pi) ($8) | ||
* Servo Sheild ($15) | ||
* RC CAR (($120-300)) | ||
|
||
#### Optional | ||
* Xbox 360 Controller | ||
* Xbox USB Adapter | ||
|
||
|
||
|
||
## Setup | ||
These instructions are based on [Geoff Boeing's post on setting up scientific python on a Raspberry Pi](http://geoffboeing.com/2016/03/scientific-python-raspberry-pi/). | ||
|
||
#### Boot your Raspberry Pi | ||
These instructions assume you're using Ubuntu operationg system. If you don't have Ubuntu, try using the NOOB method. | ||
|
||
1. Download recent Disk image. I use Jessie. | ||
2. Extract disk image from zip file. | ||
3. Open Ubuntu's "Startup Disk Creator" application. | ||
4. Insert micro usb disk via a usb adapter. This disk should show up in the Startup Disk Creator app. | ||
5. Select your RPi .img file and click create disk. | ||
6. Once the img has been created, take the SD card from your computer and put it in your RPi. | ||
7. Connect your Monitor with your HDMI cable, your mouse and keyboard and then finally power up the RPi by plugging in the Micro USB power adaptor. | ||
|
||
|
||
#### Install Basic Libraries | ||
Since the RPi is not as powerful as a laptop, it can take a long time to install python packages (ie. numpy & PIL) using pip. Luckly Adafruit has precompiled these libraries into packages that can be installed via `apt-get`. | ||
|
||
1. Open a terminal (Ctrl-Alt-t) and upgrade your system packages. | ||
|
||
``` | ||
sudo apt-get update | ||
sudo apt-get upgrade | ||
``` | ||
2. Save These initial conditions. | ||
|
||
``` | ||
dpkg -l > ~/Desktop/packages.list | ||
pip freeze > ~/Desktop/pip-freeze-initial.list | ||
``` | ||
|
||
3. Install the necessary libraries | ||
|
||
``` | ||
sudo apt-get install xsel xclip libxml2-dev libxslt-dev libzmq-dev libspatialindex-dev virtualenv | ||
``` | ||
4. Pandas & Jupyter Requirements | ||
``` | ||
sudo apt-get install python3-lxml python3-h5py python3-numexpr python3-dateutil python3-tz python3-bs4 python3-xlrd python3-tables python3-sqlalchemy python3-xlsxwriter python3-httplib2 python3-zmq | ||
``` | ||
5. Scientific Python | ||
``` | ||
sudo apt-get install python3-numpy python3-matplotlib python3-scipy python3-pandas | ||
``` | ||
|
||
#### Install your Camera | ||
Follow the instructions [here](https://www.raspberrypi.org/learning/getting-started-with-picamera/worksheet/). | ||
|
||
|
||
1. Connect your camera to the RPi. | ||
2. Enable your camera in the Menu > Preferences > Raspberry Pi Config | ||
3. Restart your Pi. `sudo reboot` | ||
|
||
|
||
#### Connect your servo sheild. | ||
|
||
1. Assemble and test your servo shield with the instructions given by Adafruit. | ||
|
||
|
||
#### Install Donkey | ||
|
||
|
||
clone repo & create virtual env | ||
|
||
``` | ||
mkdir code | ||
cd code | ||
git clone http://github.com/wroscoe/donkey.git | ||
mkdir car | ||
cd car | ||
virtualenv --system-site-packages -p python3 env | ||
source env/bin/activate | ||
pip install -e ../donkey[pi] | ||
``` | ||
|
||
# Build a donkey vehicle. | ||
|
||
Anyone can build their own robocar that runs Donkey. Once you have the parts it will take ~4hrs to start driving. See the [detailed instructions](https://docs.google.com/document/d/11IPqZcDcLTd2mtYaR5ONpDxFgL9Y1nMNTDvEarST8Wk/edit). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Datasets | ||
|
||
Donkey has several builtin datasets to help users test their autopilots and confirm that they can learn from image sequences. | ||
|
||
## Moving Square | ||
A single color moving square bounces around the screen. | ||
|
||
Outputs: | ||
* X - 120x160px image of moving square on black background. | ||
* Y - x and y cordinates of center of square in the image. (use options to only return x or y) | ||
|
||
|
||
|
||
## Driving Datasets | ||
|
||
### Line Following | ||
|
||
|
||
### Lane Keeping | ||
|
||
|
||
### Sidewalk | ||
|
||
### |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
|
||
import os | ||
uname = os.uname() | ||
if uname[1] != 'raspberrypi': | ||
if not uname[4].startswith("arm"): | ||
from . import (utils, | ||
models, | ||
datasets, | ||
remotes, | ||
sensors, | ||
actuators, | ||
mixers, | ||
vehicles, | ||
pilots, | ||
templates,) | ||
|
||
else: | ||
print('Detected running on rasberrypi. Only importing select modules.') | ||
from . import actuators, remotes, sensors, vehicles | ||
from . import actuators, mixers, remotes, sensors, vehicles |
Oops, something went wrong.