For years and years, my ROS robots have displayed an innocuous exception when I terminated a node with ctrl-c or killed all my robot processes.
For years I have searched Google for a solution. I posted about the issue on robotics.stackexchange and discourse.ros.org and many other places. Last year I logged issues against the ROS tutorials in the May 2025 ROS 2 Kilted Test Party about this. No one could tell me how to fix it - ever.
More than a year ago, @jimrh joined the “vibe coding” rage and reported using a large language model to write useful code. I stayed away from trying it, mostly due to distraction by other hobbies, but last week gave in and successfully used Google Gemini to write a new ROS 2 node.
It was a very basic node that would have taken me about 30 minutes to refresh my brain from existing nodes and then create the new node. Telling Gemini what I wanted produced suggested code for the new node that did not work at first, but I knew how to fix the problem and added the required lines to make the Python3 node run.
BUT! the Gemini created node had the same “cntr-c exception” issue that I have put up with for years. I decided to ask Gemini for a solution to the error traceback. The first modification to the code suggested by Gemini did not fix the problem, so I provided the traceback again to Gemini and asked for a new suggestion. At that point I had spent more time having Gemini write the code than it would have taken me to produce it, but my code would have had the same cntrl-c exception issue.
Voila! The Gemini large language model agent has produced a solution to an issue that has vexed me for more years than I can remember.
