Skip to content

Commit 800180e

Browse files
committed
Remove destroy_node() and shutdown() as suggested by https://ros2-tutorial.readthedocs.io/en/latest/python_node_explained.html
1 parent 81f6eb2 commit 800180e

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

mocha_core/mocha_core/mocha.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,6 @@ def main(args=None):
216216
except Exception as e:
217217
print(f"Exception: {e}")
218218
mocha.shutdown(f"Exception: {e}")
219-
finally:
220-
# Clean up node and ROS2 from main thread (safe)
221-
mocha.destroy_node()
222-
rclpy.shutdown()
223219

224220
if __name__ == "__main__":
225221
main()

mocha_core/mocha_core/translator.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,6 @@ def main(args=None):
149149
print("Keyboard Interrupt")
150150
except Exception as e:
151151
print(f"Exception: {e}")
152-
finally:
153-
# Clean up node and ROS2 from main thread (safe)
154-
translator_node.destroy_node()
155-
rclpy.shutdown()
156152

157153
if __name__ == "__main__":
158154
main()

0 commit comments

Comments
 (0)