Skip to content

Instantly share code, notes, and snippets.

@tawnkramer
Last active September 12, 2017 17:01
Show Gist options
  • Save tawnkramer/8477071f176bf476f06db55a1d650580 to your computer and use it in GitHub Desktop.
Save tawnkramer/8477071f176bf476f06db55a1d650580 to your computer and use it in GitHub Desktop.

on your pi

wget https://raw.githubusercontent.com/tawnkramer/donkey/dev-mainline/donkeycar/parts/controllers/joystick.py
cp joystick.py ~/d2/

now edit ~/d2/manage.py

near the top, add a

import joystick

then comment out the local web controller, and add the line:

ctr = joystick.JoystickPilot(max_throttle=0.3)
#ctr = dk.parts.LocalWebController()

if this is too sensitive, try making max_throttle smaller. like 0.2 or 0.1

Update: The joystick part is integrated into donkey mainline now. No need to do this. Check docs for setup. https://github.com/wroscoe/donkey/tree/master/docs

@jacksilb
Copy link

jacksilb commented Sep 3, 2017

Tawn, the wget is not working. Did you change the file locations by any chance?

HTTP request sent, awaiting response... 404 Not Found
2017-09-02 18:23:50 ERROR 404: Not Found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment