Skip to main content

Motion-Control Interfaces

B1LocoClient is the main entry point for motion-control RPC interfaces.

Source headers:

  • include/booster/robot/b1/b1_loco_client.hpp
  • include/booster/robot/b1/b1_loco_api.hpp
  • include/booster/robot/b1/b1_api_const.hpp

Initialization​

#include <booster/robot/b1/b1_loco_client.hpp>
#include <booster/robot/channel/channel_factory.hpp>

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

booster::robot::b1::B1LocoClient client;
client.Init();
client.WaitForService(5000);

To address a named robot, call client.Init(robot_name).

Init() uses the default channel rt/LocoApiTopic. Init(robot_name) appends /<robot_name> to that channel; an empty string selects the default robot. Call Init() before any request method. WaitForService(timeout_ms, require_response_path) waits for the synchronous service: true requires both request and response endpoints, while false requires only the request endpoint; it returns false before initialization or after a timeout. WaitForOperationService(timeout_ms, require_event_path) waits for the asynchronous Operation endpoints and optionally requires the event endpoint.

Firmware Compatibility​

The following versions come from the supplied interface specification. MoveHandEndEffectorV2 and MoveHandEndEffector share LocoApiId::kMoveHandEndEffector, so the table records the underlying RPC version.

C++ interface

Minimum firmware

ChangeMode

>= v1.0.0

Move

>= v1.0.0

RotateHead

>= v1.0.0

WaveHand

>= v1.0.2

GetFrameTransform

>= v1.0.5.0

Handshake

>= v1.0.6.0

Dance

>= v1.2.0.2

GetMode

>= v1.2.0.2

MoveHandEndEffector

>= v1.3.1.1

MoveHandEndEffectorV2

>= v1.3.1.1

StopHandEndEffector

>= v1.3.1.1

GetStatus

>= v1.3.1.1

GetRobotInfo

>= v1.3.1.1

WholeBodyDance

>= v1.4.0.7

UpperBodyCustomControl

>= v1.4.0.7

GetUpWithMode

>= v1.4.0.7

ZeroTorqueDrag

>= v1.4.0.7

RecordTrajectory

>= v1.4.0.7

ReplayTrajectory

>= v1.4.0.7

ResetOdometry

>= v1.5.0.9

EnterWBCGait

>= v1.5.0.9

ExitWBCGait

>= v1.5.0.9

LoadCustomTrainedTraj

>= v1.5.0.9

ActivateCustomTrainedTraj

>= v1.5.0.9

UnloadCustomTrainedTraj

>= v1.5.0.9

VisualKick

>= v1.5.2.1

SwitchGait

>= v1.6.0.10

LionDancePrepare

>= v1.6.0.10

LionDanceMove

>= v1.6.0.10

LionDanceStart

>= v1.6.0.10

ResetOdometryTo

>= v1.8.0.9

GetTrainedTrajStatus

>= v1.8.0.9

Robot Modes​

RobotMode is defined in robot_shared.hpp:

Enum

Value

Purpose

kUnknown

-1

Invalid value or error-handling placeholder.

kDamping

0

Damping mode.

kPrepare

1

Prepare mode; the robot remains standing.

kWalking

2

Walking mode for movement, turning, and kicking.

kCustom

3

Custom-action mode. With firmware >= v1.8.0.9, the robot holds a standing pose after entering this mode until it receives a valid rt/joint_ctrl command.

kSoccer

4

Soccer mode.

Typical sequence:

client.ChangeMode(booster::robot::RobotMode::kPrepare);
client.GetUp();
client.ChangeMode(booster::robot::RobotMode::kWalking);

GetUpVersion, used by GetUp and GetUpWithMode:

Enum

Value

Meaning

kV1

0

Initial/base get-up behavior and the default value.

kV2

1

BMM get-up behavior.

Movement and Gait​

Method

Supported models

Description

Move(vx, vy, vyaw)

K1, T1, T2

Send linear X/Y velocity in m/s and yaw velocity in rad/s, then wait for the RPC response.

MoveCommand(vx, vy, vyaw)

K1, T1, T2

Fire-and-forget variant for continuous velocity commands.

SwitchGait(gait_type)

K1, T1, T2

Switch the active gait; each GaitType value must map to an available body control in the firmware state graph.

