Skip to content

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

python
from Agilebot import StatusCodeEnum

Fields

NameEnum ValueDescription
OK0Success
INCOMPATIBLE_VERSION-1Incompatible version
CONNECTION_TIMEOUT-3Connection timeout
INTERFACE_NOTIMPLEMENTED-4Interface not implemented on the current controller
INDEX_OUT_OF_RANGE-5Index out of range
UNSUPPORTED_FILETYPE-6Unsupported file type
UNSUPPORTED_PARAMETER-7Unsupported robot parameter
UNSUPPORTED_SIGNAL_TYPE-8Unsupported IO signal type
PROGRAM_NOT_FOUND-9Program not found
PROGRAM_POSE_NOT_FOUND-10Program pose not found
WRITE_PROGRAM_POSE_FAILED-11Failed to write program pose
GET_ALARM_CODE_FAILED-12Failed to retrieve alarm code
WRONG_POSITION_INFO-13Incorrect position information from the controller
UNSUPPORTED_TRATYPE-14Unsupported motion type
INVALID_DH_LIST-15Invalid transformation parameter list. Please contact the developer
INTERVAL_PORTS_MUST_NOTNONE-16Interval, port list, and level duration must not be empty
INVALID_IP_ADDRESS-17Invalid IP address
INVALID_DH_PARAMETERS-18Invalid DH parameters
INVALID_PAYLOAD_INFO-19Invalid payload information
INVALID_FLYSHOT_CONFIG-20Invalid flyshot configuration parameters
FAILED_TO_DOWNLOAD_SAME_NAME_FILE-21Download failed because a file with the same name already exists
FAILED_TO_CONVERT_CART_TO_JOINT-22Failed to convert Cartesian coordinates to joint coordinates
FAILED_TO_GET_ALL_INVERSE_KINEMATICS-23Failed to obtain the eight solutions within one revolution
COORDINATE_LIMIT_EXCEEDED-24Coordinate system limit exceeded. The maximum is 10 coordinate systems with IDs in [1, 10]
FILE_NOTEXIST-25File does not exist
INVALID_IO_LIST_PARAMETERS-26Invalid IO list parameters
INVALID_PARAMETER-27Invalid parameter
NOT_FOUND-28Requested data not found
LOCAL_PROXY_UNSUPPORTED-29Local proxy is not supported in the current environment
CONTROLLER_ERROR-254Controller error. Contact the developer for details
SERVER_ERR-255Other reasons

3.2 RobotStatusEnum

Description

Robot operating status.

Import

python
from Agilebot import RobotStatusEnum

Fields

NameEnum ValueDescription
ROBOT_UNKNOWN-1Unknown state
ROBOT_IDLE0Robot idle
ROBOT_RUNNING1Robot running
ROBOT_TEACHING2Robot teaching
ROBOT_DRAG3Robot in drag mode
ROBOR_FORCE_DRAG4Robot in force-drag mode
ROBOT_IDLE_TO_RUNNING101Transition from idle to running
ROBOT_IDLE_TO_TEACHING102Transition from idle to teaching
ROBOT_RUNNING_TO_IDLE103Transition from running to idle
ROBOT_TEACHING_TO_IDLE104Transition from teaching to idle

3.3 CtrlStatusEnum

Description

Controller operating status.

Import

python
from Agilebot import CtrlStatusEnum

Fields

NameEnum ValueDescription
CTRL_UNKNOWN-1Unknown controller state
CTRL_INIT0Controller initializing
CTRL_ENGAGED1Controller enabled
CTRL_ESTOP2Controller emergency stop
CTRL_TERMINATED3Controller terminated
CTRL_ANY_TO_ESTOP101Transition from any state to emergency stop
CTRL_ESTOP_TO_ENGAGED102Transition from emergency stop to enabled
CTRL_ESTOP_TO_TERMINATED103Transition from emergency stop to terminated

3.4 ServoStatusEnum

Description

Servo controller status.

Import

python
from Agilebot import ServoStatusEnum

Fields

