High Level Command — Quick Start (ROS2)
Source: rbq_sdk/ros2/src/rbq_examples/src/rbq_high_level.cpp
Publishes HighLevelCommand at 50 Hz over ROS 2.
Select gaits from the terminal; control velocity with a joystick.
Build
bash
cd RBQ/rbq_sdk/ros2
rosdep install --from-paths src -y --ignore-src
colcon build --symlink-install
source install/setup.bashRun
bash
ros2 run rbq_examples rbq_high_level [joystickPath]
# e.g.
ros2 run rbq_examples rbq_high_level
ros2 run rbq_examples rbq_high_level /dev/input/js1Default joystick path is /dev/input/js0.
Terminal usage
list ← print all gaits
stand ← switch by name
3 ← switch by ID (walk)
rl_trot ← switch to RL trotAll gaits
| Name | ID | Notes |
|---|---|---|
sit | 0 | Sit down |
stand | 1 | Default standing |
aim | 2 | Aiming posture |
walk | 3 | MPC trot gait |
stairs | 4 | Stair-adaptive gait |
wave | 5 | Slow walk gait |
run | 6 | High-speed gait |
rl_trot | 30 | RL trot |
rl_front_walk | 31 | RL forward walk |
rl_left_walk | 33 | RL lateral left |
rl_right_walk | 34 | RL lateral right |
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_fr | 40 | RL 3-leg (front right) |
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 |
Deadzone: 0.12. omega_z is in deg/s.
Important
At startup, switchControlMode = true is sent once to enable HighLevel mode.
Without this, the robot ignores HighLevelCommand and stays in joystick mode.
→ Full reference: High Level Command (ROS2)
