Skip to content

Motion Command Set

Trajectory motion

Joint motionmovej

  • Input parameter
ParameterTypeDescription
movejstringjoint motion command.
jointintTarget joint angle, accuracy: 0.001°.
vintSpeed percentage coefficient, range: 0-100.
rintBlend radius percentage coefficient, range: 0-100.
trajectory_connectintOptional, indicating whether to plan the motion together with the next trajectory. 0: The motion is planned immediately, 1: It is planned together with the next trajectory. When set to 1, the trajectory will not execute immediately.

WARNING

The blend radius is valid only when trajectory_connect is 1, and is invalid when trajectory_connect is 0

  • Output parameter
ParameterTypeDescription
receive_statebooltrue: setting succeeded, false: setting failed.

You can refer to current_trajectory_state for the output parameters of the motion completion return result.

  • Code demo

Input

Execution: Joint motion with the following parameters:

6-DoF joint angle: [10.1°, 0.2°, 20.3°, 30.4°, 0.5°, 20.6°];
7-DoF joint angle: [10.1°, 0.2°, 20.3°, 30.4°, 0.5°, 20.6°, 20.6°];
Speed coefficient: 50%;
Blend radius: no blending.

6-DoF robotic arm:

json
{"command":"movej","joint":[10100,200,20300,30400,500,20600],"v":50,"r":0,"trajectory_connect":0}

7-DoF robotic arm:

json
{"command":"movej","joint":[10100,200,20300,30400,500,20600,20600],"v":50,"r":0,"trajectory_connect":0}

Output

Instruction reception succeeded:

json
{
    "command": "movej",
    "receive_state": true
}

Instruction reception failed:

json
{
    "command": "movej",
    "receive_state": false
}

Motion completed succeeded:

json
{
    "state": "current_trajectory_state",
    "trajectory_state": true,
    "device": 0,
    "trajectory_connect": 1
}

Motion completed failed:

json
{
    "state": "current_trajectory_state",
    "trajectory_state": false,
    "device": 0,
    "trajectory_connect": 1
}

WARNING

trajectory_connect: whether to connect to the next trajectory, 0: all trajectories in position, 1: connected to the next trajectory.

Linear motionmovel

  • Input parameter
ParameterTypeDescription
movelstringLinear motion execution.
poseintTarget pose, position accuracy: 0.001 mm, orientation accuracy: 0.001 rad.
vintSpeed percentage coefficient, range: 0-100.
rintBlend radius percentage coefficient, range: 0-100.
trajectory_connectintOptional, indicating whether to plan the motion together with the next trajectory. 0: The motion is planned immediately, 1: It is planned together with the next trajectory. When set to 1, the trajectory will not execute immediately.

WARNING

The MOVEL command is also applicable when the target position remains unchanged, but the orientation changes
The blend radius is valid only when trajectory_connect is 1, and is invalid when trajectory_connect is 0

  • Output parameter
ParameterTypeDescription
receive_statebooltrue: setting succeeded, false: setting failed.

You can refer to current_trajectory_state for the output parameters of the motion completion return result.

  • Code demo

Input

Execution: Linear motion with the following parameters:

Target position: x: 0.1 m, y: 0.2 m, z: 0.03 m
Target orientation: rx: 0.4 rad, ry: 0.5 rad, rz: 0.6 rad
Speed coefficient: 50%
Blend radius: no blending.

json
{"command":"movel","pose":[100000,200000,30000,400,500,600],"v":50,"r":0,"trajectory_connect":0}

Output

Instruction reception succeeded:

json
{
    "command": "movel",
    "receive_state": true
}

Instruction reception failed:

json
{
    "command": "movel",
    "receive_state": false
}

Motion completed succeeded:

json
{
    "state": "current_trajectory_state",
    "trajectory_state": true,
    "device": 0,
    "trajectory_connect": 1
}

Motion completed failed:

json
{
    "state": "current_trajectory_state",
    "trajectory_state": false,
    "device": 0,
    "trajectory_connect": 1
}

WARNING

trajectory_connect: whether to connect to the next trajectory, 0: all trajectories in position, 1: connected to the next trajectory.

Circular motionmovec

  • Input parameter
