Skip to content

mechovation/donkey2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Donkey 2

This is my method to use the Donkey Car, derived from the autorope/donkey2.

Starting a fresh Raspbian-Lite installation

  1. Download Raspbian-Stretch-Lite

  2. Flash MicroSD card (16-32GB) using your favorite tool. balenaEtcher seems to be popular.

  3. Configure wireless networking, in the /boot partition create wpa_supplicant.conf file containing:

country=us
update_config=1
ctrl_interface=/var/run/wpa_supplicant

network={
scan_ssid=1
ssid="MyNetworkSSID"
psk="Pa55w0rd1234"
}
  1. Enable SSH by creating an empty file in /boot named "ssh"
  2. First boot, ssh to your Pi, user:pi password:raspberry (Need more newbie help here?)
  3. Run raspi-config as super user
sudo raspi-config
  • Change hostname
  • Change password
  • Interface Options
    • Enable Camera
    • Enable I2C
  • Advanced: Expand Partition
  • Finish & Reboot
sudo shutdown -r now
  1. Package Updates
sudo apt update
sudo apt upgrade
  1. Install Prerequisites (possibly more than required??)
sudo apt-get install git
sudo apt-get install python3 python3-pip python3-virtualenv python3-dev virtualenv
sudo apt-get install build-essential gfortran libhdf5-dev

Installing Donkey 2.

Run these commands to setup your donkey car app on your car's raspberry pi.

  1. Create and activate your virtual environment.

    virtualenv env --python=python3
    source env/bin/activate
  2. Dowload and install the dependencies for this car template. (This can take a LONG time . . . . )

    git clone https://github.com/autorope/donkey2.git
    cd donkey2
    pip install -r drive_requirements.txt
  3. Activate virtual environment on login. Add this as the last line of your .bashrc file in your home directory

source env/bin/activate

Setup RC Controller

We will be using a Arduino Pro Micro to emulate the PS3 joystick. This will allow the use of the RC transmitter that came with your car during training. More details to come.

Get Driving

  1. SSH to your Pi:
  2. Run the drive script.
    python drive.py

Train an autopilot.

Here are the steps to train an autopilot on your computer after you've transfered the the tubs from your car's pi to your laptop.

  1. Create and activate your virtual environment.

    virtualenv env --python=python3
    source env/bin/activate
  2. Dowload and install the dependencies for this car template.

    git clone https://github.com/autorope/donkey2.git
    cd donkey2
    pip install -r train_requirements.txt
  3. Train an autopilot

     python train.py /path/to/folder/with/tubs/*
  4. Planning to work up some notes on using Docker Tensorflow environment for training. Stay Tuned.

About

Donkey2 Car App

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Python 100.0%