As some additional information, I've noticed that most of the time just using CTRL+C results in the following error
^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT)
[component_container-1] [INFO] [1715795814.547732352] [rclcpp]: signal_handler(signum=2)
[ERROR] [component_container-1]: process has died [pid 31153, exit code -11, cmd '/opt/ros/humble/lib/rclcpp_components/component_container --ros-args --log-level info --ros-args -r __node:=oak_container -r __ns:=/'].
If I call the /oak/stop_camera
ROS service before using CRTL+C, then the process finishes cleanly as follows
^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT)
[component_container-1] [INFO] [1715796342.479880771] [rclcpp]: signal_handler(signum=2)
[INFO] [component_container-1]: process has finished cleanly [pid 34437]
and I am able to restart the node immediately afterward without any issue connecting to the camera.
However, sometimes the /oak/stop_camera
service hangs up (seemingly forever) and when this happens it is as if the ROS node has become frozen because the SIGINT form the CTRL+C does not kill the node and the signal is elevated all the way to a SIGKILL
^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT)
[component_container-1] [INFO] [1715795919.817004394] [rclcpp]: signal_handler(signum=2)
[ERROR] [component_container-1]: process[component_container-1] failed to terminate '5' seconds after receiving 'SIGINT', escalating to 'SIGTERM'
[INFO] [component_container-1]: sending signal 'SIGTERM' to process[component_container-1]
[component_container-1] [INFO] [1715795924.949782261] [rclcpp]: signal_handler(signum=15)
[ERROR] [component_container-1]: process[component_container-1] failed to terminate '10.0' seconds after receiving 'SIGTERM', escalating to 'SIGKILL'
[INFO] [component_container-1]: sending signal 'SIGKILL' to process[component_container-1]
[ERROR] [component_container-1]: process has died [pid 32385, exit code -9, cmd '/opt/ros/humble/lib/rclcpp_components/component_container --ros-args --log-level info --ros-args -r __node:=oak_container -r __ns:=/'].
In this scenario, restarting the node results in the failure to connect to the camera I described above.