2.2 Motion, Program, Register, and Trajectory Types
This page collects the business data structures directly exposed by the C++17 APIs. Field definitions and enum values follow the SDK package headers. The "Typical APIs" notes indicate where these types usually appear.
MotionPose / PostureInfo
Header file: include/motion_types.h
MotionPose is the shared pose structure used by motion-related APIs. It can represent either a joint pose or a Cartesian pose; poseType decides which data group is interpreted.
Typical APIs:
Motion::GetCurrentPose()Motion::ConvertJointToCart()/Motion::ConvertCartToJoint()Motion::MoveJoint()/Motion::MoveLine()/Motion::MoveCircle()Program::PoseRead()/Program::PoseWrite()Registers::ReadPR()/Registers::WritePR()
Motion-Related Enums
These enums specify pose representation, motion mode, and teach-coordinate-system type.
| Enum | Value | Description |
|---|---|---|
PoseType::JOINT | 0 | MotionPose uses the joint field as a joint pose |
PoseType::CART | 1 | MotionPose uses the cartesian field as a Cartesian pose |
MoveType::MOVE_JOINT | 1 | Joint motion |
MoveType::MOVE_LINE | 2 | Linear motion |
MoveType::MOVE_CIRCLE | 3 | Circular motion |
TCSType::JOINT | 0 | Teach coordinate system: joint |
TCSType::BASE | 1 | Teach coordinate system: base frame |
TCSType::WORLD | 2 | Teach coordinate system: world frame |
TCSType::USER | 3 | Teach coordinate system: user frame |
TCSType::TOOL | 4 | Teach coordinate system: tool frame |
TCSType::RTCP_USER | 5 | Teach coordinate system: RTCP user frame |
TCSType::RTCP_TOOL | 6 | Teach coordinate system: RTCP tool frame |
PostureInfo
PostureInfo stores the posture metadata associated with a Cartesian pose. Joint poses usually do not require callers to fill it manually. Cartesian motion and Cartesian-to-joint conversion may need it to disambiguate multiple inverse-kinematics solutions.
| Field | Type | Default | Description |
|---|---|---|---|
turnCycle | std::array<int32_t, 9> | all 0 | Turn-cycle count for 9 axes |
wristFlip | int32_t | -1 | Wrist-flip state |
armUpDown | int32_t | -1 | Arm up/down state |
armBackFront | int32_t | -1 | Arm back/front state |
armLeftRight | int32_t | -1 | Arm left/right state |
MotionPose
The public cartesian field order is always X, Y, Z, A, B, C . Callers can fill values in that order; protocol adaptation is handled by the SDK.
| Field | Type | Default | Description |
|---|---|---|---|
poseType | PoseType | PoseType::JOINT | Determines whether the pose is interpreted as joint or Cartesian |
joint | std::vector<Float64> | empty | Joint value list; motion APIs check at least the first 6 joint values |
cartesian | std::vector<Float64> | empty | Cartesian pose in X, Y, Z, A, B, C order |
posture | PostureInfo | default posture | Posture metadata for Cartesian poses |
hasPosture | bool | false | Whether posture is valid |
DHParam / SoftLimit / DragStatus / PayloadInfo
Header file: include/motion_types.h
These structures are used by MotionControl parameter, drag, and payload APIs.
DHParam
DHParam represents one set of DH parameters. Typical APIs are Motion::GetDHParam() / Motion::SetDHParam() .
| Field | Type | Default | Description |
|---|---|---|---|
id | int32_t | -1 | DH parameter index |
d | Float64 | 0.0 | DH parameter d |
a | Float64 | 0.0 | DH parameter a |
alpha | Float64 | 0.0 | DH parameter alpha |
offset | Float64 | 0.0 | DH parameter offset |
SoftLimit
SoftLimit represents a soft-limit interval. The typical API is Motion::GetUserSoftLimit() .
| Field | Type | Default | Description |
|---|---|---|---|
negative | Float64 | 0.0 | Negative limit |
positive | Float64 | 0.0 | Positive limit |
DragStatus
DragStatus represents drag-related switch states. Typical APIs are Motion::GetDragStatus() / Motion::SetDragStatus() .
| Field | Type | Default | Description |
|---|---|---|---|
cartStatus | std::array<int32_t, 6> | all 0 | 6D Cartesian drag status |
jointStatus | std::array<int32_t, 9> | all 0 | 9-axis joint drag status |
isContinuousDrag | bool | false | Whether continuous drag is enabled |
PayloadInfo / PayloadSummary
PayloadInfo represents a complete payload configuration. PayloadSummary represents a compact item in payload lists. Typical APIs live under Motion::payload , such as GetById() , Add() , Update() , GetAll() , and Identify() .
| Type | Field | Type | Default | Description |
|---|---|---|---|---|
PayloadInfo | id | int32_t | 0 | Payload ID |
PayloadInfo | comment | std::string | empty | Payload comment |
PayloadInfo | weight | Float64 | 0.0 | Payload weight |
PayloadInfo | massCenter | std::array<Float64, 3> | all 0.0 | Center of mass |
PayloadInfo | inertiaMoment | std::array<Float64, 3> | all 0.0 | Inertia parameters |
PayloadSummary | id | int32_t | 0 | Payload ID |
PayloadSummary | comment | std::string | empty | Payload comment |
PayloadIdentifyState
PayloadIdentifyState is the state of the payload check/identification workflow. The typical API is Motion::payload.GetIdentifyState() .
| Enum | Value | Description |
|---|---|---|
PayloadIdentifyState::WRONG_DATA | -1 | State data is invalid or failed to parse |
PayloadIdentifyState::PAYLOAD_CHECK_INIT | 0 | Payload check initialized |
PayloadIdentifyState::PAYLOAD_CHECK_RUNNING | 1 | Payload check running |
PayloadIdentifyState::PAYLOAD_CHECK_SUCCESS | 2 | Payload check succeeded |
PayloadIdentifyState::PAYLOAD_CHECK_FAILED | 3 | Payload check failed |
PayloadIdentifyState::PAYLOAD_IDENTIFY_INIT | 4 | Payload identification initialized |
PayloadIdentifyState::PAYLOAD_IDENTIFY_RUNNING | 5 | Payload identification running |
PayloadIdentifyState::PAYLOAD_IDENTIFY_SUCCESS | 6 | Payload identification succeeded |
PayloadIdentifyState::PAYLOAD_IDENTIFY_FAILED | 7 | Payload identification failed |
ProgramPose / RunningProgramInfo
Header file: include/program_types.h
ProgramPose is the data structure for program points. RunningProgramInfo is one item in the current running-program list.
ProgramType
ProgramType distinguishes whether a program-point API operates on a user program or a block program.
| Enum Value | Value | Description |
|---|---|---|
ProgramType::USER | 0 | User program |
ProgramType::BLOCK | 1 | Block program |
RunningProgramInfo
RunningProgramInfo represents one currently running program instance.
Typical API: Program::AllRunningPrograms() .
| Field | Type | Default | Description |
|---|---|---|---|
threadId | int32_t | 0 | Thread ID of the running program |
programName | std::string | empty | Program name |
xpath | std::string | empty | Program path |
programStatus | int32_t | 0 | Program status code returned by the controller |
programType | std::string | empty | Program type string returned by the controller |
ProgramPose
ProgramPose represents one point record in a program file.
Typical APIs: Program::PoseRead() , PoseWrite() , PoseAdd() , PoseReadAll() , PoseWriteBatch() , and PoseConvert() .
| Field | Type | Default | Description |
|---|---|---|---|
id | int32_t | -1 | Point index |
name | std::string | empty | Point name |
comment | std::string | empty | Point comment |
pose | MotionPose | default pose | Motion pose associated with this point |
uf | int32_t | 0 | User frame ID |
tf | int32_t | 0 | Tool frame ID |
PoseRegister / PoseRegisterData
Header file: include/register_types.h
PoseRegister is the PR pose-register structure. Typical APIs are Registers::ReadPR() / Registers::WritePR() .
PoseRegisterData
PoseRegisterData represents the pose data stored in a PR pose register.
| Field | Type | Default | Description |
|---|---|---|---|
cart | std::array<Float64, 6> | all 0 | Cartesian pose |
joint | std::array<Float64, 9> | all 0 | 9-axis joint values |
pt | PoseType | PoseType::JOINT | Whether the PR is interpreted as joint or Cartesian |
posture | PostureInfo | default posture | PR posture metadata |
PoseRegister
PoseRegister represents one complete PR pose-register item.
| Field | Type | Default | Description |
|---|---|---|---|
id | int32_t | 0 | PR register ID |
poseRegisterData | PoseRegisterData | default data | PR pose data |
name | std::string | empty | PR name |
comment | std::string | empty | PR comment |
Register / MotionRegister / StringRegister
Header file: include/register_types.h
These three structures define common register data shapes. The current C++17 RegisterBank module mostly returns direct values: ReadR() returns Float64 , ReadMR() / ReadMH() / ReadMI() return int32_t , ReadSR() returns std::string , and ReadPR() returns PoseRegister .
| Type | Field | Type | Default | Description |
|---|---|---|---|---|
Register | id | int32_t | -1 | R register ID |
Register | value | Float64 | 0.0 | R register value |
Register | name | std::string | empty | R register name |
Register | comment | std::string | empty | R register comment |
MotionRegister | id | int32_t | -1 | MR register ID |
MotionRegister | value | int32_t | 0 | MR register value |
MotionRegister | name | std::string | empty | MR register name |
MotionRegister | comment | std::string | empty | MR register comment |
StringRegister | id | int32_t | -1 | SR register ID |
StringRegister | value | std::string | empty | SR register value |
StringRegister | name | std::string | empty | SR register name |
StringRegister | comment | std::string | empty | SR register comment |
FileType / FileInfo
Header file: include/file_manager_types.h
FileType provides file-type string constants used by FileManager::Upload() , Download() , Delete() , and related APIs. FileInfo is the return item of FileManager::Search() .
FileType
FileType is the file-category constant set used by file-management APIs.
| Constant | Value | Description |
|---|---|---|
FileType::TRAJECTORY | "Trajectory" | Trajectory file |
FileType::USER_PROGRAM | "UserProgram" | User program file |
FileType::BLOCK_PROGRAM | "BlockProgram" | Block program file |
FileType::TRAJECTORY_CSV | "TrajectoryCsv" | CSV trajectory file |
FileType::ROBOT_TMP | "RobotTmp" | Controller temporary file |
FileType::FLY_SHOT | "FlyShot" | Fly-shot related file |
FileInfo
FileInfo represents one file item in search results.
| Field | Type | Default | Description |
|---|---|---|---|
name | std::string | empty | File name |
created_at | std::string | empty | Creation time string |
TransformStatusEnum / CartesianPosition / TrajectorySegment
Header file: include/trajectory_types.h
These types are used by offline trajectory, path trajectory, and real-time trajectory APIs.
TransformStatusEnum
TransformStatusEnum represents the current state of an offline-trajectory transform task.
Typical API: Trajectory::CheckTransformStatus() .
| Enum Value | Value | Description |
|---|---|---|
TransformStatusEnum::IDLE | 0 | Idle |
TransformStatusEnum::RUNNING | 1 | Transform running |
TransformStatusEnum::SUCCESS | 2 | Transform succeeded |
TransformStatusEnum::FAILED | 3 | Transform failed |
TransformStatusEnum::NOT_FOUND | 4 | Task not found |
TransformStatusEnum::UNKNOWN | 5 | Unknown state |
CartesianPosition
CartesianPosition represents one Cartesian position. The public field order is X, Y, Z, A, B, C ; callers can fill values in that order and let the SDK handle protocol adaptation.
| Field | Type | Default | Description |
|---|---|---|---|
x | Float64 | 0.0 | X coordinate |
y | Float64 | 0.0 | Y coordinate |
z | Float64 | 0.0 | Z coordinate |
a | Float64 | 0.0 | RX rotation |
b | Float64 | 0.0 | RY rotation |
c | Float64 | 0.0 | RZ rotation |
TrajectorySegment
TrajectorySegment is the trajectory-segment wrapper used for real-time trajectory sending. It provides APIs for trajectory points, sequence number, timestamp, and serialization.
SetPointList() / GetPointList()
SetTotalPoints() / GetTotalPoints()
SetSeq() / GetSeq()
SetLastFragment() / GetLastFragment()
SetTimestamp() / GetTimestampSec() / GetTimestampNsec()
Serialize() / Deserialize()| Method | Description |
|---|---|
SetPointList | Set or read the trajectory point list |
SetTotalPoints | Set or read the total point count |
SetSeq | Set or read the segment sequence number |
SetLastFragment | Set or read whether this is the final segment |
SetTimestamp | Set or read the timestamp |
Serialize | Protobuf serialization and deserialization |
ROBOT_TOPIC_TYPE
ROBOT_TOPIC_TYPE is an alias of std::string . The RobotTopicType namespace provides subscription-topic constants. The typical API is SubPub::SubscribeStatus() .
| Constant | Value | Description |
|---|---|---|
RobotTopicType::JOINT_POSITION | "/publish/motion_control/axis_group/feedback/joints" | Joint-position feedback |
RobotTopicType::CARTESIAN_POSITION | "/publish/motion_control/axis_group/feedback/tcp_current_cartesian" | Current TCP Cartesian feedback |
RobotTopicType::TCP_WORLD_CARTESIAN | "/publish/motion_control/axis_group/feedback/tcp_world_cartesian" | TCP Cartesian feedback in the world frame |
RobotTopicType::TCP_BASE_CARTESIAN | "/publish/motion_control/axis_group/feedback/tcp_base_cartesian" | TCP Cartesian feedback in the base frame |
RobotTopicType::USER_FRAME | "/publish/motion_control/axis_group/current_coordinate" | Current user frame ID |
RobotTopicType::TOOL_FRAME | "/publish/motion_control/axis_group/current_tool" | Current tool frame ID |
RobotTopicType::VELOCITY_RATIO | "/publish/motion_control/global_vel_ratio" | Global velocity ratio |
RobotTopicType::GLOBAL_ACC_RATIO | "/publish/motion_control/global_acc_ratio" | Global acceleration ratio |
RobotTopicType::CALIBRATE_STATUS | "/publish/motion_control/calibrate_status" | Axis-group calibration status |
RobotTopicType::TRAJECTORY_RECORD | "/publish/motion_control/rc_traj_records_status" | Trajectory-record status |
RobotTopicType::RUNNING_STATUS | "/publish/controller/RunningStatus" | Controller running status |
RobotTopicType::INTERPRETER_STATUS | "/publish/controller/InterpreterStatus" | Interpreter status |
RobotTopicType::ROBOT_STATUS | "/publish/controller/RobotStatus" | Overall robot status |
RobotTopicType::CTRL_STATUS | "/publish/controller/CtrlStatus" | Controller status |
RobotTopicType::SERVO_STATUS | "/publish/controller/ServoStatus" | Servo status |
RobotTopicType::USER_OP_MODE | "/publish/controller/UserOpMode" | User operation mode |
RobotTopicType::SOFT_OP_MODE | "/publish/controller/SoftOpMode" | Soft operation mode |
RobotTopicType::OPERATION_STATUS | "/publish/controller/OperationStatus" | Operation status |
RobotTopicType::PERFORMANCE_GEAR | "/publish/controller/PerformanceGear" | Performance gear |
RobotTopicType::POWER_STATUS | "/publish/controller/PowerStatus" | Power status |
RobotTopicType::POWER_ON_STATUS | "/publish/controller/power_on_status" | Power-on status |
RobotTopicType::SAFETY_ALARM | "/publish/controller/SafetyAlarm" | Safety alarm |
RobotTopicType::SAFETY_PLANE_STATUS | "/publish/controller/safetyPlaneStatus" | Safety-plane status |
RobotTopicType::TOOL_POSTURE_LIMIT_STATUS | "/publish/controller/tool_posture_limit_status" | Tool-posture-limit status |
RobotTopicType::JOINTS_RECORD | "/publish/controller/joints_record" | Joint record |
RobotTopicType::TP_PROGRAM_STATUS | "/publish/interpreter/tp_program_status" | TP program running status |
REG_TOPIC_TYPE
REG_TOPIC_TYPE is an alias of std::string . The RegTopicType namespace provides register subscription types. The typical API is SubPub::SubscribeRegister() .
| Constant | Value | Description |
|---|---|---|
RegTopicType::R | "R" | Numeric register |
RegTopicType::MR | "MR" | Motion register |
RegTopicType::SR | "SR" | String register |
RegTopicType::PR | "PR" | Pose register |
IO_TOPIC_TYPE
IO_TOPIC_TYPE is an alias of std::string . The IOTopicType namespace provides IO subscription types. The typical API is SubPub::SubscribeIo() , where each subscription item is {IO type, port number} .
| Constant | Value | Description |
|---|---|---|
IOTopicType::DI | "DI" | Digital input |
IOTopicType::DO | "DO" | Digital output |
IOTopicType::GI | "GI" | Group input |
IOTopicType::GO | "GO" | Group output |
IOTopicType::RI | "RI" | Remote-control input |
IOTopicType::RO | "RO" | Remote-control output |
IOTopicType::UI | "UI" | Dedicated input |
IOTopicType::UO | "UO" | Dedicated output |
IOTopicType::TDI | "TDI" | Wrist digital input |
IOTopicType::TDO | "TDO" | Wrist digital output |
IOTopicType::TAI | "TAI" | Wrist analog input |
IOTopicType::AI | "AI" | Analog input |
IOTopicType::AO | "AO" | Analog output |