ResetOdometry()

K1, T1, T2

Reset position and heading together to (x, y, theta) = (0, 0, 0).

ResetOdometryTo(x, y, theta)

K1, T1, T2

While gait control is active, reset odometry to a user-provided position and heading; x and y are in metres, theta is in radians, and all three values must be finite.

EnterWBCGait()

K1

K1 supports entering WBC gait; missing configuration or an unavailable transition fails.

ExitWBCGait()

K1

K1 supports exiting WBC gait to the humanlike gait; a missing target controller or unavailable transition fails.

GaitType values:

Enum

Value

Meaning

kWholeBodyHumanlikeGait

0

Whole-body humanlike gait.

kHalfBodyHumanlikeGait

1

Half-body humanlike gait V1.

kHalfBodyHumanlikeGaitV2

2

Half-body humanlike gait V2.

kWholeBodyHumanlikeGaitV2

3

Whole-body humanlike gait V2.

Head Control​

Method

Supported models

Description

RotateHead(pitch, yaw)

K1, T1, T2

Set head pitch and yaw directly, in radians.

RotateHeadWithTime(pitch, yaw, time_millis)

K1, T1, T2

Reach the target angles within the specified time.

RotateHeadWithDirection(pitch_direction, yaw_direction)

K1, T1, T2

Rotate by direction using -1, 0, or 1.

Arm End Effectors and Grippers​

End-effector poses use Position, Orientation, and Posture. Position is in meters and orientation angles are in radians.

booster::robot::Posture target(
booster::robot::Position(0.25F, -0.15F, 0.10F),
booster::robot::Orientation(0.0F, 0.0F, 0.0F));

client.MoveHandEndEffectorV2(
target,
1000,
booster::robot::b1::HandIndex::kRightHand);

Method

Supported models

Description

MoveHandEndEffectorV2(target, time_ms, hand_index)

K1, T1

Recommended single-hand end-effector pose interface.

MoveHandEndEffector(target, time_ms, hand_index)

K1, T1

Legacy single-hand end-effector method; deprecated, use V2.

MoveHandEndEffectorWithAux(target, aux, time_ms, hand_index)

K1, T1

End-effector trajectory using an auxiliary point.

MoveDualHandEndEffector(left, right, time_ms)

K1, T1

Control both end effectors simultaneously.

StopHandEndEffector()

K1, T1

Stop end-effector control.

SwitchHandEndEffectorControlMode(bool)

Legacy LocoApiService backend (deprecated)

Deprecated; do not use in new code. The robot-state-manager backend does not implement this ID and returns BadRequest.

MoveHandEndEffector is deprecated. New code should use MoveHandEndEffectorV2.

HandIndex values:

Enum

Value

Meaning

kLeftHand

0

Left hand.

kRightHand

1

Right hand.

Gripper control:

booster::robot::b1::GripperMotionParameter motion(500, 300, 300);
client.ControlGripper(
motion,
booster::robot::b1::GripperControlMode::kPosition,
booster::robot::b1::HandIndex::kRightHand);

GripperControlMode values:

Enum

Value

Meaning

kPosition

0

Position mode; stop at the target position or configured reaction force.

kForce

1

Force mode; continue moving with the configured force until the target position.

Dexterous-hand control accepts a list of DexterousFingerParameter(seq, angle, force, speed) values:

std::vector<booster::robot::b1::DexterousFingerParameter> fingers;
for (int32_t i = 0; i < 6; ++i) {
fingers.emplace_back(i, 800, 300, 300);
}

client.ControlDexterousHand(
fingers,
booster::robot::b1::HandIndex::kRightHand,
booster::robot::b1::BoosterHandType::kInspireHand);

BoosterHandType values:

Enum

Value

Meaning

kUnknown

-1

Unknown or invalid hand type.

kInspireHand

0

Inspire dexterous hand.

kInspireTouchHand

2

Inspire dexterous hand with touch sensing.

kRevoHand

3

Revo dexterous hand.

Actions, Sound, and Special Control​

Method

Supported models

Description

WaveHand(action)

K1, T1, T2

Start or stop waving.

Handshake(action)

K1, T1, T2

Start or stop the handshake action.

Dance(dance_id)

K1, T1

Run an upper-body dance or gesture.

