ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Cancel RosService Call

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

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
2

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

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

Question Tools

1 follower

Stats

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

Seen: 1,844 times

Last updated: Jun 17 '15