Skip to content

Commit

Permalink
start adding options to parts
Browse files Browse the repository at this point in the history
  • Loading branch information
wroscoe committed Aug 21, 2018
1 parent 57c75f1 commit 33761be
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 30 deletions.
9 changes: 4 additions & 5 deletions donkeycar/parts/actuator.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,12 @@ class PWMSteering:
"""
Wrapper over a PWM motor cotnroller to convert angles to PWM pulses.
"""
LEFT_ANGLE = -1
RIGHT_ANGLE = 1

class Settings:

class Meta:
inputs = ['angle']
left_pulse = 290
right_pulse = 490
LEFT_PULSE = 290
RIGHT_PULSE = 490

def __init__(self, controller=None,
left_pulse=290, right_pulse=490):
Expand Down
2 changes: 1 addition & 1 deletion donkeycar/templates/donkey2.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def drive_mode(mode,
steering_controller = PCA9685(cfg.STEERING_CHANNEL)
steering = PWMSteering(controller=steering_controller,
left_pulse=cfg.STEERING_LEFT_PWM,
right_pulse=cfg.STEERING_RIGHT_PWM)
right_pulse=cfg.STEERING_RIGHT_PWM)

throttle_controller = PCA9685(cfg.THROTTLE_CHANNEL)
throttle = PWMThrottle(controller=throttle_controller,
Expand Down
25 changes: 1 addition & 24 deletions install/pi/install.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
# Script to install everything needed for donkeycar except the donkeycar library


# Get witch Pi version
echo "Enter the Pi number (3 or 0)"
read pi_num
if [ $pi_num == 3 ]; then
echo "installing for Pi 3."
tf_file=tensorflow-1.8.0-cp35-none-linux_armv7l.whl
elif [ $pi_num == 0 ]; then
echo "installing for Pi Zero."
tf_file=tensorflow-1.8.0-cp35-none-linux_armv6l.whl
else
echo "Only Pi 3 and Pi Zero are supported."
exit 1
fi


#standard updates (5 min)
sudo apt update -y
sudo apt upgrade -y
Expand Down Expand Up @@ -45,9 +29,6 @@ sudo apt-get autoremove -y
#install redis-server (1 min)
sudo apt install redis-server -y

sudo bash make_virtual_env.sh


#create a python virtualenv (2 min)
sudo apt install virtualenv -y
virtualenv ~/env --system-site-packages --python python3
Expand All @@ -63,8 +44,4 @@ source ~/env/bin/activate
pip install pandas #also installs numpy


#install tensorflow (5 min)
echo "Installing Tensorflow"
wget https://github.com/lhelontra/tensorflow-on-arm/releases/download/v1.8.0/${tf_file}
pip install ${tf_file}
rm ${tf_file}
pip install tensorflow==1.9

0 comments on commit 33761be

Please sign in to comment.