When using cameras for running vision algorithms, the frame rate is often a very important parameter. If the simulated cameras do not provided precisely the expected frame rate, the algorithms are likely to be lost.
Besides, current implementation of cameras highly depends on the CPU/GPU performance of the host machine when the simulation is running. That means that the frame rate cannot be predicted and that the simulations using camera(s) are not repeatable.
The changes proposed in this pull request allows the cameras to run at the desired frame rate whatever the GPU/CPU available on the host. The idea is to put on hold the world update when we need to wait for a camera sensor that requires the current state of the world.
Much care has been taken to avoid wasting time in waiting for nothing. In particular, the threads "world update" and "sensors" are waken up as soon as they can continue their job.
It is possible to go back to the legacy working mode by setting the flag "strict_rate" to false in camera's parameters.
Hi, I'm facing camera image delays of about 30ms on ROS+Gazebo on Xenial/Kinetic. I'm wondering if this could be fixed by this MR. Is there something similar already upstream or is this improvement still pending on this MR?