WholeBodyDance(dance_id)

K1, T2

Run a full-body dance or action.

Shoot()

K1, T1, T2

Request the firmware-configured powerful kick; current T1 provides the intended motion and unavailable transitions fail.

VisualKick(start, version)

K1, T1, T2

Request the firmware-configured visual kick using V1 or V2; missing motions return a state-transition error.

PlaySound(path)

K1, T1, T2

Play an audio file readable by the robot service; default models are K1, T1, and T2 and require the sound service/output hardware.

StopSound()

K1, T1, T2

Stop the currently playing audio.

ZeroTorqueDrag(active)

K1, T1

Enable or disable zero-torque drag.

UpperBodyCustomControl(start)

K1, T1, T2

Enable or disable upper-body custom control.

WaveHand and Handshake use HandAction:

Enum

Value

Meaning

kHandOpen

0

Start/open the corresponding hand action.

kHandClose

1

Stop/close the corresponding hand action.

DanceId values for upper-body dances and gestures:

Enum

ID

Meaning

kNewYear

0

New Year dance.

kNezha

1

Nezha dance.

kTowardsFuture

2

Towards the Future dance.

kDabbingGesture

3

Dabbing gesture.

kUltramanGesture

4

Ultraman gesture.

kRespectGesture

5

Respect/salute gesture.

kCheeringGesture

6

Cheering gesture.

kLuckyCatGesture

7

Lucky-cat gesture.

kStop

1000

Stop the current upper-body dance or gesture.

WholeBodyDanceId values for full-body dances and actions:

Enum

ID

Meaning

kArbicDance

0

Arabic dance. The enum spelling follows the public SDK header.

kMichaelDance1

1

Michael dance 1.

kMichaelDance2

2

Michael dance 2.

kMichaelDance3

3

Michael dance 3.

kBoxingStyleKick

5

Boxing-style kick.

kRoundhouseKick

6

Roundhouse kick.

kShanHeGuRenDance

7

Shan He Gu Ren dance.

kGaiGeChunFengDance

8

Gai Ge Chun Feng dance.

kMichaelDance1And2

9

Combined Michael dances 1 and 2.

kBowAndArrow

10

T2 bow-and-arrow full-body routine.

kCharlestonDance

11

T2 Charleston full-body dance.

ID 4 is not defined by WholeBodyDanceId; do not pass undefined integer values.

VisualKickVersion values:

Enum

Value

Meaning

kV1

0

Initial/base visual-kick implementation and the default.

kV2

1

Use the WBC path when enabled, otherwise fall back to the configured non-WBC path; no model-name gate is applied.

Lion Dance State Machine​

The public header defines strict transition rules: The current firmware supports LionDancePrepare, LionDanceMove, and LionDanceStart on K1.

  • LionDancePrepare(start) can enter from Walking mode and can transition to LionDanceMove or LionDanceStart.
  • LionDanceMove(start) can enter from LionDancePrepare and Walk Gait.
  • LionDanceStart(dance_id) can enter only from LionDancePrepare or LionDanceMove.

The public header does not define a named enum for LionDanceStart. The bundled SDK example accepts these values:

dance_id

Meaning

1

Firmware-defined lion-dance routine 1.

2

Firmware-defined lion-dance routine 2.

❗

Warning

Do not call LionDanceStart directly from any other state. The header warns that doing so causes abrupt arm-joint discontinuities and creates a hardware safety risk.

Status Queries​

Method

Supported models

C++ output

GetMode(response)

K1, T1, T2

GetModeResponse.

GetStatus(response)

K1, T1, T2

Current mode, body control, and active action list.

GetTrainedTrajStatus(response)

K1, T1, T2

Query trained-trajectory status and ID. Highlight an action only when the status is kRunning and traj_id_ matches its action ID; clear highlighting on kIdle. T1 normally reports only kIdle.

GetRobotInfo(response)

K1, T1, T2

Name, nickname, version, model, serial number, edition, and region.

GetFrameTransform(src, dst, transform)

K1, T1, T2

Transform containing position and quaternion.

GetSensors(info)

K1, T1, T2

Query the static IMU catalog into DeviceInfo; see Device Information Interfaces.

GetHands(info)

K1, T1, T2

