Improve shutdown

This commit is contained in:
2023-01-17 12:16:48 +02:00
parent 63f707d355
commit afd42c3ede

View File

@@ -124,9 +124,10 @@ def main(args=None):
rclpy.init(args=args)
axidraw_serial = AxidrawSerial()
rclpy.on_shutdown(axidraw_serial.go_home())
try:
rclpy.spin(axidraw_serial)
finally:
axidraw_serial.go_home()
rclpy.shutdown()