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

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

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

jbohren gravatar image

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


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.


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


Nice! It worked! :-)

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

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


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

Seen: 1,913 times

Last updated: Nov 03 '12