Ask Your Question

actionlib server/client race conditions

asked 2017-02-08 13:51:15 -0600

pbeeson gravatar image

updated 2017-02-08 16:14:40 -0600

I am working on a production-level piece of robotic software using ROS.

I've noticed in my extensive cloud testing that there are are rare occasions, where a SimpleActionServer will run setSuceeded(), but any getState() calls by the client still show the state as Active. I don't know exactly if getState() looks at the client's stored info, or polls the server (I'm about to dig into this code). If its the latter, then something is fundamentally wrong with the server. if its the former, then its clear that actionlibs can lose messages back and forth (Even on the same machine) and I don't know the best way to handle this.

Anyone ever see these issues and find a good solution?

edit retag flag offensive close merge delete


I was able to edit the actionlib_tutorials for fibonacci to replicate this on the simplest of scales [..]

Not an answer, but if you have such an MWE, making that available will make the job of reproducing and debugging it much easier if you can make it available.

gvdhoorn gravatar image gvdhoorn  ( 2017-02-08 14:58:06 -0600 )edit

What it appears is the setSuceeded() on the server side occasionally does NOT set the state from ACTIVE to succeeded. That is the client querying the server state see ACTIVE despite the fact that I know the server ran setSuceeded(). Unfortunately this is VERY rare and hard to reproduce.

pbeeson gravatar image pbeeson  ( 2017-02-08 16:00:26 -0600 )edit

Tarball of catkin package that just has a simple server and client that run forever can be found here. You may have to let it run for days to see it fail, and currently there isn't anything informative to help diagnose why it fails.

pbeeson gravatar image pbeeson  ( 2017-02-08 16:22:43 -0600 )edit

I ran the server/client in the tarball above and can see that the server sets the succeeded on the goal (And returns from setSucceeded), but the client never sees this. And has no way to see it.

pbeeson gravatar image pbeeson  ( 2017-02-08 18:02:54 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-02-08 23:50:33 -0600

pbeeson gravatar image

This was indeed the result of a bug. I tracked it down eventually and submitted a PR to actionlib.

edit flag offensive delete link more


I'm surprised no one has found this since 2008.

pbeeson gravatar image pbeeson  ( 2017-02-08 23:51:28 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2017-02-08 13:51:15 -0600

Seen: 76 times

Last updated: Feb 08 '17