Query the hand catalog into DeviceInfo; gripper and dexterous-hand support depends on the reported hardware.

GetRobotModel(info)

K1, T1, T2

Query the static URDF/RBDL robot-model catalog into DeviceInfo.

Frame values used by GetFrameTransform:

Enum

Value

Meaning

kUnknown

-1

Unknown or invalid frame.

kBody

0

Body/torso frame.

kHead

1

Head frame.

kLeftHand

2

Left-hand frame.

kRightHand

3

Right-hand frame.

kLeftFoot

4

Left-foot frame.

kRightFoot

5

Right-foot frame.

current_body_control_ returned by GetStatus uses BodyControl:

Enum

Value

Meaning

kUnknown

0

Unknown control state.

kDamping

1

Damping control.

kPrepare

2

Prepare/standing control.

kHumanlikeGait

3

Humanlike gait control.

kProneBody

4

Prone-body control for lie-down and push-up actions.

kSoccerGait

5

Soccer gait control.

kCustom

6

Custom-mode control.

kGetUp

7

Get-up control.

kWholeBodyDance

8

Whole-body dance control.

kShoot

9

Powerful-shot control.

kInsideFoot

10

Historical name for visual-kick V2 control.

kGoalie

11

Goalie control.

kWBCGait

12

WBC gait control.

kLionDancePreparePose

13

Lion-dance prepare pose.

kVisualKickV1

14

Visual-kick V1 control.

Each value in current_actions_ uses Action:

Enum

Value

Meaning

kUnknown

0

Unknown action.

kHandShake

1

Handshake.

kHandWave

2

Hand wave.

kHandControl

3

Hand control.

kDanceNewYear

4

New Year dance.

kDanceNezha

5

Nezha dance.

kDanceTowardsFuture

6

Towards the Future dance.

kGestureDabbing

7

Dabbing gesture.

kGestureUltraman

8

Ultraman gesture.

kGestureRespect

9

Respect/salute gesture.

kGestureCheer

10

Cheering gesture.

kGestureLuckyCat

11

Lucky-cat gesture.

kGestureBoxing

12

Boxing gesture.

kZeroTorqueDrag

13

Zero-torque drag.

kRecordTraj

14

Trajectory recording is active.

kRunRecordedTraj

15

Recorded-trajectory replay is active.

C++ example:

booster::robot::b1::GetStatusResponse status;
if (client.GetStatus(status) == booster::robot::kRpcStatusCodeSuccess) {
std::cout << static_cast<int>(status.current_mode_) << "\n";
std::cout << static_cast<int>(status.current_body_control_) << "\n";
}

booster::robot::Transform transform;
if (client.GetFrameTransform(
booster::robot::Frame::kBody,
booster::robot::Frame::kLeftHand,
transform) == booster::robot::kRpcStatusCodeSuccess) {
std::cout << transform.position_.x_ << " "
<< transform.orientation_.w_ << "\n";
}

Custom Trained Trajectories​

Use the following interfaces to manage custom trained trajectories:

Method

Supported models

Purpose

Minimum firmware

LoadCustomTrainedTraj(trajectory, trajectory_id)

K1, T2

Load trajectory/model configuration and return the robot-generated trajectory_id through an output parameter.

>= v1.5.0.9

ActivateCustomTrainedTraj(trajectory_id)

K1, T2

Activate a loaded trajectory using the exact ID returned by the load call.

>= v1.5.0.9

GetTrainedTrajStatus(response)

K1, T1, T2

Query the current trained-trajectory status and ID; a custom trajectory uses the ID returned by the load call.

>= v1.8.0.9

UnloadCustomTrainedTraj(trajectory_id)

K1, T2

Unload an unused trajectory and release robot-side resources.

>= v1.5.0.9

File Recommendations​

Use ONNX for both files:

  • CustomTrainedTraj::traj_file_path_: trajectory ONNX path, such as <trajectory.onnx>.
  • CustomModel::file_path_: control-model ONNX path, such as <model.onnx>.
❗

Important

LoadCustomTrainedTraj serializes and sends file paths and model parameters; it does not upload file contents. Place both ONNX files where the robot service can access them. Paths must be valid in the robot service environment, not only on the development computer.

Parameter Reference​

Field

Purpose

Requirement

CustomModelParams::action_scale_

