Web Controllers
LocalWebController
Web-based controller using browser interface. Import:Port for web server
angle: Steering angle (-1 to 1)throttle: Throttle value (-1 to 1)mode: Drive mode (user, local_angle, local)recording: Recording state (True/False)
Physical Joystick Controllers
JoystickController
Base class for physical joystick controllers. Constructor:Delay in seconds between joystick polls
Scale factor for throttle (0.0 to 1.0)
Scale factor for steering (0.0 to 1.0)
Direction multiplier for throttle (1.0 or -1.0)
Device path for joystick
Automatically start recording when throttle is applied
Returns control outputs based on joystick state
Returns control outputs in threaded mode
Polls joystick for input events (runs in separate thread)
Stops the controller thread
Sets the tub for record deletion functionality
- Mode toggle: Switch between user, local_angle, and local modes
- Record toggle: Start/stop manual recording
- Erase records: Delete last N records from tub
- Emergency stop: Immediately stop the vehicle
- Increase/Decrease throttle: Adjust max throttle scale
- Constant throttle: Toggle constant throttle mode
PS3JoystickController
PlayStation 3 controller support. Constructor:- Select: Toggle mode
- Circle: Toggle manual recording
- Triangle: Erase last 100 records
- Cross: Emergency stop
- D-Pad Up/Down: Increase/decrease max throttle
- Start: Toggle constant throttle
- L1/R1: Chaos monkey (test mode)
- Left stick horizontal: Steering
- Right stick vertical: Throttle
PS4JoystickController
PlayStation 4 controller support. Constructor:- Share: Toggle mode
- Circle: Toggle manual recording
- Triangle: Erase last 100 records
- Cross: Emergency stop
- L1/R1: Increase/decrease max throttle
- Options: Toggle constant throttle
- Left stick horizontal: Steering
- Right stick vertical: Throttle
XboxOneJoystickController
Xbox One controller support. Constructor:- A button: Toggle mode
- B button: Toggle manual recording
- X button: Erase last 100 records
- Y button: Emergency stop
- Right/Left shoulder: Increase/decrease max throttle
- Options: Toggle constant throttle
- Left stick horizontal: Steering
- Right stick vertical: Throttle
- Right trigger: Forward throttle (Forza mode)
- Left trigger: Reverse throttle (Forza mode)
LogitechJoystickController
Logitech F710 gamepad support. Constructor:- Start: Toggle mode
- B: Toggle manual recording
- Y: Erase last 100 records
- A: Emergency stop
- Back: Toggle constant throttle
- L1/R1: Chaos monkey
- D-Pad Up/Down: Increase/decrease max throttle
- Left stick horizontal: Steering
- Right stick vertical: Throttle
RC Receiver
RCReceiver
Read RC receiver PWM signals via pigpio. Constructor:Configuration object with RC GPIO pin settings
Returns RC control values
Usage Examples
Web Controller
PS4 Controller
RC Receiver
Configuration
Typical joystick configuration inmyconfig.py:
