smach actionlib
I am currently working with SMACH and using SimpleActionState as action clients for the roscpp Action servers I have developed.
One of the main key points for using actions, as stated in the ROS actionlib wiki page, was:
The actionlib package provides a standardized interface for interfacing with preemptible tasks
I was wondering how this feature could be achieved when using the SimpleActionState object. I would like to subscribe to the action feedback topic to keep track of the action server behavior. Then, at some point, the client would then be able to preempt the requested action depending on the data received.
By looking at the SimpleActionState Tutorials I have seen how can goal and result callbacks be defined, but nothing related to feedback. In addition, on the SimpleActionState API I can only find a preempt_timeout parameter, but nothing related to preemption callbacks. In a previous question, issues with this specific parameter were already observed.
A possible work around, would be to use a concurrence container which would launch both a SimpleActionState and a subscriber state to the feedback topic. With this solution though, I would not be able to preempt the action.
If there is no way to preempt an action, then which is the difference between actions and services when using SMACH?