跳到主要内容

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_s2action
取消加油production_movie/fist_down_s2action
打招呼greetings_s2action
比心production_movie/loveaction
比心回零production_movie/post_loveaction
握手qyh/handshakecmd="start" 或 cmd="stop"service
握手回零qyh/post_handshakestop后回零action