运动控制模块
运动控制模块
Section titled “运动控制模块”【当前运控有两种模式,传统弯腿行走模式和强化学习直腿行走模式,传统模式不建议使用,自 V1.0 版本起将不再维护传统模式下的接口并将完全移除传统行走模式,请使用强化学习模式及其对应接口】
本文档包含了运动控制模块(Motion Control, MC)包含的话题和服务的相关文档协议,以支持系统的运动控制功能。
本模块在旗舰款和基础款上均位于 x86 开发板上,http 后端监听的端口为 56322。
特别注意事项【必读】
Section titled “特别注意事项【必读】”-
在 JOINT_SERVO 后缀的 action 下,包括 RL_LOCOMOTION_ARM_EXT_JOINT_SERVO 和 RL_WHOLE_BODY_EXT_JOINT_SERVO 模式,手臂、头部、手指、腰部会默认被动作播放模块接管,不会执行用户指令。
-
调用 动作播放模块 的 DisableMotionPlayer 接口即可动态停止 MotionPlayer 服务,使用该接口无需重启 motion_player 服务。
Terminal window curl -i -H 'content-type:application/json' \-H 'timeout: 1000' \-X POST 'http://192.168.100.100:56444/rpc/aimdk.protocol.MotionCommandService/DisableMotionPlayer' \-d '{}'
-
-
调用关节透传接口时,请严格遵守如下要求:
- 传入的关节角度值必须符合关节限位以及动态范围限制,对应表格列在下方,其中手臂、头部、手指关节限位需要用户自行保证传入的关节角度值在限位范围内。
- 透传指令接口推荐使用控制频率为 100 Hz,传入的关节指令不允许出现跳变和阶跃,也不允许传入值与当前状态相差过大,请严格计算关节速度和加速度保证关节运动的平滑性。
上肢关节控制的关节限位以及动态范围限制:
| 关节名称 | 最小角度(rad) | 最大角度(rad) | 最大速度绝对值(rad/s) | 最大加速度绝对值(rad/s^2) |
|---|---|---|---|---|
| 左臂 J1 | -2.91 | 2.91 | 3.00 | 6.28 |
| 左臂 J2 | -0.46 | 1.60 | 3.00 | 6.28 |
| 左臂 J3 | -2.91 | 2.91 | 3.00 | 6.28 |
| 左臂 J4 | -2.00 | -0.03 | 3.00 | 6.28 |
| 左臂 J5 | -2.94 | 2.94 | 3.00 | 6.28 |
| 左臂 J6 | -0.45 | 0.45 | 3.00 | 6.28 |
| 左臂 J7 | -0.35 | 0.35 | 3.00 | 6.28 |
| 右臂 J1 | -2.91 | 2.91 | 3.00 | 6.28 |
| 右臂 J2 | -1.60 | 0.46 | 3.00 | 6.28 |
| 右臂 J3 | -2.91 | 2.91 | 3.00 | 6.28 |
| 右臂 J4 | 0.03 | 2.00 | 3.00 | 6.28 |
| 右臂 J5 | -2.94 | 2.94 | 3.00 | 6.28 |
| 右臂 J6 | -0.45 | 0.45 | 3.00 | 6.28 |
| 右臂 J7 | -0.35 | 0.35 | 3.00 | 6.28 |
头部关节限位(仅支持位控):
| 关节名称 | 最小角度(rad) | 最大角度(rad) |
|---|---|---|
| idx27_head_joint1(摇头) | -0.785 | 0.785 |
| idx28_head_joint2(点头) | -0.401 | 0.401 |
灵巧手关节限位(支持位控和力控,左右手关节限位相同):
| 关节名称 | 最小位置 | 最大位置 | 最小力矩数值 | 最大力矩数值 |
|---|---|---|---|---|
| left_thumb_0 | 0 | 2000 | 0 | 5700 |
| left_thumb_1 | 0 | 2000 | 0 | 5700 |
| left_index | 0 | 2000 | 0 | 5700 |
| left_middle | 0 | 2000 | 0 | 5700 |
| left_ring | 0 | 2000 | 0 | 5700 |
| left_pinky | 0 | 2000 | 0 | 5700 |
腰部动作限位
| 自由度 | 最小角度/位置(rad / m) | 最大角度/位置(rad / m) |
|---|---|---|
| lift | -0.15 | 0.00 |
| roll | -0.5236 | 0.5236 |
| pitch | -0.5236 | 0.5236 |
| yaw | -0.5236 | 0.5236 |

运动控制状态机【必读】
Section titled “运动控制状态机【必读】”运动控制接口调用存在一定的规则,只有特定的状态(Action)下可以调用特定的接口,详细请参考以下 Action 列表(仅列出开放使用的 Action,其余 Action 请勿使用)
| 序号 | Action 类型 | Action 代码 | 中文名称 | 详细说明 | 可调用接口 |
|---|---|---|---|---|---|
| 0 | 安全 Action | DEFAULT | 默认模式 | 运控启动之后的默认 action | |
| 1 | 位控 Action | RL_JOINT_DEFAULT | 强化位控站立模式 | 上机器人强化位控站立,直腿站立 | |
| 2 | 位控 Action | PASSIVE_UPPER_BODY_JOINT_SERVO | 下肢被动上肢伺服模式 | 下肢不使能,手臂可以接收外部关节伺服指令 | T2 |
| 3 | 位控 Action | PASSIVE_UPPER_BODY_PLANNING_MOVE | 下肢被动上肢 RRT 规划模式 | 下肢不使能,上肢路径规划,rpc接收目标关节角或SE3位置 | S1 |
| 4 | 位控 Action | PASSIVE_UPPER_BODY_COLLISION_ESCAPE | 下肢被动上肢躲避碰撞模式 | 配合 PASSIVE_UPPER_BODY_PLANNING_MOVE 使用,可在发生碰撞后无法调用规划接口时使用,切到该action后可以自动分开(一般情况下不会使用) | |
| 4 | 位控 Action | SIT_DOWN | 位控坐下模式 | 下肢动作,上肢保持不动,配合椅子实现坐下 | |
| 5 | 位控 Action | STAND_UP | 位控站起模式 | 下肢动作,上肢保持不动,配合椅子实现站起 | |
| 7 | 位控 Action | MOBILE_PLATFORM_SIT_DOWN | 移动平台位控坐下模式 | 下肢动作,上肢保持不动,配合坐姿开箱 | |
| 6 | 位控 Action | MOBILE_PLATFORM_STAND_UP | 移动平台位控站起模式 | 下肢动作,上肢保持不动,配合坐姿开箱 | |
| 8 | 力控 Action | RL_LOCOMOTION_DEFAULT | 强化行走模式 | 强化学习训练的拟人行走模式,走路时手臂会摆动 | T1 |
| 9 | 力控 Action | RL_LOCOMOTION_ARM_EXT_JOINT_SERVO | 强化行走上肢伺服模式 | 下肢拟人行走或站立,上肢接受外部关节伺服指令,行走或站立时做动作(使用全身控制的强化模型,更具有稳定性) | T1、T2 |
| 10 | 力控 Action | RL_LOCOMOTION_ARM_EXT_PLANNING_MOVE | 强化行走上肢 RRT 规划模式 | 下肢站立,上肢路径规划,rpc接收目标关节角或SE3位置 | S1 |
| 11 | 力控 Action | RL_LOCOMOTION_ARM_EXT_COLLISON_ESCAPE | 强化行走上肢躲避碰撞模式 | 配合 RL_LOCOMOTION_ARM_EXT_PLANNING_MOVE 使用,可在发生碰撞后无法调用规划接口时使用,切到该action后可以自动分开(一般情况下不会使用) | |
| 12 | 力控 Action | RL_WHOLE_BODY_EXT_JOINT_SERVO | 强化行走模式 | 与 RL_LOCOMOTION_ARM_EXT_JOINT_SERVO 类似,额外可控制腰部动作,A2 机器人腰部无实际自由度,腰部动作是通过腿部电机配合实现 | T1、T2、T3 |
| 13 | 力控 Action | RL_WHOLE_BODY_DANCE | 强化行走模式 | 可运行指定的全身舞蹈动作 | S2 |
动作切换状态机:

