ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

rospy sets up an interrupt handler for SIGINT (ctrl-C), and uses that to trigger shutdown of ROS.

If you don't want rospy to shut down when your program gets SIGINT, you should pass the disable_signals argument to rospy.init_node(), as described in rospy initialization and shutdown:

rospy.init_node('my_node', disable_signals=True)

You will then be able to do your own handling of SIGINT (or KeyboardInterrupt).