ParameterTypeDescription
movecstringCircular motion
poseobjectPose.
pose_viaintPose of via-point: position accuracy: 0.001 mm, orientation accuracy: 0.001 rad.
pose_tointTarget pose: position accuracy: 0.001 mm, orientation accuracy: 0.001 rad.
vintSpeed percentage coefficient, range: 0-100.
rintBlend radius percentage coefficient, range: 0-100.
loopintLoop count, 0 by default.
trajectory_connectintOptional, indicating whether to plan the motion together with the next trajectory. 0: The motion is planned immediately, 1: It is planned together with the next trajectory. When set to 1, the trajectory will not execute immediately.

WARNING

The blend radius is valid only when trajectory_connect is 1, and is invalid when trajectory_connect is 0.

  • Output parameter
ParameterTypeDescription
receive_statebooltrue: setting succeeded, false: setting failed.

You can refer to current_trajectory_state for the output parameters of the motion completion return result.

  • Code demo

Input

Execution: Circular motion with the following parameters:

Position of via-point: x: 0.1 m, y: 0.2 m, z: 0.03 m;
Orientation of via-point: rx: 0.4 rad, ry: 0.5 rad, rz: 0.6 rad;
Position of final point: x: 0.2 m, y: 0.3 m, z: 0.03 m;
Orientation of final point: rx: 0.4 rad, ry: 0.5 rad, rz: 0.6 rad;
Speed coefficient: 50%;
Blend radius: no blending.

json
{"command":"movec","pose":{"pose_via":[100000,200000,30000,400,500,600],"pose_to":[200000,300000,30000,400,500,600]},"v":50,"r":0,"loop":0,"trajectory_connect":0}

Output

Instruction reception succeeded:

json
{
    "command": "movec",
    "receive_state": true
}

Instruction reception failed:

json
{
    "command": "movec",
    "receive_state": false
}

Motion completed succeeded:

json
{
    "state": "current_trajectory_state",
    "trajectory_state": true,
    "device": 0,
    "trajectory_connect": 1
}

Motion completed failed:

json
{
    "state": "current_trajectory_state",
    "trajectory_state": false,
    "device": 0,
    "trajectory_connect": 1
}

WARNING

trajectory_connect: whether to connect to the next trajectory, 0: all trajectories in position, 1: connected to the next trajectory.

Joint space planning to target orientationmovej_p

Move to target pose through joint space planning.

  • Input parameter
ParameterTypeDescription
movej_pstringJoint space planning to target orientation command.
poseintTarget pose, position accuracy: 0.001 mm, orientation accuracy: 0.001 rad.
vintSpeed percentage coefficient, range: 1-100.
rintBlend radius percentage coefficient, range: 0-100.
trajectory_connectintOptional, indicating whether to plan the motion together with the next trajectory. 0: The motion is planned immediately, 1: It is planned together with the next trajectory. When set to 1, the trajectory will not execute immediately.
  • Output parameter
ParameterTypeDescription
posearrayCurrent pose, position accuracy: 0.001 mm, orientation accuracy: 0.001 rad.
jointarrayCurrent joint angle, accuracy: 0.001°.
arm_errnumberState code. If the value is 0, it indicates the system is functioning normally, and the command is executed successfully. If any other error occurs, the corresponding error code is returned, and the command is not executed.

You can refer to current_trajectory_state for the output parameters of the motion completion return result.

  • Code demo

Input

Execution: Linear motion with the following parameters:

Target position: x: 0.1 m, y: 0.2 m, z: 0.03;
Target orientation: rx: 0.4 rad, ry: 0.5 rad, rz: 0.6 rad;
Speed coefficient: 50%;
Blend radius: no blending.

json
{"command":"movej_p","pose":[100000,200000,30000,400,500,600],"v":50,"r":0,"trajectory_connect":0}

Output

Return command reception state:

json
{
    "state": "pose_state",
    "pose": [
        10,
        20,
        30,
        40,
        50,
        60
    ],
    "joint": [
        10,
        20,
        30,
        40,
        50,
        60,
        70
    ],
    "arm_err": 0
}

Motion completed succeeded:

json
{
    "state": "current_trajectory_state",
    "trajectory_state": true,
    "device": 0,
    "trajectory_connect": 1
}

Motion completed failed:

json
{
    "state": "current_trajectory_state",
    "trajectory_state": false,
    "device": 0,
    "trajectory_connect": 1
}

WARNING

