Skip to main content

SDK Architecture and Communication Model

Booster Service runs in the service layer and exposes robot capabilities through the interface layer. ROS 2 applications communicate through ROS 2 DDS, while non-ROS applications use Booster Robotics SDK. Both paths access the same system services.

Initialization Order​

Most SDK capabilities depend on DDS. Initialize ChannelFactory before using a topic or RPC client:

booster::robot::ChannelFactory::Instance()->Init(0, "<network_ip>");

The default domain_id is 0. The second argument is the network IP address, for example 127.0.0.1 or 192.168.10.102; an empty string uses the default network configuration.

High-Level Services: RPC Clients​

High-level services are wrapped by RpcClient. Each business client is bound to a fixed RPC topic:

Client

Purpose

Typical methods

B1LocoClient

Motion, actions, and status queries

Move, GetUp, GetStatus

AiClient / LuiClient

AI chat, TTS, and ASR

StartAiChat, Speak, SendTtsText

VisionClient

Vision service and detection queries

StartVisionService, GetDetectionObject

CameraClient / X5CameraClient

Camera catalog and X5 camera mode

GetCameras, ChangeMode

LightControlClient

LED control

SetLEDLightColor, StopLEDLightControl

AudioManager

Playback, recording, capture, Bluetooth, and volume

CreatePlayer, GetDevices

To address a named robot, call Init(robot_name). B1LocoClient appends the robot name to the rt/LocoApiTopic topic suffix.

Return Codes and Responses​

C++ methods generally return an int32_t status code. Constants are defined in include/booster/robot/rpc/error.hpp. 0 means success; all nonzero values should be handled explicitly. See RPC Error Codes for definitions and troubleshooting guidance.

Use the method’s output parameter for typed business responses. To inspect a raw response body, call SendApiRequestWithResponse with a Response object.

Low-Level Services: Topic Publish/Subscribe​

Low-level DDS topics are exposed through the C++ templates ChannelPublisher<MSG> and ChannelSubscriber<MSG>.

Their constructors accept a reliable option. The default is false, which selects best-effort delivery and is suitable for high-frequency real-time topics.

Choosing High-Level or Low-Level Services​

  • Prefer high-level RPC clients for standing, walking, actions, dance, audio, and vision tasks.
  • Use topics for high-frequency state, joint commands, ROS-like topics, and AI subtitle streams.
  • Publishing rt/joint_ctrl is direct low-level control. The application is responsible for command frequency, joint indexing, and safety limits.