Skip to content

UDP Active Reporting Command Set

UDP active reporting

UDP robotic arm state active reporting interface

The Gen 3 robotic arm provides the UDP robotic arm state active reporting interface. When using the interface, it must be in the same LAN as the robotic arm. By setting the target IP address of the configured active reporting interface, or establishing TCP connection between the interface and the robotic arm, the robotic arm will actively report the robotic arm state data periodically. The default target port is 8089 (configurable), and the data can be received by listening to the 8089 port of the local computer through the UDP protocol. The data period is configurable, which is 5 ms by default.

  • Input parameter

The size of the joint-related array is consistent with the number of joints. For example, if there are 7 axes, the array size of the joint information fields, such as joint_status, is 7. Its parameters are as follows:

ParameterTypeDescription
statestringrealtime_arm_joint_state real-time robotic arm state reporting.
arm_current_statusstring"idle": enabled but in idle
"move_L": move L state
"move_J": in move J state
"move_C": move C state
"move_S": move S state
"move_through_joint": angle pass-through state
"move_through_pose": pose pass-through state
"move_through_force_pose": force control pass-through state
"move_through_current": current loop pass-through state
"stop": emergency stop state
"slow_stop": slow stop state
"pause": pause state
"current_drag": current loop drag state
"sensor_drag": 6-DoF force drag state
"tech_demonstration": Teaching state
errintSystem error code.
joint_statusintCurrent joint state.
joint_currentintCurrent joint current, with an accuracy of 0.001 mA.
joint_en_flagintCurrent joint enabling state, 1: enable, 0: disable.
joint_err_codeintCurrent joint error code.
joint_positionintCurrent joint angle, with an accuracy of 0.001°.
joint_temperatureList[float]Current joint temperature, with an accuracy of 0.001°C.
joint_voltageintCurrent joint voltage, with an accuracy of 0.001 V.
joint_speedintCurrent joint speed, with an accuracy of 0.02 rpm.
waypointobjectCurrent waypoint information.
positionintCurrent waypoint position, with an accuracy of 0.000001 M.
eulerobjectCurrent waypoint Euler angle, with an accuracy of 0.001 rad.
quatobjectCurrent waypoint quaternion, with an accuracy of 0.000001.
six_force_sensorobject6-DoF force data (available only in 6-DoF force version).
one_force_sensorobject1-DoF force data (available only in 1-DoF force version).
forceobjectOriginal data of current force sensor, 0.001 N or 0.001 Nm.
zero_forceobjectExternal force data of current force sensor system, 0.001 N or 0.001 Nm.
coordinateintFrame for system external force data, 0: sensor frame, 1: current work frame, 2: current tool frame.
lift_stateintLifting joint data. Including:
height: current lifting mechanism height, unit: mm, accuracy: 1 mm;
pos: current angle, accuracy: 0.001°;
current: current lifting driver current, unit: mA, accuracy: 1 mA;
err_flag: lifting driver error code. For the error code type, refer to the joint error code;
en_flag: current joint enabling state, 1: enable, 0: disable.
expand_stateintExpansion joint-related data. Including:
pos: current angle, accuracy: 0.001°;
current: current lifting driver current, unit: mA, accuracy: 1 mA;
err_flag: lifting driver error code. For the error code type, refer to the joint error code; en_flag: current joint enabling state, 1: enable, 0: disable.
mode: current lifting state, 0: idle, 1: forward speed motion, 2: forward position motion, 3: backward speed motion, 4: backward position motion.
joint_id: Expansion joint ID.
aloha_stateintaloha master arm state. Including:
io1_state: IO1 state (photoelectrically detected with handle), 0: not triggered after pressing the key, 1:triggered after pressing the key;
io2_state: IO2 state (detected by pressing the handle key), 0: not triggered after pressing the key, 1:triggered after pressing the key.
handintDexterous hand state:
hand_pos, indicating the position of dexterous hand;
hand_angle, indicating the angle of dexterous hand;
hand_force, indicating the DoF force of dexterous hand, expressed in mN;
hand_state, indicating that DoF state of dexterous hand, with the state meanings defined by the dexterous hand manufacturer;
hand_err, indicating a dexterous hand system error, with the error meanings defined by the dexterous hand manufacturer. The specific meanings are as defined in the following table.
  • Definition of dexterous hand state

OYMotion:

Name of stateState codeDescription
STATUS_OPENING0Be opening
STATUS_CLOSING1Be closing
STATUS_POS_REACHED2Position reached
STATUS_OVER_CURRENT3Overcurrent protection
STATUS_POS_REACHED2Force reached
STATUS_STUCK5Motor stuck

INSPIRE-ROBOTS

State codeDescription
0Be opening
1Be closing
2Position reached
3Force reached
5Overcurrent protection
6Electric cylinder stuck
7Electric cylinder fault
  • Code demo

6-DoF UDP data reporting.