Scale model action outputs.

The length must match the controlled-joint dimension; use values from the training/export configuration.

CustomModelParams::kp_

Position gain for each controlled joint.

Length and order must match model outputs.

CustomModelParams::kd_

Velocity gain for each controlled joint.

Length and order must match model outputs.

CustomModel::params_

List of model parameter groups.

A common configuration passes one group, {model_params}. Multiple groups must follow the deployment configuration.

CustomModel::joint_order_

Joint ordering used by the model.

Use kMuJoCo for a MuJoCo-exported model and kIsaacLab for an Isaac Lab model.

JointOrder values:

Enum

Value

Meaning

kMuJoCo

0

Use the MuJoCo export joint order.

kIsaacLab

1

Use the Isaac Lab export joint order.

Choose joint_order_ from the model’s training/export order, not from the simulator running the application. action_scale_, kp_, and kd_ must have equal lengths.

Complete C++ Example​

The following program reads the communication IP address, trajectory ONNX, and model ONNX from the command line, then loads, activates, and unloads the trajectory. The joint count and gains are placeholders; replace them with the model’s training values.

#include <cstddef>
#include <cstdint>
#include <iostream>
#include <string>
#include <vector>

#include <booster/robot/b1/b1_loco_client.hpp>
#include <booster/robot/channel/channel_factory.hpp>
#include <booster/robot/rpc/error.hpp>

int main(int argc, char *argv[]) {
if (argc != 4) {
std::cerr << "Usage: " << argv[0]
<< " <network_ip> <trajectory.onnx> <model.onnx>\n";
return 1;
}

const std::string trajectory_onnx = argv[2];
const std::string model_onnx = argv[3];

booster::robot::ChannelFactory::Instance()->Init(0, argv[1]);

booster::robot::b1::B1LocoClient client;
client.Init();
if (!client.WaitForService(5000)) {
std::cerr << "Loco service is unavailable\n";
return 1;
}

// Replace these dimensions and values with the training configuration.
constexpr std::size_t kModelJointCount = 12;
std::vector<double> action_scale(kModelJointCount, 1.0);
std::vector<double> kp(kModelJointCount, 40.0);
std::vector<double> kd(kModelJointCount, 1.0);

booster::robot::b1::CustomModelParams model_params(
action_scale,
kp,
kd);
booster::robot::b1::CustomModel model(
model_onnx,
{model_params},
booster::robot::b1::JointOrder::kMuJoCo);
booster::robot::b1::CustomTrainedTraj trajectory(
trajectory_onnx,
model);

std::string trajectory_id;
int32_t ret = client.LoadCustomTrainedTraj(
trajectory,
trajectory_id);
if (ret != booster::robot::kRpcStatusCodeSuccess) {
std::cerr << "LoadCustomTrainedTraj failed: " << ret << "\n";
return 1;
}

std::cout << "Loaded trajectory ID: " << trajectory_id << "\n";

ret = client.ActivateCustomTrainedTraj(trajectory_id);
if (ret != booster::robot::kRpcStatusCodeSuccess) {
std::cerr << "ActivateCustomTrainedTraj failed: " << ret << "\n";
const int32_t cleanup_ret =
client.UnloadCustomTrainedTraj(trajectory_id);
if (cleanup_ret != booster::robot::kRpcStatusCodeSuccess) {
std::cerr << "Cleanup unload failed: " << cleanup_ret << "\n";
}
return 1;
}

std::cout << "Trajectory activated. Press Enter to unload.\n";
std::cin.get();

ret = client.UnloadCustomTrainedTraj(trajectory_id);
if (ret != booster::robot::kRpcStatusCodeSuccess) {
std::cerr << "UnloadCustomTrainedTraj failed: " << ret << "\n";
return 1;
}

return 0;
}

Run it as follows:

./my_custom_trajectory <network_ip> <trajectory.onnx> <model.onnx>

If loading fails, first confirm that both paths are readable by the robot service. Then check the three parameter-array lengths, joint_order_, and the model export configuration. See RPC Error Codes for RPC status codes.

Complete LocoApiId Values​

LocoApiId values are business operation identifiers in the locomotion service protocol. Typed client methods map to these IDs; the values must remain synchronized with the service. kPushUp is a protocol enum without a high-level convenience wrapper.

