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 eth0A 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 trotAll gaits
| Name | ID | Notes |
|---|---|---|
sitting | 0 | Sit down |
standing | 1 | Default at startup |
aiming | 2 | Aiming posture |
trotting | 3 | MPC trot |
trot_stairs | 4 | Stair-climbing trot |
waving | 5 | Wave gait |
trot_running | 6 | High-speed trot |
docking | 10 | Auto-docking sequence |
rl_trot | 30 | RL trot |
rl_front_walk | 31 | RL front walk |
rl_left_walk | 33 | RL left walk |
rl_right_walk | 34 | RL right walk |
rl_bound | 35 | RL bound |
rl_pace | 36 | RL pace |
rl_pronk | 37 | RL pronk |
rl_3leg_hr | 38 | RL 3-leg (hind right) |
rl_3leg_hl | 39 | RL 3-leg (hind left) |
rl_3leg_fl | 41 | RL 3-leg (front left) |
rl_trot_vision | 42 | RL trot with vision |
rl_trot_run | 45 | RL fast run |
rl_silent | 46 | RL silent |
rl_stairs | 47 | RL stair climbing |
rl_walk_vision | 48 | RL walk w/ terrain height feedback (height/pitch adjustable) |
rl_walk | 49 | RL walk (height/pitch adjustable) |
Joystick velocity
| Axis | Command | Max |
|---|---|---|
| L stick forward/back | vel_x | ±1.2 m/s |
| L stick left/right | vel_y | ±0.5 m/s |
| R stick left/right | omega_z | ±60 deg/s |
omega_zis 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++)