trajectory_connect: whether to connect to the next trajectory, 0: all trajectories in position, 1: connected to the next trajectory.

Spline curve motionmoves

Spline curve motion is a smooth motion trajectory defined by control points, also known as nodes or key points. To achieve spline curve motion, at least three distinct data points are required to complete the reverse calculation of control points. These data points are entered sequentially via the moves command.

  • Input parameter
ParameterTypeDescription
movesstringSpline curve motion command.
poseintTarget pose, position accuracy: 0.001 mm, orientation accuracy: 0.001 rad.
vintSpeed percentage coefficient, range: 0-100.
rintBlend radius percentage coefficient, range: 0-100.
trajectory_connectintOptional, indicating whether to plan the motion together with the next trajectory. 0: The motion is planned immediately, 1: It is planned together with the next trajectory. When set to 1, the trajectory will not execute immediately.

WARNING

This motion currently does not support trajectory blending.

  • Output parameter
ParameterTypeDescription
receive_statebooltrue: setting succeeded, false: setting failed.

You can refer to current_trajectory_state for the output parameters of the motion completion return result.

  • Code demo

Input

Execution: Three-point spline curve motion with the following parameters:

Target position:
x:0.1m,y:0.2m,z:0.03m;
x:0.1m,y:0.3m,z:0.03m;
x:0.1m,y:0.4m,z:0.03m;
Target orientation: rx: 0.4 rad, ry: 0.5 rad, rz: 0.6 rad;
Speed coefficient: 50%;
Blend radius: no blending.

WARNING

The following commands should be run line by line.

json
{"command":"moves","pose":[100000,200000,30000,400,500,600],"v":50,"r":0,"trajectory_connect":1}
json
{"command":"moves","pose":[100000,300000,30000,400,500,600],"v":50,"r":0,"trajectory_connect":1}
json
{"command":"moves","pose":[100000,400000,30000,400,500,600],"v":50,"r":0,"trajectory_connect":0}

Output

Instruction reception succeeded:

json
{
    "command": "moves",
    "receive_state": true
}

Instruction reception failed:

json
{
    "command": "moves",
    "receive_state": false
}

Motion completed succeeded:

json
{
    "state": "current_trajectory_state",
    "trajectory_state": true,
    "device": 0,
    "trajectory_connect": 1
}

Motion completed failed:

json
{
    "state": "current_trajectory_state",
    "trajectory_state": false,
    "device": 0,
    "trajectory_connect": 1
}

WARNING

trajectory_connect: whether to connect to the next trajectory, 0: all trajectories in position, 1: connected to the next trajectory.

Pose pass-through movep_canfd

The target pose is passed-through to the robotic arm via CANFD, without the need of controller planning. The target pose is the numerical values of the current tool in the current work frame and tool frame.

  • Input parameter
ParameterTypeDescription
movep_canfdstringPose passed-through to CANFD. If the command is correct, the robotic arm will execute it immediately.
poseintTarget pose. Position accuracy: 0.001 mm, orientation accuracy: 0.001 rad.
followboolDriver motion follow, true: high follow, false: low follow. If high follow is used, the pass-through cycle should not exceed 10 ms.

WARNING

The pass-through effect is related to the period and the smoothness of the trajectory. The period must be stable to prevent significant fluctuations.

The high-speed Ethernet port pass-through cycle can also reach 10 ms, but the configuration must be enabled with a command before using the high-speed network port.

Additionally, Ethernet port can attain a pass-through cycle as fast as 2 ms.

When using this command, users should carefully plan the trajectory, as the smoothness of the trajectory planning determines the robotic arm's operating state. The maximum angle between frames for each joint must not exceed 10°, and the joint planning speed must not exceed 180°/s. Otherwise, the joint will not respond.

  • Output parameter
ParameterTypeDescription
posearrayCurrent pose, position accuracy: 0.001 mm, orientation accuracy: 0.001 rad.
jointarrayCurrent joint angle, accuracy: 0.001°.
arm_errnumberState code. If the value is 0, it indicates the system is functioning normally, and the command is executed successfully. If any other error occurs, the corresponding error code is returned, and the command is not executed.

WARNING

The robotic arm no longer provides return values, and the real-time state is collected via the UDP state reporting interface.

  • Code demo

Input

Execution: Target pose pass-through with the following parameters:

