Skip to content

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.bash

Run

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/js1

Default joystick path is /dev/input/js0.

Terminal usage

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

Supported gaits

NameIDNotes
sit0Sit down
stand1Default standing
walk3MPC trot gait
stairs4Stair-adaptive gait
wave5Slow walk gait

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

Deadzone: 0.12. omega_z is in deg/s.

ROS 2 topics used

DirectionTopicMessage type
Publish/rbq/cmd/high_levelrbq_msgs/msg/HighLevelCommand
Publish/rbq/cmd/switch_control_modestd_msgs/msg/Bool
Publish/rbq/cmd/switch_gaitstd_msgs/msg/Int8
Subscribe/rbq/robot_statusrbq_msgs/msg/RobotStatus (best-effort QoS)

HighLevelCommand posture/velocity fields (roll, pitch, yaw, vel_x, vel_y, omega_z, delta_body_h, delta_foot_h) are float32. See the full field reference.

Important

At startup, switch_control_mode = 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)

This user manual is intended for RBQ users.