Understanding the ROS actionlib
In the ROS computational network, there could be several cases where someone needs to send a request to a node to perform a task, and also receive a reply to that request. This can be possible via ROS services.
Nevertheless, in some cases, if the service takes a long time to execute or a requested service is not valid now, the client might want the ability to preempt the request during execution and get periodic feedback via a request progress status. The ROS tools provide the actionlib
package to create servers that execute long-running goals that could be preempted or resubmitted.
Getting ready
The actionlib
package consists of ActionClient
and ActionServer
, which communicate via a "ROS Action Protocol" built on top of ROS messages via function calls and callbacks.
The following diagram shows the interaction between the client and server applications:

Client-server interaction
We have to define a few messages that are action-specific, through which the client...