Rosanswers logo

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?

Originally posted by Pablo Iñigo Blasco on ROS Answers with karma: 2982 on 2012-11-02

Post score: 1


1 Answer 1


Rosanswers logo


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.

Originally posted by jbohren with karma: 5809 on 2012-11-03

This answer was ACCEPTED on the original site

Post score: 5

Original comments

Comment by Pablo Iñigo Blasco on 2012-11-03:
Nice! It worked! :-)

Comment by Felix Widmaier on 2017-10-13:
The link to the rospy documentation is dead. It can be found here.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.