Target position: x: 0.1 m, y: 0.2 m, z: 0.03;
Target orientation (Euler angle): rx: 0.4 rad, ry: 0.5 rad, rz: 0.6 rad;
Target orientation (quaternion): w: 0.4, x: 0.5, y: 0.6, z: 0.7.

  • Code demo

Input

Pose pass-through via Euler angles:

json
{"command":"movep_canfd","pose":[100000,200000,30000,400,500,600],"follow":true}

Pose pass-through via quaternion:

json
{"command":"movep_canfd","pose_quat":[100000,200000,30000,400000,500000,600000,700000],"follow":true}

Output

Current 6-DoF pose: position accuracy: 0.001 mm, orientation accuracy: 0.001 rad;
joint: current joint angle, accuracy: 0.001°;

json
{
    "state": "pose_state",
    "pose": [
        10,
        20,
        30,
        40,
        50,
        60
    ],
    "joint": [
        10,
        20,
        30,
        40,
        50,
        60
    ],
    "arm_err": 0
}

Current 7-DoF pose: position accuracy: 0.001 mm, orientation accuracy: 0.001 rad;
joint: current joint angle, accuracy: 0.001°;

json
{
    "state": "pose_state",
    "pose": [
        10,
        20,
        30,
        40,
        50,
        60
    ],
    "joint": [
        10,
        20,
        30,
        40,
        50,
        60,
        70
    ],
    "arm_err": 0
}

Angle pass-through movej_canfd

The angle is passed-through to the robotic arm via CANFD, without the need of controller planning.

  • Input parameter
ParameterTypeDescription
movej_canfdstringAngle passed-through to CANFD. If the command is correct, the robotic arm will execute it immediately.
jointintJoint angle, accuracy: 0.001°.
followboolDriver motion follow, true: high follow, false: low follow. If high follow is used, the pass-through cycle should not exceed 10 ms.
expandintOptional field for sending. If a universal extension axis exists and pass-through is needed, this parameter can be used for pass-through.

WARNING

The pass-through effect is related to the period and the smoothness of the trajectory. The period must be stable to prevent significant fluctuations.

The high-speed Ethernet port pass-through cycle can also reach 10 ms, but the configuration must be enabled with a command before using the high-speed network port.

Additionally, the Ethernet port can attain a pass-through cycle as fast as 2 ms.

When using this command, users should carefully plan the trajectory, as the smoothness of the trajectory planning determines the robotic arm's operating state. The maximum angle between frames for each joint must not exceed 10°, and the joint planning speed must not exceed 180°/s. Otherwise, the joint will not respond.

  • Output parameter
ParameterTypeDescription
arm_errnumberState code. If the value is 0, it indicates the system is functioning normally, and the command is executed successfully. If any other error occurs, the corresponding error code is returned, and the command is not executed
  • Code demo

Input

Execution: Target angle pass-through to the robotic arm via CANFD with the following parameters:

Target joint angle of the 6-DoF robotic arm: [1°, 0°, 20°, 30°, 0°, 20°], follow indicates the motion following effect of the driver, true means high following and false means low following;
Target joint angle of the 7-DoF robotic arm: [1°, 0°, 20°, 30°, 0°, 20°, 20°], follow indicates the motion following effect of the driver, true means high following and false means low following.

6-DoF robotic arm:

json
{"command":"movej_canfd","joint":[1000,0,20000,30000,0,20000],"follow":true,"expand":1000}

7-DoF robotic arm:

json
{"command":"movej_canfd","joint":[1000,0,20000,30000,0,20000,20000],"follow":true,"expand":1000}

Output

6-DoF robotic arm:

json
{
    "state": "joint_state",
    "joint": [
        10,
        20,
        30,
        40,
        50,
        60
    ],
    "arm_err": 0
}

7-DoF robotic arm:

json
{
    "state": "joint_state",
    "joint": [
        10,
        20,
        30,
        40,
        50,
        60,
        70
    ],
    "arm_err": 0
}

Motion control

Set quick stopset_arm_stop

Set a quick stop.

  • Input parameter
ParameterTypeDescription
set_arm_stopstringOrientation step command.
  • Output parameter
ParameterTypeDescription
arm_stopbooltrue: setting succeeded; false: setting failed.
  • Code demo

Input

Execution: Set quick stop.

json
{ "command": "set_arm_stop" }

Output

