7.14 动作库
7.14.1 动作库接口
- 说明:调用预设的动作,在STAND或者POSITION_CTRL状态下运行
- 控制方式:action 以及 service
- 话题名称:/mc/manipulation/action 和 /mc/manipulation/service
- 数据定义位置:mc_task_msgs::action::ArmTask 和mc_task_msgs::srv::WalkerMotion
- 数据格式:
mc_task_msgs::action::ArmTask
# motion id indicates different motions
string task_name
# motion arguments packed in a json string
# corresponding profile.json file describe how to parse there json arguments
string yaml_args ""
---
# Result motion execute result
rosa_msgs/NodeState state
---
# Feedback
rosa_msgs/NodeState state
float64 total_time
float64 current_time
mc_task_msgs::srv::WalkerMotion
# motion id indicates different motions
string motion_id
# motion arguments packed in a json string
# corresponding profile.json file describe how to parse there json arguments
string json_args
# 'start' or 'stop' motion
string CMD_START=start
string CMD_STOP=stop
string cmd
---
# motion execute result
bool ok
# error message
string message
- 示例
ros2 action send_goal /mc/manipulation/action mc_task_msgs/action/ArmTask \
"{task_name: '<动作名>', yaml_args: '<参数字符串>'}"
- 支持动作列表:
| 动作 | task_name | 备注 | 类型 |
|---|---|---|---|
| 加油 | production_movie/fist_up_s2 | action | |
| 取消加油 | production_movie/fist_down_s2 | action | |
| 打招呼 | greetings_s2 | action | |
| 比心 | production_movie/love | action | |
| 比心回零 | production_movie/post_love | action | |
| 握手 | qyh/handshake | cmd="start" 或 cmd="stop" | service |
| 握手回零 | qyh/post_handshake | stop后回零 | action |