why is ros::duration().sleep() skipping delays ? [closed]
Hello
I am using ros::Duration(5).sleep() in one of my boost threads. It works fine in the first execution loop but starts skipping the delays completely after first cycle. Also I'm using ros::Rate rate(0.02); rate.sleep(); it's the same case for this method as well.
I'm using ros::AsyncSpinner spinner(4); spinner.start in my main loop and there's no other ros spin anywhere in the code. I cannot see why this would cause a problem, but still mentioning.
Any help/advice is appreciated, thanks in advance !
For
rate.sleep()
I'd say that your node application logic is taking too much time to run, essentially causing overruns of your time quota. Expected behaviour of ofros::Rate
in that case is to skip the sleep.Why
ros::Duration(5).sleep()
does what it does, no idea.Please provide a way to reproduce the problem so we can look closer.