My Autonomous RC car build: 'Donkey Car' WIP (20210325)

This is my progress log of creating a autonomous RC car.


What is a donkey car?

An opensource DIY self driving platform for small scale cars

Donkey® Car - Home

Recommended they have a discord

Discord  Server

https://discord.gg/PN6kFeA

Github autorope/donkeycar: Open source hardware and software platform to build a small scale self driving car.


How to build the hardware

Car body selection

Build a car. - Donkey Car

The only missing part I didnt already have was

3d print files

Donkey Chassis and Adapters - Current by aconway - Thingiverse


my printer model
doesnt fit on my printer need to fix use other file
even if i rotate it! darn...
at least 1 of them works

Donkey Self-Racing Car - Classic Version by aconway - Thingiverse

The newist version doesnt work for me....

Going to modify the files to split them into two pieces

after some though i decided to modify the new one for uses on my mini using tinkercad
cut the object in two
I had to cut corners
Reference:  Why does the paper in Battlestar Galactica have the corners cut off? - Science Fiction & Fantasy Stack Exchange
trying out a quicker print

I'm going to have to wait two weeks to print this because I had to buy more PLA filament. (sad face emoji)

by oran collins
github.com/wisehackermonkey
oranbusiness [at symbol] gmail [dot character] com
20210325

Install the software (RPI4)

Get Your Raspberry Pi Working - Donkey Car

Login to my pi:

sudo apt-get update
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 git ntp -y

Install OpenCV Dependencies

sudo apt-get install libilmbase-dev libopenexr-dev libgstreamer1.0-dev libjasper-dev libwebp-dev libatlas-base-dev libavcodec-dev libavformat-dev libswscale-dev libqtgui4 libqt4-test -y

Setup Virtual Env

python3 -m virtualenv -p python3 env --system-site-packages
echo "source env/bin/activate" >> ~/.bashrc
source ~/.bashrc

NOTE: To return to the system python you can type deactivate.

Install Donkeycar Python Code

cd ~ 
mkdir github
cd github

git clone https://github.com/autorope/donkeycar
cd donkeycar
git checkout master
pip install -e .[pi]
pip install numpy --upgrade
wget "https://raw.githubusercontent.com/PINTO0309/Tensorflow-bin/master/tensorflow-2.3.1-cp37-none-linux_armv7l_download.sh"
chmod u+x tensorflow-2.3.1-cp37-none-linux_armv7l_download.sh
./tensorflow-2.3.1-cp37-none-linux_armv7l_download.sh
pip install tensorflow-2.3.1-cp37-none-linux_armv7l.whl
python -c "import tensorflow"

install opencv bindings

sudo apt install python3-opencv -y

Create Donkey car app

Create Donkeycar App. - Donkey Car

donkey createcar --path ~/github/donkeycar-oran
cd ~/github/donkeycar-oran
nano myconfig.py
To save and exit: ctrl + x, "y", ENTER