Seeking a way for Processing Gazebo Garden Camera Sensor Data Without ROS

Hi everyone,

I have a camera sensor in my Gazebo Garden simulation environment, and I’m currently not using ROS. I can successfully visualize the camera images in the simulation, but now I’m looking to process this image data further. I was directed towards the PyGazebo library, however, it seems it’s not compatible with the Garden version of Gazebo.

Could anyone suggest which library I should use instead? Also, I would appreciate any guidance on how to set this up for processing the camera images from the Gazebo Garden environment.

Thanks in advance for your help!

Hi, were you able to find a solution for this because I am also facing the same issue.

Edit:
I actually found a solution to this and am mentioning it here so that anyone else facing the same issue in future can use this to solve the issue.

You can start by creating a subscriber for the topic the camera is publishing the data on by using Gazebo Transport API. You can do it by following the tutorials given on their official website. After that you can use OpenCV to convert that raw image into the required format and use it however you want.

1 Like

Some ideas:

  • From the first part of the Camera Segmentation tutorial: use the save element of the Camera classes to store the images in you filesystem (sdformat spec). Process images with your favorite tool afterwards (opencv via python is used in the tutorial).

  • From he second part of the Camera Segmentation tutorial: processing the segmentation sensor via gz-transport. Process the segmentation data in real time via gz-transport.

  • There is self-contained C++ example for saving images in the gz-sensors repository that includes how to use the callback on the camera sensor to save images.

1 Like