To accept /cancel messages from other topics during the execution of a ros::simple-action-server callback I had to use something like the following.
(defun execute-cb (server goal)
;; ...
;; Check for interruption
(send server :spin-once)
(when (send server :is-preempt-requested)
(send server :set-preempted)
(return-from execute-cb nil))
;; ...
)
Am I missing something here or is this actually the right way to do it?
Also I could not find any solid examples for the action server implementation, do we have any?