[ros-users] [Discourse.ros.org] [Next Generation ROS] How to shutdown and reinitialize a publisher node in ROS 2

ruffsl ros.discourse at gmail.com
Sat Mar 3 07:16:34 UTC 2018



Funny you should mention this python alternative. For a potential use case, I was just using this style of iterative initialisation and shutdown within a single thread to do sros2 access control verification this week. Interesting to know that had I used rclcpp to benchmark my policies rather than rclpy I would have hit this current issue. I also found using the try_shutdown method more forgiving to use should you ever lose track of the state of things like when developing from in an interactive python shell session. 

https://github.com/ruffsl/PPAC_ROS2/blob/master/simple_init_test.py





---
[Visit Topic](https://discourse.ros.org/t/how-to-shutdown-and-reinitialize-a-publisher-node-in-ros-2/4090/4) or reply to this email to respond.




More information about the ros-users mailing list