NameEnum ValueDescription
SERVO_UNKNOWN-1Unknown servo controller state
SERVO_IDLE1Servo controller idle
SERVO_RUNNING2Servo controller running
SERVO_DISABLE3Servo controller disabled
SERVO_WAIT_READY4Servo controller waiting for ready
SERVO_WAIT_DOWN5Servo controller waiting for shutdown
SERVO_INIT10Servo controller initializing

3.5 SoftModeEnum

Description

Robot PC status mode.

Import

python
from Agilebot import SoftModeEnum

Fields

NameEnum ValueDescription
UNKNOWN0Unknown
AUTO1Automatic mode
MANUAL_LIMIT2Manual speed-limited mode
MANUAL3Manual mode

3.6 PoseType

Description

Robot pose type.

Import

python
from Agilebot import PoseType

Fields

NameEnum ValueDescription
JOINT0Joint space
CART1Cartesian coordinates

3.7 TCSType

Description

Coordinate system type.

Import

python
from Agilebot import TCSType

Fields

NameEnum ValueDescription
JOINT0Joint space
BASE1Base coordinate system
WORLD2World coordinate system
USER3User coordinate system
TOOL4Tool coordinate system
RTCP_USER5RTCP user coordinate system
RTCP_TOOL6RTCP tool coordinate system

3.8 Joint

Description

Data structure describing the robot joint positions.

Import

python
from Agilebot import Joint

Attributes

AttributeTypeDescription
j1floatValue of joint 1
j2floatValue of joint 2
j3floatValue of joint 3
j4floatValue of joint 4
j5floatValue of joint 5
j6floatValue of joint 6
j7floatValue of joint 7
j8floatValue of joint 8
j9floatValue of joint 9

3.9 Position

Description

Data structure describing the robot Cartesian pose.

Import

python
from Agilebot import Position

Attributes

AttributeTypeDescription
xfloatX-axis coordinate
yfloatY-axis coordinate
zfloatZ-axis coordinate
afloatA-axis angle
bfloatB-axis angle
cfloatC-axis angle

3.10 Posture

Description

Data structure describing the robot posture parameters.

Import

python
from Agilebot import Posture

Attributes

AttributeTypeDescription
turn_cycleint[]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_flipintWrist flip posture (-1/0/1). On 6-axis robots (joint 5), 1 means the wrist flips downward, -1 means it flips upward.
arm_up_downintArm 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_frontintArm 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_rightintArm 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

python
from Agilebot import BaseCartData

Attributes

AttributeTypeDescription
positionPositionCartesian pose data
posturePostureRobot 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

python
from Agilebot import MotionPose

Attributes

AttributeTypeDescription
cartDataBaseCartDataCartesian data
jointJointJoint data
ptPoseTypePose type, default is PoseType.JOINT

3.13 DHparam

Description

Robot DH parameter list.

Import

python
from Agilebot import DHparam

Attributes

AttributeTypeDescriptionDefault Value
idintID of the DH parameter-1
dfloatJoint distance-1.0
afloatLink length-1.0
alphafloatLink twist angle-1.0
offsetfloatJoint offset-1.0

3.14 PayloadInfo

Description

Robot payload information.

Import

python
from Agilebot import PayloadInfo

Attributes

AttributeTypeDescription
idintPayload ID
weightfloatPayload weight (kg)
commentstrComment
mass_centerMassCenterCenter of mass
inertia_momentInertiaMomentMoment of inertia

MassCenter

FieldTypeDescription
xfloatX
yfloatY
zfloatZ

InertiaMoment

FieldTypeDescription
lxfloatLX
lyfloatLY
lzfloatLZ

3.15 ProgramCartData

Description

Program Cartesian data.

Import

python
from Agilebot import ProgramCartData

Attributes

AttributeTypeDescription
baseCartBaseCartDataCartesian data
ufintUser coordinate system ID in use
tfintTool coordinate system ID in use

3.16 ProgramPoseData

Description

Program pose data.

Import

python
from Agilebot import ProgramPoseData

Attributes

AttributeTypeDescription
cartDataProgramCartDataProgram pose data
jointJointJoint data
ptPoseTypePose type, default is PoseType.JOINT

3.17 ProgramPose

Description

Program pose.

Import

