Skip to content

Data Structures

using AbcType = double;
EnumerationValueDescription

SUCCESS

0

Success

UNKNOWN_ERROR

-1

Unknown error

General Errors (-1 ~ -49)

TIMEOUT

-2

Timeout

INVALID_HANDLE

-3

Invalid handle

INVALID_STATE

-4

Invalid state

NOT_INITIALIZED

-5

Not initialized

NOT_IMPLEMENTED

-6

Not implemented

INVALID_ARGUMENT

-7

Invalid argument

PARAM_ERROR

-50

Parameter error

Parameter Errors (-50 ~ -99)

PARAM_OUT_OF_RANGE

-51

Parameter value out of range

ARM_ERROR

-100

Robotic arm general error

Robotic Arm Errors (-100 ~ -199)

ARM_CTRL_FALSE

-101

Controller returned false; likely incorrect parameters or arm state error.

ARM_DATA_SEND_FAILED

-102

Failed to send data (communication error)

ARM_DATA_RECEIVE_FAILED

-103

Failed to receive data or controller timeout

ARM_RETURN_DATA_ERR

-104

Failed to parse returned data (invalid or incomplete format)

ARM_CHECK_FAILED

-105

Current position device check failed (e.g., not a joint)

ARM_TIMEOUT

-106

Timeout waiting for response

ARM_OUT_OF_RANGE

-107

Robotic arm motion out of range

TORSO_ERROR

-200

Torso general error

Torso Errors (-200 ~-219)

TORSO_CANBUS_ERROR

-201

Torso CAN bus error

TORSO_ACTUATOR_ERROR

-202

Torso actuator error

TORSO_TIMEOUT

-206

Timeout waiting for response

TORSO_OUT_OF_RANGE

-207

Torso motion out of range

HEAD_ERROR

-220

Head general error

Head Errors (-220 ~ -229)

HEAD_CANBUS_ERROR

-221

Head CAN bus error

HEAD_ACTUATOR_ERROR

-222

Head actuator error

HEAD_TIMEOUT

-226

Timeout waiting for response

HEAD_OUT_OF_RANGE

-227

Head motion out of range

SENSOR_ERROR

-300

Sensor general error

Sensor Errors (-300 ~ -399)

SENSOR_NOT_CONNECTED

-301

Sensor not connected

SENSOR_DATA_ERROR

-302

Sensor data error

CHASSIS_ERROR

-400

Chassis general error

Chassis Errors (-400 ~ -499)

CHASSIS_INIT_ERROR

-401

Chassis initialization error

CHASSIS_TIMEOUT

-402

Timeout waiting for response

ALGO_ERROR

-900

Algorithm general error

Algorithm Errors (-900 ~ -999)

ALGO_NOT_CONVERGED

-901

Algorithm did not converge

ALGO_APPROXIMATE_SOLUTION

-902

Algorithm approximate solution

Structure Member
Data Type
Description
positionAbcPositionXYZ-axis coordinate values
quaternionAbcQuatQuaternion
Structure MemberData TypeDescription
xAbcTypeXYZ-axis coordinate values, in meters.
y
z
Structure MemberData TypeDescription
wAbcTypeQuaternion
x
y
z
Structure MemberData TypeDescription
xAbcTypeVelocity (Cartesian space)
y
z
wx
wy
wz
EnumerationValueDescription
RM65_B0Robotic arm type
RM65_6FB1
RM65_6F2
RM75_B3
RM75_6FB4
RM75_6F5
ZM73L_6F6
ZM73R_6F7
EnumerationValueDescription
AlphaBot1s1Robot Type
AlphaBot22
AlphaBot1s_HuiKe3
Structure Member
Data Type
Description
heightAbcTypeVertical height, in meters (m).
forwardAbcTypeFront-back displacement, in meters (m).
pitchAbcTypePitch angle, in radians (rad).
yawAbcTypeWaist rotation angle, in radians (rad).
Structure Member
Data Type
Description
arm_typestringRobotic arm vendor
arm_namestringRobotic arm name (e.g., "left_arm")
ipstringTCP IP address
udp_ipstringUDP IP address
portintTCP port number
udp_portintUDP port number
udp_cycleintUDP cycle (period = udp_cycle * 5 ms)
enable_gripperboolGripper status (enable/disable)
EnumerationDescription
ARM_IDLEEnabled but idle state
ARM_MOVEMoving state
ARM_MOVE_THROUGH_JOINTAngle pass-through state
ARM_MOVE_THROUGH_POSEPose pass-through state
ARM_MOVE_THROUGH_FORCE_POSEForce-Controlled pass-through state
ARM_MOVE_THROUGH_CURRENTCurrent-loop pass-through state
ARM_STOPEmergency stop state
ARM_SLOW_STOPSlow stop state
ARM_PAUSEPause state
ARM_CURRENT_DRAGCurrent-loop drag state
ARM_SENSOR_DRAG6-DoF force drag state
ARM_TECH_DEMONSTRATIONTeaching state

