Skip to content

ROS 2 Service Reference ​

Reference of the ROS 2 services the robot's onboard software exposes over CycloneDDS.

Like the topics, the services need no driver node. Each robot process serves them directly over ROS 2-compatible DDS, so ros2 service list and ros2 service call work as soon as the process is running. Use the same RMW_IMPLEMENTATION=rmw_cyclonedds_cpp and network interface as for the topics (see Network & DDS).

All services use the two standard rcl_interfaces types, so no extra workspace is needed:

TypeUsed by
rcl_interfaces/srv/SetParametersset_param — set values; set_service — run actions and switch features
rcl_interfaces/srv/GetParametersget_param — read values back

Request and response rules ​

  • One result per parameter. SetParameters returns one results[i] per parameters[i], in the same order. A parameter fails on its own — the others in the same request still apply.
  • Failure reason. A failed entry has successful: false and a short English reason (for example unknown parameter, expects number). A successful entry has an empty reason.
  • Up to 64 parameters per request. A larger request is rejected as a whole: every set_* entry fails with too many parameters (max 64), and every get_param value comes back unset.
  • Value type. Set value.type explicitly (1=bool, 2=integer, 3=double, 4=string). If you leave it at 0, the robot uses the one value field you filled in. A zero value (0, 0.0, empty string) cannot be detected that way, so always set the type when sending zero.
  • Unknown names in get_param come back with type: 0 (not set).
  • set_service takes bool values unless the name says otherwise (gait, stream_live). Entries marked true only fail with true only when sent false.
