Ask Your Question
1

Actionlib notifications not received

asked 2011-07-24 23:04:30 -0500

joan gravatar image

updated 2014-01-28 17:10:06 -0500

ngrennan gravatar image

Hi,

I have been trying to notify to both action server and action client when any of them dies. I would like the client to be notified by the server whenever this server dies. Similarly, I would like the server to be notified if the current client dies for some reason.

I am using a simple action server with the execute callback option, and a client with the done, active and feedback callbacks.

In the destructor of the node containing the action server, I have added the following code:

if ( as_.isActive() )
{
  as_.setAborted();
}
as_.shutdown();

Unfortunately, the client never gets any kind of notification. I was expecting the done callback to receive an aborted status, or something similar.

For the client notification, I have tried to use the isServerConnected() and getState() functions from the node's destructor, but I always get the same result whether the server is running or not: isServerConnected()=0 and getState()=Aborted. I have also called cancelGoal() and stopTrackingGoal() to let the server cancel the current goal, but they seem to have no effect.

Maybe I am missing some important key points. Any Suggestion?

Joan

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2011-07-26 07:26:46 -0500

eitan gravatar image

I think I've run into this before when trying to do something similar. In my case, ROS had already shutdown when my destructor was called which meant that no actionlib related messages were going over the wire.

There's actually a tool called bond that would be perfect for your use case. Not only will it let you know when nodes go down cleanly, it'll also let you know if they go down from a crash. Hope this helps.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2011-07-24 23:04:30 -0500

Seen: 316 times

Last updated: Jul 26 '11