Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

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

@dlarue

This comment has been minimized.

Copy link

dlarue commented Aug 21, 2017

on the standard donkey platform, 30% was a bit too fast for me so I tried 20% but it was too slow and even stopped on a bump. 25% was juuuuust right.

@jacksilb

This comment has been minimized.

Copy link

jacksilb commented Sep 2, 2017

Tawn, how do we pair the PS3 controller with the RPI3 in the first place so then we can use your code ;-)?

Thank you,
-Jack

Well, here is what found that it seems what I need.
https://www.piborg.org/blog/pi-zero-wifi-ps3
https://www.piborg.org/rpi-ps3-help

@jacksilb

This comment has been minimized.

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
You can’t perform that action at this time.