ROS actionlib

ROS Actionlib提供了一种比service更适合长时任务的通信机制。它采用client-server模式,ActionClient与ActionServer通过ROS Action Protocol交换信息。Action包含Goal IDs以确保通信匹配,以及多个topic用于发送Goal、取消Goal、反馈状态、结果信息。Action server会跟踪每个goal的状态直到完成,并且在完成状态后一段时间发送结果。
摘要由CSDN通过智能技术生成

参考blog:

https://www.cnblogs.com/21207-iHome/p/8297099.html

https://blog.csdn.net/x_r_su/article/details/53098679

http://wiki.ros.org/cn/actionlib_tutorials/Tutorials/SimpleActionClient

1 引入背景

    actionlib是ROS中一个很重要的功能包集合,尽管在ROS中已经提供了srevice机制来满足请求-响应式的使用场景,但是加入某个请求执行时间很长,在此期间用户想查看执行的进度或者取消这个请求的话,service机制就不能满足了,但是actionlib可满足用户这种需求。


2 actionlib工作机制

    actionlib使用client-server工作模式,ActionClient 和ActionServer通过"ROS Action Protocol"进行通信,"ROS Action Protocol"以ROS消息方式进行传输。此外ActionClient 和ActionServer给用户提供了一些简单的接口,用户使用这些接口可以完成goal请求(client边)和goal执行(server边)。

ROS actionlib is a library that provides a way to define and execute long-running, asynchronous tasks in a modular way. It is used to manage and monitor the progress of tasks that have multiple stages or that require feedback during execution. The library provides a flexible and efficient communication protocol that allows nodes to interact with each other in a structured and reliable way. Actionlib is commonly used in robotics applications to control complex behaviors such as navigation, manipulation, or perception. It allows developers to define and execute complex actions as a series of smaller, self-contained tasks. These tasks can be executed in parallel, and the overall progress of the action can be tracked and monitored. Actionlib consists of two main components: the action server and the action client. The action server is responsible for executing the action, while the action client sends requests to the server and monitors the progress of the action. The action server receives requests from the action client and executes the requested action. During execution, the server provides feedback to the client, keeping it informed of the progress of the action. Once the action is complete, the server sends a result message back to the client. The action client sends requests to the server and monitors the progress of the action. It can also cancel the action if necessary. The client receives feedback from the server, allowing it to provide real-time feedback to the user or to adjust its behavior based on the progress of the action. Overall, ROS actionlib provides a powerful and flexible framework for managing and executing complex, asynchronous tasks in ROS-based robotics applications.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值