ServiceProcessAvailable when
/rbq/motion/*NetworkRobot software is running
/rbq/vision/*StreamerVision software is running
/rbq/camera/*HALVision software is running
/rbq/ptz/*PtzThe PTZ camera payload is installed

Motion ​

/rbq/motion/set_param ​

FieldValue
Typercl_interfaces/srv/SetParameters
DescriptionSet payload, walking, and docking parameters. All values are numbers (integer or double).
NameUnitDescription
payload.masskgMass of the extra payload, used for CoM compensation
payload.com_x / payload.com_y / payload.com_zmPayload centre of mass, body frame
dynamics.max_speedm/sUpper limit of the walking speed
dynamics.body_heightmStanding height offset relative to the default
dynamics.body_tiltdegFixed body pitch while walking
dock.offset_x / dock.offset_ymDocking target offset
dock.count_req—Marker detection attempts before docking
dock.count_try—Docking failures allowed before giving up

The dynamics.* ranges are those of the app's Drive parameters. A payload.* value outside the payload limits fails with reason: validation_error. The CoM limits are |x| ≤ 0.5 m, |y| ≤ 0.3 m, |z| ≤ 0.4 m; the mass limit depends on the robot model.

Set dynamics.max_speed first

The robot applies the three dynamics.* values together. Until dynamics.max_speed has been set once, body_height and body_tilt fail with dynamics.max_speed not set yet - set it first. Send all three in one request to be safe. The stored values reset when the robot's software restarts.

payload.* sets the first custom payload slot.

/rbq/motion/get_param ​

FieldValue
Typercl_interfaces/srv/GetParameters
DescriptionRead back the set_param names above. Values come back as doubles (type: 3).

dynamics.max_speed is unset until it has been set through set_param.

/rbq/motion/set_service ​

FieldValue
Typercl_interfaces/srv/SetParameters
DescriptionRun motion actions and switch modes.
NameValueDescription
estopbool, true onlyEmergency stop — every joint goes to high damping. The robot collapses. Same as /rbq/cmd/emergency
auto_startbool, true onlyCAN check → Find Home → Control Start. Same as /rbq/cmd/auto_start
control_modebooltrue → HighLevel Command mode, false → joystick mode. Same as /rbq/cmd/switch_control_mode
power_ch<N>boolTurn PDU power port N on or off, for N from 0 to 31. Port numbers are listed under Power Control
gaitinteger or stringSwitch gait. Integer: a gait id from the Gait State IDs. String: one of the names below

Gait names accepted by gait (case-insensitive): sitting, standing, aiming, trotting, trot_stairs, waving, trot_running, docking, rl_trot, rl_front_walk, rl_left_walk, rl_right_walk, rl_bound, rl_pace, rl_pronk, rl_3leg_hr, rl_trot_vision, rl_trot_run, rl_silent, rl_trot_vision_slow, rl_walk, rl_walk_vision. Another id or name fails with unknown gait id / unknown gait name.

DANGER

estop cuts joint torque at once and the robot falls. Sit the robot down first when testing.

Examples:

bash
# Walking parameters — send all three together
ros2 service call /rbq/motion/set_param rcl_interfaces/srv/SetParameters \
  "{parameters: [
    {name: 'dynamics.max_speed',   value: {type: 3, double_value: 1.0}},
    {name: 'dynamics.body_height', value: {type: 3, double_value: 0.0}},
    {name: 'dynamics.body_tilt',   value: {type: 3, double_value: 0.0}}]}"

# Read the payload mass
ros2 service call /rbq/motion/get_param rcl_interfaces/srv/GetParameters "{names: ['payload.mass']}"

# Switch to standing by name
ros2 service call /rbq/motion/set_service rcl_interfaces/srv/SetParameters \
  "{parameters: [{name: 'gait', value: {type: 4, string_value: 'standing'}}]}"

Vision ​

/rbq/vision/set_param · /rbq/vision/get_param ​

FieldValue
Typercl_interfaces/srv/SetParameters · rcl_interfaces/srv/GetParameters
DescriptionWebRTC video stream settings. Changes are kept across restarts.
NameValueDescription
webrtc.width / webrtc.heightinteger, 16–7680Stream resolution in pixels. Setting one keeps the other
webrtc.presetstringx264 encoder preset: ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow, placebo

/rbq/vision/set_service ​

FieldValue
Typercl_interfaces/srv/SetParameters
DescriptionSwitch vision features and the live view.
NameValueDescription
stream_liveintegerSelect the live view by id — 0 = none, 1 front, 2 rear, 3 left, 4 right, 11 stacked, 12 panorama, 13 stairs, 14 side by side, 15 dock
face_detectboolFace detection overlay
point2goboolPoint-to-go overlay
guideboolGuide overlay
daybooltrue → day mode, false → night (IR) mode
heightmap.stairsboolStairs detection in the height map
heightmap.edgeboolEdge detection in the height map
heightmap.alignboolAlign the height map to the body yaw

TIP

stream_live: 0 (no view) is accepted but ignored while other viewers are watching the stream.

Camera ​

/rbq/camera/set_param · /rbq/camera/get_param ​

FieldValue
Typercl_interfaces/srv/SetParameters · rcl_interfaces/srv/GetParameters
DescriptionRead and write the camera configuration as <SECTION>.<key> — for example MAIN.RS_PRESET_HIGH_DENSITY.
  • set_param changes only keys that already exist; a typo fails with unknown section or unknown key. Any scalar value is accepted and stored as text. The camera configuration reloads after a successful change.
  • get_param returns the stored text (type: 4), or unset if the key does not exist.

/rbq/camera/set_service ​

FieldValue
Typercl_interfaces/srv/SetParameters
DescriptionCamera actions.
NameValueDescription
ir_projectorboolIR projector of every depth camera on or off
reload_configbool, true onlyReload the camera configuration
sensor_<N>.enabledboolOpen (true) or close (false) camera sensor N. Sensor ids are listed under Vision — Camera Sensors

PTZ ​

/rbq/ptz/set_param ​

FieldValue
Typercl_interfaces/srv/SetParameters
DescriptionPTZ position and speed. All values are numbers.
NameUnitDescription
pan / tiltradTarget angle, same ranges as /rbq/cmd/ptz
zoom×Target zoom, same range as /rbq/cmd/ptz
pan_vel / tilt_veldeg/sTurn at this speed
zoom_vel—Zoom continuously at this rate

Unlike /rbq/cmd/ptz, each name applies on its own — setting pan leaves tilt and zoom where they are.

There is no get_param for the PTZ — read the current position from /rbq/ptz.

/rbq/ptz/set_service ​

FieldValue
Typercl_interfaces/srv/SetParameters
DescriptionPTZ actions. Both names act only when sent true.
NameDescription
return_centerMove pan and tilt back to centre and zoom to 1×
stopStop pan and tilt movement

This user manual is intended for RBQ users.