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

Should I unregister from Publishers/Subscribers when I terminate a ROS node by exiting the script?

asked 2023-01-20 06:47:05 -0500

Ifx13 gravatar image

Hi everyone.

So my question is pretty much what the title is. Is it good practice or even necessary to unregister from ROS publishers or subscribers I used inside my ROS node before terminating the node from the script?

Is there any difference if my ROS node is written in python or c++?

Thanks in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2023-01-20 06:58:07 -0500

aarsh_t gravatar image

As far as my experience is, It does not make difference if you unregistered the pub/sub before terminating the node. As node terminates, it will stop publishing or subscribing to the topic until and unless there is another node publishing or subscribing to the same topic.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2023-01-20 06:47:05 -0500

Seen: 140 times

Last updated: Jan 20 '23