python
from Agilebot import ProgramPose

Attributes

AttributeTypeDescription
poseDataProgramPoseDataProgram pose data
idintPose ID
namestrPose name
commentstrPose comment

3.18 PoseRegisterData

Description

Register data class, used to represent the data stored in a register.

Import

python
from Agilebot import PoseRegisterData

Attributes

AttributeTypeDescription
cartDataBaseCartDataCartesian pose data
jointJointJoint data
ptPoseTypePose type, default is PoseType.JOINT

3.19 PoseRegister

Description

Register class, used to represent the register data stored on the controller.

Import

python
from Agilebot import PoseRegister

Attributes

AttributeTypeDescription
poseRegisterDataPoseRegisterDataRegister pose data
idintRegister ID
namestrRegister name
commentstrRegister comment

3.20 TransformStatusEnum

Description

Trajectory transformation status.

Import

python
from Agilebot import TransformStatusEnum

Fields

NameEnum ValueDescription
TRANSFORM_START0Transformation started
TRANSFORM_RUNNING1Transformation in progress
TRANSFORM_SUCCESS2Transformation succeeded
TRANSFORM_FAILED3Transformation failed
TRANSFORM_NOT_FOUND4Transformation not found
TRANSFORM_UNKNOWN5Unknown transformation status

3.21 HWState

Description

Hardware state enumeration.

Import

python
from Agilebot import HWState

Fields

NameDescription
TOPIC_JOINTPublish robot joint feedback
TOPIC_CURRENT_CARTESIANPublish current TCP Cartesian pose
TOPIC_UFPublish current user frame info
TOPIC_TFPublish current tool frame info
TOPIC_VELOCITYPublish global velocity ratio
TOPIC_RUNNING_STATUSPublish controller running status
TOPIC_INTERPRETER_STATUSPublish interpreter status
TOPIC_ROBOT_STATUSPublish robot status
TOPIC_CTRL_STATUSPublish controller state
TOPIC_SERVO_STATUSPublish servo controller status
TOPIC_TRAJECTORY_RECORDS_STATUSPublish trajectory record status

3.22 CoordinateSystemType

Description

Robot coordinate system type.

Import

python
from Agilebot import CoordinateSystemType

Fields

NameEnum ValueDescription
UserFrame0User coordinate system
ToolFrame1Tool coordinate system

3.23 Coordinate

Description

Coordinate system data, including tool and user frames.

Import

python
from Agilebot import Coordinate

Attributes

AttributeTypeDescription
idintCoordinate system ID
namestrCoordinate system name
commentstrCoordinate system comment
dataPositionCoordinate pose data

3.24 DragStatus

Description

Robot drag status.

Import

python
from Agilebot import DragStatus

Attributes

AttributeTypeDescription
cart_statusCartStatusCartesian axis drag/lock status
joint_statusJointStatusJoint axis drag/lock status
is_continuous_dragboolContinuous drag flag

3.24.1 CartStatus

Description

Cartesian status class representing Cartesian axis drag state.

Import

python
from Agilebot import CartStatus

Attributes

AttributeTypeDescription
xboolX-axis status
yboolY-axis status
zboolZ-axis status
aboolA-axis status
bboolB-axis status
cboolC-axis status

3.24.2 JointStatus

Description

Joint status class representing the status of each robot joint. All joints default to True (available).

Import

python
from Agilebot import JointStatus

Attributes

AttributeTypeDescription
j1boolStatus of J1
j2boolStatus of J2
j3boolStatus of J3
j4boolStatus of J4
j5boolStatus of J5
j6boolStatus of J6
j7boolStatus of J7
j8boolStatus of J8
j9boolStatus of J9

3.25 ModbusChannel

Description

Modbus channel type.

Import

python
from Agilebot import ModbusChannel

Fields

NameEnum ValueDescription
CONTROLLER_TCP_TO_4852TCP-to-RS485 module channel
WRIST_485_03Wrist AI channel
WRIST_485_14Wrist DO channel
CONTROLLER_4855Controller 485 channel

3.26 PayloadIdentifyState

Description

Payload identification state.

Import

python
from Agilebot import PayloadIdentifyState

