How to handle multiple goals with Action API (without waitForResult )?

asked 2018-05-28 15:54:59 -0500

Developer gravatar image

updated 2018-05-30 14:16:30 -0500

Hi

I send sequence of goals to move_base SimpleActionServer. But server just processes the first and last goals. Goals between first and last goals are dropped. In API , it says that: only one goal can have an active status at a time. Clearly this is the reason of that issue. But is there any solution for that problem or alternative server that can accept goals faster than SimpleActionServer?

Note:

  • This issue is discussed here but solution is not so clear. (it is advised to use actionlib API directly, but how?)
  • This issue is discussed here but solution is not so clear. (it is advised to use Action API of move_base, but how?)

Thanks

edit retag flag offensive close merge delete

Comments

The code shown in the second bullet point gives a good simple example of how to send a goal and wait for it to be reached, then send another. It does just what you're asking about. It send a series of goals to move-base. It waits until 1st goal is reached then sends the next, and so on.

billy gravatar image billy  ( 2018-05-30 13:12:16 -0500 )edit

Thanks. The problem with simpleActionServer is wait time. It can not processes all the goals if you send the goals in the loop without " ac.waitForResult(); ". As a result it drops the goals. So this example does not handles exactly what I want. Do you have any idea for this issue ?

Developer gravatar image Developer  ( 2018-05-30 14:16:32 -0500 )edit

But is there any solution for that problem or alternative server that can accept goals faster than SimpleActionServer?

If the server can't actually process the goals, what's the point of being able to submit them?

gvdhoorn gravatar image gvdhoorn  ( 2018-05-30 15:49:30 -0500 )edit

Are you're worried about the node being blocked while waiting for goal to be reached? It's hard t help without understanding why you can't implement this concept and not tolerate the waiting. If you need to be able to submit several goals quickly, submit them to above node and let it do the work.

billy gravatar image billy  ( 2018-05-30 17:14:46 -0500 )edit