Odin Rqtclose !free! -
def shutdown_odin(self): # Call the ODIN service that saves logs and parks actuators client = self._node.create_client(Trigger, '/odin/graceful_shutdown') client.call_async(Trigger.Request()) # Then close the rqt GUI self._node.destroy_node() rclpy.shutdown()
This prevents the "sudden close" syndrome while ensuring data integrity. A user reported: "Every time I open rqt_console, the ODIN sonar node closes." odin rqtclose
Create a persistent workspace state:
export ROS_DOMAIN_ID=42 To eliminate unwanted rqtclose behavior with ODIN, apply these configuration patterns: For Launch Files (Python/XML) # odin_bringup/launch/stable_rqt.launch.py from launch import LaunchDescription from launch_ros.actions import Node def generate_launch_description(): return LaunchDescription([ Node( package='rqt_gui', executable='rqt_gui', name='rqt_gui', arguments=['--force-discover'], # Prevent incomplete shutdown prefix='xterm -e gdb --args', # Debug if needed ), Node( package='odin_driver', executable='node_driver', name='odin_driver', parameters=['enable_sigint_handler': False], # Critical! ) ]) For ODIN C++ Nodes Disable default shutdown behavior on service calls: def shutdown_odin(self): # Call the ODIN service that
# odin_rqt_plugin/odin_controller.py import rclpy from rclpy.node import Node from python_qt_binding.QtWidgets import QPushButton from rqt_gui_py.plugin import Plugin class OdinController(Plugin): def (self, context): super(). init (context) self._node = Node('odin_rqt_controller') self._button = QPushButton('Gracefully Shutdown ODIN') self._button.clicked.connect(self.shutdown_odin) self.setWidget(self._button) init (context) self