Preventing move base from executing a queued-up goal
I have a problem where I have a set of goals sent to my (physical) robot every few seconds , from a subscriber's callback. The robot is slow and takes a while to reach the next goal. By this time, a huge list of goals have piled up in the action client's queue.
How can I get only the last goal (i.e. the one at the tail end of the queue) to execute?
I want to drop all intermediate goals.