json
{
    "command": "set_arm_stop",
    "arm_stop": true
}

Set slow stopset_arm_slow_stop

Stop on the currently running trajectory.

  • Input parameter
ParameterTypeDescription
set_arm_slow_stopstringSlow stop command.
  • Output parameter
ParameterTypeDescription
arm_slow_stopbooltrue: setting succeeded; false: setting failed.
  • Code demo

Input

Execution: Set slow stop.

json
{ "command": "set_arm_slow_stop" }

Output

json
{
    "command": "set_arm_slow_stop",
    "arm_slow_stop": true
}

Set pauseset_arm_pause

Pause on the trajectory with a recoverable trajectory.

  • Input parameter
ParameterTypeDescription
set_arm_pausestringPause command.
  • Output parameter
ParameterTypeDescription
arm_pausebooltrue: setting succeeded; false: setting failed.
  • Code demo

Input

Execution: Set pause.

json
{ "command": "set_arm_pause" }

Output

json
{
    "command": "set_arm_pause",
    "arm_pause": true
}

Resume after pauseset_arm_continue

  • Input parameter
ParameterTypeDescription
set_arm_continuestringResumption after pause command.
  • Output parameter
ParameterTypeDescription
arm_continuebooltrue: setting succeeded; false: setting failed.
  • Code demo

Input

Execution: Resume after pause.

json
{ "command": "set_arm_continue" }

Output

json
{
    "command": "set_arm_continue",
    "arm_continue": true
}

Delete current trajectoryset_delete_current_trajectory

Delete the current trajectory. This command must be executed after pausing!

  • Input parameter
ParameterTypeDescription
set_delete_current_trajectorystringCurrent trajectory deletion command.
  • Output parameter
ParameterTypeDescription
delete_current_trajectorybooltrue: setting succeeded; false: setting failed.
  • Code demo

Input

Execution: Delete current trajectory.

json
{ "command": "set_delete_current_trajectory" }

Output

json
{
    "command": "set_delete_current_trajectory",
    "delete_current_trajectory": true
}

Delete all trajectoriesset_arm_delete_trajectory

Delete all trajectories. This command must be executed after pausing!

  • Input parameter
ParameterTypeDescription
set_arm_delete_trajectorystringAll trajectories' deletion command.
  • Output parameter
ParameterTypeDescription
arm_delete_trajectorybooltrue: setting succeeded; false: setting failed.
  • Code demo

Input

Execution: Delete all trajectories.

json
{ "command": "set_arm_delete_trajectory" }

Output

json
{
    "command": "set_arm_delete_trajectory",
    "arm_delete_trajectory": true
}

Get the current planning typeget_arm_current_trajectory

  • Input parameter
ParameterTypeDescription
get_arm_current_trajectorystringCurrent planning type getting command.
  • Output parameter
ParameterTypeDescription
arm_current_trajectorystringReturn the currently running trajectory.
  • Code demo

Input

Execution: Get the current planning type.

json
{ "command": "get_arm_current_trajectory" }

Output

Currently running joint planning, with the array containing the current joint angles, accuracy: 0.001°.

6-DoF robotic arm:

json
{
    "state": "arm_current_trajectory",
    "type": "movej",
    "data": [
        0,
        0,
        0,
        0,
        0,
        0
    ]
}

7-DoF robotic arm:

json
{
    "state": "arm_current_trajectory",
    "type": "movej",
    "data": [
        0,
        0,
        0,
        0,
        0,
        0,
        0
    ]
}

Currently running linear planning, with the array containing the current end effector pose, position accuracy:0.001 mm, orientation accuracy: 0.001 rad.

json
{"state":"arm_current_trajectory","type":"movel","data":[0,0,0,0,0,0]}

Currently running circular planning, with the array containing the current end effector pose, position accuracy:0.001 mm, orientation accuracy: 0.001 rad.

json
{
    "state": "arm_current_trajectory",
    "type": "movel",
    "data": [
        0,
        0,
        0,
        0,
        0,
        0
    ]
}

No active planning, with the array containing the current joint angles, accuracy: 0.001°.

6-DoF robotic arm:

json
{
    "state": "arm_current_trajectory",
    "type": "none",
    "data": [
        0,
        0,
        0,
        0,
        0,
        0
    ]
}

7-DoF robotic arm:

