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

It is possible to unregister a ros-service?

asked 2012-11-02 11:09:48 -0500

I would like to dispose the register resources when an specific node dies. I'm aware that parameters can be deleted. But, it is possible to do the same with services?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
5

answered 2012-11-03 04:20:38 -0500

jbohren gravatar image

updated 2012-11-03 04:52:51 -0500

rospy

You can unregister a service by calling shutdown() on the rospy.Service object (doc here). It looks like this isn't done automatically on destruction like in the ros c++ implementation. Maybe it should do that.

roscpp

Are you seeing a service persist even after it's been destroyed? The way to unregister a service manually is to call shutdown() on the ServiceServer object (doc here), but this should happen automatically when the ServiceServer object is destroyed. Maybe you're not actually destroying the server object.

edit flag offensive delete link more

Comments

Nice! It worked! :-)

Pablo Iñigo Blasco gravatar image Pablo Iñigo Blasco  ( 2012-11-03 13:23:23 -0500 )edit
1

The link to the rospy documentation is dead. It can be found here.

Felix Widmaier gravatar image Felix Widmaier  ( 2017-10-13 02:28:53 -0500 )edit

Question Tools

Stats

Asked: 2012-11-02 11:09:48 -0500

Seen: 1,912 times

Last updated: Nov 03 '12