Autonmous Vehicle Project at Fubar Labs for the Autonomous Powerwheels Racing compeition.
- Autonomous Powerwheels Racing Pittsburg Makerfiare 2017
- We totally did laps. We were on the track on time and ready to go!
- Autonmous Powerwheels Racing Makerfaire NYC 2017
- Autonmous Vehicle Competition via Sparkfun at Denver Makerfaire 2017
Prepare your PI
sudo apt-getupdate
sudo apt-get install python3-pip python3-dev ython3-dev python3-pip python-pip python3-h5py \
python3-numpy python3-matplotlib python3-scipy python3-pandas
Get TensorFlow for PI installed (http://www.instructables.com/id/Google-Tensorflow-on-Rapsberry-Pi/)
wget https://github.com/samjabrahams/tensorflow-on-raspberry-pi/releases/download/v1.1.0/tensorflow-1.1.0-cp34-cp34m-linux_armv7l.whl
Install Tensorflow for Python 3.4
sudo pip3 install pip3 install tensorflow-1.1.0-cp34-cp34m-linux_armv7l.whl
If you have Tensorflow on Raspberry PI with Stretch you need to rename the Tensorflow wheel binary:
cp tensorflow-1.1.0-cp34-cp34m-linux_armv7l.whl tensorflow-1.1.0-cp35-cp35m-linux_armv7l.whl
Fix a potential error message:
sudo pip3 uninstall mock
sudo pip3 install mock
Install the Python libraries:
git clone https://github.com/fubarlabs/autonomous
cd autonomous
virtualenv auto -p python3
source auto/bin/activate
pip install -r requirements.txt
Set up the raspberry pi services
cd /usr/local/bin
ln -s /autonomous/services/ottoMicroLogger.py
ln -s /autonomous/services/ottoMicroLogger.service
systemctl enable /autonomous/services/ottoMicroLogger.service
Code is installed from the Raspberry PI using PLatform IO
sudo pip install platformio
Platform IO is only Python 2.7 but it can program the Arduino. In our chase it's the Fubarion SD board.
Arduino code location: ./autonomous/arduino
cd arduino
MOTTO: Small RC Car Collection Code: MOTTOServoDtaSampleDelay.ino
cd MOTTOServoDataSampleDelay
pio run -t upload
Full Auto Code: MOTTOFullAutoDrive.ino
cd MOTTOFUllAutoDrive.ino
pio run -t upload
OTTO: Power Wheels Autonomus Collection Code: NewOTTOFullAutoDrive.ino
cd NewOTTOFUllAutoDrive.ino
pio run -t upload
Full Auto Code: NewOTTOFullAutoDrive.ino
cd NewOTTOFUllAutoDrive.ino
pio run -t upload
Data collection is done as a Raspberry PI service. The folder services contains:
-
ottologger.py
-
ottologger.service
-
Copy ottologger.py /usr/local/bin
-
register ottologer.service as a system service
-
Switch on pin 4 enables and disables collection
-
LED on pin 11 shows the status of collection
Autonomous Project Documenatation
Simple model in basic_model.py
. Currently linear with mean squared error loss (summed over outputs?)
- Webcam image
- Current Accel
- Current Speed
- Current Distance from rangefinder
- Current Steering wheel angle
- Steering Wheel angle
- Maybe speed?
Driving model is in current_model.py
. Weights are on Google Drive. Line 74 of the model will have to be changed to reflect the true location/name of the weights file.