I have a code where I am checking for shutdown interrupt in a statement like so:
int main()
{
bool running(false);
//running is set to true by a condition statement somewhere here
for(; running || ros::ok() || !viewer->wasStopped() ;)
{
// ... ... ... ...
//do something
}
ros::shutdown();
return 0;
}
However, during runtime, when I do Ctrl + C
, I get the usual warning ^C[ WARN] [1458383451.748234940]: Shutdown Signal Received. Shutting down ROS!
but the node never shuts down.
Could I be missing something?
Originally posted by lakehanne on ROS Answers with karma: 152 on 2016-03-19
Post score: 0