Enumerator

Value

Business meaning

kChangeMode

2000

Change robot mode.

kMove

2001

Planar linear and angular velocity control.

kRotateHead

2004

Head target orientation.

kWaveHand

2005

Hand-wave action.

kRotateHeadWithDirection

2006

Continuous directional head rotation.

kLieDown

2007

Model-configured lie-down trajectory.

kGetUp

2008

Get-up action.

kMoveHandEndEffector

2009

Single-hand end-effector control (V1/V2 share this ID).

kControlGripper

2010

Gripper control.

kGetFrameTransform

2011

Frame-transform query.

kSwitchHandEndEffectorControlMode

2012

Legacy end-effector mode switch (deprecated).

kControlDexterousHand

2013

Per-finger dexterous-hand control.

kHandshake

2015

Handshake action.

kDance

2016

Upper-body dance or gesture.

kGetMode

2017

Query the current robot mode.

kGetStatus

2018

Query mode, body control, and action status.

kPushUp

2019

Generic-RPC nested push-up trajectory; no high-level PushUp wrapper exists.

kPlaySound

2020

Play an audio file on the robot.

kStopSound

2021

Stop the current audio.

kGetRobotInfo

2022

Query robot identity.

kStopHandEndEffector

2023

Stop end-effector motion.

kShoot

2024

Powerful kick.

kGetUpWithMode

2025

Get up into a selected mode.

kZeroTorqueDrag

2026

Zero-torque drag.

kRecordTrajectory

2027

Start or stop trajectory recording.

kReplayTrajectory

2028

Replay a robot-side trajectory file.

kWholeBodyDance

2029

Execute a whole-body dance or action.

kUpperBodyCustomControl

2030

Start or stop upper-body custom control.

kResetOdometry

2031

Reset odometry.

kLoadCustomTrainedTraj

2032

Load a custom trained trajectory.

kActivateCustomTrainedTraj

2033

Activate a loaded trained trajectory.

kUnloadCustomTrainedTraj

2034

Unload a loaded trained trajectory.

kEnterWBCGait

2035

Enter WBC gait.

kExitWBCGait

2036

Exit WBC gait.

kMoveDualHandEndEffector

2037

Synchronized dual-hand end-effector control.

kVisualKick

2038

Visual kick.

kLionDancePrepare

2039

Enter or leave lion-dance preparation.

kLionDanceStart

2040

Start a specified lion-dance routine.

kLionDanceMove

2041

Start or stop lion-dance locomotion.

kSwitchGait

2042

Switch gait implementation.

kRotateHeadWithTime

2043

Timed head rotation.

kGetSensors

2044

Query the configured IMU catalog.

kGetHands

2045

Query the configured hand catalog.

kGetRobotModel

2046

Query the static robot model.

kGetTrainedTrajStatus

2047

Query trained-trajectory status.

kHandOnChestGreeting

2050

T2 chest-greeting action.

Additional State and Hardware Enums​

Enum

Member (value)

Meaning

ProneBodyControlPosture

kUnknown (0)

Unknown or unavailable prone-controller state.

ProneBodyControlPosture

kInactive (1)

Prone-body controller is inactive.

ProneBodyControlPosture

kPushUp (2)

Push-up posture or activity.

ProneBodyControlPosture

kLieDown (3)

Lying-down posture.

ProneBodyControlPosture

kSoccerLocomotion (4)

Soccer locomotion posture.

ProneBodyControlPosture

kSoccerKicking (5)

Soccer kicking posture.

RobocupBehaviorStatus

RUNNING (0)

RoboCup behavior execution is in progress.

RobocupBehaviorStatus

SHOOTING (1)

RoboCup shot execution is in progress.

RobocupBehaviorStatus

PASSING (2)

RoboCup pass execution is in progress.

TrainedTrajStatus

kIdle (0)

No trained trajectory is executing.

TrainedTrajStatus

kRunning (1)

A trained trajectory is executing.

RemoteControllerEvent

NONE (0)

Linux remote controller has no event.

RemoteControllerEvent

AXIS (0x600)

Linux remote-controller analog-axis event.

RemoteControllerEvent

HAT (0x602)

Linux remote-controller directional-hat event.

RemoteControllerEvent

