Joystick Translation
Maintained by Nova
Overview
Converts joy messages coming from the ROS2 joystick driver and translates those values into our custom Vehicle/Control
message type to be used for TBS (throttle/brake/steering).
In:
- /joy joy
- /speed CarlaSpeedometer
- /clock Clock
- /guardian/mode Mode
Out:
- /vehicle/control VehicleControl
- /requested_mode Mode
- /node_statuses DiagnosticStatus
getSpeedAdjustedSteering(self, joystick_pos: float)
Adjusts steering response based off vehicle speed. The higher the speed, the more sensitive the steering. We calculate a lower maximum steer value on either direction using linear scaling on our inputted speed.
joyCb(self, msg: Joy)
Processes joystick input and publishes vehicle control commands as well as the requested mode