PS3 Walk

Controlling the NUgus with a PS3 controller.
Ysobel Sims GitHub avatar
Updated 8 Nov 2026

This page is archived. It documents the NUgus, which NUbots no longer uses as its main platform.

The PS3 walk module is an interface for testing and demonstrating the walk and other functionalities using a PS3 controller.

The module connects to the PS3 controller using USB or bluetooth and reacts based on joystick or button input.

CommandDescription
Left Joystick HorizontalAdds rotational speed to the walk command.
Left Joystick VerticalAdds x speed to the walk command.
Right Joystick HorizontalChanges the head yaw.
Right Joystick VerticalChanges the head pitch.
STARTToggles walking on/off.
SELECTToggles locking of the head.
R2Right kick.
L2Left kick.
DPAD UpPerform Clap move.
DPAD DownPerform The Robot move.
DPAD LeftPerform Dab move.
DPAD RightPerform Arm Dangle move.
TrianglePerform Star move.
CirclePerform Raise The Roof move.
CrossPerform Crouch move.
SquarePerform Wave move.

To use this module, build the PS3Walk role and install it on the robot. Ensure the PS3 controller is paired and connected to the right robot. You can set up bluetooth on the robot and pair the controller using the steps below. Once these have been run once, the robot should automatically connect to the controller when both the robot and controller are powered. When you are ready, run ./ps3walk on the robot to begin controlling it.

The robot will initially not perform any action. If you want the robot to stand, pick up the robot and press the start button. It will then move to its standing position and begin looking for walk inputs.

Setup

  1. Install bluez, bluez-utils, and bluez-plugins if they have not already been installed:
    pacman -S --needed bluez bluez-utils bluez-plugins
  2. Restart the system:
    reboot now
    This is only necessary if the packages were not previously installed.
  3. Start the bluetooth service:
    systemctl start bluetooth.service
Start bluetooth automatically

Bluetooth can be powered on automatically when the system starts. This enables the controllers to connect without having to run systemctl start bluetooth.service and bluetoothctl power on. This is not currently enable by default in the existing installation. Some robots might have this enabled.

  1. Run
    systemctl enable bluetooth.service
  2. Set AutoEnable=true in /etc/bluetooth/main.conf:
    [Policy]
    AutoEnable=true

Now, after restarting the robot, and having previously paired the PS3 controller (see below), the PS3 controller will connect to the robot automatically.

ps3walk still needs to be started in order to control the robot.

Pairing the PS3 Controller via Bluetooth

  1. Unplug and power off the PS3 controller.
  2. Run the interactive program bluetoothctl, and type the following commands:
    power on
    scan on
    discoverable on
    If bluetooth is working correctly, you might see other devices appear and disappear.
  3. Turn on the PS3 controller by pressing the middle PS button. The four LEDS should start flashing quickly.
  4. Plug the PS3 controller into the computer with a USB cable.
  5. Type yes when the following prompt appears:
    Authorize service 00001124-0000-1000-8000-00805f9b34fb (yes/no)

The PS3 controller is now paired. You can unplug it and it will remain connected.

The controllers are extremely finicky. Placing them on a table or shaking them can trigger multiple buttons to be pressed!
The steps are based on the Arch Linux controller pairing guide. If you are having trouble or are connecting a different controller try using their guide as a starting point.

Verifying the PS3 Controller is functioning correctly.

Verifying the PS3 controller is connected and sending messages is useful for debugging the range, interference, event codes, and making sure the controller is connect to the right robot.

  1. Install joyutils:
    pacman -S --needed joyutils
  2. If you are connected via ssh run:
    jstest --event /dev/input/js0
    Otherwise, if you're connected to a virtual console:
    jstest /dev/input/js0
  3. Move controller inputs, and press Ctrl + C to exit.

Connecting multiple PS3 controllers is possible. The first PS3 controller that connects is located at /dev/input/js0. The second controller that connects is then located at /dev/input/js1. Additionally, the LEDs on the controllers show which number they are. This holds true regardless of whether the controller is connected over Bluetooth or USB.

NUbots acknowledges the traditional custodians of the lands within our footprint areas: Awabakal, Darkinjung, Biripai, Worimi, Wonnarua, and Eora Nations. We acknowledge that our laboratory is situated on unceded Pambalong land. We pay respect to the wisdom of our Elders past and present.
Copyright © 2026 NUbots - CC-BY-4.0
Deploys by Netlify