SimpleActionServer: checking isNewGoalAvailable and isPreemptedRequested not working [closed]
Hi,
I have registered a goalCB and preemptCB callbacks in a SimpleActionServer. 1- Server receives the first goal. 2-goalCB is called, it accepts the goal and then continues doing some other tasks. 3- when goalCB is still running, in the middle of its execution, server is sent another goal. 4- When I am still in the goalCB (triggered by the first goal) and the second goal is now supposed to have been arrived in the server (I ensure this by proper delays in the code), I check isNewGoalAvailable() and isPreemptedRequested() and both of them return false. Aren't they suppose to be used for polling information about receiving new goals or cancel requests?
When the goalCB finishes its process, then preemptCB is called, then goalCB is called for the second time (triggered by the second goal) and now before accepting the second goal, isNewGoalAvailable() and isPreemptedRequested() return true which is the correct behaviour but not much useful anymore!
I might missing something big here, please help me out.
Cheers, Pouyan