Skip to content

RBQ ROS2 SDK — 빠른 시작

4단계로 RBQ 로봇을 ROS 2 Humble에 연결합니다.

1. 클론 및 ROS 설치

bash
git clone https://github.com/RainbowRobotics/RBQ.git
cd RBQ

# ROS 2 Humble 설치 (최초 1회) — https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debs.html
sudo apt update && sudo apt install -y ros-humble-desktop \
    python3-colcon-common-extensions python3-rosdep \
    ros-humble-rmw-cyclonedds-cpp ros-humble-cyclonedds
sudo rosdep init && rosdep update
source /opt/ros/humble/setup.bash

2. ROS2 SDK 빌드

bash
cd ros2
rosdep install --from-paths src -y --ignore-src
colcon build --symlink-install
cd ..

3. 실행

시뮬레이션:

bash
source ros2/install/local_setup.bash
bash scripts/sim.bash

실제 로봇:

bash
source ros2/install/local_setup.bash
bash scripts/start_ros_driver.bash

4. DDS 설정 (개발 PC ↔ 로봇 Wi-Fi)

ros2 topic 명령을 쓸 터미널에서 아래를 설정합니다:

bash
export CYCLONEDDS_URI='<CycloneDDS><Domain><Id>0</Id><General><Interfaces><NetworkInterface name="wlp4s0"/></Interfaces></General></Domain></CycloneDDS>'
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp

wlp4s0은 실제 Wi-Fi 인터페이스 이름으로 바꾸세요 (ifconfig로 확인).

빠른 명령 테스트

bash
# HighLevel 모드 활성화
ros2 topic pub --once /rbq/motion/switchControlMode std_msgs/msg/Bool "{data: true}"

# 일어서기
ros2 topic pub --once /rbq/motion/switchGait std_msgs/msg/Int8 "{data: 1}"

# 0.3 m/s 전진
ros2 topic pub --once /rbq/motion/cmd_highLevel rbq_msgs/msg/HighLevelCommand \
'{vel_x: 0.3, vel_y: 0.0, omega_z: 0.0, gait_state: 3, gait_transition: false}'

# 토픽 목록 확인
ros2 topic list

사용 가능한 토픽 목록

bash
source ros2/install/local_setup.bash
ros2 topic list

전체 ROS2 레퍼런스: ROS2 SDK

This user manual is intended for RBQ users.