If the number of joints is less than MAX_ARM_DOF, the extra data fields will be zero.

Structure MemberData TypeDescription
jointsarray<AbcType, MAX_ARM_DOF>Current joint angles, in radians (rad).
joint_positionCurrent joint angles, in degrees (°).
joint_speedCurrent joint speeds, in RPM (revolutions per minute).
joint_currentCurrent joint current, in milliamperes (mA).
joint_temperatureCurrent joint temperature, in degrees Celsius (°C).
joint_voltageCurrent joint voltage, in volts (V).
joint_err_codearray<uint16_t, MAX_ARM_DOF>Current joint error codes.
joint_en_flagarray<bool, MAX_ARM_DOF>Current joint enable flags.
- true: Enabled.
- false: Disabled.
Structure Member
Data Type
Description
forceAbcType[6]Current raw force sensor data, in units of 0.001 N or 0.001 N·m.
zero_forceAbcType[6]Current external force data measured by the force sensor system, in units of 0.001 N or 0.001 N·m.
coordinateintCoordinate frame of the external force data.
- 0: Sensor coordinate frame.
- 1: Current working coordinate frame.
- 2: Current tool coordinate frame.
Structure Member
Data Type
Description
namechar[64]Robotic arm name
timestampstd::chrono::system_clock::time_pointTimestamp
joint_statusAbcJointStateJoint states
poseAbcPoseCurrent pose of the robotic arm
force_sensorAbcArmForceSensorForce sensor status
arm_current_statusAbcArmCurrentStatusRobotic arm status
gripper_stateAbcGripperStateGripper status
ee_poseAbcPoseEnd-effector pose
Structure Member
Data Type
Description
portintCommunication port.
- 0: Controller RS485 port.
- 1: End-effector interface board RS485 port.
- 3: Controller Modbus TCP device.
addressintStarting data address
deviceintPeripheral device address
numintNumber of data items
Structure Member
Data Type
Description
joint_speedintJoint speed.
lift_stateintLift joint information.
- 1: Enable reporting.
- 0: Disable reporting.
- -1: Do not set, keep previous state.
expand_stateintExtended joint information (either lift joint or extended joint, lift joint has priority).
- 1: Enable reporting.
- 0: Disable reporting.
- -1: Do not set, keep previous state.
hand_stateintDexterous hand status.
- 1: Enable reporting.
- 0: Disable reporting.
- -1: Do not set, keep previous state.
arm_current_statusintCurrent status of the robotic arm.
- 1: Enable reporting.
- 0: Disable reporting.
- -1: Do not set, keep previous state.
aloha_stateintStatus of the AlphaBot main arm.
- 1: Enable reporting.
- 0: Disable reporting.
- -1: Do not set, keep previous state.
Structure Member
Data Type
Description
cycleintBroadcasting cycle, a multiple of 5ms.
enableboolEnable flag. Whether to enable active reporting.
portintBroadcast port number.
force_coordinateintCoordinate frame for external force data.
- -1: Force sensor not supported.
- 0: Sensor frame.
- 1: Current work frame.
- 2: Current tool frame.
ipchar[28]Custom reporting target IP address.
custom_configUdpCustomConfigCustom configuration settings.
const size_t MAX_ARM_DOF = 7;
using AbcArmRealtimeStateCallback =
std::function<void(std::shared_ptr<const AbcArmRealtimeState>)>;
Structure Member
Data Type
Description
chassis_typestringChassis vendor
chassis_namestringChassis name (e.g., "chassis")
ipstringIP address (e.g., "127.0.0.1")
portintPort number (e.g., 54051)
Structure Member
Data Type
Description
thetafloatOrientation
xfloatX-axis coordinate value
yfloatY-axis coordinate value
Structure Member
Data Type
Description
map_iduint32_tMap ID
mileageuint32_tAccumulated mileage
robot_iduint32_tChassis ID
poseChassisPose2D2D pose
twistChassisTwistTwist (linear + angular velocity)
Structure Member
Data Type
Description
xfloatX-axis coordinate value
yfloatY-axis coordinate value
zfloatZ-axis coordinate value
Structure Member
Data Type
Description
angularfloatAngular velocity
linearfloatLinear velocity
Structure MemberData TypeDescription
frame_idstringFrame ID
secsint32_tSeconds
nsecsuint32_tNanoseconds
child_frame_idstringChild frame ID
t_xdoubleXYZ-axis coordinate values
t_ydouble
t_zdouble
r_xdoubleQuaternion
r_ydouble
r_zdouble
r_wdouble
Structure Member
Data Type
Description
charge_stateChargeStateCharging State
robot_iduint32_tChassis ID
poweruint32_tBattery percentage (0–100).
- 100: Fully charged.
- 0: No charge.
healthuint32_tBattery Health (full charge capacity / design capacity)
charge_cycleuint32_tCharge Cycle Count
battery_cycleuint32_tBattery cycle
temp_maxuint32_tBattery temperature (maximum temperature)
successboolRequest success flag.
- true: Request succeeded.
- false: Request failed to process.
msgstringResponse message description, typically used to explain why a request could not be processed.
EnumerationValueDescription
kChargeStateUndefined0Undefined
kNot1Not charging
kManual2Manual charging in progress
kAuto3Auto charging in progress
Structure Member
Data Type
Description
robot_iduint32_tChassis ID
navNavStateChassis navigation information
robotRobotBitChassis bit information
successboolRequest success flag.
- true: Request succeeded.
- false: Request failed to process.
msgstringResponse message description, typically used to explain why a request could not be processed.
EnumerationValueDescription
kNavBitUndefined0Undefined
kNarrow1Narrow passage
kGuide2Guide to destination
kInaLift3In elevator
kImpede4Obstruct
kQRCode5QR code
kStage6Segment arrival
EnumerationValueDescription
kRobotBitUndefined0Undefined
kTaskable1Taskable
Structure Member
Data Type
Description
robot_iduint32_tChassis ID
stateStateChassis auto mode status
successboolRequest success flag.
- true: Request succeeded.
- false: Request failed to process.
msgstringResponse message description, typically used to explain why a request could not be processed.
EnumerationValueDescription
kStateUndefined0Undefined
kUninit1Uninitialized
kIdle2Idle
kParking3Parking
kTask4In Task
kWarning5Warning
kFault6Fault
kFollowing7Following
kCharging8Charging
kMapping9Mapping
Structure Member
Data Type
Description
robot_iduint32_tChassis ID
codeuint64_tStatus code
timeuint64_tTime
status_msgstringMessage
robot_task_idint64_tTask ID
stateRobotStateChassis auto mode status
typeActionTypeAction type
levelLevelLevel
successboolRequest success flag.
- true: Request succeeded.
- false: Request failed to process.
msgstringResponse message description, typically used to explain why a request could not be processed.
EnumerationValueDescription
rs_kStateUndefined0Undefined
rs_kUninit1Uninitialized
rs_kIdle2Idle
rs_kParking3Parking
rs_kTask4In Task
rs_kWarning5Warning
rs_kFault6Fault
rs_kFollowing7Following
rs_kCharging8Charging
rs_kMapping9Mapping
EnumerationValueDescription
at_kTypeUndefined0Undefined
at_kNav1Navigation
at_kStepCtrl2Step Control
at_kSecondposEnter3Second Position Enter
at_kSecondposQuit4Second Position Quit
at_kCarry5Carrying Action
at_kWait6Wait
at_kCharge7Charge
EnumerationValueDescription
l_kNormal0Normal
l_kTips1Tips
l_kWarn2Warning
l_kFault3Fault
Structure Member
Data Type
Description
robot_iduint32_tChassis ID
lidarsvector<HardwareState_State>Repeated Lidar 2
camerasvector<HardwareState_State>Repeated Camera 2
successboolRequest success flag.
- true: Request succeeded.
- false: Request failed to process.
msgstringResponse message description, typically used to explain why a request could not be processed.
EnumerationValueDescription
kNormal0Normal
kInfo1Tips
kWarn16Warning
kFatal17Fault
Structure Member
Data Type
Description
task_stateTaskStateTask state
current_poseChassisPose2DCurrent 2D pose
msg_typeMassageTypeMessage type
msgstringResponse message description, typically used to explain why a request could not be processed.
EnumerationValueDescription
kSuccess0Success
kRunning1Running
kFailed2Failed
EnumerationValueDescription
kNormal0Normal
kWarn1Warning
kFault2Fault
#define ABC_TORSO_DOF 4
#define ABC_HEAD_DOF 2
Structure Member
Data Type
Description
head_typestringHead vendor
head_namestringHead name
head_joint_numuint8_tNumber of head joints
comm_paramsCommParamsUnionCommunication parameters
motor_paramsvector<MotorParam>Motor parameters
Union MemberData TypeDescription
canCommParamsCANCAN parameters
ethCommParamsETHETH parameters (reserved)
Structure Member
Data Type
Description
devicestringDevice name (e.g., "can0")
baud_rateintBaud rate (e.g., 500000)
can_iduint8_tCAN node ID (0x00 - 0xFF)
Structure Member
Data Type
Description
ipstringIP address (e.g., "192.168.1.10")
portuint16_tPort number (e.g., 8080)
Structure Member
Data Type
Description
motor_iduint16_tMotor ID
reduction_ratiouint16_tReduction ratio
position_maxAbcTypeMaximum rotation angle
position_minAbcTypeMinimum rotation angle
speed_maxAbcTypeMaximum rotation speed
speed_minAbcTypeMinimum rotation speed
acc_maxAbcTypeMaximum rotation acceleration
acc_minAbcTypeMinimum rotation acceleration
Structure Member
Data Type
Description
torso_typestringTorso vendor (e.g., "ti5")
torso_namestringTorso name
torso_joint_numuint8_tNumber of torso joints
comm_paramsCommParamsUnionCommunication parameters
motor_paramsvector<MotorParam>Motor parameters
using AbcTorsoStateCallback = std::function<
void(std::shared_ptr<const AbcTorsoState>)>;
Structure Member
Data Type
Description
timestampstd::chrono::system_clock::time_pointTimestamp
err_codestd::array<uint32_t, ABC_TORSO_DOF>Error codes for each joint
joints_positionsstd::array<AbcType, ABC_TORSO_DOF>Angle for each joint
joints_speedstd::array<AbcType, ABC_TORSO_DOFSpeed for each joint
joints_currentstd::array<AbcType, ABC_TORSO_DOF>Current for each joint
Structure Member
Data Type
Description
sensor_typestringSensor vendor (e.g., "realsense")
sensor_namestringSensor name (e.g., "head_camera")
serial_numberstringSerial number
color_widthintColor image width
color_heightintColor image height
depth_widthintDepth image width
depth_heightintDepth image height
frame_rateintFrame rate
align_to_colorboolWhether to align the depth image to the color image
enable_depthboolWhether to enable the depth stream. Default is true. When set to false, the depth stream and all related logic that depends on depth data will be disabled.
active_pullboolWhether to use active frame pulling mode. Defaults to false (automatic background frame pulling). When set to true, only one frame is fetched when get_data() is called, and the callback mechanism is not supported.
using SensorCallback = std::function<
void(std::shared_ptr<const SensorData>)>;
EnumerationDescription
CAMERACamera sensor
DEPTH_CAMERADepth camera
LIDARLiDAR
IMUInertial Measurement Unit
FORCE_TORQUEForce sensor
PROXIMITYProximity sensor
OTHEROther types of sensors
EnumerationDescription
DISCONNECTEDDisconnected
CONNECTEDConnected
STREAMINGData streaming in progress
SENSOR_ERRORError state
Structure Member
Data Type
Description
widthintImage width, in pixels.
heightintImage height, in pixels.
ppxfloatHorizontal coordinate of the principal point, expressed as pixel offset from the left edge.
ppyfloatVertical coordinate of the principal point, expressed as pixel offset from the top edge.
fxfloatHorizontal focal length, expressed as a multiple of pixel width.
fyfloatVertical focal length, expressed as a multiple of pixel height.
coeffsfloat[5]Distortion coefficients. The parameter order for each model is as follows:
- Brown-Conrady model: [k1, k2, p1, p2, k3].
- F-Theta fisheye lens model: [k1, k2, k3, k4, 0].
- Other models: Refer to their specific interpretation rules.
Structure Member
Data Type
Description
positionsvector<AbcType>Positions
velocitiesvector<AbcType>Velocities
accelerationsvector<AbcType>Accelerations
timestampAbcTypeTimestamp
Structure Member
Data Type
Description
is_validboolWhether the trajectory is valid
issuesvector<string>Issues
scoredoubleTrajectory score (higher is better)
has_collisionboolWhether any collision exists
collision_indicesvector<size_t>Indices of trajectory points
using TrajectoryStatusCallback = std::function<
void(bool finished, AbcErrorCode error_code)>;
using SyncDataCallback = std::function<
void(std::shared_ptr<SyncDataPackage>)>;
EnumerationDescription
NEARESTNearest timestamp matching
INTERPOLATEInterpolation matching
EXTRAPOLATEExtrapolation matching
EnumerationDescription
LATEST_TIMESTAMPSynchronize based on the latest timestamp (default mode)
REFERENCE_SENSORSynchronize based on a reference sensor

