Simulated camera framerate slow down and latency increase when subscribing to multiple cameras

Create issue
Issue #2559 new
Stefan Kohlbrecher created an issue

This is on Ubuntu 16.04/Kinetic/Gazebo9 from .debs.

I have a fairly complex world (which I unfortunately cannot share) and a (ROS-based) robot with 4 cameras (using libgazebo_ros_camera) moving inside it.

As long as I only subscribe to the image of one of the cameras, everything largely works fine. I get a realtime factor of ~0.95, images come in at a rate of 10Hz (as specified). When subscribing to the images of the three other cameras, the following effects are observed:

  • Realtime factor stays relatively consistent at about ~0.8.
  • The latency of images increases greatly. When comparing image timestamps to ros::Time::now() inside a ROS image callback, the delay is about 1 (simulated) second.
  • The publishing rate of the original image drops dramatically from 10 Hz (as specified) to about 4.0 Hz.

It thus looks like rendering images takes considerable time. That's ok in principle, but what I'd expect in that case is that Gazebo slows down accordingly to keep the image publishing rate. Is the observed behavior the intended/expected one?

Comments (3)

  1. Nate Koenig

    I think we can get pr #2502 merged. We are having a PR review sprint the first week of December, and we'll aim to get this wrapped up before or during that week.

  2. Log in to comment