Relative Content

Tag Archive for ros2

Will the ROS2 node be automatically reclaimed?

def main(): rclpy.init() pub_demo = Topic_Pub(“publisher_node”) rclpy.spin(pub_demo) pub_demo.destroy_node() rclpy.shutdown() If the destroy_node() function is not used, will executing rclpy.shutdown() reclaim and destroy the related nodes? I’m not quite sure how to monitor whether a node has been destroyed.If possible, please also let me know how to monitor whether a node has been destroyed, Thanks. ros2

ROS 2 Node not Shutting Down Gracefully

I’m running ROS 2 Humble on a VirtualBox Ubuntu 22.04 machine. Whenever I run a ros node (like the one in the ROS2 Tutorial and try to end it using Ctrl+C, the node spits out an error and then closes.
my_node