TRON 2 DOCS
Products/TRON 2/SDK · high-level control
TRON 2 · DOCUMENTATION

Arms · motion & servo

Check scope below

3.6 Dual-Arm Configuration Protocol Interface Definitions

3.6.1 MoveJ Interface Description

3.6.1.1 Request: request_movej

Note: when moveJ is called, each joint angle is checked against its limit. If a limit is exceeded, an over-limit error is reported and this moveJ call is not executed.

moveJ joint limits are ordered from the upper to lower joints of the left arm, then the upper to lower joints of the right arm, unit: rad. Upper limit: [2.6005, 3.1940, 1.4835, 0.2618, 1.3963, 0.7854, 1.5708, 2.6005, 0.2618, 3.6652, 0.2618, 1.7453, 0.7854, 1.5708] Lower limit: [-3.1416, -0.2618, -3.6652, -2.6180, -1.7453, -0.7854, -1.5708, -3.1416, -3.1940, -1.4835, -2.6180, -1.3963, -0.7854, -1.5708]

{
  "accid": "DACH_TRON2A_001", // robot serial number; replace it with your robot's serial number
  "title": "request_movej",
  "timestamp": 1672373633989,
  "guid": "746d937cd8094f6a98c9577aaf213d98",
  "data": {
    "time": 2, // move to the specified position in 2 seconds
    "joint": []  //14 joint values, unit: rad
  }
}

3.6.1.2 Response: response_movej

{
  "accid": "DACH_TRON2A_001",
  "title": "response_movej",
  "timestamp": 1672373633989,
  "guid": "746d937cd8094f6a98c9577aaf213d98",
  "data": {
    "result": "success"  // success: success, fail_invalid_cmd:invalid command (missing field)
  }
}

3.6.1.3 Example

{
    "accid": "DACH_TRON2A_026",
    "title": "request_movej",
    "timestamp": 1672373633989,
    "guid": "746d937cd8094f6a98c9577aaf213d98",
    "data": {
        "time": 5,
        "joint": [0,0,0,-1.6,0,0,0,0,0,0,-1.6,0,0,0]
    }
}

3.6.2 MoveH Interface Description

This interface controls the head's two degrees of freedom.

Upper limit: [1.04 ,1.57]

Lower limit: [-0.78, -1.57]

3.6.2.1 Request: request_moveh

{
    "accid": "DACH_TRON2A_026",
    "title": "request_moveh",
    "timestamp": 1672373633989,
    "guid": "746d937cd8094f6a98c9577aaf213d98",
    "data": {
        "time": 5,
        "joint": [0.5,0.5] //pitch,yaw
    }
}

3.6.2.2 Response: response_moveh

{
  "accid": "DACH_TRON2A_001",
  "title": "response_moveh",
  "timestamp": 1672373633989,
  "guid": "746d937cd8094f6a98c9577aaf213d98",
  "data": {
    "result": "success"  // success: success, fail_invalid_cmd:invalid command (missing field)
  }
}

3.6.3 MoveP Interface Description

3.6.3.1 Request: request_movep

The reference coordinate system is as follows. The coordinate origin is located at the center of the lower plane of the base, and the arm end-effector reference is located at the center of the last joint of the arm. Product manual illustration

Note: when moveP is called, the end-effector positions of the left and right arms are checked to see whether they are within the reachable range. If a limit is exceeded, an over-limit error is reported and this call is not executed.

moveP joint limits (ordered as x_min, x_max, y_min, y_max, z_min, z_max, unit: m) Left arm: [[0.250, 0.732], [-0.213, 0.900], [-0.673, 0.5]] Right arm: [[0.250, 0.732], [-0.900, 0.213], [-0.673, 0.5]]

{
  "accid": "DACH_TRON2A_001", // robot serial number; replace it with your robot's serial number
  "title": "request_movep",
  "timestamp": 1672373633989,
  "guid": "746d937cd8094f6a98c9577aaf213d98",
  "data": {
    "time": 1, //move to this position in 1 second
    "pos": []  //[LEFT_POS(3), wxyzPOSE(4) + RIGHT_POS(3), wxyzPOSE(4)]
  }
}

3.6.3.2 Response: response_movep

{
  "accid": "DACH_TRON2A_001",
  "title": "response_movep",
  "timestamp": 1672373633989,
  "guid": "746d937cd8094f6a98c9577aaf213d98",
  "data": {
    "result": "success"  // success: success, fail_invalid_cmd:invalid command (missing field)
  }
}

3.6.3.3 Example



{
  "accid": "DACH_TRON2A_129",
  "title": "request_movep",
  "timestamp": 1672373633989,
  "guid": "746d937cd8094f6a98c9577aaf213d98",
  "data": {
    "time": 5,
    "pos": [  0.5,  0.2, -0.3, 0.7, 0,  -0.7,  0,  0.5,-0.2, -0.3,  0.7,   0,  -0.7,  0  ]
  }
}

3.6.4 ServoJ Control Command

3.6.4.1 Request: request_servoj

It is recommended to control the robot arm motion in a real-time system at a control frequency of 300 Hz to ensure control performance and stability.

{
  "accid": "DACH_TRON2A_001", // robot serial number; modify it to your robot serial number; 
  "title": "request_servoj",
  "timestamp": 1672373633989,
  "guid": "746d937cd8094f6a98c9577aaf213d98",
  "data": {  
    "filter_ratio": 1.0,//range is 0 to 1; 1 means fully trusting the ground truth (no filtering)
    "q": [ ],  // positions of all joints; fill in 16-dimensional data; 
  }
}

// Please replace the above parameters with actual parameters

3.6.4.2 Response: None

3.6.4.3 Notification Push: notify_servoJ

When a ServoJ control operation fails, the server sends this notification to inform the client of the reason.

{
  "accid": "WF_TRON2A_001",
  "title": "notify_servoJ",
  "timestamp": 1672373633989,
  "guid": "746d937cd8094f6a98c9577aaf213d98",
  "data": {
    "result": "fail_invalid_cmd"  // fail_invalid_cmd: invalid command, fail_motor: motor error
  }
}

3.6.5 ServoP Control Command

3.6.5.1 Request: request_servop

Continuously send the position data for the left and right arms.It is recommended to control the robot arm motion in a real-time system at a control frequency of 300 Hz to ensure control performance and stability.

{
 "accid": "DACH_TRON2A_026", // 机器人序列号,注意修为您机器人的序列号;
 "title": "request_servop",
 "timestamp": 1672373633989,
 "guid": "746d937cd8094f6a98c9577aaf213d98",
 "data": {           }     //[LEFT_POS(3)、wxyzPOSE(4) + RIGHT_POS(3)、wxyzPOSE(4)]
}

3.6.5.2 Response: None

3.6.5.3 Notification Push: notify_servop

NEXTArms · state, compliance & teaching