Web Controller
Browser-based control interface for driving your Donkey car. Location:donkeycar/parts/web_controller/web.py
- Web-based UI accessible from any device
- Keyboard or on-screen controls
- Real-time video streaming
- Mode switching (user/autopilot)
- Recording control
http://<vehicle-ip>:8887
Physical Joystick Controllers
All joystick controllers follow a common pattern:Base Joystick Class
Location:donkeycar/parts/controller.py:17
The Joystick class provides low-level access to joystick devices via /dev/input/js0.
JoystickController
Location:donkeycar/parts/controller.py:819
Base class that maps joystick inputs to vehicle actions.
Key Methods:
set_steering()- Map axis to steering angleset_throttle()- Map axis to throttle valuetoggle_mode()- Switch between user/autopilot modestoggle_manual_recording()- Start/stop recordingincrease_max_throttle()/decrease_max_throttle()- Adjust throttle scaleemergency_stop()- Immediate stop sequenceerase_last_N_records()- Delete recent data
PlayStation Controllers
PS3 Controller
Location:donkeycar/parts/controller.py:1212
- Select: Toggle driving mode (user/local_angle/local)
- Circle: Toggle manual recording
- Triangle: Erase last 100 records
- Cross: Emergency stop
- D-pad Up: Increase max throttle
- D-pad Down: Decrease max throttle
- Start: Toggle constant throttle
- L1/R1: Chaos monkey (add steering bias for testing)
- Left Stick Horizontal: Steering
- Right Stick Vertical: Throttle
PS4 Controller
Location:donkeycar/parts/controller.py:1290
- Share: Toggle driving mode
- Circle: Toggle manual recording
- Triangle: Erase last records
- Cross: Emergency stop
- L1: Increase max throttle
- R1: Decrease max throttle
- Options: Toggle constant throttle
- Left Stick Horizontal: Steering
- Right Stick Vertical: Throttle
donkeycar/parts/controller.py:1333
Xbox Controllers
Xbox One Controller
Location:donkeycar/parts/controller.py:1355
- A: Toggle driving mode
- B: Toggle manual recording
- X: Erase last records
- Y: Emergency stop
- Right Shoulder: Increase throttle
- Left Shoulder: Decrease throttle
- Options: Toggle constant throttle
- Left Stick Horizontal: Steering
- Right Stick Vertical: Throttle
- Right Trigger: Forward (Forza mode)
- Left Trigger: Reverse (Forza mode)
Other Controllers
Logitech Gamepad F710
Location:donkeycar/parts/controller.py:1439
- Start: Toggle mode
- B: Toggle recording
- Y: Erase records
- A: Emergency stop
- Back: Toggle constant throttle
- R1/L1: Chaos monkey
- D-pad Up/Down: Adjust throttle
Nimbus Controller
Location:donkeycar/parts/controller.py:1514
For SteelSeries Nimbus (iOS/Apple TV controller).
WiiU Pro Controller
Location:donkeycar/parts/controller.py:1546
RC Receiver
For traditional RC transmitter/receiver setups using GPIO pins. Location:donkeycar/parts/controller.py:246
pigpio library
Configuration
Inmyconfig.py:
Adding Controllers to Vehicle
Testing Controllers
Test controller connection:Creating Custom Controller Mappings
Use the joystick creator tool:- Detect your controller
- Show button/axis codes
- Help you create a custom mapping
donkeycar/parts/controller.py:348 (JoystickCreator)
Common Issues
Controller Not Detected
Bluetooth Pairing Issues
Wrong Button Mappings
- Different controller revisions may have different mappings
- Use
jstestordonkey createjsto identify correct mappings - Create custom controller class if needed
Next Steps
- Actuators - Control motors with your input
- Data Stores - Record driving data
- Custom Parts - Create custom controller logic
