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 JointPose is a 6-element array (radians).
  • Cartesian pose CartesianPose is 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)

FieldTypeDescription
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)

FieldTypeDescription
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

FieldTypeDescription
name[str]Device name
mac[str]MAC address
ip[str]IP address
online[bool]Whether online

KinData

Motion data (current state)

FieldTypeDescription
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

FieldTypeDescription
joint_temp[list[float]]Joint temperature (°C)
joint_voltage[list[float]]Joint voltage (V)
flange_voltage[float]Flange voltage (V)

Payload

Payload parameters

FieldTypeDescription
mass[float]Payload mass (kg)
cog[Position]Payload center of gravity offset position (m)

Claw

Gripper status

FieldTypeDescription
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

FieldTypeDescription
mode[int]Mode
speed[int]Speed
colors[list[int]]RGB color list
voice[int]Sound
volume[int]Volume

CommandStdout

Command execution result

FieldTypeDescription
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

FieldTypeDescription
key[str]Key name
value[str]Key value

HttpRequest

HTTP request

FieldTypeDescription
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

FieldTypeDescription
status[int]Status code
headers[dict[str, str]]Response headers
body[str]Response body

ConnectOption

Connection options

FieldTypeDescription
request_timeout[int]Request timeout (seconds)

Enum Types (all strings)

IoDevice

IO device name (unknown device name defaults to "ROBOT")

ValueDescription
ROBOTControl box
FLANGEFlange
EXTRAExpansion board
SHOULDERShoulder light board
FLANGE_BTNFlange button

DigitalMode

Digital IO mode

ValueDescription
INPUTInput
OUTPUTOutput

Relation

Signal comparison relation

ValueDescription
EQEqual
NEQNot equal
LTLess than
LTELess than or equal
GTGreater than
GTEGreater than or equal

Parity

Serial port parity ("None" means no parity)

ValueDescription
NoneNo parity
OddOdd parity
EvenEven parity

AutoCfg

Auto configuration on startup

ValueDescription
ARM_POWERAuto power on after startup
ENABLE_JOINTAuto power on and start arm after startup
INIT_CLAWAuto initialize gripper after power on

RobotState

Robot state

ValueDescription
DISCONNECTEDRobot hardware communication fault
ESTOPRobot in emergency stop state, please confirm safety
BOOTINGRobot initializing
ROBOT_OFFRobot power not turned on
ROBOT_ONRobot power turned on
IDLERobot idle
PAUSEDRobot in paused state
MOVINGRobot moving
UPDATINGRobot system updating
STARTINGRobot startup from initialization to idle
STOPPINGRobot transitioning from idle to stopped
TEACHINGRobot in teaching mode
STOPRobot stopped, not emergency stopped

EstopReason

Emergency stop reason

ValueDescription
NONENo emergency stop
SYSTEMSoftware
MANUALManual API call
HARD_ESTOPHardware emergency stop button
COLLISIONCollision
JOINT_LIMITJoint limit
EXCEEDOverspeed
TRAJECTORY_ERRORMotion planning error
COMM_ERRORCommunication fault
CAN_ERRORCAN communication fault
JOINT_ERRORJoint 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.