Why won't my node exit
I'm running a simple node with a single timer(10hz), when a flag running is set the node should destroy itself and I expect to exit out of rclpy.spin(), however nothing happens. I need to Ctrl+C to exit the program. Is this to be expected?
Code:
def MyNode(Node):
def __init__(self, name):
super().__init__(name)
self.running = false
self.create_timer(0.1, self.action)
def action(self):
self.running=true
self.destory_timer()
self.destory_node()