How can i use Waitkey in ROS..
I have while loop which waits for a user input, and then goes to the next state..
Within i get video image using Image_transport.
So my idea is to have
cout << "Am i done?" << endl;
While(input != 'y')
{
Retreive new frames for the function to work with....
}
But the problem is that it keeps outputting "Am i done", which i suspect is because the Ros::spin(), but what doesn't make sense, it how it breaks out of the while loop. How do make it only do the thing within the while loop until a key is pressed.
↧