Kamo ROS学习笔记——Action

Action

- 在使用service的过程中,请求送出后无法得知其处理的进度。

- Action类似于Service,带有状态反馈的通信方式,通常用在长时间、可抢占的任务中
webwxgetmsgimg.jpeg

-传递的消息goal 我们的请求,任务执行的目标

-cancel:任务执行中间可能需要cancel这个任务
--回调status:Action执行的状态
-result 会把结果反馈到Client
-feeback 表示反馈的状态 比如小车的位置等等

action

:action通信的数据格式:
:定义在*.action文件中:
举例:./action/DoDishes.action

#Define the goal //由Client指定的目标
uint32 dishwasher_id
# Specify which diswasher we want to use
---
#Define the result //service回传给Client的
uint32 total_dishes_cleaned
---
#Define a feedback message 
float32 percent_complete
//与result的区别:result只当动作执行完回传一次 而feedback是实时的 可传递多次

move_base_msgs/action/MoveBase.action //导航功能包

geometry_msgs/PoseStamped target_pose //目标的位姿
//stamped表示带时间戳 包括了平移和旋转
---
//result为空 无内容
---
geometry_msgs/PoseStamped base_position //状态的实时反馈,当前所在的位姿

你可能感兴趣的:(Kamo ROS学习笔记——Action)