Custom Types
This document lists the custom data types used in the SDK, corresponding to Python SDK type declarations (lebai_sdk.pyi). The structure of SDKs in each language is nearly identical, only the syntax differs.
TIP
- Joint pose
JointPoseis a 6-element array (radians). - Cartesian pose
CartesianPoseis a dictionary: position unit m, angle unit rad. - Enum types in all languages are strings (e.g. robot state
"IDLE","MOVING").
Pose Types
JointPose
Joint pose (radians): [joint1, joint2, ..., joint6], i.e. [list[float]]
CartesianPose
Cartesian pose (position unit m, angle unit rad)
| Field | Type | Description |
|---|---|---|
| x | [float] | X coordinate (m) |
| y | [float] | Y coordinate (m) |
| z | [float] | Z coordinate (m) |
| rx | [float] | Rotation angle around X axis (rad) |
| ry | [float] | Rotation angle around Y axis (rad) |
| rz | [float] | Rotation angle around Z axis (rad) |
Pose
Pose parameter: either joint pose or Cartesian pose, i.e. [JointPose] | [CartesianPose]
Position
Spatial position (unit m)
| Field | Type | Description |
|---|---|---|
| x | [float] | X coordinate (m) |
| y | [float] | Y coordinate (m) |
| z | [float] | Z coordinate (m) |
Data Object Types
DeviceInfo
Device information returned by device discovery
| Field | Type | Description |
|---|---|---|
| name | [str] | Device name |
| mac | [str] | MAC address |
| ip | [str] | IP address |
| online | [bool] | Whether online |
KinData
Motion data (current state)
| Field | Type | Description |
|---|---|---|
| actual_joint_pose | [JointPose] | Current joint position (radians) |
| actual_joint_speed | [JointPose] | Current joint speed (rad/s) |
| actual_joint_acc | [JointPose] | Current joint acceleration (rad/s²) |
| actual_joint_torque | [JointPose] | Current joint torque (Nm) |
| target_joint_pose | [JointPose] | Target joint position (radians) |
| target_joint_speed | [JointPose] | Target joint speed (rad/s) |
| target_joint_acc | [JointPose] | Target joint acceleration (rad/s²) |
| target_joint_torque | [JointPose] | Target joint torque (Nm) |
| actual_tcp_pose | [CartesianPose] | Current TCP pose |
| target_tcp_pose | [CartesianPose] | Target TCP pose |
| actual_flange_pose | [CartesianPose] | Current flange pose |
PhyData
Physical data
| Field | Type | Description |
|---|---|---|
| joint_temp | [list[float]] | Joint temperature (°C) |
| joint_voltage | [list[float]] | Joint voltage (V) |
| flange_voltage | [float] | Flange voltage (V) |
Payload
Payload parameters
| Field | Type | Description |
|---|---|---|
| mass | [float] | Payload mass (kg) |
| cog | [Position] | Payload center of gravity offset position (m) |
Claw
Gripper status
| Field | Type | Description |
|---|---|---|
| force | [float] | Gripper force (force control) |
| amplitude | [float] | Gripper amplitude (position control) |
| weight | [float] | Payload weight (deprecated) |
| hold_on | [bool] | Whether amplitude is stable |
LedStyle
LED light strip style
| Field | Type | Description |
|---|---|---|
| mode | [int] | Mode |
| speed | [int] | Speed |
| colors | [list[int]] | RGB color list |
| voice | [int] | Sound |
| volume | [int] | Volume |
CommandStdout
Command execution result
| Field | Type | Description |
|---|---|---|
| done | [bool] | Not started or completed |
| stdout | [str] | Debug information |
| stderr | [str] | Warning information |
| code | [int] | Return code, non-0 is failure |
Item
KV storage item
| Field | Type | Description |
|---|---|---|
| key | [str] | Key name |
| value | [str] | Key value |
HttpRequest
HTTP request
| Field | Type | Description |
|---|---|---|
| method | [str] | Request method, e.g. "GET", "POST" |
| url | [str] | Request URL |
| headers | [dict[str, str]] | Request headers |
| body | [str] | Request body |
HttpResponse
HTTP response
| Field | Type | Description |
|---|---|---|
| status | [int] | Status code |
| headers | [dict[str, str]] | Response headers |
| body | [str] | Response body |
ConnectOption
Connection options
| Field | Type | Description |
|---|---|---|
| request_timeout | [int] | Request timeout (seconds) |
Enum Types (all strings)
IoDevice
IO device name (unknown device name defaults to "ROBOT")
| Value | Description |
|---|---|
ROBOT | Control box |
FLANGE | Flange |
EXTRA | Expansion board |
SHOULDER | Shoulder light board |
FLANGE_BTN | Flange button |
DigitalMode
Digital IO mode
| Value | Description |
|---|---|
INPUT | Input |
OUTPUT | Output |
Relation
Signal comparison relation
| Value | Description |
|---|---|
EQ | Equal |
NEQ | Not equal |
LT | Less than |
LTE | Less than or equal |
GT | Greater than |
GTE | Greater than or equal |
Parity
Serial port parity ("None" means no parity)
| Value | Description |
|---|---|
None | No parity |
Odd | Odd parity |
Even | Even parity |
AutoCfg
Auto configuration on startup
| Value | Description |
|---|---|
ARM_POWER | Auto power on after startup |
ENABLE_JOINT | Auto power on and start arm after startup |
INIT_CLAW | Auto initialize gripper after power on |
RobotState
Robot state
| Value | Description |
|---|---|
DISCONNECTED | Robot hardware communication fault |
ESTOP | Robot in emergency stop state, please confirm safety |
BOOTING | Robot initializing |
ROBOT_OFF | Robot power not turned on |
ROBOT_ON | Robot power turned on |
IDLE | Robot idle |
PAUSED | Robot in paused state |
MOVING | Robot moving |
UPDATING | Robot system updating |
STARTING | Robot startup from initialization to idle |
STOPPING | Robot transitioning from idle to stopped |
TEACHING | Robot in teaching mode |
STOP | Robot stopped, not emergency stopped |
EstopReason
Emergency stop reason
| Value | Description |
|---|---|
NONE | No emergency stop |
SYSTEM | Software |
MANUAL | Manual API call |
HARD_ESTOP | Hardware emergency stop button |
COLLISION | Collision |
JOINT_LIMIT | Joint limit |
EXCEED | Overspeed |
TRAJECTORY_ERROR | Motion planning error |
COMM_ERROR | Communication fault |
CAN_ERROR | CAN communication fault |
JOINT_ERROR | Joint fault |
Other Types
Robot
Robot control interface. After successful connection, you can call various control and query methods. It can be copied, with multiple references sharing the same connection.
RobotSubscription
RPC subscription object, can repeatedly call next() to get push data.