Emergency Stop Button Monitoring Data Structures

Section titled “Emergency Stop Button Monitoring Data Structures”
Structure Member
Data Type
Description
pressed_level_intGPIO level polarity when the emergency stop button is pressed.
- 0: Active-Low. The pin level is low when the button is pressed.
- 1: Active-High. The pin level is high when the button is pressed.
allow_multicb_boolWhether multiple callback functions are allowed.
- true: Multiple callbacks are allowed.
- false: Only one callback is allowed.
name_stringName
EStopMConfigConstructorInitializes all data members using a member initializer list.
ApacheOrinStatic functionReturns a configured EStopMConfig instance (gpiochip0 + pin 2 + Active-Low). Configuration is identical to EStopMConfig(), suitable for robots equipped with the ApacheOrin chip.
NvidiaOrinStatic functionReturns a configured EStopMConfig instance (gpiochip1 + pin 9 + Active-High), suitable for robots equipped with the NvidiaOrin chip.
EnumerationValueDescription
None-1Unable to get status
Pressed1Emergency stop button is pressed
Released0Emergency stop button is released
Structure Member
Data Type
Description
statusintGripper status.
- 0: Offline.
- 1: Online.
- -1: Online but disabled.
errorintGripper error information.
- Lower 8 bits: Internal gripper error codes.
- Bits 5–7: Reserved.
- Bit 4: Internal communication error.
- Bit 3: Driver error.
- Bit 2: Overcurrent.
- Bit 1: Overtemperature.
- Bit 0: Locked-rotor.
modeintCurrent operating mode.
- 1: Gripper fully open and idle.
- 2: Gripper fully closed and idle.
- 3: Gripper stopped and idle.
- 4: Gripper is closing.
- 5: Gripper is opening.
- 6: Gripper stopped by force-controlled during closing.
current_forceintCurrent force, in grams (g).
temperatureintCurrent temperature, in degrees Celsius (°C).
actposintGripper aperture, range 0–1000.
- 0: Gripper fully closed.
- 1000: Gripper fully open.