json
{"aloha_state":{"io1_state":0,"io2_state":0},"arm_current_status":"idle","err":0,"joint_status":{"joint_current":[43000,2085000,1020000,1000,257000,-57000],"joint_en_flag":[1,1,1,1,1,1],"joint_err_code":[0,0,0,0,0,0],"joint_position":[13434,-69764,2926,-4742,-45721,-223],"joint_temperature":[33000,35000,37000,36000,37000,39000],"joint_voltage":[22000,22000,22000,22000,22000,22000]},"six_force_sensor":{"force":[-13000,3799,-22393,-216,-408,481],"zero_force":[17476,10415,30827,5,2,2],"coordinate":1},"state":"realtime_arm_joint_state","waypoint":{"euler":[2935,2935,2935],"position":[578568,127709,345856],"quat":[-23405,824245,106348,555663]}}

7-DoF UDP data reporting.

json
{"aloha_state":{"io1_state":0,"io2_state":0},"arm_current_status":"idle","err":0,"joint_status":{"joint_current":[43000,2085000,1020000,1000,257000,-57000,1000],"joint_en_flag":[1,1,1,1,1,1,1],"joint_err_code":[0,0,0,0,0,0,0],"joint_position":[13434,-69764,2926,-4742,-45721,-223,-223],"joint_temperature":[33000,35000,37000,36000,37000,39000,37000],"joint_voltage":[22000,22000,22000,22000,22000,22000,22000]},"six_force_sensor":{"force":[-13000,3799,-22393,-216,-408,481],"zero_force":[17476,10415,30827,5,2,2],"coordinate":1},"state":"realtime_arm_joint_state","waypoint":{"euler":[2935,2935,2935],"position":[578568,127709,345856],"quat":[-23405,824245,106348,555663]}}

Query the UDP robotic arm state active reporting configuration get_realtime_push

  • Input parameter
ParameterTypeDescription
get_realtime_pushstringQuery the UDP robotic arm state active reporting configuration
  • Output parameter
ParameterTypeDescription
portintSet the port No. of broadcast.
cycleintSet the broadcast cycle, unit: 5 ms.
enableboolSet the enabling state.
force_coordinateintFrame for external force data:
0: sensor frame
1: current work frame
2: current tool frame (supported by the force sensor version).
ipstringSelf-defined reporting target IP address.
customintIncluding
joint_speed: joint speed;
lift_state: information of lifting joint;
expand_state: information of expansion joint;
arm_current_status: current joint state
aloha_state: aloha master arm state
hand: dexterous hand state.
  • Code demo

Input

Used to query the UDP robotic arm state active reporting configuration.

json
{"command":"get_realtime_push"}

Output

json
{
    "command": "get_realtime_push",
    "custom": {
        "aloha_state": false,
        "expand_state": true,
        "joint_speed": true,
        "lift_state": true,
        "arm_current_status": true
    },
    "cycle": 100,
    "enable": true,
    "force_coordinate": 2,
    "ip": "192.168.1.10",
    "port": 8099
}

Set the UDP robotic arm state active reporting configuration set_realtime_push

  • Input parameter
ParameterTypeDescription
set_realtime_pushstringSet the UDP robotic arm state active reporting configuration.
portintSet the port No. of broadcast.
cycleintSet the broadcast cycle, unit: 5 ms. For example, 1 means 5 ms, 2 means 10 ms.
enableboolSet the enabling state.
force_coordinateintFrame for external force data, 0: sensor frame; 1: current work frame; 2: current tool frame (supported by the force sensor version).
ipstringSelf-defined reporting target IP address.
customintCustomized items, the following options are not mandatory, if not set, they will remain the state before setting. Including:
joint_speed: joint speed;
lift_state: information of lifting joint;
expand_state: information of expansion joint (select one from lifting joint and expansion joint, with the lifting joint displayed first);
arm_current_status: current robotic arm state;
aloha_state: aloha master arm state;
hand: dexterous hand state

WARNING

For the hand field, the following data have real meanings only when the hand_follow_angle and hand_follow_pos interfaces are called, with the sequence of bending of the thumb, and rotation of the index finger, middle finger, ring finger, little finger and thumb.

  1. hand_pos, indicating the position of dexterous hand
  2. hand_angle, indicating the angle of dexterous hand
  3. hand_force, indicating the DoF force of dexterous hand, unit: mN
  4. hand_state, indicating the DoF state of dexterous hand, with the state meanings defined by the dexterous hand manufacturer
  5. hand_err, indicating the dexterous hand system error, with the error meanings defined by the dexterous hand manufacturer. For example, the INSPIRE-ROBOTS state codes are as follows: 1: error, 0: no error
  • Output parameter
ParameterTypeDescription
set_realtime_pushbooltrue: success, false: failure.
  • Code demo

Input

Used to set the UDP robotic arm state active reporting configuration

json
{"command":"set_realtime_push","cycle":100,"enable":true,"port":8099,"force_coordinate":2,"ip":"192.168.1.223","custom":{"aloha_state":true,"joint_speed":true,"lift_state":true,"expand_state":true,"arm_current_status":true,"hand":true}}

Return demo:

json
{
    "command": "set_realtime_push",
    "state": true
}