Actionlib: preempt vs cancel
Hi,
I'm currently trying to understand the Actionlib state machine and am not clear about what "preempt" exactly means in this context.
The wikipage (http://wiki.ros.org/actionlib/DetailedDescription) describes the "Preemted" state as:
Preempted - Processing of the goal was canceled by either another goal, or a cancel request sent to the action server
For the SimpleActionServer it says here (http://wiki.ros.org/actionlib#Using_the_ActionClient), that:
New goals preempt previous goals based on the stamp in their GoalID field (later goals preempt earlier ones)
However, here (http://wiki.ros.org/actionlib/DetailedDescription) it also says about the SimpleActionClient:
For simplicity, the Simple Action Client tracks only one goal at a time. When a user sends a goal with the simple client, it disables all callbacks associated with the previous goal and also stops tracking its state. Note that it does not cancel the previous goal!
The later seems to make a distinction between cancelling and preempting and I am unclear if there is actually a difference or what the SimpleActionServer actually does when a new goal arrives.
For example:
If I have a goal which changes over time, is it enough to simply send the updated goal via the SimpleActionClient to the server or should I actively cancel the previous goal in advance? I don't need any of the previous goals and don't want to have any overhead on the server regarding them. I am simply interested in the most recent goal.
I'd appreciate any kind of information on this topic, thanks!