json
{
    "state": "arm_current_trajectory",
    "type": "none",
    "data": [
        0,
        0,
        0,
        0,
        0,
        0,
        0
    ]
}

Trajectory completion return flagcurrent_trajectory_state

The trajectory is the current trajectory.

  • Output parameter
ParameterTypeDescription
current_trajectory_statestringCurrent trajectory completion return flag.
trajectory_statebooltrue: motion completed succeeded; false: motion completed failed.
deviceint0: joint, 1: gripper, 2: dexterous hand, 3: lift mechanism, 4: expansion joint, others: reserved.
trajectory_connectnumWhether to connect to the next trajectory, 0: all trajectories in position, 1: connected to the next trajectory.

Code demo

Execution: Current trajectory reached the target.

json
{"state":"current_trajectory_state","trajectory_state":true,"device":0,"trajectory_connect": 1}

Step motion

Joint stepset_joint_step

Control the step motion of a specific joint of the robotic arm.

  • Input parameter
ParameterTypeDescription
set_joint_stepstringJoint step command.
joint_stepint(1) Step joint number; (2) Joint step angle, unit: °, accuracy: 0.001°.
vintSpeed percentage coefficient, range: 0-10.
  • Output parameter
ParameterTypeDescription
receive_statebooltrue: setting succeeded, false: setting failed.

You can refer to current_trajectory_state for the output parameters of the motion completion return result.

  • Code demo

Input

Execution: Joint step, joint 1 steps backward by 10° at a speed of 30%.

json
{ "command": "set_joint_step", "joint_step": [1, -10000], "v": 30 }

Output

Instruction reception succeeded:

json
{
    "command": "set_joint_step",
    "receive_state": true
}

Instruction reception failed:

json
{
    "command": "set_joint_step",
    "receive_state": true
}

Motion completed succeeded:

json
{
    "state": "current_trajectory_state",
    "trajectory_state": true,
    "device": 0,
    "trajectory_connect": 1
}

Motion completed failed:

json
{
    "state": "current_trajectory_state",
    "trajectory_state": false,
    "device": 0,
    "trajectory_connect": 1
}

WARNING

trajectory_connect: whether to connect to the next trajectory, 0: all trajectories in position, 1: connected to the next trajectory

Position stepset_pos_step

Control the robotic arm to perform linear step motion along the x, y, and z axes.

  • Input parameter
ParameterTypeDescription
set_pos_stepstringPosition step command.
step_typestringStep type: x_step: X-axis direction, y_step: Y-axis direction, z_step: Z-axis direction.
vintSpeed percentage coefficient, range: 0-100.
stepintStep distance unit: m, accuracy: 0.001 mm, equivalent to 0.000001 m.
  • Output parameter
ParameterTypeDescription
receive_statebooltrue: setting succeeded; false: setting failed.

You can refer to current_trajectory_state for the output parameters of the motion completion return result.

  • Code demo

Input

Execution: Position step, step 0.5 m backward along the x-axis at a speed of 30%.

json
{"command":"set_pos_step","step_type":"x_step","step":-500000,"v":30}

Output

Instruction reception succeeded:

json
{
    "command": "set_pos_step",
    "receive_state": true
}

Instruction reception failed:

json
{
    "command": "set_pos_step",
    "receive_state": false
}

Motion completed succeeded:

json
{
    "state": "current_trajectory_state",
    "trajectory_state": true,
    "device": 0,
    "trajectory_connect": 1
}

Motion completed failed:

json
{
    "state": "current_trajectory_state",
    "trajectory_state": false,
    "device": 0,
    "trajectory_connect": 1
}

WARNING

trajectory_connect: whether to connect to the next trajectory, 0: all trajectories in position, 1: connected to the next trajectory

Orientation stepset_ort_step

Control the robotic arm to perform rotation step motion along the x, y, and z axes.

  • Input parameter
ParameterTypeDescription
set_ort_stepstringOrientation step command.
step_typestringStep direction: rx_step: rotation around the X-axis, ry_step: rotation around the Y-axis, rz_step: rotation around the Z-axis.
vintSpeed percentage coefficient, range: 0-100.
stepintStep angle: unit: rad, accuracy: 0.001 rad.
  • Output parameter
ParameterTypeDescription
receive_statebooltrue: setting succeeded, false: setting failed.

