Rqtclose: Odin

rqt --force-discover --close-with-master The --close-with-master flag ensures rqt exits if the ROS master dies, preventing hangs. Outdated python-qt-binding or ros-kinetic-rqt-gui (or Melodic/Noetic) can cause shutdown deadlocks. Update:

def _spin_ros(self): rospy.rostime.wallsleep(0) # Allow ROS callbacks odin rqtclose

trap cleanup EXIT rosrun rqt_gui rqt_gui & rqt_pid=$! wait $rqt_pid Example of a safe shutdown in a Python rqt plugin: wait $rqt_pid Example of a safe shutdown in

#!/bin/bash # odin – correct wrapper for rqt rqt_pid="" function cleanup if [[ -n "$rqt_pid" ]]; then kill -TERM "$rqt_pid" wait "$rqt_pid" echo "odin rqtclose: clean exit" fi If rqt itself crashes, you have a system-level ROS issue

<node name="odin_gui" pkg="odin_viz" type="odin_rqt.py" /> Check odin_rqt.py for any custom signal handling. Specifically, search for:

rosrun rqt_gui rqt_gui Then close it. If it closes cleanly, the problem is in your Odin wrapper. If rqt itself crashes, you have a system-level ROS issue. If you use a launch file (e.g., odin_gui.launch ), look for:

rosnode kill /rqt_gui_py_node_xxxx Then improve your shutdown logic to call rosnode kill on itself (not recommended) or fix the plugin. Fix 1 – Correct the Odin Wrapper Replace any kill -9 with kill -TERM and add a wait loop: