TRON 2 · 使用与开发
移动双臂 · 升降台与底盘
3.6.11 获取升降台状态(仅适用于移动版双臂)
3.6.11.1 请求:request_lifter_state
{
"accid": "DACH_TRON2A_001",
"title": "request_lifter_state",
"guid": "6f5d2f3c27ac4ef89a4f2c31e8b7f402",
"timestamp": 1762771201000,
"data": {}
}
3.6.11.2 响应:response_lifter_state
{
"accid": "DACH_TRON2A_001",
"title": "response_lifter_state",
"guid": "6f5d2f3c27ac4ef89a4f2c31e8b7f402",
"timestamp": 1762771201000,
"data": {
"result": "success",
"q": [0.12],
"v": [0.00]
}
}
3.6.12 升降台绝对位置控制(仅适用于移动版双臂)
3.6.12.1 请求:request_set_lifter_position
{
"accid": "DACH_TRON2A_001",
"title": "request_set_lifter_position",
"guid": "8b9d7caa48d44b9b9e0d6b2f2b30a101",
"timestamp": 1762771300000,
"data": {
"position": 200.5, //目标位置,单位 mm
"duration": 2000 //到达时间,单位 ms,整数;绝对位置控制允许 0,表示最快速度到达
}
}
3.6.12.2 响应:response_set_lifter_position
{
"accid": "DACH_TRON2A_001",
"title": "response_set_lifter_position",
"guid": "8b9d7caa48d44b9b9e0d6b2f2b30a101",
"timestamp": 1762771300000,
"data": {
"result": "success"
}
}
3.6.13 升降台速度控制(仅适用于移动版双臂)
3.6.13.1 请求:request_set_lifter_velocity
{
"accid": "DACH_TRON2A_001",
"title": "request_set_lifter_velocity",
"guid": "8b9d7caa48d44b9b9e0d6b2f2b30a101",
"timestamp": 1762771300000,
"data": {
"velocity": 50, //升降台速度,单位 mm/s,有符号,正数/负数分别表示不同方向
"duration": 2000 //速度控制持续时间,单位 ms,整数,必须 > 0
}
}
3.6.13.2 响应:response_set_lifter_velocity
{ "accid": "DACH_TRON2A_001",
"title": "response_set_lifter_velocity",
"guid": "8b9d7caa48d44b9b9e0d6b2f2b30a101",
"timestamp": 1762771300000,
"data": {
"result": "success"
}
}
3.6.14 查询升降台当前位置(仅适用于移动版双臂)
3.6.14.1 请求:request_get_lifter_position
{
"accid": "DACH_TRON2A_001",
"title": "request_get_lifter_position",
"guid": "8b9d7caa48d44b9b9e0d6b2f2b30a101",
"timestamp": 1762771300000,
"data": {
}
}
3.6.14.2 响应:response_get_lifter_position
{ "accid": "DACH_TRON2A_001",
"title": "response_get_lifter_position",
"guid": "...",
"timestamp": 1762771300000,
"data": {
"result": "success",
"position": 200.3,
"q": -254.4,
"q_per_mm": 0.6224,
"timestamp": 1762771300000
}
}
3.6.15 获取底盘状态(仅适用于移动版双臂)
3.6.15.1 请求:request_chassis_state
{
"accid": "DACH_TRON2A_001",
"title": "request_chassis_state",
"guid": "b6d6f4d2-6f0f-4f0b-8d8e-8f2f3a5a1c01",
"timestamp": 1762771200000,
"data": {}
}
3.6.15.2 响应:response_chassis_state
{
"accid": "DACH_TRON2A_001",
"title": "response_chassis_state",
"guid": "b6d6f4d2-6f0f-4f0b-8d8e-8f2f3a5a1c01",
"timestamp": 1762771200000,
"data": {
"result": "success",
"data": [0.25, -0.10, 0.03] //inear_velocity,angular_velocity,steering_angle;
}
}
3.6.16 设置底盘运动模式(仅适用于移动版双臂)
3.6.16.1 请求:request_set_chassis_mode
{
"accid": "DACH_TRON2A_001", // 机器人序列号,注意修为您机器人的序列号;
"title": "request_set_chassis_mode",
"timestamp": 1672373633989,
"guid": "746d937cd8094f6a98c9577aaf213d98",
"data": {
"move_mode": "ackerman" //ackerman,parallel,park,spinning,emergency_stop
}
}
3.6.16.2 响应:response_set_chassis_mode
{
"accid": "DACH_TRON2A_001",
"title": "response_set_chassis_mode",
"timestamp": 1672373633989,
"guid": "746d937cd8094f6a98c9577aaf213d98",
"data": {
"result": "success" // success: 成功
}
}
3.6.17 控制底盘运动(仅适用于移动版双臂)
3.6.17.1 请求:request_chassis_move
{
"accid": "DACH_TRON2A_001", // 机器人序列号,注意修为您机器人的序列号;
"title": "request_chassis_move",
"timestamp": 1672373633989,
"guid": "746d937cd8094f6a98c9577aaf213d98",
"data": {
"x": 0.3, //速度值,范围-1到1
"y": 0.0, //速度值,范围-1到1
"yaw": 0.0 //转弯角速度,范围-1到1
}
}
3.6.17.2 响应:response_chassis_move
{
"accid": "DACH_TRON2A_001",
"title": "response_chassis_move",
"timestamp": 1672373633989,
"guid": "746d937cd8094f6a98c9577aaf213d98",
"data": {
"result": "success" // success: 成功, fail_imu: IMU 错误, fail_motor: 电机错误
}
}
继续阅读双臂 · C++ / Python 示例