You can refer to current_trajectory_state for the output parameters of the motion completion return result.

  • Code demo

Input

Execution: Orientation step, rotate 0.5 rad backward around the x-axis at a speed of 30%.

json
{"command":"set_ort_step","step_type":"rx_step","step":-500,"v":30}

Output

Instruction reception succeeded:

json
{
    "command": "set_ort_step",
    "receive_state": true
}

Instruction reception failed:

json
{
    "command": "set_ort_step",
    "receive_state":  false
}

Motion completed succeeded:

json
{
    "state": "current_trajectory_state",
    "trajectory_state": true,
    "device": 0,
    "trajectory_connect": 1
}

Motion completed failed:

json
{
    "state": "current_trajectory_state",
    "trajectory_state": false,
    "device": 0,
    "trajectory_connect": 1
}

WARNING

trajectory_connect: whether to connect to the next trajectory, 0: all trajectories in position, 1: connected to the next trajectory

Teaching motion

Joint teachingset_joint_teach

  • Input parameter
ParameterTypeDescription
set_joint_teachstringJoint step command.
teach_jointintJoint number.
directionstringDirection, "pos": positive direction, “neg”: negative direction.
vintSpeed coefficient
  • Output parameter
ParameterTypeDescription
joint_teachbooltrue: setting succeeded; false: setting failed.
  • Code demo

Input

Execution: Joint 1 teaching, positive direction at a speed of 50%.

json
{"command":"set_joint_teach","teach_joint":1,"direction":"pos","v":50}

Output

json
{
    "command": "set_joint_teach",
    "joint_teach": true
}

Position teachingset_pos_teach

  • Input parameter
ParameterTypeDescription
set_pos_teachstringPosition teaching command.
teach_typestringCoordinate axis, "x", "y", "z".
directionstringDirection, "pos": positive direction, “neg”: negative direction.
vintSpeed coefficient
  • Output parameter
ParameterTypeDescription
pos_teachbooltrue: setting succeeded; false: setting failed.
  • Code demo

Input

Execution: Position teaching, x-axis negative direction at a speed of 50%.

json
{"command":"set_pos_teach","teach_type":"x","direction":"neg","v":50}

Output

json
{
    "command": "set_pos_teach",
    "pos_teach": true
}

Orientation teachingset_ort_teach

  • Input parameter
ParameterTypeDescription
set_ort_teachstringOrientation teaching command.
teach_typestringRotation axis, "rx", "ry", "rz".
directionstringDirection, "pos": positive direction, “neg”: negative direction.
vintSpeed coefficient
  • Output parameter
ParameterTypeDescription
ort_teachbooltrue: setting succeeded; false: setting failed.
  • Code demo

  • Output parameter

ParameterTypeDescription
stop_teachbooltrue: setting succeeded; false: setting failed.

Input

Execution: Pose teaching, rx-axis negative direction at a speed of 50%.

json
{"command":"set_ort_teach","teach_type":"rx","direction":"neg","v":50}

Output

json
{
    "command": "set_ort_teach",
    "ort_teach": true
}

Stop teachingset_stop_teach

  • Input parameter
ParameterTypeDescription
set_stop_teachstringTeaching stop command.
  • Code demo

Input

Execution: Stop teaching.

json
{ "command": "set_stop_teach" }

Output

json
{
    "command": "set_stop_teach",
    "stop_teach": true
}

Set teaching reference frameset_teach_frame

  • Input parameter
ParameterTypeDescription
set_teach_framestringTeaching reference frame setting command.
frame_typenumber0: work frame, 1: tool frame.
  • Output parameter
ParameterTypeDescription
set_statebooltrue: setting succeeded, false: setting failed.
  • Code demo

Input

Execution: Set the teaching reference frame to the work frame.

json
{"command":"set_teach_frame","frame_type":0}

Output

json
{
    "command": "set_teach_frame",
    "set_state": true
}

Get the teaching reference frameget_teach_frame

  • Input parameter
ParameterTypeDescription
get_teach_framestringTeaching reference frame acquisition command.
  • Output parameter
ParameterTypeDescription
frame_typenumber0: work frame, 1: tool frame.
  • Code demo

Input

Execution: Get the teaching reference frame.

json
{ "command": "get_teach_frame" }

Output

json
{
    "command": "get_teach_frame",
    "frame_type": 0
}