gz-sensors
gz-sensors copied to clipboard
Performance drops when saving data from segmentation camera sensor
Environment
- OS Version: Ubuntu 18.04
- Source or binary build? Source: testing https://github.com/ignitionrobotics/ign-sensors/pull/133
Description
When using the segmentation camera sensor in #133 with the example world in https://github.com/ignitionrobotics/ign-gazebo/pull/853 (segmentation_camera.sdf
), simulation performance noticeably decreases if I save segmentation data. I see an RTF of about 60% when saving images, and an RTF of about 97% without saving images.
Steps to reproduce
- Build a workspace with #133 and https://github.com/ignitionrobotics/ign-gazebo/pull/853
- run
ign gazebo segmentation_camera.sdf
, then press the "play" button to start simulation. The default sdf file saves segmentation data. Take note of the RTF - comment out the following lines from the SDF to skip saving data, and then run simulation again. You should see higher RTF:
- https://github.com/ignitionrobotics/ign-gazebo/blob/cc6a1919340bbc11b6ccd9ed4900f6f1e8e12d47/examples/worlds/segmentation_camera.sdf#L299-L301
- https://github.com/ignitionrobotics/ign-gazebo/blob/cc6a1919340bbc11b6ccd9ed4900f6f1e8e12d47/examples/worlds/segmentation_camera.sdf#L350-L352