Skip to content

High Level Command (Python) — Quick Start

Source: rbq_sdk/python/example/sport/rbq_high_level.py

Python port of the C++ rbq_high_level example. Publishes HighLevelCommand at 50 Hz, selects gaits via terminal, and controls velocity with a joystick.

Install

bash
cd RBQ/rbq_sdk/python
pip install -e .

Run

bash
cd RBQ/rbq_sdk/python/example/sport
python3 rbq_high_level.py <networkInterface> [joystickPath]
python3 rbq_high_level.py eth0

A joystick is required. The program auto-detects /dev/input/js* (prefers Logitech/Xbox by name).
Override via argument or JOY=/dev/input/js1 python3 rbq_high_level.py eth0.

Terminal usage

list              ← print the example's built-in list
standing          ← switch by name
3                 ← switch by ID (trotting)
waving            ← switch to wave gait

Supported gaits

NameIDNotes
sitting0Sit down
standing1Default at startup
trotting3MPC trot
trot_stairs4Stair-climbing trot
waving5Wave gait
docking10Auto-docking sequence

The example's built-in list also prints internal gaits that are not supported. Use only the gaits in the table above.

Joystick velocity

AxisCommandMax
L stick forward/backvel_x±1.2 m/s
L stick left/rightvel_y±0.5 m/s
R stick left/rightomega_z±60 deg/s

omega_z is in deg/s — QuadWalk converts to rad/s internally.

Important

The program sends switchControlMode = true at startup.
Without this, the robot ignores HighLevelCommand and stays in joystick mode.

C++ version: High Level Command (C++)

This user manual is intended for RBQ users.