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

You missed initializing your node with ros::init_options::NoSigintHandler, e. g.

  ros::init(argc, argv, "MyNode", ros::init_options::NoSigintHandler);

The answer in this thread contains a very good example for handling SIGINT in an ROS node:

http://answers.ros.org/question/27655/what-is-the-correct-way-to-do-stuff-before-a-node-is-shutdown/