Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to save camera image when needed?

I am currently following this tutorial to publish image messages using the camera plugin. I can totally subscribe the image_raw topic and save every published image message, but that's not what I need.

I am using gazebo to collect image dataset of object manipulation. So ideally I need to capture (save to file) one image after some manipulation actions, then continue with the next round of manipulation and image capturing. So it is like a service request to save the image when needed rather than save images all the time. However, the only source of image I know in gazebo is the image topic. Does anyone have a better idea on how to do that?