0
$\begingroup$

Rosanswers logo

How does an actionlib client cancel an ongoing action?

The docs clearly explain how to code an actionlib server to react to a cancellation request and exit, but I can't find any example of how this is initiated by the client.


Originally posted by Cerin on ROS Answers with karma: 940 on 2016-04-21

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Each of the client APIs for the action clients has a cancel method. The full API documentation can be accessed through the Code API link on the main wiki page.

In the python action client, send_goal returns ClientGoalHandle which can be used to cancel the goal: http://docs.ros.org/jade/api/actionlib/html/classactionlib_1_1action__client_1_1ActionClient.html#abcec1f2a881b3c41ea977da9812c313e

In the C++ action client, sendGoal returns a GoalHandle with a cancel method: http://docs.ros.org/jade/api/actionlib/html/classactionlib_1_1ActionClient.html

On the python simple action client, there is a cancel_goal method: http://docs.ros.org/jade/api/actionlib/html/classactionlib_1_1simple__action__client_1_1SimpleActionClient.html

On the C++ SimpleActionClient, there is a cancelGoal method: http://docs.ros.org/jade/api/actionlib/html/classactionlib_1_1SimpleActionClient.html


Originally posted by ahendrix with karma: 47576 on 2016-04-21

This answer was ACCEPTED on the original site

Post score: 3

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.