BUTTON_DOWN (0x603)

Linux remote-controller button-press event.

RemoteControllerEvent

BUTTON_UP (0x604)

Linux remote-controller button-release event.

RemoteControllerEvent

REMOVE (0x606)

Linux remote-controller device-removal event.

WholeBodyDanceId

kBowAndArrow (10)

T2 bow-and-arrow full-body routine.

WholeBodyDanceId

kCharlestonDance (11)

T2 Charleston full-body dance.

JointIndex, JointIndexK1, and JointIndexWith7DofArm are complete low-level array layouts. Pair each layout with its robot model and matching kJointCnt constant:

Layout

Members and indices

Count

JointIndex (T1)

kHeadYaw=0, kHeadPitch=1, kLeftShoulderPitch=2, kLeftShoulderRoll=3, kLeftElbowPitch=4, kLeftElbowYaw=5, kRightShoulderPitch=6, kRightShoulderRoll=7, kRightElbowPitch=8, kRightElbowYaw=9, kWaist=10, kLeftHipPitch=11, kLeftHipRoll=12, kLeftHipYaw=13, kLeftKneePitch=14, kCrankUpLeft=15, kCrankDownLeft=16, kRightHipPitch=17, kRightHipRoll=18, kRightHipYaw=19, kRightKneePitch=20, kCrankUpRight=21, kCrankDownRight=22.

23

JointIndexK1 (K1)

kHeadYaw=0, kHeadPitch=1, kLeftShoulderPitch=2, kLeftShoulderRoll=3, kLeftElbowPitch=4, kLeftElbowYaw=5, kRightShoulderPitch=6, kRightShoulderRoll=7, kRightElbowPitch=8, kRightElbowYaw=9, kLeftHipPitch=10, kLeftHipRoll=11, kLeftHipYaw=12, kLeftKneePitch=13, kCrankUpLeft=14, kCrankDownLeft=15, kRightHipPitch=16, kRightHipRoll=17, kRightHipYaw=18, kRightKneePitch=19, kCrankUpRight=20, kCrankDownRight=21.

22

JointIndexWith7DofArm (T1_7DofArm)

kHeadYaw=0, kHeadPitch=1, kLeftShoulderPitch=2, kLeftShoulderRoll=3, kLeftElbowPitch=4, kLeftElbowYaw=5, kLeftWristPitch=6, kLeftWristYaw=7, kLeftHandRoll=8, kRightShoulderPitch=9, kRightShoulderRoll=10, kRightElbowPitch=11, kRightElbowYaw=12, kRightWristPitch=13, kRightWristYaw=14, kRightHandRoll=15, kWaist=16, kLeftHipPitch=17, kLeftHipRoll=18, kLeftHipYaw=19, kLeftKneePitch=20, kCrankUpLeft=21, kCrankDownLeft=22, kRightHipPitch=23, kRightHipRoll=24, kRightHipYaw=25, kRightKneePitch=26, kCrankUpRight=27, kCrankDownRight=28.

29

Payload and response field index​

The public payload fields in b1_loco_api.hpp are summarized below. Pose fields use the robot base/torso frame, angles are in radians, positions in metres, and JSON field names omit the trailing member underscore.

Type

Fields

Business meaning

RotateHeadParameter

pitch_, yaw_

Target head pitch/yaw angles in radians.

RotateHeadWithTimeParameter

pitch_, yaw_, time_millis_

Target head angles and requested duration in milliseconds.

ChangeModeParameter

mode_

Target robot mode; kSoccer is supported on K1 and T1.

SwitchGaitParameter

gait_type_

Target gait implementation; availability follows the active state graph.

GetModeResponse

mode_

Current mode.

GetStatusResponse

current_mode_, current_body_control_, current_actions_

Current mode, body control, and active action list.

GetRobotInfoResponse

name_, nickname_, version_, model_, serial_number_, edition_, region_

Robot identity and firmware metadata.

MoveParameter

vx_, vy_, vyaw_

Planar X/Y linear velocities (m/s) and yaw velocity (rad/s).

RotateHeadWithDirectionParameter

pitch_direction_, yaw_direction_

Head-joint directions; only -1, 0, and 1 are valid.

GetUpParameter

version_

Get-up implementation; kV1 supports K1, T1, T2 and kV2 supports K1 only.

