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/high_level
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 all gaits
standing          ← switch by name
3                 ← switch by ID (trotting)
rl_trot           ← switch to RL trot

All gaits

NameIDNotes
sitting0Sit down
standing1Default at startup
aiming2Aiming posture
trotting3MPC trot
trot_stairs4Stair-climbing trot
waving5Wave gait
trot_running6High-speed trot
docking10Auto-docking sequence
rl_trot30RL trot
rl_front_walk31RL front walk
rl_left_walk33RL left walk
rl_right_walk34RL right walk
rl_bound35RL bound
rl_pace36RL pace
rl_pronk37RL pronk
rl_3leg_hr38RL 3-leg (hind right)
rl_3leg_hl39RL 3-leg (hind left)
rl_3leg_fl41RL 3-leg (front left)
rl_trot_vision42RL trot with vision
rl_trot_run45RL fast run
rl_silent46RL silent
rl_stairs47RL stair climbing
rl_walk_vision48RL walk w/ terrain height feedback (height/pitch adjustable)
rl_walk49RL walk (height/pitch adjustable)

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.