Long while loop might crash ros::Rate.sleep()?
ros::Rate loop_rate(8); // 8Hz
while(ros::ok())
{
Kalman_Filter.filter_control();
ros::spin_once();
loop_rate.sleep();
}
The function Kalman_Filter.filter_control() is a state machine and one state runs on 1Hz, while the rest of the code runs on 8Hz. Will this crash loop_rate.sleep()?