actionlib - SimpleActionServer - Accept new goal only on certain condition
Hi,
I couldn't come up with an easy way to do the following having a look at actionlib's source code and documentation:
If I'm right, SimpleActionServer's default policy is to cancel the active goal upon a new goal arrival. What I try to do is make the server only accept a new goal if the goal parameters meet certain condition.
For instance, supose that my goal have an integer parameter called "priority". I'd like a new goal to be accepted (hence preemping the active goal) by the server if the new arrived goal priority is bigger than the active's.
Is it possible to do this by only using SimpleActionServer's ExecuteCallback?
Thanks,