GetUpWithModeParameter

mode_, version_

Get-up implementation and resulting mode; T2 kV1 cannot enter soccer mode.

WaveHandParameter

hand_index_, hand_action_

Target hand and start/stop action; start is supported on K1, T1, T2 and stop on K1, T1.

HandshakeParameter

hand_action_

Handshake start/stop action; the current T1_7DofArm configuration may refuse it.

HandOnChestGreetingParameter

up_

T2 chest-greeting arm switch; lowering requires the raised pose to be active.

MoveHandEndEffectorParameter

target_posture_, aux_posture_, time_millis_, hand_index_, has_aux_, new_version_

Single-hand target, optional auxiliary posture, duration, side, and orientation semantics.

GripperMotionParameter

position_, force_, speed_

Gripper target position, reaction force, and motion-speed scales.

ControlGripperParameter

motion_param_, mode_, hand_index_

Gripper motion parameters, position/force mode, and target hand.

MoveDualHandEndEffectorParameter

left_target_posture_, right_target_posture_, time_millis_

Synchronized dual-hand targets and duration.

GetFrameTransformParameter

src_, dst_

Source and destination frames.

SwitchHandEndEffectorControlModeParameter

switch_on_

Deprecated legacy hand end-effector mode switch; the state-manager backend may return BadRequest.

DexterousFingerParameter

seq_, angle_, force_, speed_

Finger/axis index and target angle, force, and speed scales.

ControlDexterousHandParameter

finger_params_, hand_index_, hand_type_

Finger command list, target hand, and installed hand type; requires compatible hardware from GetHands().

DanceParameter

dance_id_

Upper-body dance or gesture ID; supported on K1 and T1.

WholeBodyDanceParameter

dance_id_

Whole-body dance ID; K1 uses 0–9 and T2 uses bow-and-arrow/Charleston.

PlaySoundParameter

sound_file_path_

Audio path resolved by the robot service.

ReplayTrajectoryParameter

traj_file_path_

Trajectory path resolved by the robot service.

ZeroTorqueDragParameter

enable_

K1/T1 zero-torque drag switch.

RecordTrajectoryParameter

enable_

K1/T1 trajectory-recording switch.

UpperBodyCustomControlParameter

start_

Upper-body custom-control switch; low-level commands must use the matching model layout.

CustomModelParams

action_scale_, kp_, kd_

Per-joint action scale, position gain, and velocity gain; lengths must match.

CustomModel

file_path_, params_, joint_order_

Control-model file, parameter sets, and joint ordering.

CustomTrainedTraj

traj_file_path_, model_

Complete trained-trajectory load request; supported on K1 and T2.

LoadCustomTrainedTrajResponse

tid_

Service-assigned trajectory identifier; supported on K1 and T2.

CustomTrainedTrajParameter

tid_

Trajectory ID used by activate/unload operations; supported on K1 and T2.

GetTrainedTrajStatusResponse

status_, traj_id_

TrainedTrajStatus and current trajectory ID (empty when no ID is known).

VisualKickParameter

start_, version_

Visual-kick switch and implementation version.

LionDancePrepareParameter

start_

K1 lion-dance preparation-pose switch.

LionDanceMoveParameter

start_

K1 lion-dance locomotion switch; enter from preparation or Walk Gait.

LionDanceStartParameter

dance_idx_

K1 service-defined lion-dance routine index; enter only from preparation or locomotion.

Additional state enums​

  • ProneBodyControlPosture: kUnknown=0 unknown, kInactive=1 inactive, kPushUp=2 push-up, kLieDown=3 lying down, kSoccerLocomotion=4 soccer locomotion, and kSoccerKicking=5 soccer kicking.
  • RobocupBehaviorStatus: RUNNING=0 running, SHOOTING=1 shooting, and PASSING=2 passing.
  • TrainedTrajStatus: kIdle=0 no trajectory running and kRunning=1 executing.
  • WholeBodyDanceId also includes T2 kBowAndArrow=10 and kCharlestonDance=11; ID 4 is undefined and must not be sent.

The per-member descriptions for JointIndex, JointIndexK1, JointIndexWith7DofArm, HandIndex, BoosterHandType, HandAction, and RemoteControllerEvent are in Low-Level Topics.