Skip to content

RBQ API Overview

The RBQ API provides a comprehensive C++ interface for developers to control and interact with the RBQ quadruped robot. It is designed to support both low-level real-time control and high-level behavioral commands in a multi-process environment.

Process ID (Motion Ownership)

When creating an RBQ_API instance, a process ID must be provided:

cpp
RBQ_API api(20);  // Process ID between 20 and 39 for user applications

This ID ensures safe multi-process control using a motion ownership mechanism, where each joint can only be controlled by its owner process.

⚠️ Always call setMotionOwner() before sending joint commands.


API Structure Summary

CategoryComponentDescription
ControlJointLow-level joint control: position, torque, gains (Kp/Kd)
startMoveJoint() / stopMoveJoint()Start/stop jog motion per joint
lockUnlockJoint()Locks/unlocks joints for manual manipulation
SensorIMUAccess to orientation (quaternion/RPY), gyro, and acceleration
getBatteryVoltage()Reads battery voltage (internal only)
GamepadGamepadAccess Logitech F710 gamepad inputs: jogs, triggers, buttons
High-level MotionmotionStaticReady() / motionDynamicWalk() etc.Predefined robot behaviors

Joint Control API (RBQ_API::Joint)

Reading Sensor Values

FunctionDescription
getPos()Read joint position (rad)
getVel()Read joint velocity (rad/s)
getTorque()Read joint torque (Nm)
getGainKp() / getGainKd()Read current Kp/Kd gains

Sending Commands

FunctionDescription
setMotionOwner()Take control of a joint
setPosRef()Set joint position target
setTorqueRef()Set torque target (Nm)
setGainKp() / setGainKd()Set control gains with quantization

✅ Each joint must have an owner process to receive control commands.


IMU Sensor API (RBQ_API::IMU)

Provides access to robot orientation and motion state.

FunctionOutput
getQuaternion()Orientation as Eigen quaternion (w, x, y, z)
getRPY()Roll, Pitch, Yaw (ZYX Euler angles, radians)
getGyro()Angular velocity in rad/s (X, Y, Z)
getAcc()Linear acceleration in m/s² (X, Y, Z)

Gamepad API (RBQ_API::Gamepad)

Supports Logitech F710 (X mode) for teleoperation.

TypeFunctionDescription
JoystickgetLeftJogX/Y(), getRightJogX/Y()Range: [-1.0, 1.0]
TriggergetLeftTrigger(), getRightTrigger()Range: [0.0, 1.0]
ButtongetButtonState(Button::X)Returns true if pressed

Built-in Motion Programs

Easily trigger predefined robot behaviors:

FunctionDescription
motionStaticReady()Move to ready pose
motionStaticGround()Lie down to ground pose
motionDynamicWalk()Start dynamic walking
motionDynamicRun()Start dynamic running
motionDynamicAim()Aim pose for manipulation/vision
motionDynamicStairs()Stair climbing motion
motionDynamicHealthCheck()Diagnostic motion

This user manual is intended for RBQ users.