ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hi Daniel,

Assuming you registered a SimpleDoneCallback() when you call SimpleActionClient::sendGoal(), you should most definitely receive a callback when the goal goes into a PREEMPTED state on the server. However, I think you might be using the action server slightly incorrectly.

Please refer to the following state transition diagram, copied from actionlib/DetailedDescription: Server States Detailed

When someone cancels a goal, the server does not immediately transition into a PREEMPTED or RECALLED state. Instead, the goal goes to either RECALLING or PREEMPTING, and the action server's cancel callback is called. It is then the server implementer's responsibility to transition the goal into a terminal state by calling setCancelled(), setAborted(), or setSucceeded(). As soon as the goal is transitioned into a terminal state, the client's SimpleDoneCallback will get triggered.