Skip to content

blanck/parts

Repository files navigation

Some custom DonkeyCar parts

Feel free to use my custom parts for the donkeycar platform. To clone everything, use git clone https://github.com/blanck/parts.git ~/mycar/parts

Joystick/Gamepad controllers

Since I use different gamepads for different cars I have added the mapping in separate files

Matricom (or other bluetooth/usb-dongle-based) gamepad controller

Instructions for Donkey Car v.4+

Edit config file and change CONTROLLER_TYPE to 'custom' Copy the parts file to my_joystick.py

cp parts/matricom.py my_joystick.py

Instructions for Donkey Car v.2

add this line after the other from rows in manage.py

from parts.matricom_dc2 import JoystickController

Bluetooth pairing

When the gamepad is turned off, press the X and the Mode button at the same time

sudo bluetoothctl
scan on
connect <mac:id with lowest RSSI>
trust <mac:id with lowest RSSI>
quit

It should say Connection successful and [Gamepad]

Arrogant Bastard wireless gamepad EG-C3059W

Instructions for Donkey Car v.4+

Edit config file and change CONTROLLER_TYPE to 'custom' Copy the parts file to my_joystick.py

cp parts/arrogant.py my_joystick.py

Instructions for Donkey Car v.2

add this line after the other from rows in manage.py

from parts.arrogant_dc2 import JoystickController

USB camera part

A part using v4l2-ctl drivers to use a USB camera image instead of PiCamera

cam = USBCamera(resolution=(160, 120), framerate = 15)

GPIO Motorcontroller for 4WD

A very basic motor controller to use for 4-wheel-drive motor controllers connected to separate GPIO channels

from parts.gpio import GPIOCtrl, PWMThrottle, PWMSteering

and

steering_controller = GPIOCtrl()
steering = PWMSteering(controller=steering_controller,
                       left_pulse=cfg.STEERING_LEFT_PWM,
                       right_pulse=cfg.STEERING_RIGHT_PWM)
V.add(steering, inputs=['throttle','angle'])

About

DonkeyCar parts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages