Skip to content

ROS 2 Quick Start

Goal: Set up the RBQ ROS 2 SDK, connect to the robot (or simulator), and send your first motion commands via ROS 2 topics.

RBQ ROS2 SDK overview diagram

The RBQ ROS 2 SDK enables:

  • Robot control — posture commands, gait switching, velocity-based navigation
  • Sensor feedback — IMU, foot contact, battery state, and more as ROS 2 topics
  • Vision streaming — front, rear, and downward camera data
  • RViz2 visualization — real-time robot state and LiDAR display

System Requirements

ComponentRequirement
OSUbuntu 22.04
ROS 2Humble
Python3.8 / 3.9 / 3.10

Installation

1. Install ROS 2 Humble

bash
cd <your workspace>/RBQ
sudo bash scripts/ex/install/ros.bash
source /opt/ros/humble/setup.bash
sudo rosdep init && rosdep update

2. Build the RBQ ROS 2 Package

bash
cd rbq_ros2_msgs
colcon build --symlink-install
source install/setup.bash

3. Start the Robot (or Simulator)

Start the RBQ motion stack before launching ROS 2 nodes. In simulation:

bash
bash scripts/sim.bash

On the real robot, ensure Auto Start has been completed.

4. Launch the ROS 2 Node

bash
ros2 launch rbq_bringup rbq_bringup.launch.py

Quick Start Commands

Step 1. Switch to HighLevel Command Mode

NOTE

To control the robot with HighLevelCommand topics, you must switch to HighLevel mode first. The default mode is JoyStick mode.

trueHighLevel mode — accepts /rbq/motion/cmd_highLevel
falseJoyStick mode — robot controlled by joystick (default)
bash
ros2 topic pub --once /rbq/motion/switchControlMode std_msgs/msg/Bool "{data: true}"

Step 2. Auto Start

CAUTION

Before running autoStart, ensure the robot is in the correct initial pose on a flat surface.

bash
ros2 topic pub --once /rbq/motion/autoStart std_msgs/msg/Bool "{data: true}"

Step 3. Gait Transition

Gait IDStateCommand
0Sitros2 topic pub --once /rbq/motion/switchGait std_msgs/msg/Int8 "{data: 0}"
1Standros2 topic pub --once /rbq/motion/switchGait std_msgs/msg/Int8 "{data: 1}"
3Walkros2 topic pub --once /rbq/motion/switchGait std_msgs/msg/Int8 "{data: 3}"

Full gait state table (including RL gaits): software/ROS2 — Topics

Step 4. Send Velocity Commands

Once in Walk mode (gait_id: 3):

bash
# Move forward at 0.3 m/s
ros2 topic pub --once /rbq/motion/cmd_highLevel rbq_msgs/msg/HighLevelCommand \
'{header: {stamp: {sec: 0, nanosec: 0}, frame_id: "base"},
  identifier: "walk_fwd",
  vel_x: 0.3, vel_y: 0.0, omega_z: 0.0,
  roll: 0.0, pitch: 0.0, yaw: 0.0,
  delta_body_h: 0.0, delta_foot_h: 0.0,
  gait_state: 3, gait_transition: false}'

Key Topics at a Glance

TopicTypeDirectionDescription
/rbq/motion/autoStartBoolPublishTrigger Auto Start
/rbq/motion/switchGaitInt8PublishSwitch gait state
/rbq/motion/switchControlModeBoolPublishHighLevel / Joystick toggle
/rbq/motion/cmd_highLevelHighLevelCommandPublishVelocity + gait command
/rbq/sensor/imuImuSubscribeIMU data
/rbq/sensor/jointStateJointStateSubscribeJoint positions/velocities
/rbq/sensor/batteryBatteryStateSubscribeBattery level

For the full topic list (60+ topics including vision, manipulation, and SLAM), see:

Full ROS 2 Topic Reference →

RViz2 Visualization

bash
ros2 launch rbq_bringup rbq_rviz.launch.py

This user manual is intended for RBQ users.