Fields

NameEnum ValueDescription
PAYLOAD_CHECK_INIT0Payload check initialization in progress
PAYLOAD_CHECK_RUNNING1Payload check running
PAYLOAD_CHECK_SUCCESS2Payload check succeeded
PAYLOAD_CHECK_FAILED3Payload check failed
PAYLOAD_IDENTIFY_INIT4Payload identification initialization
PAYLOAD_IDENTIFY_RUNNING5Payload identification running
PAYLOAD_IDENTIFY_SUCCESS6Payload identification succeeded
PAYLOAD_IDENTIFY_FAILED7Payload identification failed
WRONG_DATA-1Invalid data

3.27 MoveMode

Description

Jog move mode.

Import

python
from Agilebot import MoveMode

Fields

NameEnum ValueDescription
Continuous0Continuous motion
Stepping1Step 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

python
from Agilebot import SignalType

Fields

NameEnum ValueDescription
DI1Digital input signal
DO2Digital output signal
UI3User input signal
UO4User output signal
RI5Remote-control input signal
RO6Remote-control output signal
GI7Group input signal
GO8Group output signal
TAI9Tool analog input signal
TDI10Tool digital input signal
TDO11Tool digital output signal
AI12Analog input signal
AO13Analog 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

python
from Agilebot import SignalValue

Attributes

NameValueDescription
OFF0Signal off
ON1Signal 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

python
from Agilebot import SerialParams, ModbusChannel, ModbusParity

Constructor

python
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

AttributeTypeDescription
idintDevice station / slave ID
channelModbusChannelCommunication channel enumeration, defaults to CONTROLLER_TCP_TO_485
ipstrGateway IP address when using TCP-to-485
portintGateway port when using TCP-to-485
baudintBaud rate, default 9600 bps
data_bitintData bits, default 8
stop_bitintStop bits, default 1
parityModbusParityParity setting, default ModbusParity.NONE
timeoutintRead/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

python
from Agilebot import RobotTopicType

Enum Values

NameDescription
JOINT_POSITIONJoint feedback (rad)
CARTESIAN_POSITIONTCP pose under the active user/tool frames
TCP_WORLD_CARTESIANTCP pose in the world frame
TCP_BASE_CARTESIANTCP pose in the base frame
USER_FRAMECurrent user frame
TOOL_FRAMECurrent tool frame
VELOCITY_RATIOGlobal speed ratio (0-100%)
GLOBAL_ACC_RATIOGlobal acceleration ratio (0-100%)
CALIBRATE_STATUSAxis-group calibration status
TRAJECTORY_RECORDTrajectory recording status
RUNNING_STATUSController running status
INTERPRETER_STATUSInterpreter status (running/paused/stopped/error)
ROBOT_STATUSRobot overall status
CTRL_STATUSController readiness status
SERVO_STATUSServo enable status
USER_OP_MODEUser operation mode
SOFT_OP_MODESoft operation mode
OPERATION_STATUSOperation status
PERFORMANCE_GEARPerformance gear
POWER_STATUSPower status
POWER_ON_STATUSPower-on status
SAFETY_ALARMSafety alarm status
SAFETY_PLANE_STATUSSafety plane status
TOOL_POSTURE_LIMIT_STATUSTool posture limit status
JOINTS_RECORDJoint record
TP_PROGRAM_STATUSTP program status

3.31.2 RegTopicType

Description

Register subscription topic enumeration for accessing internal R / MR / SR / PR registers.

Import

python
from Agilebot import RegTopicType

Enum Values

NameValueDescription
RRGeneric register
MRMRMotion register
SRSRString register
PRPRPosition register

3.31.3 IOTopicType

Description

IO subscription topic enumeration covering digital, group, analog, robot, and tool IO.

Import

python
from Agilebot import IOTopicType

Enum Values

NameValueDescription
DIDIDigital input
DODODigital output
GIGIGroup input
GOGOGroup output
RIRIRemote-control input
RORORemote-control output
UIUIUser input
UOUOUser output
TDITDITool digital input
TDOTDOTool digital output
TAITAITool analog input
AIAIAnalog input
AOAOAnalog output