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
4

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 imagePablo 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 imageFelix Widmaier ( 2017-10-13 02:28:53 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

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

Seen: 763 times

Last updated: Nov 03 '12