3 Data Structures
3.1 StatusCodeEnum
Description
Interface return status codes.
Note: If you encounter a return code that is not listed here, consult the robot fault-code table or interpret the value literally.
Import
from Agilebot import StatusCodeEnumFields
| Name | Enum Value | Description |
|---|---|---|
OK | 0 | Success |
INCOMPATIBLE_VERSION | -1 | Incompatible version |
CONNECTION_TIMEOUT | -3 | Connection timeout |
INTERFACE_NOTIMPLEMENTED | -4 | Interface not implemented on the current controller |
INDEX_OUT_OF_RANGE | -5 | Index out of range |
UNSUPPORTED_FILETYPE | -6 | Unsupported file type |
UNSUPPORTED_PARAMETER | -7 | Unsupported robot parameter |
UNSUPPORTED_SIGNAL_TYPE | -8 | Unsupported IO signal type |
PROGRAM_NOT_FOUND | -9 | Program not found |
PROGRAM_POSE_NOT_FOUND | -10 | Program pose not found |
WRITE_PROGRAM_POSE_FAILED | -11 | Failed to write program pose |
GET_ALARM_CODE_FAILED | -12 | Failed to retrieve alarm code |
WRONG_POSITION_INFO | -13 | Incorrect position information from the controller |
UNSUPPORTED_TRATYPE | -14 | Unsupported motion type |
INVALID_DH_LIST | -15 | Invalid transformation parameter list. Please contact the developer |
INTERVAL_PORTS_MUST_NOTNONE | -16 | Interval, port list, and level duration must not be empty |
INVALID_IP_ADDRESS | -17 | Invalid IP address |
INVALID_DH_PARAMETERS | -18 | Invalid DH parameters |
INVALID_PAYLOAD_INFO | -19 | Invalid payload information |
INVALID_FLYSHOT_CONFIG | -20 | Invalid flyshot configuration parameters |
FAILED_TO_DOWNLOAD_SAME_NAME_FILE | -21 | Download failed because a file with the same name already exists |
FAILED_TO_CONVERT_CART_TO_JOINT | -22 | Failed to convert Cartesian coordinates to joint coordinates |
FAILED_TO_GET_ALL_INVERSE_KINEMATICS | -23 | Failed to obtain the eight solutions within one revolution |
COORDINATE_LIMIT_EXCEEDED | -24 | Coordinate system limit exceeded. The maximum is 10 coordinate systems with IDs in [1, 10] |
FILE_NOTEXIST | -25 | File does not exist |
INVALID_IO_LIST_PARAMETERS | -26 | Invalid IO list parameters |
INVALID_PARAMETER | -27 | Invalid parameter |
NOT_FOUND | -28 | Requested data not found |
LOCAL_PROXY_UNSUPPORTED | -29 | Local proxy is not supported in the current environment |
CONTROLLER_ERROR | -254 | Controller error. Contact the developer for details |
SERVER_ERR | -255 | Other reasons |
3.2 RobotStatusEnum
Description
Robot operating status.
Import
from Agilebot import RobotStatusEnumFields
| Name | Enum Value | Description |
|---|---|---|
ROBOT_UNKNOWN | -1 | Unknown state |
ROBOT_IDLE | 0 | Robot idle |
ROBOT_RUNNING | 1 | Robot running |
ROBOT_TEACHING | 2 | Robot teaching |
ROBOT_DRAG | 3 | Robot in drag mode |
ROBOR_FORCE_DRAG | 4 | Robot in force-drag mode |
ROBOT_IDLE_TO_RUNNING | 101 | Transition from idle to running |
ROBOT_IDLE_TO_TEACHING | 102 | Transition from idle to teaching |
ROBOT_RUNNING_TO_IDLE | 103 | Transition from running to idle |
ROBOT_TEACHING_TO_IDLE | 104 | Transition from teaching to idle |
3.3 CtrlStatusEnum
Description
Controller operating status.
Import
from Agilebot import CtrlStatusEnumFields
| Name | Enum Value | Description |
|---|---|---|
CTRL_UNKNOWN | -1 | Unknown controller state |
CTRL_INIT | 0 | Controller initializing |
CTRL_ENGAGED | 1 | Controller enabled |
CTRL_ESTOP | 2 | Controller emergency stop |
CTRL_TERMINATED | 3 | Controller terminated |
CTRL_ANY_TO_ESTOP | 101 | Transition from any state to emergency stop |
CTRL_ESTOP_TO_ENGAGED | 102 | Transition from emergency stop to enabled |
CTRL_ESTOP_TO_TERMINATED | 103 | Transition from emergency stop to terminated |
3.4 ServoStatusEnum
Description
Servo controller status.
Import
from Agilebot import ServoStatusEnumFields
| Name | Enum Value | Description |
|---|---|---|
SERVO_UNKNOWN | -1 | Unknown servo controller state |
SERVO_IDLE | 1 | Servo controller idle |
SERVO_RUNNING | 2 | Servo controller running |
SERVO_DISABLE | 3 | Servo controller disabled |
SERVO_WAIT_READY | 4 | Servo controller waiting for ready |
SERVO_WAIT_DOWN | 5 | Servo controller waiting for shutdown |
SERVO_INIT | 10 | Servo controller initializing |
3.5 SoftModeEnum
Description
Robot PC status mode.
Import
from Agilebot import SoftModeEnumFields
| Name | Enum Value | Description |
|---|---|---|
UNKNOWN | 0 | Unknown |
AUTO | 1 | Automatic mode |
MANUAL_LIMIT | 2 | Manual speed-limited mode |
MANUAL | 3 | Manual mode |
3.6 PoseType
Description
Robot pose type.
Import
from Agilebot import PoseTypeFields
| Name | Enum Value | Description |
|---|---|---|
JOINT | 0 | Joint space |
CART | 1 | Cartesian coordinates |
3.7 TCSType
Description
Coordinate system type.
Import
from Agilebot import TCSTypeFields
| Name | Enum Value | Description |
|---|---|---|
JOINT | 0 | Joint space |
BASE | 1 | Base coordinate system |
WORLD | 2 | World coordinate system |
USER | 3 | User coordinate system |
TOOL | 4 | Tool coordinate system |
RTCP_USER | 5 | RTCP user coordinate system |
RTCP_TOOL | 6 | RTCP tool coordinate system |
3.8 Joint
Description
Data structure describing the robot joint positions.
Import
from Agilebot import JointAttributes
| Attribute | Type | Description |
|---|---|---|
j1 | float | Value of joint 1 |
j2 | float | Value of joint 2 |
j3 | float | Value of joint 3 |
j4 | float | Value of joint 4 |
j5 | float | Value of joint 5 |
j6 | float | Value of joint 6 |
j7 | float | Value of joint 7 |
j8 | float | Value of joint 8 |
j9 | float | Value of joint 9 |
3.9 Position
Description
Data structure describing the robot Cartesian pose.
Import
from Agilebot import PositionAttributes
| Attribute | Type | Description |
|---|---|---|
x | float | X-axis coordinate |
y | float | Y-axis coordinate |
z | float | Z-axis coordinate |
a | float | A-axis angle |
b | float | B-axis angle |
c | float | C-axis angle |
3.10 Posture
Description
Data structure describing the robot posture parameters.
Import
from Agilebot import PostureAttributes
| Attribute | Type | Description |
|---|---|---|
turn_cycle | int[] | Turn count for each axis. Integer range ..., -2,-1,0,1,2,... with 0 at the 0° posture. During linear/arc motions the target turn count is chosen automatically. Rotations ≥ 180° map to ≥ 1, between -179.99° and 179.99° map to 0, ≤ -180° map to ≤ -1. |
wrist_flip | int | Wrist flip posture (-1/0/1). On 6-axis robots (joint 5), 1 means the wrist flips downward, -1 means it flips upward. |
arm_up_down | int | Arm up/down posture (-1/0/1). On 6-axis robots (joint 3), 1 means the arm is above the line between joints 4 and 2 (with J3 < 0), -1 means it is below that line (with J3 > 0). |
arm_back_front | int | Arm front/back posture (-1/0/1). On 6-axis robots (joint 1), 1 means the arm is in front (axis 2 on the left of axis 1 when facing forward), -1 means the arm is behind (axis 2 on the right of axis 1). |
arm_left_right | int | Arm left/right posture (-1/0/1). On 4-axis SCARA robots (joint 2), 1 means the arm is on the right, -1 means the arm is on the left. |
3.11 BaseCartData
Description
Data structure describing the robot Cartesian target pose.
Import
from Agilebot import BaseCartDataAttributes
| Attribute | Type | Description |
|---|---|---|
position | Position | Cartesian pose data |
posture | Posture | Robot posture parameters |
3.12 MotionPose
Description
Data structure describing the robot pose. Distances in the XYZ directions are measured in millimeters (mm) and angle data is in degrees (deg). In some versions the angle information is returned in radians; refer to the API return description for details.
Import
from Agilebot import MotionPoseAttributes
| Attribute | Type | Description |
|---|---|---|
cartData | BaseCartData | Cartesian data |
joint | Joint | Joint data |
pt | PoseType | Pose type, default is PoseType.JOINT |
3.13 DHparam
Description
Robot DH parameter list.
Import
from Agilebot import DHparamAttributes
| Attribute | Type | Description | Default Value |
|---|---|---|---|
id | int | ID of the DH parameter | -1 |
d | float | Joint distance | -1.0 |
a | float | Link length | -1.0 |
alpha | float | Link twist angle | -1.0 |
offset | float | Joint offset | -1.0 |
3.14 PayloadInfo
Description
Robot payload information.
Import
from Agilebot import PayloadInfoAttributes
| Attribute | Type | Description |
|---|---|---|
id | int | Payload ID |
weight | float | Payload weight (kg) |
comment | str | Comment |
mass_center | MassCenter | Center of mass |
inertia_moment | InertiaMoment | Moment of inertia |
MassCenter
| Field | Type | Description |
|---|---|---|
x | float | X |
y | float | Y |
z | float | Z |
InertiaMoment
| Field | Type | Description |
|---|---|---|
lx | float | LX |
ly | float | LY |
lz | float | LZ |
3.15 ProgramCartData
Description
Program Cartesian data.
Import
from Agilebot import ProgramCartDataAttributes
| Attribute | Type | Description |
|---|---|---|
baseCart | BaseCartData | Cartesian data |
uf | int | User coordinate system ID in use |
tf | int | Tool coordinate system ID in use |
3.16 ProgramPoseData
Description
Program pose data.
Import
from Agilebot import ProgramPoseDataAttributes
| Attribute | Type | Description |
|---|---|---|
cartData | ProgramCartData | Program pose data |
joint | Joint | Joint data |
pt | PoseType | Pose type, default is PoseType.JOINT |
3.17 ProgramPose
Description
Program pose.
Import
from Agilebot import ProgramPoseAttributes
| Attribute | Type | Description |
|---|---|---|
poseData | ProgramPoseData | Program pose data |
id | int | Pose ID |
name | str | Pose name |
comment | str | Pose comment |
3.18 PoseRegisterData
Description
Register data class, used to represent the data stored in a register.
Import
from Agilebot import PoseRegisterDataAttributes
| Attribute | Type | Description |
|---|---|---|
cartData | BaseCartData | Cartesian pose data |
joint | Joint | Joint data |
pt | PoseType | Pose type, default is PoseType.JOINT |
3.19 PoseRegister
Description
Register class, used to represent the register data stored on the controller.
Import
from Agilebot import PoseRegisterAttributes
| Attribute | Type | Description |
|---|---|---|
poseRegisterData | PoseRegisterData | Register pose data |
id | int | Register ID |
name | str | Register name |
comment | str | Register comment |
3.20 TransformStatusEnum
Description
Trajectory transformation status.
Import
from Agilebot import TransformStatusEnumFields
| Name | Enum Value | Description |
|---|---|---|
TRANSFORM_START | 0 | Transformation started |
TRANSFORM_RUNNING | 1 | Transformation in progress |
TRANSFORM_SUCCESS | 2 | Transformation succeeded |
TRANSFORM_FAILED | 3 | Transformation failed |
TRANSFORM_NOT_FOUND | 4 | Transformation not found |
TRANSFORM_UNKNOWN | 5 | Unknown transformation status |
3.21 HWState
Description
Hardware state enumeration.
Import
from Agilebot import HWStateFields
| Name | Description |
|---|---|
TOPIC_JOINT | Publish robot joint feedback |
TOPIC_CURRENT_CARTESIAN | Publish current TCP Cartesian pose |
TOPIC_UF | Publish current user frame info |
TOPIC_TF | Publish current tool frame info |
TOPIC_VELOCITY | Publish global velocity ratio |
TOPIC_RUNNING_STATUS | Publish controller running status |
TOPIC_INTERPRETER_STATUS | Publish interpreter status |
TOPIC_ROBOT_STATUS | Publish robot status |
TOPIC_CTRL_STATUS | Publish controller state |
TOPIC_SERVO_STATUS | Publish servo controller status |
TOPIC_TRAJECTORY_RECORDS_STATUS | Publish trajectory record status |
3.22 CoordinateSystemType
Description
Robot coordinate system type.
Import
from Agilebot import CoordinateSystemTypeFields
| Name | Enum Value | Description |
|---|---|---|
UserFrame | 0 | User coordinate system |
ToolFrame | 1 | Tool coordinate system |
3.23 Coordinate
Description
Coordinate system data, including tool and user frames.
Import
from Agilebot import CoordinateAttributes
| Attribute | Type | Description |
|---|---|---|
id | int | Coordinate system ID |
name | str | Coordinate system name |
comment | str | Coordinate system comment |
data | Position | Coordinate pose data |
3.24 DragStatus
Description
Robot drag status.
Import
from Agilebot import DragStatusAttributes
| Attribute | Type | Description |
|---|---|---|
cart_status | CartStatus | Cartesian axis drag/lock status |
joint_status | JointStatus | Joint axis drag/lock status |
is_continuous_drag | bool | Continuous drag flag |
3.24.1 CartStatus
Description
Cartesian status class representing Cartesian axis drag state.
Import
from Agilebot import CartStatusAttributes
| Attribute | Type | Description |
|---|---|---|
x | bool | X-axis status |
y | bool | Y-axis status |
z | bool | Z-axis status |
a | bool | A-axis status |
b | bool | B-axis status |
c | bool | C-axis status |
3.24.2 JointStatus
Description
Joint status class representing the status of each robot joint. All joints default to True (available).
Import
from Agilebot import JointStatusAttributes
| Attribute | Type | Description |
|---|---|---|
j1 | bool | Status of J1 |
j2 | bool | Status of J2 |
j3 | bool | Status of J3 |
j4 | bool | Status of J4 |
j5 | bool | Status of J5 |
j6 | bool | Status of J6 |
j7 | bool | Status of J7 |
j8 | bool | Status of J8 |
j9 | bool | Status of J9 |
3.25 ModbusChannel
Description
Modbus channel type.
Import
from Agilebot import ModbusChannelFields
| Name | Enum Value | Description |
|---|---|---|
CONTROLLER_TCP_TO_485 | 2 | TCP-to-RS485 module channel |
WRIST_485_0 | 3 | Wrist AI channel |
WRIST_485_1 | 4 | Wrist DO channel |
CONTROLLER_485 | 5 | Controller 485 channel |
3.26 PayloadIdentifyState
Description
Payload identification state.
Import
from Agilebot import PayloadIdentifyStateFields
| Name | Enum Value | Description |
|---|---|---|
PAYLOAD_CHECK_INIT | 0 | Payload check initialization in progress |
PAYLOAD_CHECK_RUNNING | 1 | Payload check running |
PAYLOAD_CHECK_SUCCESS | 2 | Payload check succeeded |
PAYLOAD_CHECK_FAILED | 3 | Payload check failed |
PAYLOAD_IDENTIFY_INIT | 4 | Payload identification initialization |
PAYLOAD_IDENTIFY_RUNNING | 5 | Payload identification running |
PAYLOAD_IDENTIFY_SUCCESS | 6 | Payload identification succeeded |
PAYLOAD_IDENTIFY_FAILED | 7 | Payload identification failed |
WRONG_DATA | -1 | Invalid data |
3.27 MoveMode
Description
Jog move mode.
Import
from Agilebot import MoveModeFields
| Name | Enum Value | Description |
|---|---|---|
Continuous | 0 | Continuous motion |
Stepping | 1 | Step motion |
3.28 SignalType
Description
SignalType is an enumeration class that distinguishes between digital, user, robot, group, and analog IO signals so the robot control system can correctly identify and manage each signal type.
Import
from Agilebot import SignalTypeFields
| Name | Enum Value | Description |
|---|---|---|
DI | 1 | Digital input signal |
DO | 2 | Digital output signal |
UI | 3 | User input signal |
UO | 4 | User output signal |
RI | 5 | Remote-control input signal |
RO | 6 | Remote-control output signal |
GI | 7 | Group input signal |
GO | 8 | Group output signal |
TAI | 9 | Tool analog input signal |
TDI | 10 | Tool digital input signal |
TDO | 11 | Tool digital output signal |
AI | 12 | Analog input signal |
AO | 13 | Analog output signal |
3.29 SignalValue
Description
SignalValue defines signal on/off values using two constants, OFF and ON , which represent the off and on states of a signal.
Import
from Agilebot import SignalValueAttributes
| Name | Value | Description |
|---|---|---|
OFF | 0 | Signal off |
ON | 1 | Signal on |
3.30 SerialParams
Description
Serial communication configuration. Used when performing Modbus-RTU/TCP to 485 communication. The instance can be passed directly to the lower-level communication interface to describe connection parameters.
Import
from Agilebot import SerialParams, ModbusChannel, ModbusParityConstructor
SerialParams(
id: int = 1,
channel: ModbusChannel = ModbusChannel.CONTROLLER_TCP_TO_485,
ip: str = "10.27.1.80",
port: int = 502,
baud: int = 9600,
data_bit: int = 8,
stop_bit: int = 1,
parity: ModbusParity = ModbusParity.NONE,
timeout: int = 1000
)Attributes
| Attribute | Type | Description |
|---|---|---|
id | int | Device station / slave ID |
channel | ModbusChannel | Communication channel enumeration, defaults to CONTROLLER_TCP_TO_485 |
ip | str | Gateway IP address when using TCP-to-485 |
port | int | Gateway port when using TCP-to-485 |
baud | int | Baud rate, default 9600 bps |
data_bit | int | Data bits, default 8 |
stop_bit | int | Stop bits, default 1 |
parity | ModbusParity | Parity setting, default ModbusParity.NONE |
timeout | int | Read/write timeout in milliseconds, default 1000 |
3.31 SubPub Topic Types
3.31.1 RobotTopicType
Description
Robot real-time topic enumeration used for subscribing or publishing robot status.
Import
from Agilebot import RobotTopicTypeEnum Values
| Name | Description |
|---|---|
JOINT_POSITION | Joint feedback (rad) |
CARTESIAN_POSITION | TCP pose under the active user/tool frames |
TCP_WORLD_CARTESIAN | TCP pose in the world frame |
TCP_BASE_CARTESIAN | TCP pose in the base frame |
USER_FRAME | Current user frame |
TOOL_FRAME | Current tool frame |
VELOCITY_RATIO | Global speed ratio (0-100%) |
GLOBAL_ACC_RATIO | Global acceleration ratio (0-100%) |
CALIBRATE_STATUS | Axis-group calibration status |
TRAJECTORY_RECORD | Trajectory recording status |
RUNNING_STATUS | Controller running status |
INTERPRETER_STATUS | Interpreter status (running/paused/stopped/error) |
ROBOT_STATUS | Robot overall status |
CTRL_STATUS | Controller readiness status |
SERVO_STATUS | Servo enable status |
USER_OP_MODE | User operation mode |
SOFT_OP_MODE | Soft operation mode |
OPERATION_STATUS | Operation status |
PERFORMANCE_GEAR | Performance gear |
POWER_STATUS | Power status |
POWER_ON_STATUS | Power-on status |
SAFETY_ALARM | Safety alarm status |
SAFETY_PLANE_STATUS | Safety plane status |
TOOL_POSTURE_LIMIT_STATUS | Tool posture limit status |
JOINTS_RECORD | Joint record |
TP_PROGRAM_STATUS | TP program status |
3.31.2 RegTopicType
Description
Register subscription topic enumeration for accessing internal R / MR / SR / PR registers.
Import
from Agilebot import RegTopicTypeEnum Values
| Name | Value | Description |
|---|---|---|
R | R | Generic register |
MR | MR | Motion register |
SR | SR | String register |
PR | PR | Position register |
3.31.3 IOTopicType
Description
IO subscription topic enumeration covering digital, group, analog, robot, and tool IO.
Import
from Agilebot import IOTopicTypeEnum Values
| Name | Value | Description |
|---|---|---|
DI | DI | Digital input |
DO | DO | Digital output |
GI | GI | Group input |
GO | GO | Group output |
RI | RI | Remote-control input |
RO | RO | Remote-control output |
UI | UI | User input |
UO | UO | User output |
TDI | TDI | Tool digital input |
TDO | TDO | Tool digital output |
TAI | TAI | Tool analog input |
AI | AI | Analog input |
AO | AO | Analog output |