Skip to content

PS4 Controller Setup

A PS4 Joystick is used for car control and teleoperation. This guide describes how to set up the controller to work with the car.

Pair the Controller

This only needs to be done once per car and joystick combination.

  1. Power on the car by plugging in a battery and flipping the horizontal power switch on the side of the car. Wait for the car to boot up.

  2. Open the bluetooth settings page on the car. The easiest way to do this is to plug a keyboard into the car, press the windows key, and type "Bluetooth" to search for the bluetooth settings app, and open it from this menu.

  3. Put the PS4 controller into pairing mode by holding the "Share" button and the "PS" button until the light bar starts flashing quickly.

  4. In the bluetooth settings on the car, look for the PS4 controller in the list of available devices.

    Bluetooth Settings Disconnected Joystick

  5. Select the Wireless Controller to pair. Choose the device and click pair.

    Bluetooth Settings Connected Joystick

  6. Close the bluetooth settings app.

Start the Joystick ROS Node

To use the PS4 controller with the car, you need to run the joystick ROS2 node. This node reads input from the controller and publishes it as ROS2 messages that other nodes can subscribe to.

Start the joystick ROS2 node with the command:

ros2 run ut_automata joystick

Alternatively, start the teleoperation tmuxinator configuration with:

cd ~/roboracer_ws/tmux/
tmuxinator