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

Revision history [back]

click to hide/show revision 1
initial version

You are correct, LifeCycle Nodes are only cpp and would be a nicer implementation. The node in this case would never be completely killed but you can easily restart a node with decent tools.

If you just want to kill the node through a service call, I would recommend to do it with the normal python way: exit(). Than your node should be gracefully exited which has the same effect than what you might desire.

Restarting would then be a part that might be a little bit harder. But probably you could hack your way around with using parts of a launch file in a normal python script. But I would not straight forward recommend that, as I do not know the possible side effects of that.

Cheers!