Arms · state, compliance & teaching
Pose and joint state, compliance, payload identification and drag teaching. Chinese-only interfaces are marked below.
3.6.6 Get Dual-Arm End-Effector Poses
3.6.6.1 Request: request_get_move_pose
Use this interface to obtain the end-effector poses of both robot arms.
{
"accid": "DACH_TRON2A_036", // robot serial number; modify it to your robot serial number;
"title": "request_get_move_pose",
"timestamp": 1672373633989,
"guid": "746d937cd8094f6a98c9577aaf213d98",
"data": {}
}
3.6.6.2 Response: response_get_move_pose
After receiving the request, return information about the current poses of both arms.
{
"accid": "WF_TRON2A_001",
"title": "response_get_move_pose",
"timestamp": 1672373633989,
"guid": "746d937cd8094f6a98c9577aaf213d98",
"data": {
"timestamp": 1672373633989, // data timestamp in milliseconds
"left_position": [0.0, 0.0, 0.0], // position of the left-arm end effector, in meters, ordered as x, y, z
"left_quat": [1.0, 0.0, 0.0, 0.0], // orientation of the left-arm end effector, represented by a quaternion, ordered as w, x, y, z
"right_position": [0.0, 0.0, 0.0], // position of the right-arm end effector, in meters, ordered as x, y, z
"right_quat": [1.0, 0.0, 0.0, 0.0], // orientation of the right-arm end effector, represented by a quaternion, ordered as w, x, y, z
"result": "success" // fail_not_data
}
}
3.6.7 Get Robot Joint State
3.6.7.1 Request: request_get_joint_state
This request is used to get the state of each robot joint.
{
"accid": "DACH_TRON2A_001", // robot serial number; replace it with your robot's serial number
"title": "request_get_joint_state",
"timestamp": 1672373633989,
"guid": "746d937cd8094f6a98c9577aaf213d98",
"data": {}
}
3.6.7.2 Response: response_get_joint_state
After receiving the request, return the current state of each robot joint.
{
"accid": "DACH_TRON2A_001",
"title": "response_get_joint_state",
"timestamp": 1672373633989,
"guid": "746d937cd8094f6a98c9577aaf213d98",
"data": {
"names": [], // names of all joints
"q": [], // positions of all joints
"dq": [], // velocities of all joints
"tau": [], // torques of all joints
"result": "success" // fail_not_data
}
}
3.6.7.3 Notification Push: None
Chinese interface definitions · translation pending
3.6.8 柔顺控制
3.6.8.1 开启/关闭柔顺控制
请求:request_set_compliant_enable
{
"accid": "DACH_TRON2A_001",
"title": "request_set_compliant_enable",
"timestamp": 1762771300000,
"guid": "746d937cd8094f6a98c9577aaf213d98",
"data": {
"enable": true
}
}
响应:response_set_compliant_enable
{
"accid": "DACH_TRON2A_001",
"title": "response_set_compliant_enable",
"timestamp": 1762771300000,
"guid": "746d937cd8094f6a98c9577aaf213d98",
"data": {
"result": "success",
"enable": true
}
}
3.6.8.2 查询柔顺控制开关
请求:request_get_compliant_enable
{
"accid": "DACH_TRON2A_001",
"title": "request_get_compliant_enable",
"timestamp": 1762771300000,
"guid": "746d937cd8094f6a98c9577aaf213d98",
"data": {}
}
响应:response_get_compliant_enable
{
"accid": "DACH_TRON2A_001",
"title": "response_get_compliant_enable",
"timestamp": 1762771300000,
"guid": "746d937cd8094f6a98c9577aaf213d98",
"data": {
"result": "success",
"enable": false
}
}
3.6.8.3 设置柔顺控制参数
请求:request_set_compliant_param
{
"accid": "DACH_TRON2A_001",
"title": "request_set_compliant_param",
"timestamp": 1762771300000,
"guid": "746d937cd8094f6a98c9577aaf213d98",
"data": {
"title": "joint_impedance_kp", //joint_impedance_kp/cart_impedance_kp
"data": [ /* joint 14 项 / cart 12 项 */ ]
}
}
响应:response_set_compliant_param
{
"accid": "DACH_TRON2A_001",
"title": "response_set_compliant_param",
"timestamp": 1762771300000,
"guid": "746d937cd8094f6a98c9577aaf213d98",
"data": {
"result": "success",
"title": "joint_impedance_kp"
}
}
3.6.8.4 查询柔顺控制参数
请求:request_get_compliant_param
{
"accid": "DACH_TRON2A_001",
"title": "request_get_compliant_param",
"timestamp": 1762771300000,
"guid": "746d937cd8094f6a98c9577aaf213d98",
"data": {
"title": "joint_toque" // 可选;缺省时同时返回 joint_toque(14) 与 cart_force(12)。
}
}
响应:response_get_compliant_param
{
"accid": "DACH_TRON2A_001",
"title": "response_get_compliant_param",
"timestamp": 1762771300000,
"guid": "746d937cd8094f6a98c9577aaf213d98",
"data": {
"result": "success",
"title": "joint_toque",
"data": [ /* ... */ ]
}
}
缺省 title 时响应:
{
"data": {
"result": "success",
"joint_toque": [ /* 14 */ ],
"cart_force": [ /* 12 */ ]
}
}
3.6.9 负载辨识
3.6.9.1 设置机械臂负载参数
请求:request_set_payload_param
{
"accid": "DACH_TRON2A_001",
"title": "request_set_payload_param",
"timestamp": 1762771300000,
"guid": "746d937cd8094f6a98c9577aaf213d98",
"data": {
"arm": 0, //0=左臂,1=右臂;data:真实物理量 [m(kg), mcx, mcy, mcz(kg·m)]。
"data": [0.5, 0.0, 0.0, 0.01]
}
}
响应:response_set_payload_param
{
"accid": "DACH_TRON2A_001",
"title": "response_set_payload_param",
"timestamp": 1762771300000,
"guid": "746d937cd8094f6a98c9577aaf213d98",
"data": {
"result": "success",
"arm": 0
}
}
3.6.9.2 查询双臂负载参数
请求:request_get_payload_param
{
"accid": "DACH_TRON2A_001",
"title": "request_get_payload_param",
"timestamp": 1762771300000,
"guid": "746d937cd8094f6a98c9577aaf213d98",
"data": {}
}
响应:response_get_payload_param
{
"accid": "DACH_TRON2A_001",
"title": "response_get_payload_param",
"timestamp": 1762771300000,
"guid": "746d937cd8094f6a98c9577aaf213d98",
"data": {
"result": "success",
"data": [ /* m_L,mcx_L,mcy_L,mcz_L, m_R,mcx_R,mcy_R,mcz_R */ ]
}
}
3.6.10 拖动示教
3.6.10.1 进入拖动示教
请求:request_enter_drag_teach
{
"accid": "DACH_TRON2A_001",
"title": "request_enter_drag_teach",
"timestamp": 1762771300000,
"guid": "746d937cd8094f6a98c9577aaf213d98",
"data": {}
}
响应:response_enter_drag_teach
{
"accid": "DACH_TRON2A_001",
"title": "response_enter_drag_teach",
"timestamp": 1762771300000,
"guid": "746d937cd8094f6a98c9577aaf213d98",
"data": {
"result": "success",
"success": true,
"message": ""
}
}
3.6.10.1 拖动示教轨迹管理
请求:request_drag_teach_manage
{
"accid": "DACH_TRON2A_001",
"title": "request_drag_teach_manage",
"timestamp": 1762771300000,
"guid": "746d937cd8094f6a98c9577aaf213d98",
"data": {
"cmd": "start_record", //status/list/start_record/stop_record/play/delete/rename/gripper/exit
"arg": "" //play/delete=文件名;rename="old|newlabel";gripper=open/close/toggle
}
}
响应:response_drag_teach_manage
{
"accid": "DACH_TRON2A_001",
"title": "response_drag_teach_manage",
"timestamp": 1762771300000,
"guid": "746d937cd8094f6a98c9577aaf213d98",
"data": {
"result": "success",
"success": true,
"message": "",
"cmd": "start_record"
}
}
仅当cmd == "list" 时,额外返回 files 数组:
{
"data": {
"result": "success",
"success": true,
"cmd": "list",
"files": ["traj_1", "traj_2"]
}
}