Decline new goals in Action Server

asked 2021-06-29 17:36:40 -0500

lorepieri gravatar image

updated 2021-06-30 03:27:23 -0500

I'm looking for an implementation of Actionlib which declines new incoming goals, if the system is already busy completing a previous goal. The default behaviour of SimpleActionServer is instead to cancel current goals and replace them with the newly arrived goal.

Is there a ready-to-use python implementation of such Actionlib server? Similar questions have been asked many years ago, but I've not been able to find any answer.

edit retag flag offensive close merge delete

Comments

The default behaviour of SimpleActionClient is instead to cancel current goals and replace them with the newly arrived goal.

Accepting (or rejecting) goals is the server's responsibility, not the client.

But re: it preempts the current goal: that's because it's a simple action server. Part of that is the reduced complexity of handling only a single goal, on both ends.

I'm looking for an implementation of Actionlib which declines new incoming goals, if the system is already busy completing a previous goal. [..] Is there a ready-to-use python implementation of such Actionlib client?

Afaik there have been no changes to the base actionlib implementation in this area. Either the simple action server is used, or implementers are responsible for using the full API, which allows you to do anything needed.

There may be 3rd party implementations which sit between the simple version and the full, base actionlib ...(more)

gvdhoorn gravatar image gvdhoorn  ( 2021-06-30 02:43:47 -0500 )edit

(Perhaps everywhere you've used client it should be server?)

Take a look at #q240056, which did include a link to the code but is now a 404. However, the OP seems to have made enhancements to goalCallback() function to get the desired result.

There's also an open ticket to expose setRejected, but doesn't look like anything's gonna be done about it.

The comments under the accepted answer to #q349636 suggest using locks.

Coming back to your question "Is there a ready-to-use python implementation of such Actionlib client?", you'll probably have to look around quite a bit.

abhishek47 gravatar image abhishek47  ( 2021-06-30 03:15:02 -0500 )edit

Exactly, I'm looking for one of those 3rd party implementations to avoid reinventing the wheel.

lorepieri gravatar image lorepieri  ( 2021-06-30 03:28:59 -0500 )edit