Ask Your Question

Cancel RosService Call

asked 2015-06-17 08:30:39 -0600

Benjamin.Nilson gravatar image

In my program I have a service call when I need to get some data.

if(ros::service:call("service_x", call_x))

This service goes and gets data from a sensor, processes the data, and pubishes the results.

I want to know if there is way that I can cancel or kill this service call if the sensor node crashes or becomes unresponsive.

Thanks All

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-06-17 09:53:14 -0600

gvdhoorn gravatar image

No, services do not support timeouts, cancellation or preemption.

If you need that, you should probably take a look at actionlib.

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

1 follower


Asked: 2015-06-17 08:30:39 -0600

Seen: 631 times

Last updated: Jun 17 '15