Improve shutdown
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user