Channel 接口
Section titled “Channel 接口”| 接口调用码 | 话题名 | 话题描述 | 订阅 or 发布 | 消息类型 | 备注 | 通信后端 |
|---|---|---|---|---|---|---|
| T1 | /motion/control/locomotion_velocity | 下肢控制指令 | 订阅 | aimdk::protocol::McLocomotionVelocityChannel | mode 有两种,一种用于基本遥控行走,填写 LocomotionMode_DEFAULT,对应枚举值 0,另一种用于导航行走,填写 LocomotionMode_NAVIGATION,对应枚举值 1,导航行走对速度指令响应更加灵敏,遥控行走则会更为顺滑;前进最大速度为 0.8m/s,后退最大速度为 0.3m/s,横移最大速度为 0.25m/s,旋转最大速度为 1.0 rad/s; 不推荐使用后退,不建议使用横移速度,基本行走功能请使用正前进速度结合旋转实现 | ros2 |
| T2 | /motion/control/move_waist | 腰部控制指令 | 订阅 | aimdk::protocol::McMoveWaistChannel | 仅在 RL_WHOLE_BODY_EXT_JOINT_SERVO 模式下可被调用 | ros2 |
| T2 | /motion/control/move_waist_lift | 下蹲指令 | 订阅 | aimdk::protocol::McMoveWaistLiftChannel | 限位为 -0.15 到 0.00,仅在 RL_WHOLE_BODY_EXT_JOINT_SERVO 模式下可被调用 | ros2 |
| T2 | /motion/control/move_waist_sideways | 侧身指令 | 订阅 | aimdk::protocol::McMoveWaistSidewaysChannel | 限位为 -0.5236 到 0.5236,仅在 RL_WHOLE_BODY_EXT_JOINT_SERVO 模式下可被调用 | ros2 |
| T2 | /motion/control/move_waist_pitch | 弯腰指令 | 订阅 | aimdk::protocol::McMoveWaistPitchChannel | 限位为 -0.5236 到 0.5236,仅在 RL_WHOLE_BODY_EXT_JOINT_SERVO 模式下可被调用 | ros2 |
| T2 | /motion/control/move_waist_twist | 转身指令 | 订阅 | aimdk::protocol::McMoveWaistTwistChannel | 限位为 -0.5236 到 0.5236,仅在 RL_WHOLE_BODY_EXT_JOINT_SERVO 模式下可被调用 | ros2 |
| T3 | /motion/control/arm_joint_command | 透传手臂控制指令 | 订阅 | sensor_msgs::msg::JointState | 仅在 JOINT_SERVO 模式下可被调用,运控不会对手臂关节进行规划,会直接透传到 HAL,只支持位控; 必须一次性传入 14 个关节角度值,前 7 个为左手,后 7 个为右手 | ros2 |
| T3 | /motion/control/neck_joint_command | 透传头部控制指令 | 订阅 | sensor_msgs::msg::JointState | 仅在 JOINT_SERVO 模式下可被调用,头部有两个关节名称分别为 [idx27_head_joint1, idx28_head_joint2],只支持位控 | ros2 |
| T3 | /motion/control/hand_joint_command | 透传手指控制指令 | 订阅 | sensor_msgs::msg::JointState | 仅在 JOINT_SERVO 模式下可被调用,JointState 包含左右手指的十二个关节,各个关节名称分别为: [left_thumb_0, left_thumb_1, left_index, left_middle, left_ring, left_pinky,right_thumb_0, right_thumb_1, right_index, right_middle, right_ring, right_pinky] 手指的力矩放在 effort 里面,范围是 0-5700;手指的位置放在 position,为 0~2000 的数字;手指的控制逻辑是力矩和位置二者满足其一就会停止运动,例如针对某根手指传入 1000 的位置,5700 的力矩,如果没有外物卡住手指,当位置达到 1000 时,力矩不会继续加大,此时力矩会处于一个较小的值,如果外物卡住手指(抓住某物体等),力矩会持续加大到 5700 附近,对应电缸输出 5.7N 的力矩; | ros2 |
| T* | /motion/control/arm_joint_state | 手臂关节状态 | 发布 | sensor_msgs::msg::JointState | 手臂关节状态,包含两条手臂各 7 个关节,对于双臂前五个关节来说,position、velocity、effort 字段为有效值,后两个关节只有 position 字段为有效值(数值为等效串联关节的值); 发布频率为 100 hz | ros2 |
| T* | /motion/control/neck_joint_state | 头部关节状态 | 发布 | sensor_msgs::msg::JointState | 头部关节状态,包含两个关节,position、velocity、effort 字段为有效值; 发布频率为 100 hz | ros2 |
| T* | /motion/control/hand_joint_state | 手部关节状态 | 发布 | sensor_msgs::msg::JointState | 手部关节状态,包含两只灵巧手各 6 个关节,position、effort 字段为有效值,position 范围为 0-2000,effort 范围为 0-5700; 发布频率为 100 hz; 力矩因手指内的连杆机构、转轴、以及弹簧等级机构都会带来一些影响,可能会出现略小于 0 的负值(-1000 以内),为正常现象; 手指受外力影响时同样会出现负值,此时为正常现象 | ros2 |
带星号的接口调用码表示可以在任何 action 下调用。
RPC 接口
Section titled “RPC 接口”考虑目前软件日志以及网络资源占用问题,所有 RPC 服务接口建议以 1Hz 及以下的频率调用。
SetAction/GetAction 操作规范:
- SetAction 接口为异步接口,调用后会立即返回,返回成功不代表 Action 切换完成,需要通过 GetAction 接口轮询确认 Action 切换完成后,方可进行下一步操作
- GetAction 轮询间隔建议设置为 1 秒(避免高频 RPC 调用),如认为 1s 延迟过大,可设置为 500ms,更小间隔不推荐
| 接口调用码 | 接口名 | 接口描述 | 请求消息类型 | 答复消息类型 | 备注 | 通信后端 |
|---|---|---|---|---|---|---|
| S* | pb:/aimdk.protocol.McActionService/SetAction | 设置 Action | aimdk::protocol::McActionRequest | aimdk::protocol::CommonResponse | http | |
| S* | pb:/aimdk.protocol.McActionService/GetAction | 获取 Action | aimdk::protocol::CommonRequest | aimdk::protocol::McActionResponse | http | |
| S* | pb:/aimdk.protocol.McActionService/GetAvailableActions | 获取可用 Action 列表 | aimdk::protocol::CommonRequest | aimdk::protocol::AvailableActionsResponse | http | |
| S* | pb:/aimdk.protocol.McActionService/GetAvailableCommands | 获取 Action 切换命令 | aimdk::protocol::CommonRequest | aimdk::protocol::AvailableCommandResponse | http | |
| S* | pb:/aimdk.protocol.McDataService/GetTaskState | 获取任务状态 | aimdk::protocol::CommonTaskRequest | aimdk::protocol::CommonTaskResponse | http | |
| S* | pb:/aimdk.protocol.McDataService/GetJointState | 获取关节状态 | aimdk::protocol::CommonRequest | aimdk::protocol::McJointStatesResponse | 获取所有关节位置、速度和力状态信息(包括上肢和下肢,头和手除外) | http |
| S* | pb:/aimdk.protocol.McDataService/GetJointAngle | 获取关节角度 | aimdk::protocol::CommonRequest | aimdk::protocol::McJointAnglesResponse | 获取所有关节角度信息(包括上肢和下肢,头和手除外) | http |
| S* | pb:/aimdk.protocol.McMotionService/SetHandCommand | 设置手部命令 | aimdk::protocol::HandCommandRequest | aimdk::protocol::CommonResponse | 位置的范围是 0-2000,力矩的范围是 0-5700; 手指的控制逻辑是力矩和位置二者满足其一就会停止运动,例如针对某根手指传入 1000 的位置,5700 的力矩,如果没有外物卡住手指,当位置达到 1000 时,力矩不会继续加大,此时力矩会处于一个较小的值,如果外物卡住手指(抓住某物体等),力矩会持续加大到 5700 附近,对应电缸输出 57N 的力矩; | http |
| S* | pb:/aimdk.protocol.McDataService/GetHandState | 获取灵巧手状态 | aimdk::protocol::CommonRequest | aimdk::protocol::HandStateResponse | 位置范围为 0-2000,力矩范围为 0-5700; 力矩因手指内的连杆机构、转轴、以及弹簧等级机构都会带来一些影响,可能会出现略小于 0 的负值(-1000 以内),为正常现象; 手指受外力影响时同样会出现负值,此时为正常现象 | http |
| S* | pb:/aimdk.protocol.McMotionService/SetNeckCommand | 设置头部命令 | aimdk::protocol::NeckCommandRequest | aimdk::protocol::CommonResponse | 旗舰款支持点头和摇头控制,基础版仅支持摇头控制,SetNeckCommand.py脚本包含使用示例,可供参考;第一个值代表摇头,范围 -0.785 - 0.785,第二个值代表点头,范围 -0.401 - 0.401; | http |
| S* | pb:/aimdk.protocol.McDataService/GetNeckState | 获取头部状态 | aimdk::protocol::CommonRequest | aimdk::protocol::NeckStateResponse | http | |
| S1 | pb:/aimdk.protocol.McMotionService/PlanningMove | 上肢规划运动 | aimdk::protocol::PlanningMoveRequest | aimdk::protocol::CommonTaskResponse | 给左臂或右臂发送 SE3 目标点,机器人自行规划路径并执行; 返回的任务 ID,可用于查询任务状态; 有自碰撞检测,对环境的碰撞检测依赖于传感器数据,不能完全保证不与环境发生碰撞; 使用时必须指定需要运动的手臂和对应的位姿 | http |
| S2 | pb:/aimdk.protocol.McMotionService/GetDanceTypeList | 获取舞蹈列表 | aimdk::protocol::CommonRequest | aimdk::protocol::McDanceResponse | 跳舞 action 下获取可跳的舞蹈列表 | http |
| S2 | pb:/aimdk.protocol.McMotionService/SelectDanceType | 选择舞蹈 | aimdk::protocol::DanceTypeRequest | aimdk::protocol::CommonResponse | 跳舞 action 下选择要跳的舞蹈 | http |
上肢规划控制接口使用说明
Section titled “上肢规划控制接口使用说明”通过 rpc 发给机器人期望的左臂或者右臂的 SE3 目标点,机器人会根据当前机器人状态进行规划,并执行规划后的运动到达目标点,该接口只有旗舰款可以使用。
-
切换到可以使用 PLANNING_MOVE 的 Action
可以使用上肢规划功能的 Action 有:
Action 名称 描述 开机后切换顺序 PASSIVE_UPPER_BODY_PLANNING_MOVE 下肢完全不使能,上肢执行规划运动 DEFAULT -> PASSIVE_UPPER_BODY_PLANNING_MOVE RL_LOCOMOTION_ARM_EXT_PLANNING_MOVE 下肢可以强化行走,上肢执行规划运动 DEFAULT -> RL_JOINT_DEFAULT -> RL_LOCOMOTION_ARM_EXT_PLANNING_MOVE -
发送目标位置
发送方式为 rpc 服务,接口为
pb:/aimdk.protocol.McMotionService/PlanningMove发送示例如下:
import numpy as npimport jsonimport requestsimport timefrom datetime import datetimedef create_header():now = datetime.now()header = {"timestamp": {"seconds": int(now.timestamp()),"nanos": now.microsecond * 1000,"ms_since_epoch": int(now.timestamp() * 1000),},"control_source": "ControlSource_MANUAL"}return headerdef send_json_data(json_data, url):json_str = json.dumps(json_data, indent=2)print("Sending JSON data:")print(json_str)print("")headers = {'content-type': 'application/json'}response = requests.post(url, headers=headers, data=json_str)print(f"Response: {response.status_code}")print(response.text)print("")def main():url = "http://192.168.100.100:56322/rpc/aimdk.protocol.McMotionService/PlanningMove"leftTrl = [0.35, 0.35, 0.25]leftQuat = [0.818758, 0.570822, -0.0606913, -0.0106989]rightTrl = [0.35, -0.35, 0.25]rightQuat = [0.818761, -0.570817, -0.0606912, 0.0106992]data = {"header": create_header(),"group": "McPlanningGroup_LEFT_ARM","mode": "McPlanningMode_DEFAULT","target": {"type": "SE3","left": {"position":{"x":leftTrl[0],"y":leftTrl[1],"z":leftTrl[2]},"orientation":{"x":leftQuat[1],"y":leftQuat[2],"z":leftQuat[3],"w":leftQuat[0]}},"right":{"position":{"x":rightTrl[0],"y":rightTrl[1],"z":rightTrl[2]},"orientation":{"x":rightQuat[1],"y":rightQuat[2],"z":rightQuat[3],"w":rightQuat[0]}},},"reference": {"joint_position": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]},}send_json_data(data, url)if __name__ == "__main__":main()对于发送的数据,
- “group”表示本次要运动的手臂,“McPlanningGroup_LEFT_ARM”表示左臂,“McPlanningGroup_RIGHT_ARM”表示右臂
- “target”表示手臂要运动到的目标点,
- “position”表示目标点位置
- “orientation”表示目标点四元数
- “reference”中的”joint_position”表示参考关节角,一般设为 0 即可,若不全为 0,且长度与机器人手臂关节数一致,即 7 个参考值,机器人会以尽量接近该关节角到达目标点
-
查询任务状态(可选)
参见 get_task_state.sh,调用 rpc 接口后会返回当前执行的任务状态,常见返回值和含义如下:
序号 状态 描述 0 CommonState_UNKNOWN 任务不存在 1 CommonState_SUCCESS 规划运动成功完成 2 CommonState_FAILURE 规划运动成功失败 3 CommonState_ABORTED 当前状态不能进行规划运动,任务被取消 4 CommonState_PENDING 前序任务规划或执行中,当前任务处于等待状态 5 CommonState_RUNNING 任务规划或执行中 若在轮巡查询任务状态时,已经返回了状态量 1,2,3 中任意一个,标志当前任务已经结束,运控将不再保存任务信息,所以如果后续继续查询同一任务,则会返回状态 0,表示任务不存在。
-
目标点的描述
目标点表示在机器人的基座坐标系下,机器人掌心的位置和姿态。相对于 URDF 中的手臂末端有一定的偏移,偏移为:
手臂 末端连杆名称 位置偏移(x,y,z) 姿态偏移(四元数 w,x,y,z) 左臂 left_arm_link07 [-0.1, 0.0, 0.0] [0.0, 0.0, 0.70710678, 0.70710678] 右臂 right_arm_link07 [ 0.1, 0.0, 0.0] [-0.70710678, 0.70710678, 0.0, 1.0] 这样是为了使左右手臂的末端连杆姿态一致,便于计算。如果要计算掌心的位姿,可以先订阅 ros2 的 tf 话题,然后再计算掌心位置,计算示例如下:
import numpy as npfrom scipy.spatial.transform import Rotation as Rdef pose_array_to_se3(pose_array, w_first=True):trl = pose_array[:3]quat = np.array([pose_array[4], pose_array[5], pose_array[6], pose_array[3]]) if w_first else pose_array[3:]rotm = R.from_quat(quat).as_matrix()se3 = np.eye(4)se3[:3, :3] = rotmse3[:3, 3] = trlreturn se3def se3_to_pose_array(se3, w_first=True):rotm = se3[:3, :3]trl = se3[:3, 3]quat_xyzw = rot.as_quat()if w_first:quat = np.array([quat_xyzw[3], quat_xyzw[0], quat_xyzw[1], quat_xyzw[2]])else:quat = quat_xyzwreturn np.concatenate([trl, quat])def main():left_flange_array = np.array([0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0]) # 改成自己的从tf订阅到的数据right_flange_array = np.array([0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0]) # 改成自己的从tf订阅到的数据left_flange_tcp_array = np.array([-0.1, 0.0, 0.0, 0.0, 0.0, 0.70710678, 0.70710678])right_flange_tcp_array = np.array([0.1, 0.0, 0.0, -0.70710678, 0.70710678, 0.0, 0.0])left_flange_se3 = pose_array_to_se3(left_flange_array)right_flange_se3 = pose_array_to_se3(right_flange_array)left_flange_tcp_se3 = pose_array_to_se3(left_flange_tcp_array)right_flange_tcp_se3 = pose_array_to_se3(right_flange_tcp_array)left_tcp_se3 = left_flange_se3 @ left_flange_tcp_se3right_tcp_se3 = right_flange_se3 @ right_flange_tcp_se3left_tcp_array = se3_to_pose_array(left_tcp_se3)right_tcp_array = se3_to_pose_array(right_tcp_se3) -
运动范围边界
基于目前 URDF 的模型参数,对于左臂,1,2 轴的旋转中心点在(-0.03779, 0.191, 0.3421 ),因此,发给左臂的目标点位置至少满足 0.33690<||(x+0.03779, y-0.191, z-0.3421)||<0.60939
类似的,发给右臂的目标点位置至少满足 0.33690<||(x-0.03779, y+0.191, z-0.3421)||<0.60939
超过该范围的点位一定不可达,即使目标点位置满足要求,如果姿态不合理也会导致无法到达。
-
到点精度
到点精度主要受三个方面影响:
来源 影响 规划算法 很小,位置最大误差为 0.005m 左右,机器人运动的路径越长,一般误差会越小 机器硬件 较大,位置最大误差一般为 0.02m 左右,受机器人之间的差异影响,可能会有浮动,具体以实测为准 底座晃动 较大,若机器处于下肢力控站立,当手臂运动目标较远,运动幅度较大时,机器人底座可能会移动,甚至踏步,来保持稳定站立;
此时若机器人只是移动底座,位置最大误差为 0.02m 左右,若机器人为了保持平衡发生踏步,误差则不再可控;
若机器人下肢不使能,底座固定,则该部分误差可忽略不计
Protobuf 消息类型
Section titled “Protobuf 消息类型”aimdk::protocol::ToolInertia
Section titled “aimdk::protocol::ToolInertia”| Field | Type | Description |
|---|---|---|
| ixx | double | 惯量矩阵在X轴的主惯量 x 轴 |
| iyy | double | y 轴 |
| izz | double | z 轴 |
| ixy | double | xy 平面 |
| ixz | double | xz 平面 |
| iyz | double | yz 平面 |
aimdk::protocol::McToolPayload
Section titled “aimdk::protocol::McToolPayload”| Field | Type | Description |
|---|---|---|
| mass | double | 负载质量 |
| mass_center | aimdk::protocol::Vec3 | 负载质心 |
| ToolInertia | aimdk::protocol::ToolInertia | 负载惯量 |
aimdk::protocol::McToolConfig
Section titled “aimdk::protocol::McToolConfig”| Field | Type | Description |
|---|---|---|
| id | int32 | |
| name | string | |
| config_file | string | |
| payload | aimdk::protocol::McToolPayload | |
| tcp | aimdk::protocol::SE3Pose |
aimdk::protocol::McAddToolRequest
Section titled “aimdk::protocol::McAddToolRequest”设置机器人手部控制请求
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::RequestHeader | 请求头 |
| data | aimdk::protocol::McToolConfig[] | 请求数据 |
aimdk::protocol::McGetToolResponse
Section titled “aimdk::protocol::McGetToolResponse”设置机器人手部控制请求
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::RequestHeader | 请求头 |
| data | aimdk::protocol::McToolConfig[] | 请求数据 |
aimdk::protocol::McRobotToolConfig
Section titled “aimdk::protocol::McRobotToolConfig”| Field | Type | Description |
|---|---|---|
| left_arm | aimdk::protocol::McToolConfig | |
| right_arm | aimdk::protocol::McToolConfig |
aimdk::protocol::McRobotToolRequest
Section titled “aimdk::protocol::McRobotToolRequest”设置机器人手部控制请求
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::RequestHeader | 请求头 |
| data | aimdk::protocol::McRobotToolConfig | 请求数据 |
aimdk::protocol::McRobotToolResponse
Section titled “aimdk::protocol::McRobotToolResponse”设置机器人手部控制请求
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::RequestHeader | 请求头 |
| data | aimdk::protocol::McRobotToolConfig | 请求数据 |
aimdk::protocol::McToolPayloadRequest
Section titled “aimdk::protocol::McToolPayloadRequest”| Field | Type | Description |
|---|---|---|
| left_arm | aimdk::protocol::McToolPayload | |
| right_arm | aimdk::protocol::McToolPayload |
aimdk::protocol::AimMasterControlSource
Section titled “aimdk::protocol::AimMasterControlSource”AimMaster控制源
| Name | Number | Description |
|---|---|---|
| AimMasterControlSource_AUTO | 0 | 自主控制 |
| AimMasterControlSource_MANUAL | 1 | 手动控制 |
aimdk::protocol::AimMasterControlAxis
Section titled “aimdk::protocol::AimMasterControlAxis”AimMaster控制操纵杆轴
| Field | Type | Description |
|---|---|---|
| up_down | double | 上下方向摇杆 |
| left_right | double | 左右方向摇杆 |
aimdk::protocol::AimMasterControlButton
Section titled “aimdk::protocol::AimMasterControlButton”AimMaster控制操纵杆按钮
| Field | Type | Description |
|---|---|---|
| up_down | oneof {bool up} {bool down} | 摇杆按钮: 上下 |
| left_right | oneof {bool left} {bool right} | 摇杆按钮: 左右 |
aimdk::protocol::AimMasterControlInfo
Section titled “aimdk::protocol::AimMasterControlInfo”AimMaster控制
| Field | Type | Description |
|---|---|---|
| type | aimdk::protocol::AimMasterControlInfo::Type | 摇杆类型 |
| data | oneof {AimMasterControlAxis axis} {AimMasterControlButton button} | 摇杆数据 |
aimdk::protocol::AimMasterControlInfo::Type
Section titled “aimdk::protocol::AimMasterControlInfo::Type”| Name | Number | Description |
|---|---|---|
| Type_UNKNOWN | 0 | |
| Type_AXIS | 1 | 摇杆类型:轴型,数据类型为 DOUBLE |
| Type_BUTTON | 2 | 摇杆类型:按钮型,数据类型为 BOOL |
aimdk::protocol::AimMasterControl
Section titled “aimdk::protocol::AimMasterControl”AimMaster控制消息
| Field | Type | Description |
|---|---|---|
| mode | aimdk::protocol::AimMasterControl::Mode | 控制模式 |
| left | aimdk::protocol::AimMasterControlInfo | 摇杆: 左摇杆 |
| right | aimdk::protocol::AimMasterControlInfo | 摇杆: 右摇杆 |
aimdk::protocol::AimMasterControl::Mode
Section titled “aimdk::protocol::AimMasterControl::Mode”| Name | Number | Description |
|---|---|---|
| Mode_UNKNOWN | 0 | |
| Mode_UPPER_BODY | 1 | 控制模式:上半身控制 |
| Mode_WHOLE_BODY | 2 | 控制模式:全身控制 |
| Mode_HEAD | 3 | 控制模式:头部控制 |
aimdk::protocol::AimMasterControlSourceRequest
Section titled “aimdk::protocol::AimMasterControlSourceRequest”与客户端交互的接口结构请求
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::RequestHeader | |
| target | aimdk::protocol::AimMasterControlSource |
aimdk::protocol::AimMasterControlSourceResponse
Section titled “aimdk::protocol::AimMasterControlSourceResponse”与客户端交互的接口结构响应
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::ResponseHeader | |
| current | aimdk::protocol::AimMasterControlSource |
aimdk::protocol::AimMasterControlCommandRequest
Section titled “aimdk::protocol::AimMasterControlCommandRequest”AimMaster控制操作命令请求
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::RequestHeader | 请求头 |
| command | aimdk::protocol::AimMasterControlCommandRequest::Command | AimMaster控制命令 |
aimdk::protocol::AimMasterControlCommandRequest::Command
Section titled “aimdk::protocol::AimMasterControlCommandRequest::Command”AimMaster控制命令
| Name | Number | Description |
|---|---|---|
| Command_UNKNOWN | 0 | 未知命令 |
| Command_ROBOT_INIT | 1 | 姿态初始化命令 |
aimdk::protocol::QuestProVr
Section titled “aimdk::protocol::QuestProVr”VR
| Field | Type | Description |
|---|---|---|
| pose | aimdk::protocol::SE3Pose | VR 位姿 |
| axis_x | double | |
| axis_y | double | |
| index_trig | double | |
| hand_trig | double | |
| key_one | bool | |
| key_two | bool |
aimdk::protocol::QuestProVrController
Section titled “aimdk::protocol::QuestProVrController”VR控制
| Field | Type | Description |
|---|---|---|
| left | aimdk::protocol::QuestProVr | |
| right | aimdk::protocol::QuestProVr |
aimdk::protocol::McRemoteControlMode
Section titled “aimdk::protocol::McRemoteControlMode”| Name | Number | Description |
|---|---|---|
| McRemoteControlMode_UNKNOWN | 0 | 未知模式 |
| McRemoteControlMode_AUTO | 100 | 自主控制模式 |
| McRemoteControlMode_FULL_BODY | 200 | 全身控制模式 |
| McRemoteControlMode_UPPER_BODY | 300 | 上身控制模式 |
aimdk::protocol::McRemoteControlAxis
Section titled “aimdk::protocol::McRemoteControlAxis”遥控控制操纵杆
| Field | Type | Description |
|---|---|---|
| up_down | double | 上下方向摇杆 0-1: 上,-1-0: 下 |
| left_right | double | 左右方向摇杆 -1-0: 左,0-1: 右 |
aimdk::protocol::McRemoteControlButton
Section titled “aimdk::protocol::McRemoteControlButton”遥控控制按钮
| Field | Type | Description |
|---|---|---|
| up | bool | 上下方向摇杆 |
| down | bool | |
| left | bool | 左右方向摇杆 |
| right | bool |
aimdk::protocol::McRemoteControlInfo
Section titled “aimdk::protocol::McRemoteControlInfo”完整的遥控控制消息
| Field | Type | Description |
|---|---|---|
| mode | aimdk::protocol::McRemoteControlMode | 遥控控制模式 |
| left_axis | aimdk::protocol::McRemoteControlAxis | 左摇杆 |
| right_button | aimdk::protocol::McRemoteControlButton | 右按键 |
aimdk::protocol::UniversalGamepad
Section titled “aimdk::protocol::UniversalGamepad”通用游戏手柄
| Field | Type | Description |
|---|---|---|
| left_left_right | float | axis0 |
| left_up_down | float | axis1 |
| lt | float | axis2 |
| right_left_right | float | axis3 |
| right_up_down | float | axis4 |
| rt | float | axis5 |
| a | int32 | buttion0 |
| b | int32 | buttion1 |
| x | int32 | buttion2 |
| y | int32 | buttion3 |
| lb | int32 | buttion4 |
| rb | int32 | buttion5 |
| back | int32 | buttion6 |
| start | int32 | buttion7 |
| logitech | int32 | buttion8 |
| left_ga | int32 | buttion9 |
| right_ga | int32 | buttion10 |
| hat0_x | int32 | hat0_x |
| hat0_y | int32 | hat0_y |
aimdk::protocol::QuestProVrControllerChannel
Section titled “aimdk::protocol::QuestProVrControllerChannel”VR控制通道
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::Header | 消息头 |
| data | aimdk::protocol::QuestProVrController | 数据 |
aimdk::protocol::UniversalGamepadChannel
Section titled “aimdk::protocol::UniversalGamepadChannel”通用游戏手柄通道
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::Header | 消息头 |
| data | aimdk::protocol::UniversalGamepad | 数据 |
aimdk::protocol::AimMasterControlChannel
Section titled “aimdk::protocol::AimMasterControlChannel”AimMaster控制通道
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::Header | 消息头 |
| data | aimdk::protocol::AimMasterControl | 数据 |
aimdk::protocol::McRemoteControlChannel
Section titled “aimdk::protocol::McRemoteControlChannel”遥控器控制通道
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::Header | 消息头 |
| data | aimdk::protocol::McRemoteControlInfo | 数据 |
aimdk::protocol::ServoMoveGoalReachCondition
Section titled “aimdk::protocol::ServoMoveGoalReachCondition”伺服运动抵达目标判定
| Field | Type | Description |
|---|---|---|
| position_tolerance | double | |
| orientation_tolerance | double | |
| keep_time | double |
aimdk::protocol::ServoMoveVelocity
Section titled “aimdk::protocol::ServoMoveVelocity”伺服运动速度
| Field | Type | Description |
|---|---|---|
| linear | double | |
| angular | double |
aimdk::protocol::ServoMoveCommand
Section titled “aimdk::protocol::ServoMoveCommand”伺服运动指令
| Field | Type | Description |
|---|---|---|
| left | aimdk::protocol::SE3Pose | |
| right | aimdk::protocol::SE3Pose | |
| servo_velocity | aimdk::protocol::ServoMoveVelocity | |
| goal_reach_condition | aimdk::protocol::ServoMoveGoalReachCondition |
aimdk::protocol::ServoMoveResult
Section titled “aimdk::protocol::ServoMoveResult”伺服运动姿态结果
| Field | Type | Description |
|---|---|---|
| status | aimdk::protocol::ServoMoveResult::Status |
aimdk::protocol::ServoMoveResult::Status
Section titled “aimdk::protocol::ServoMoveResult::Status”| Name | Number | Description |
|---|---|---|
| SUCCESS | 0 | |
| FAILURE | 1 |
aimdk::protocol::GetPlanningMoveTargetResponse
Section titled “aimdk::protocol::GetPlanningMoveTargetResponse”| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::ResponseHeader | |
| planning_move_request | aimdk::protocol::PlanningMoveRequest |
aimdk::protocol::McControlInfo
Section titled “aimdk::protocol::McControlInfo”| Field | Type | Description |
|---|---|---|
| mode | aimdk::protocol::ControlSource |
aimdk::protocol::McWorkState
Section titled “aimdk::protocol::McWorkState”机器人工作状态
| Name | Number | Description |
|---|---|---|
| McWorkState_DISABLED | 0 | |
| McWorkState_ENABLED | 1 |
aimdk::protocol::McState
Section titled “aimdk::protocol::McState”机器人状态
| Field | Type | Description |
|---|---|---|
| timestamp | uint64 | |
| work_state | aimdk::protocol::McWorkState | |
| action_info | aimdk::protocol::McActionInfo | |
| control_info | aimdk::protocol::McControlInfo | |
| is_collisioned | bool | |
| sit_stand_state | aimdk::protocol::McSitStandState | |
| is_walking | bool | |
| enable_collision | bool | |
| will_be_collided | bool | |
| enable_future_collision | bool |
aimdk::protocol::McWorkStateResponse
Section titled “aimdk::protocol::McWorkStateResponse”| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::ResponseHeader | 响应头 |
| state | aimdk::protocol::McWorkState |
aimdk::protocol::McStateResponse
Section titled “aimdk::protocol::McStateResponse”| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::ResponseHeader | 响应头 |
| state | aimdk::protocol::McState |
aimdk::protocol::McSitStandState
Section titled “aimdk::protocol::McSitStandState”机器人坐下站起状态发布
| Name | Number | Description |
|---|---|---|
| McSitStandState_DEFAULT | 0 | |
| McSitStandState_SIT_SOON | 1 | |
| McSitStandState_STAND_BACKWARD | 2 | |
| McSitStandState_STAND_FORWARD | 3 | |
| McSitStandState_STAND_SOON | 4 | |
| McSitStandState_SIT_DONE | 5 | |
| McSitStandState_STAND_DONE | 6 | |
| McSitStandState_SITING | 7 | |
| McSitStandState_STANDING | 8 | |
| McSitStandState_SIT_BCK | 9 | 备用接口 |
| McSitStandState_STAND_BCK | 10 | |
| McSitStandState_MOBILE_PLATFORM_SIT_SOON | 100 | |
| McSitStandState_MOBILE_PLATFORM_STAND_BACKWARD | 101 | |
| McSitStandState_MOBILE_PLATFORM_STAND_FORWARD | 102 | |
| McSitStandState_MOBILE_PLATFORM_STAND_SOON | 103 | |
| McSitStandState_MOBILE_PLATFORM_SIT_DONE | 104 | |
| McSitStandState_MOBILE_PLATFORM_STAND_DONE | 105 |
aimdk::protocol::McWorkModeRequest
Section titled “aimdk::protocol::McWorkModeRequest”设置工作模式
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::RequestHeader | 请求头 |
| mode | aimdk::protocol::ControlSource | 模式 |
aimdk::protocol::McWorkModeResponse
Section titled “aimdk::protocol::McWorkModeResponse”获取工作模式
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::ResponseHeader | 响应头 |
| mode | aimdk::protocol::ControlSource | 模式 |
aimdk::protocol::McStateChannel
Section titled “aimdk::protocol::McStateChannel”遥控器控制通道
topic : /mc/base/state
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::Header | 消息头 |
| state | aimdk::protocol::McState |
aimdk::protocol::McJakaWorkMode
Section titled “aimdk::protocol::McJakaWorkMode”MC jaka工作状态
| Name | Number | Description |
|---|---|---|
| McJakaWorkMode_DEFAULT | 0 | |
| McJakaWorkMode_SERVO | 1 |
aimdk::protocol::McJakaStateResponse
Section titled “aimdk::protocol::McJakaStateResponse”| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::ResponseHeader | 响应头 |
| work_mode | aimdk::protocol::McJakaWorkMode |
aimdk::protocol::StandRequest
Section titled “aimdk::protocol::StandRequest”原地站立请求
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::RequestHeader | 通用请求头 |
| stance | aimdk::protocol::StandRequest::Stance |
aimdk::protocol::StandRequest::Stance
Section titled “aimdk::protocol::StandRequest::Stance”上肢控制类型:保持不动、回到标准姿态
| Name | Number | Description |
|---|---|---|
| FREEZE | 0 | 保持不动 |
| STAND | 1 | 回到标准姿态 |
aimdk::protocol::AdjustCommand
Section titled “aimdk::protocol::AdjustCommand”| Field | Type | Description |
|---|---|---|
| name | string | 关节或末端名称 |
| arm_type | uint32 | 1 左臂,2 右臂,3 双臂 |
| mode | aimdk::protocol::AdjustCommand::PressType | 按压模式 |
| step | double | 步长 |
| velocity | double | 速度 |
aimdk::protocol::AdjustCommand::PressType
Section titled “aimdk::protocol::AdjustCommand::PressType”| Name | Number | Description |
|---|---|---|
| UNKNOWN | 0 | |
| Short | 1 | 模式:1、点击;2、长按 |
| Long | 2 |
aimdk::protocol::AdjustCommandRequest
Section titled “aimdk::protocol::AdjustCommandRequest”| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::RequestHeader | |
| command | aimdk::protocol::AdjustCommand |
aimdk::protocol::AdjustEndPosition
Section titled “aimdk::protocol::AdjustEndPosition”| Field | Type | Description |
|---|---|---|
| name | string | 末端名称 |
| x | double | |
| y | double | |
| z | double | |
| r_x | double | |
| r_y | double | |
| r_z | double | |
| around_singularity_flag | bool | 靠近奇异位置 |
aimdk::protocol::AdjustEndPositionsResponse
Section titled “aimdk::protocol::AdjustEndPositionsResponse”| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::RequestHeader | |
| end_positions | aimdk::protocol::AdjustEndPosition[] |
aimdk::protocol::CollisionRequest
Section titled “aimdk::protocol::CollisionRequest”碰撞功能请求消息
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::RequestHeader | |
| enable | bool |
aimdk::protocol::CollisionResponse
Section titled “aimdk::protocol::CollisionResponse”碰撞功能状态响应消息
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::ResponseHeader | |
| CollisionDetectionState | bool |
aimdk::protocol::DanceTypeRequest
Section titled “aimdk::protocol::DanceTypeRequest”跳舞类型请求
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::RequestHeader | |
| dance_name | string | 选择舞蹈名称 |
aimdk::protocol::McDanceResponce
Section titled “aimdk::protocol::McDanceResponce”跳舞列表获取
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::ResponseHeader | 响应头 |
| dance_name | string[] | 舞蹈名称 |
| dance_model_path | string[] | 模型存放路径 |
| dance_data_path | string[] | 舞蹈数据存放路径 |
| dance_time | double[] | 返回舞蹈运行持续时间 |
aimdk::protocol::MovJRequest
Section titled “aimdk::protocol::MovJRequest”MovJ请求
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::RequestHeader | 请求头 |
| group | aimdk::protocol::McPlanningGroup | 规划组 |
| param | aimdk::protocol::MotionParam | 运动参数,包括速度、加速度、减速度等 |
| angles | double[] | 关节角度,单位:弧度 |
aimdk::protocol::JointControlRequest
Section titled “aimdk::protocol::JointControlRequest”MovJ请求
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::RequestHeader | 请求头 |
| group | aimdk::protocol::JointControlRequest::JointGroup | 关节组 |
| cmds | aimdk::protocol::JointControlRequest::Control[] | 控制指令 |
aimdk::protocol::JointControlRequest::JointGroup
Section titled “aimdk::protocol::JointControlRequest::JointGroup”| Name | Number | Description |
|---|---|---|
| UNKNOWN | 0 | |
| LEFT_ARM | 1 | |
| RIGHT_ARM | 4 | |
| DUAL_ARM | 7 | |
| WAIST_LIFT | 11 | |
| WAIST_PITCH | 12 | |
| HEAD | 13 |
aimdk::protocol::Control::Control
Section titled “aimdk::protocol::Control::Control”| Field | Type | Description |
|---|---|---|
| name | string | 关节名称 |
| mode | aimdk::protocol::Control::Mode | 控制模式 |
| angle | double | 关节角度,单位:弧度 |
aimdk::protocol::Control::Mode
Section titled “aimdk::protocol::Control::Mode”| Name | Number | Description |
|---|---|---|
| ABSOLUTE | 0 | 绝对角度模式 |
| RELATIVE | 1 | 相对角度模式 |
aimdk::protocol::MotionParam
Section titled “aimdk::protocol::MotionParam”运动参数
| Field | Type | Description |
|---|---|---|
| velocity_scale | double | |
| acceleration_scale | double |
aimdk::protocol::McLocomotionVelocityChannel
Section titled “aimdk::protocol::McLocomotionVelocityChannel”遥控器控制通道
topic : /motion/control/locomotion_velocity
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::Header | 消息头 |
| data | aimdk::protocol::LocomotionVelocity | 数据 |
aimdk::protocol::McMoveWaistChannel
Section titled “aimdk::protocol::McMoveWaistChannel”人形腰部控制
topic : /motion/control/move_waist
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::Header | 消息头 |
| data | aimdk::protocol::WaistMoveValue | 数据 |
aimdk::protocol::McMoveWaistLiftChannel
Section titled “aimdk::protocol::McMoveWaistLiftChannel”人形腰部控制—腰部升降
topic : /motion/control/move_waist_lift
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::Header | 消息头 |
| waist_lift_value | double | 腰部垂直位移(范围-0.15 ~ +0.04,单位:m) |
aimdk::protocol::McMoveWaistSidewaysChannel
Section titled “aimdk::protocol::McMoveWaistSidewaysChannel”人形腰部控制—腰部左歪右歪
topic : /motion/control/move_waist_sideways
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::Header | 消息头 |
| waist_sideways_value | double | 数据 |
aimdk::protocol::McMoveWaistPitchChannel
Section titled “aimdk::protocol::McMoveWaistPitchChannel”人形腰部控制—腰部前俯后仰
topic : /motion/control/move_waist_pitch
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::Header | 消息头 |
| waist_pitch_value | double | 数据 |
aimdk::protocol::McMoveWaistTwistChannel
Section titled “aimdk::protocol::McMoveWaistTwistChannel”人形腰部控制—腰部扭动
topic : /motion/control/move_waist_twist
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::Header | 消息头 |
| waist_twist_value | double | 数据 |
aimdk::protocol::McHandCommandChannel
Section titled “aimdk::protocol::McHandCommandChannel”手部指令通道
topic : /motion/control/hand_command
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::Header | 消息头 |
| data | aimdk::protocol::HandCommand | 手部指令 |
aimdk::protocol::MotorAckermannJoystickChannel
Section titled “aimdk::protocol::MotorAckermannJoystickChannel”单摇杆阿克曼
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::Header | 消息头 |
| turn_pos | double | rad s; + 逆时针, - 顺时针; gamepad_control: turn_range |
| move_vel | double | m s; + 前进行, - 后退; gamepad_control: max_velocity |
aimdk::protocol::MotorRotationChannel
Section titled “aimdk::protocol::MotorRotationChannel”原地旋转
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::Header | 消息头 |
| rot_vel | double | rad s; + 逆时针, - 顺时针; gamepad_control: max_w |
aimdk::protocol::MotorHeadPitchChannel
Section titled “aimdk::protocol::MotorHeadPitchChannel”头部俯仰
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::Header | 消息头 |
| head_pitch_vel | double | rad s; + 下弯, - 上弯; arm_joint_limits: - name: “head_link” |
aimdk::protocol::MotorWaistPitchChannel
Section titled “aimdk::protocol::MotorWaistPitchChannel”腰部,弯腰
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::Header | 消息头 |
| waist_pitch_vel | double | rad s; + 下弯, - 上弯; arm_joint_limits: - name: “idx10_joint_body_link3” |
aimdk::protocol::MotorWaistLiftChannel
Section titled “aimdk::protocol::MotorWaistLiftChannel”腰部,升降
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::Header | 消息头 |
| waist_lift_vel | double | m s; + 上升, - 下降; arm_joint_limits: - name: “idx09_joint_body_link2” |
aimdk::protocol::McArmControlChannel
Section titled “aimdk::protocol::McArmControlChannel”双臂控制消息
topic : /motion/control/joint_arm_control
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::Header | 消息头,序号和时间戳等信息 |
| flag | uint32 | 控制标记位,0是左臂,1是右臂,2是双臂 |
| positions | double[] | 关节角度、速度、加速度,力 一般包含14个元素, 前7个对应左臂,后7个对应右臂 The position of the trajectory. Unit rad |
| velocities | double[] | The velocity of the trajectory. Unit rad/s |
| accelerations | double[] | The acceleration of the trajectory. Unit rad/s^2 |
| effort | double[] | The effort of the trajectory. Unit N |
aimdk::protocol::LinearMoveTarget
Section titled “aimdk::protocol::LinearMoveTarget”直线运动姿态请求
| Field | Type | Description |
|---|---|---|
| left | aimdk::protocol::SE3Pose | |
| right | aimdk::protocol::SE3Pose |
aimdk::protocol::LinearMoveRequest
Section titled “aimdk::protocol::LinearMoveRequest”| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::RequestHeader | 请求头 |
| group | aimdk::protocol::McPlanningGroup | 规划组 |
| param | aimdk::protocol::MotionParam | 运动参数,包括速度、加速度、减速度等 |
| target | aimdk::protocol::LinearMoveTarget | 目标位姿 |
aimdk::protocol::MovePoseRequest
Section titled “aimdk::protocol::MovePoseRequest”运动姿态请求
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::RequestHeader | 请求头 |
| type | aimdk::protocol::ArmType | 机械臂类型 |
| mode | aimdk::protocol::MovePoseMode | 运动模式,绝对位置或者相对位置 |
| param | aimdk::protocol::MotionParam | 运动参数,包括速度、加速度、减速度等 |
| is_block | bool | 是否阻塞 |
| pose | aimdk::protocol::SE3Pose | 目标位姿 |
aimdk::protocol::MoveTrajectoryTarget
Section titled “aimdk::protocol::MoveTrajectoryTarget”| Field | Type | Description |
|---|---|---|
| left | aimdk::protocol::ScalarTrajectory | 左臂轨迹 |
| right | aimdk::protocol::ScalarTrajectory | 右臂轨迹 |
aimdk::protocol::MoveTrajectoryRequest
Section titled “aimdk::protocol::MoveTrajectoryRequest”运动轨迹请求
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::RequestHeader | 请求头 |
| target | aimdk::protocol::MoveTrajectoryTarget |
aimdk::protocol::WaistMoveValue
Section titled “aimdk::protocol::WaistMoveValue”| Field | Type | Description |
|---|---|---|
| x | double | 腰部水平位移(x,y范围会设置成0,不允许调整) |
| y | double | |
| z | double | 腰部垂直位移(范围-0.15 ~ +0.04,单位:m) |
| roll | double | 腰部旋转角度(RPY的范围都是-30 ~ +30°) (数据传输使用弧度:-0.5236~0.5236,单位:rad) |
| pitch | double | |
| yaw | double |
aimdk::protocol::LocomotionGaitType
Section titled “aimdk::protocol::LocomotionGaitType”| Name | Number | Description |
|---|---|---|
| LocomotionGaitType_UNKNOWN | 0 | 步态: 未知,非行走action下应当设置 |
| LocomotionGaitType_STANCE | 1 | 步态: 站住 |
| LocomotionGaitType_WALK | 2 | 步态: 正常行走,无速度指令时踏步 |
| LocomotionGaitType_SMART_WALK | 3 | 步态: 正常行走,无速度指令时站住 |
| LocomotionGaitType_RUN | 4 | 步态: 跑步 |
| LocomotionGaitType_JUMP | 5 | 步态: 双脚跳 |
| LocomotionGaitType_HOP | 6 | 步态: 单脚跳 |
aimdk::protocol::LocomotionMode
Section titled “aimdk::protocol::LocomotionMode”| Name | Number | Description |
|---|---|---|
| LocomotionMode_DEFAULT | 0 | 默认模式 适用于遥控场景 |
| LocomotionMode_NAVIGATION | 1 | 导航模式 速度响应更快,0.05m/s激活踏步,踏步后500ms内无速度指令会停止踏步,适用于自动行走的导航场景 |
aimdk::protocol::LocomotionVelocity
Section titled “aimdk::protocol::LocomotionVelocity”| Field | Type | Description |
|---|---|---|
| mode | aimdk::protocol::LocomotionMode | 速度控制模式 |
| forward_velocity | double | 前进速度 单位: m/s 方向: +为前进,-为后退 速度范围: 根据机器人实际速度限制 |
| lateral_velocity | double | 侧移动速度 单位: m/s 方向: +为左侧移动,-为右侧移动 速度范围: 根据机器人实际速度限制 |
| angular_velocity | double | 旋转速度(角速度) 单位: m/s 方向: +为左旋转,-为右旋转 速度范围: 根据机器人实际速度限制 |
aimdk::protocol::LocomotionGaitRequest
Section titled “aimdk::protocol::LocomotionGaitRequest”机器人步态请求
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::RequestHeader | 请求头 |
| gait | aimdk::protocol::LocomotionGaitType | 机器人步态 |
aimdk::protocol::LocomotionGaitResponse
Section titled “aimdk::protocol::LocomotionGaitResponse”机器人步态查询返回
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::ResponseHeader | 请求头 |
| gait | aimdk::protocol::LocomotionGaitType | 机器人步态 |
aimdk::protocol::PlanningMoveObjectInfo
Section titled “aimdk::protocol::PlanningMoveObjectInfo”| Field | Type | Description |
|---|---|---|
| name | string | |
| pose | aimdk::protocol::SE3Pose | |
| type | aimdk::protocol::PlanningMoveObjectInfo::GeometryType | |
| parent_frame | string |
aimdk::protocol::PlanningMoveObjectInfo::GeometryType
Section titled “aimdk::protocol::PlanningMoveObjectInfo::GeometryType”| Name | Number | Description |
|---|---|---|
| UNKNOWN | 0 | |
| BOX | 1 | |
| CYLINDER | 2 | |
| SPHERE | 3 |
aimdk::protocol::PlanningTarget
Section titled “aimdk::protocol::PlanningTarget”| Field | Type | Description |
|---|---|---|
| type | aimdk::protocol::PlanningTarget::Type | |
| left | aimdk::protocol::SE3Pose | |
| right | aimdk::protocol::SE3Pose | |
| joints | double[] |
aimdk::protocol::PlanningTarget::Type
Section titled “aimdk::protocol::PlanningTarget::Type”| Name | Number | Description |
|---|---|---|
| UNKNOWN | 0 | |
| SE3 | 1 | |
| JOINT | 2 | |
| EE | 3 |
aimdk::protocol::PlanningReference
Section titled “aimdk::protocol::PlanningReference”| Field | Type | Description |
|---|---|---|
| joint_position | double[] | 参考的关节角度,数量需要与group的关节数量一致 |
| trajectory | aimdk::protocol::ScalarTrajectory |
aimdk::protocol::PlanningMoveRequest
Section titled “aimdk::protocol::PlanningMoveRequest”| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::RequestHeader | 请求头 |
| world_model | aimdk::protocol::McPlanningWorldModel | |
| group | aimdk::protocol::McPlanningGroup | 规划组 |
| mode | aimdk::protocol::McPlanningMode | 模式 |
| target | aimdk::protocol::PlanningTarget | 目标位置 |
| targets | aimdk::protocol::PlanningTarget[] | 多目标位置 |
| reference | aimdk::protocol::PlanningReference | 参考位置 |
| obj_info | aimdk::protocol::PlanningMoveObjectInfo | |
| param | aimdk::protocol::MotionParam | 运动参数 |
aimdk::protocol::ComputeKinematicsRequest
Section titled “aimdk::protocol::ComputeKinematicsRequest”| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::RequestHeader | 请求头 |
| group | aimdk::protocol::McPlanningGroup | 规划组 |
| target | aimdk::protocol::PlanningTarget | 目标位置 |
| reference | aimdk::protocol::PlanningReference | 参考位置 |
aimdk::protocol::ComputeKinematicsResponse
Section titled “aimdk::protocol::ComputeKinematicsResponse”| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::ResponseHeader | 响应头 |
| success_flag | bool | |
| ik_results | aimdk::protocol::ScalarTrajectory | 规划的轨迹 |
aimdk::protocol::ActiveMotionControlRequest
Section titled “aimdk::protocol::ActiveMotionControlRequest”主动动作暂停/继续rpc
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::RequestHeader | 请求头 |
| control_flag | bool | control_flag: 0继续; 1暂停; |
aimdk::protocol::TempPlanningMoveResponse
Section titled “aimdk::protocol::TempPlanningMoveResponse”| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::ResponseHeader | 响应头 |
| task_id | uint64 | |
| state | aimdk::protocol::CommonState | |
| trajectory | aimdk::protocol::ScalarTrajectory | 规划的轨迹 |
aimdk::protocol::McAction
Section titled “aimdk::protocol::McAction”| Name | Number | Description |
|---|---|---|
| McAction_DEFAULT | 0 | 默认模式 运控启动之后的默认action |
| McAction_PASSIVE_UPPER_BODY_JOINT_SERVO | 1 | // 被动模式 // 初始启动需切换到当前action,才能进行后续操作 McAction_PASSIVE_DEFAULT = 1; 下肢被动上肢伺服模式 下肢不使能,手臂可以接收外部关节伺服指令 |
| McAction_PASSIVE_UPPER_BODY_PLANNING_MOVE | 2 | 下肢被动上肢RRT规划模式 下肢不使能,上肢路径规划,rpc接收目标关节角或SE3位置 |
| McAction_PASSIVE_UPPER_BODY_COLLISON_ESCAPE | 3 | 下肢被动上肢躲避碰撞模式 下肢不使能,上肢发生碰撞后,规划将失效,切到该模式可以移动到非碰撞位置 |
| McAction_JOINT_DEFAULT | 100 | 位控站立模式 上肢和下肢关节动作到标准站立位置 |
| McAction_JOINT_FREEZE | 101 | 位控关节锁定模式 上肢和下肢锁定在当前位置 |
| McAction_STAND_DEFAULT | 201 | 力控站立模式 下肢力控站立,上肢动作到设定的默认位置,不能控制手臂 此模式允许对机身(腰)进行伺服控制,包括下蹲、弯腰(pitch)、转身(yaw)和左右摇摆(roll)等。 |
| McAction_STAND_ARM_FREEZE | 202 | 力控站立上肢锁定模式 下肢力控站立,上肢锁定在当前位置 |
| McAction_STAND_ARM_EXT_JOINT_SERVO | 203 | 力控站立上肢伺服模式 下肢站立,手臂可以接受外部关节伺服指令 |
| McAction_STAND_ARM_EXT_JOINT_TRAJ | 204 | 力控站立上肢规划模式 用于客户实现上肢路径规划,rpc通信接收关节角度,支持任意数量路径点(建议500以下) |
| McAction_STAND_ARM_EXT_JOINT_ONLINE_TRAJ | 205 | 力控站立上肢规划在线模式 用于客户实现上肢路径规划,实时话题接收14个关节角度、速度等,按点位队列顺序执行 |
| McAction_LOCOMOTION_DEFAULT | 301 | 行走模式 行走时手臂会摆动,支持平地和5°以下斜坡地形全向行走,允许驻坡,禁止外部对上肢进行控制 |
| McAction_LOCOMOTION_ARM_EXT_JOINT_SERVO | 302 | 下肢行走上肢伺服模式 支持平地地形全向行走,允许外部对上肢进行边走边控制 |
| McAction_RL_JOINT_DEFAULT | 400 | 强化位控站立模式 机器人强化位控站立,直腿站立 |
| McAction_RL_LOCOMOTION_DEFAULT | 401 | 强化行走模式 强化学习训练的行走模式,直腿行走 |
| McAction_RL_LOCOMOTION_ARM_EXT_JOINT_SERVO | 402 | 强化行走上肢伺服模式 下肢可以强化行走,上肢可以接受外部关节伺服指令,边走边做动作 |
| McAction_RL_LOCOMOTION_ARM_EXT_PLANNING_MOVE | 403 | 强化站立上肢RRT规划模式 下肢力控站立,上肢路径规划,rpc接收目标关节角或SE3位置 |
| McAction_RL_LOCOMOTION_ARM_EXT_COLLISON_ESCAPE | 404 | 强化站立上肢躲避碰撞模式 下肢力控站立,上肢躲避自碰撞 |
| McAction_RL_WHOLE_BODY_EXT_JOINT_SERVO | 405 | 带腰全身运控模式 |
| McAction_RL_WHOLE_BODY_DANCE | 406 | 全身舞蹈模式 |
| McAction_SIT_DOWN | 501 | 坐下模式 机器人坐下 |
| McAction_STAND_UP | 502 | 站起模式 机器人站起 |
| McAction_MOBILE_PLATFORM_SIT_DOWN | 503 | 移动平台位控坐下模式 机器人移动平台坐下 |
| McAction_MOBILE_PLATFORM_STAND_UP | 504 | 移动平台位控站起模式 机器人移动平台站起 |
| McAction_USE_EXT_CMD | 5000 | 机器人使用扩展命令 |
aimdk::protocol::McActionStatus
Section titled “aimdk::protocol::McActionStatus”| Name | Number | Description |
|---|---|---|
| McActionStatus_UNKNOWN | 0 | 未知状态 |
| McActionStatus_PREPARE | 100 | 准备中 |
| McActionStatus_RUNNING | 200 | 运行中 |
| McActionStatus_DONE | 300 | 完成 |
aimdk::protocol::McActionInfo
Section titled “aimdk::protocol::McActionInfo”| Field | Type | Description |
|---|---|---|
| current_action | aimdk::protocol::McAction | 当前运行的Action |
| ext_action | string | 扩展Action |
| status | aimdk::protocol::McActionStatus | Action状态 |
aimdk::protocol::McActionCommand
Section titled “aimdk::protocol::McActionCommand”| Field | Type | Description |
|---|---|---|
| action | aimdk::protocol::McAction | Action |
| ext_action | string | 扩展Action |
aimdk::protocol::McActionRequest
Section titled “aimdk::protocol::McActionRequest”机器人Action命令请求
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::RequestHeader | 请求头 |
| command | aimdk::protocol::McActionCommand |
aimdk::protocol::McActionResponse
Section titled “aimdk::protocol::McActionResponse”机器人Action命令响应
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::ResponseHeader | 响应头 |
| info | aimdk::protocol::McActionInfo |
aimdk::protocol::AvailableActionsResponse
Section titled “aimdk::protocol::AvailableActionsResponse”| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::ResponseHeader | 响应头 |
| actions | string[] |
aimdk::protocol::AvailableCommandResponse
Section titled “aimdk::protocol::AvailableCommandResponse”| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::ResponseHeader | 响应头 |
| commands | aimdk::protocol::McActionCommand[] |
aimdk::protocol::GetSimulationObjRequest
Section titled “aimdk::protocol::GetSimulationObjRequest”获取仿真对象请求
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::RequestHeader | 请求头 |
| obj_id | string[] | 物体id |
aimdk::protocol::GetSimulationObjResponse
Section titled “aimdk::protocol::GetSimulationObjResponse”| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::ResponseHeader | 响应头 |
| obj_pose | aimdk::protocol::SE3Pose[] | 物体位姿 |
| error_code | int32 | 错误码 |
aimdk::protocol::ArmType
Section titled “aimdk::protocol::ArmType”臂类型
| Name | Number | Description |
|---|---|---|
| ArmType_UNKNOWN | 0 | 未定义 |
| ArmType_LEFT | 1 | 左臂 |
| ArmType_RIGHT | 2 | 右臂 |
aimdk::protocol::MovePoseMode
Section titled “aimdk::protocol::MovePoseMode”运动位置模式: 绝对位置或者相对位置
| Name | Number | Description |
|---|---|---|
| MovePoseMode_UNKNOWN | 0 | 未定义 |
| MovePoseMode_ABSOLUTE | 1 | 绝对位置 |
| MovePoseMode_RELATIVE | 2 | 相对位置 |
aimdk::protocol::McPlanningGroup
Section titled “aimdk::protocol::McPlanningGroup”规划组
| Name | Number | Description |
|---|---|---|
| McPlanningGroup_UNKNOWN | 0 | 未知 |
| McPlanningGroup_LEFT_ARM | 1 | 左臂 |
| McPlanningGroup_LEFT_ARM_WAIST | 2 | 左臂腰部 |
| McPlanningGroup_LEFT_ARM_WAIST_WHEEL | 3 | 左臂腰部轮子 |
| McPlanningGroup_RIGHT_ARM | 4 | 右臂 |
| McPlanningGroup_RIGHT_ARM_WAIST | 5 | 右臂腰部 |
| McPlanningGroup_RIGHT_ARM_WAIST_WHEEL | 6 | 右臂腰部轮子 |
| McPlanningGroup_DUAL_ARM | 7 | 双臂 |
| McPlanningGroup_DUAL_ARM_WAIST | 8 | 双臂腰部 |
| McPlanningGroup_DUAL_ARM_WAIST_WHEEL | 9 | 双臂腰部轮子 |
| McPlanningGroup_DUAL_ARM_WAIST_HEAD | 10 | 双臂腰部头部 |
| McPlanningGroup_WAIST_LIFT | 11 | 腰部升降 |
| McPlanningGroup_WAIST_PITCH | 12 | 腰部俯仰 |
| McPlanningGroup_HEAD | 13 | 头部 |
aimdk::protocol::McPlanningMode
Section titled “aimdk::protocol::McPlanningMode”| Name | Number | Description |
|---|---|---|
| McPlanningMode_DEFAULT | 0 | 默认避障规划。left_target right_target |
| McPlanningMode_CLOSURE | 100 | 闭链规划,抓物体后调用,obj_center |
| McPlanningMode_GRAB | 200 | 抓取,obj_center |
| McPlanningMode_PLACE | 300 | 放置 |
| McPlanningMode_LINEAR_MOVE | 400 | 线性运动 |
aimdk::protocol::McPlanningWorldModel
Section titled “aimdk::protocol::McPlanningWorldModel”任务规划世界模型
本类型无字段
aimdk::protocol::McPlanningScene
Section titled “aimdk::protocol::McPlanningScene”任务规划场景
本类型无字段
aimdk::protocol::CollisionRecoverRequest
Section titled “aimdk::protocol::CollisionRecoverRequest”冲突恢复请求
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::RequestHeader | 请求头 |
| type | aimdk::protocol::ArmType | 手臂类型 |
aimdk::protocol::PrimitiveType
Section titled “aimdk::protocol::PrimitiveType”- 装配任务相关动作指令接口
| Name | Number | Description |
|---|---|---|
| PrimitiveType_UNKNOWN | 0 | |
| PrimitiveType_SLIDE_SPIRAL | 1 | 螺旋线搜索 |
| PrimitiveType_SLIDE_SPIRAL_DUAL | 2 | 双臂螺旋线搜索 |
| PrimitiveType_SLIDE_ZIGZAG | 3 | 之字形搜索 |
| PrimitiveType_SLIDE_ZIGZAG_DUAL | 4 | 双臂之字形搜索 |
| PrimitiveType_SLEEVE | 5 | 力控插拔 |
| PrimitiveType_SLEEVE_DUAL | 6 | 双臂力控插拔 |
| PrimitiveType_CONTACT | 7 | 力控接触 |
| PrimitiveType_CONTACT_DUAL | 8 | 双臂力控接触 |
aimdk::protocol::PtTriggerConditionType
Section titled “aimdk::protocol::PtTriggerConditionType”| Name | Number | Description |
|---|---|---|
| PtTriggerConditionType_UNKNOWN | 0 | |
| PtTriggerConditionType_AND | 1 | AND |
| PtTriggerConditionType_OR | 2 | OR |
| PtTriggerConditionType_EQUAL | 3 | EQUAL |
| PtTriggerConditionType_LESS | 4 | LESS |
| PtTriggerConditionType_GREATER | 5 | GREATER |
| PtTriggerConditionType_GREATER_EQUAL | 6 | GREATER_EQUAL |
| PtTriggerConditionType_LESS_EQUAL | 7 | LESS_EQUAL |
aimdk::protocol::PtTriggerConditionParam
Section titled “aimdk::protocol::PtTriggerConditionParam”动作指令触发停止条件参数定义
| Field | Type | Description |
|---|---|---|
| name | string | 停止条件名称 |
| data | double | 停止条件判定标准值 |
| state | double | 停止条件状态值 |
aimdk::protocol::PtTriggerCondition
Section titled “aimdk::protocol::PtTriggerCondition”动作指令触发停止条件
| Field | Type | Description |
|---|---|---|
| type | aimdk::protocol::PtTriggerConditionType | 停止条件类型(多类型:“AND”, “OR”,单类型:“EQUAL”, “LESS”, “GREATER”, “GREATER_EQUAL”, “LESS_EQUAL”) |
| param | aimdk::protocol::PtTriggerConditionParam | 停止条件参数 |
aimdk::protocol::PtTriggerConfig
Section titled “aimdk::protocol::PtTriggerConfig”动作指令触发停止条件配置
| Field | Type | Description |
|---|---|---|
| type | aimdk::protocol::PtTriggerConditionType | 停止条件类型(通常用于组合多个 PtTriggerCondition) |
| conditions | aimdk::protocol::PtTriggerCondition[] | 停止条件列表 |
aimdk::protocol::PtWiggleParam
Section titled “aimdk::protocol::PtWiggleParam”搜索时姿态震荡参数
| Field | Type | Description |
|---|---|---|
| range | double | 震动幅度 |
| period | double | 震动周期 |
aimdk::protocol::ExternalForceCtrlParam
Section titled “aimdk::protocol::ExternalForceCtrlParam”e 外力导纳参数
| Field | Type | Description |
|---|---|---|
| external_force_axis | int32[] | 力控轴 |
| external_goal_wrench | double[] | 目标力 |
| external_kp | double[] | 力增益 |
| external_kv | double[] | 阻尼 |
| external_ki | double[] | 力积分 |
| external_max_integral | double[] | 积分限制 |
aimdk::protocol::InternalForceCtrlParam
Section titled “aimdk::protocol::InternalForceCtrlParam”e 内力导纳参数
| Field | Type | Description |
|---|---|---|
| internal_force_axis | int32[] | 力控轴 |
| internal_goal_wrench | double[] | 目标力 |
| internal_kp | double[] | 力增益 |
| internal_kv | double[] | 阻尼 |
| internal_ki | double[] | 力积分 |
| internal_max_integral | double[] | 积分限制 |
aimdk::protocol::AssemblyCtrlParam
Section titled “aimdk::protocol::AssemblyCtrlParam”e 装配控制任务
| Field | Type | Description |
|---|---|---|
| external_admittance | aimdk::protocol::ExternalForceCtrlParam | 外力导纳 |
| internal_admittance | aimdk::protocol::InternalForceCtrlParam[] | 内力导纳列表 |
aimdk::protocol::PtSlideCommonParam
Section titled “aimdk::protocol::PtSlideCommonParam”力控搜索通用参数
| Field | Type | Description |
|---|---|---|
| contact_axis | double[] | 接触轴 |
| search_axis | double[] | 搜索轴 |
| contact_force | double | 接触力 |
| start_density | double | 起始搜索轨迹密度 |
| time_factor | int32 | 控制搜索轨迹快慢,越小轨迹运动速度越快 |
| random_factor | double | 噪声叠加幅度控制系数 |
| start_search_immediately | bool | 是否进入立即开始搜索 |
aimdk::protocol::PtSlideSpiralParam
Section titled “aimdk::protocol::PtSlideSpiralParam”螺旋线搜索参数
| Field | Type | Description |
|---|---|---|
| search_radius | double | 搜索最大半径 |
| wiggle | aimdk::protocol::PtWiggleParam | 搜索时姿态震荡参数 |
| common | aimdk::protocol::PtSlideCommonParam | 力控搜索通用参数 |
| pt_slide_trigger | aimdk::protocol::PtTriggerConfig | 动作指令触发停止条件 |
| pt_control_param | aimdk::protocol::ExternalForceCtrlParam | 控制参数 |
aimdk::protocol::PtDualSlideSpiralParam
Section titled “aimdk::protocol::PtDualSlideSpiralParam”双臂螺旋线搜索参数
| Field | Type | Description |
|---|---|---|
| search_radius | double | 搜索最大半径 |
| wiggle | aimdk::protocol::PtWiggleParam | 搜索时姿态震荡参数 |
| common | aimdk::protocol::PtSlideCommonParam | 力控搜索通用参数 |
| pt_dual_slide_trigger | aimdk::protocol::PtTriggerConfig | 触发条件 |
| pt_control_param | aimdk::protocol::AssemblyCtrlParam | 控制参数 |
aimdk::protocol::PtSlideZigzagParam
Section titled “aimdk::protocol::PtSlideZigzagParam”之字形搜索参数
| Field | Type | Description |
|---|---|---|
| length | double | 搜索区域长度 |
| height | double | 搜索区域宽度 |
| wiggle | aimdk::protocol::PtWiggleParam | 搜索时姿态震荡参数 |
| common | aimdk::protocol::PtSlideCommonParam | 力控搜索通用参数 |
| pt_slide_trigger | aimdk::protocol::PtTriggerConfig | 动作指令触发停止条件 |
| pt_control_param | aimdk::protocol::ExternalForceCtrlParam | 控制参数 |
aimdk::protocol::PtDualSlideZigzagParam
Section titled “aimdk::protocol::PtDualSlideZigzagParam”双臂之字形搜索参数
| Field | Type | Description |
|---|---|---|
| length | double | 搜索区域长度 |
| height | double | 搜索区域宽度 |
| wiggle | aimdk::protocol::PtWiggleParam | 搜索时姿态震荡参数 |
| common | aimdk::protocol::PtSlideCommonParam | 力控搜索通用参数 |
| pt_dual_slide_trigger | aimdk::protocol::PtTriggerConfig | 动作指令触发停止条件 |
| pt_control_param | aimdk::protocol::AssemblyCtrlParam | 控制参数 |
aimdk::protocol::PtSleeveParam
Section titled “aimdk::protocol::PtSleeveParam”力控插拔及触发停止条件
| Field | Type | Description |
|---|---|---|
| insert_dir | double[] | 插入方向 (tcp) |
| alignment_dir | int32[] | 哪些方向需要开柔顺 |
| max_contact_force | double | 最大力限制保护 |
| insert_vel | double | 插入速度 |
| deadband_scale | double | 力控柔顺时调整死区系数 |
| pt_sleeve_trigger | aimdk::protocol::PtTriggerConfig | 触发条件 |
| pt_control_param | aimdk::protocol::ExternalForceCtrlParam | 控制参数 |
aimdk::protocol::PtDualSleeveParam
Section titled “aimdk::protocol::PtDualSleeveParam”双臂力控插拔及触发停止条件
| Field | Type | Description |
|---|---|---|
| insert_dir | double[] | 插入方向 (tcp) |
| alignment_dir | int32[] | 哪些方向需要开柔顺 |
| max_contact_force | double | 最大力限制保护 |
| insert_vel | double | 插入速度 |
| deadband_scale | double | 力控柔顺时调整死区系数 |
| pt_dual_sleeve_trigger | aimdk::protocol::PtTriggerConfig | 触发条件 |
| pt_control_param | aimdk::protocol::AssemblyCtrlParam | 控制参数 |
aimdk::protocol::PtContactParam
Section titled “aimdk::protocol::PtContactParam”力控接触及触发停止条件
| Field | Type | Description |
|---|---|---|
| refer_coordinate | string | 接触参考坐标系 (tcp/world) |
| freespace_vel | double | 自由空间内速度 |
| contact_dir | double[] | 接触方向 |
| max_contact_force | double | 最大接触力保护 |
| pt_contact_trigger | aimdk::protocol::PtTriggerConfig | 力控接触通用参数 |
aimdk::protocol::PrimitiveAction
Section titled “aimdk::protocol::PrimitiveAction”力控动作指令
| Field | Type | Description |
|---|---|---|
| name | string | 力控动作名称:未使用(不建议使用) |
| type | aimdk::protocol::PrimitiveType | 力控动作类型 |
| param | google.protobuf.Any | 力控动作参数 以下参数均为动作参数,具体取值请参考上面的定义 - PtSlideSpiralParam: 螺旋线搜索参数 - PtSlideZigzagParam: 之字形搜索参数 - PtSleeveParam: 柔顺参数 - PtContactParam: 接触参数 - PtDualSlideSpiralParam: 双臂螺旋线搜索参数 - PtDualSlideZigzagParam: 双臂之字形搜索参数 - PtDualSleeveParam: 双臂柔顺参数 |
aimdk::protocol::ForcePrimitive
Section titled “aimdk::protocol::ForcePrimitive”力控动作组
| Field | Type | Description |
|---|---|---|
| actions | aimdk::protocol::PrimitiveAction[] |
aimdk::protocol::ForcePrimitiveRequest
Section titled “aimdk::protocol::ForcePrimitiveRequest”| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::RequestHeader | |
| task | oneof {ForcePrimitive left} {ForcePrimitive right} {ForcePrimitive dual} |
aimdk::protocol::McJointStatesResponse
Section titled “aimdk::protocol::McJointStatesResponse”运控公共状态响应
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::ResponseHeader | 响应头 |
| states | aimdk::protocol::JointState[] | 关节状态,包括角度和速度、扭矩 |
aimdk::protocol::McJointCommandsResponse
Section titled “aimdk::protocol::McJointCommandsResponse”运控公共状态响应
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::ResponseHeader | 响应头 |
| commands | aimdk::protocol::JointCommand[] | 关节指令 |
aimdk::protocol::McJointParamsResponse
Section titled “aimdk::protocol::McJointParamsResponse”运控公共参数响应
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::ResponseHeader | 响应头 |
| params | aimdk::protocol::JointParam[] | 关节参数 |
aimdk::protocol::McJointPosition
Section titled “aimdk::protocol::McJointPosition”| Field | Type | Description |
|---|---|---|
| name | string | 关节名称 |
| position | double | 关节角度 |
aimdk::protocol::McJointAnglesResponse
Section titled “aimdk::protocol::McJointAnglesResponse”运控公共角度响应
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::ResponseHeader | 响应头 |
| joints | aimdk::protocol::McJointPosition[] | 关节角度,单位:弧度 or m |
aimdk::protocol::ArmStatus
Section titled “aimdk::protocol::ArmStatus”臂状态
| Field | Type | Description |
|---|---|---|
| error_code | bool | 错误码 |
| inpos | bool | 位置 |
| enable | bool | 是否可用 |
| protective_stop | bool | 碰撞保护 |
| on_soft_limit | bool | 软限位 |
aimdk::protocol::ArmStatusRequest
Section titled “aimdk::protocol::ArmStatusRequest”臂状态请求
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::RequestHeader | 请求头 |
| arm_type | aimdk::protocol::ArmType | 臂类型 |
aimdk::protocol::ArmStatusResponse
Section titled “aimdk::protocol::ArmStatusResponse”臂状态请求响应
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::ResponseHeader | 响应头 |
| arm_status | aimdk::protocol::ArmStatus | 臂状态信息 |
aimdk::protocol::GetTcpPositionResponse
Section titled “aimdk::protocol::GetTcpPositionResponse”获得Tcp位置响应
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::ResponseHeader | 响应头 |
| tcp_position | aimdk::protocol::SE3Pose[] | TCP位姿 |
aimdk::protocol::MotionGPTState
Section titled “aimdk::protocol::MotionGPTState”运动GPT状态
| Name | Number | Description |
|---|---|---|
| MotionGPTState_WAIT_MGPT_COMMAND | 0 | 等待命令 |
| MotionGPTState_MOVING_TO_FIRST_POINT | 1 | 移动到第一个点 |
| MotionGPTState_ARRIVED_FIRST_POINT | 2 | 到达第一个点 |
| MotionGPTState_MOVING_TO_FINAL_POINT | 3 | 移动到最后一个点 |
| MotionGPTState_ARRIVED_FINAL_POINT | 4 | 到达最后一个点 |
| MotionGPTState_MGPT_FINISHED | 5 | 已完成 |
aimdk::protocol::MotionGPTStateRequest
Section titled “aimdk::protocol::MotionGPTStateRequest”运动GPT状态请求
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::RequestHeader | 请求头 |
| state | aimdk::protocol::MotionGPTState | 状态 |
aimdk::protocol::MotionGPTStateResponse
Section titled “aimdk::protocol::MotionGPTStateResponse”运动GPT状态响应
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::ResponseHeader | 响应头 请求头 |
| state | aimdk::protocol::MotionGPTState | 状态 |
aimdk::protocol::McPlanningGroupAvailableResponse
Section titled “aimdk::protocol::McPlanningGroupAvailableResponse”任务规划组可用状态响应
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::ResponseHeader | 响应头 |
| groups | aimdk::protocol::McPlanningGroup[] | 可用组 |
aimdk::protocol::KineInverseRequest
Section titled “aimdk::protocol::KineInverseRequest”逆向运动请求
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::RequestHeader | 请求头 |
| type | aimdk::protocol::ArmType | 手臂类型 手臂类型 |
| ref_angles | double[] | 关节角度,单位:弧度 or m |
| cartesian_pose | aimdk::protocol::SE3Pose | 目标位姿 |
aimdk::protocol::KineInverseResponse
Section titled “aimdk::protocol::KineInverseResponse”逆向运动响应
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::ResponseHeader | 响应头 |
| type | aimdk::protocol::ArmType | 手臂类型 |
| angles | double[] | 关节角度,单位:弧度 or m |
| error_code | int32 | 错误码 |
| error_msg | string | 错误信息 |
aimdk::protocol::KineForwardRequest
Section titled “aimdk::protocol::KineForwardRequest”前向运动请求
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::RequestHeader | 请求头 |
| type | aimdk::protocol::ArmType | 手臂类型 |
| angles | double[] | 关节角度,单位:弧度 or m |
aimdk::protocol::KineForwardResponse
Section titled “aimdk::protocol::KineForwardResponse”前向运动响应
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::ResponseHeader | 响应头 |
| type | aimdk::protocol::ArmType | 手臂类型 |
| cartesian_pose | aimdk::protocol::SE3Pose | 目标位姿 |
| error_code | int32 | 错误码 |
| error_msg | string | 错误信息 |
aimdk::protocol::FootKinematicsChannel
Section titled “aimdk::protocol::FootKinematicsChannel”足部运动学消息
topic : /mc/kinematics/foot_kine
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::Header | 消息头 |
| data | aimdk::protocol::FootKinematicsData | 足部运动学数据 |
aimdk::protocol::FootKinematics
Section titled “aimdk::protocol::FootKinematics”逆向运动请求
| Field | Type | Description |
|---|---|---|
| type | aimdk::protocol::FootKinematics::Type | |
| pose | aimdk::protocol::SE3Pose | body frame, xyz |
| velocity | aimdk::protocol::SE3Velocity | body frame, m/s |
| contact_phase | double | 0.0~1.0 : 0:swing; 1:contact |
aimdk::protocol::FootKinematics::Type
Section titled “aimdk::protocol::FootKinematics::Type”| Name | Number | Description |
|---|---|---|
| UNKNOWN | 0 | |
| LEFT | 1 | |
| RIGHT | 2 |
aimdk::protocol::FootKinematicsData
Section titled “aimdk::protocol::FootKinematicsData”| Field | Type | Description |
|---|---|---|
| foot | aimdk::protocol::FootKinematics[] | 一般情况下,存在2个数据,一个是左脚,一个是右脚 |
运动控制示例脚本
Section titled “运动控制示例脚本”运动控制模块接口提供了多种运动控制功能,为此提供了一些示例脚本,位于 AimDK 包中 examples/mc 路径下,可以参考这些脚本进行运动控制相关的开发,一些脚本的说明如下:
| 名称 | 功能 | 备注 |
|---|---|---|
| SetAction.py | 设置 Action | 需按照状态机切换机器人动作,具体见前述 Action 状态机 |
| actions.py | 获取当前 Action | 获取当前 Action |
| GetAvailableCommands.py | 获取 action 切换命令接口 | 获取所有 action 切换命令,可用于设置 action |
| GetJointState.py | 获取关节状态 | 获取机器人所有关节状态信息(不含头和手),包括名称、位置、速度等 |
| GetJointAngle.py | 获取关节角度 | 获取机器人所有关节角度信息(不含头和手),包括名称、位置 |
| GetHandState.py | 获取手部关节状态 | 获取机器人手部状态信息,包括名称、位置、速度等 |
| GetNeckState.py | 获取头部关节状态 | 获取机器人头部状态信息,包括名称、位置、速度等 |
| GetTaskState.py | 查询任务状态 | 查询执行运动的任务状态,需要传入 task id,主要用于 PlanningMove 任务查询 |
| SetHandCommand.py | 设置手势 | 设置机器人双手的手指位置和扭矩 |
| SetNeckCommand.py | 设置头部关节 | 设置机器人头部关节的位置 |
| PlanningMove.py | 规划运动 | 规划运动,需要传入目标位置和参考位置 |
| walk.py | 机器人运动指令 | 设置机器人前向、侧向和旋转运动指令 |
| arm.py | 透传手臂控制 | 不会对手臂关节进行规划,会直接透传(需要进行数据平滑处理);需要传入 14 个关节角度值,前 7 个为左手,后 7 个为右手 |
| hand.py | 透传手指头控制 | 左右手指的十二个关节,拇指有两个关节 |
| neck.py | 透传头部控制 | 头部有两个关节 |
| joint_state.py | 订阅上肢关节数据 | 可通过修改话题名获取脖子和手部以及手臂关节数据 |
| move_waist.py | 腰部运动 | 腰部运动,包括腰部升降、腰部俯仰、腰部扭动、腰部侧歪 |
| move_waist_lift.py | 腰部升降 | 腰部升降,范围为 -0.15 ~ +0.00,单位为 m |
| SelectDanceType.py | 选择舞蹈 | 选择要跳的舞蹈 |