Gazebo | Ignition | Community
Ask Your Question

Clouds from screen is not visible in camera image

asked 2018-08-06 08:45:35 -0500

mpc gravatar image

I am trying to model a camera sensor in Gazebo and pass the image to ROS: image description

My problem is that the clouds from the screen do not appear in the camera image. Currently, I am unsure if this is the normal operation of the or this is an error. I would like to have a camera where clouds from the screen are available in the image.

I am currently running Gazebo 9.3.0 and ROS melodic.

First I want to find out why the clouds do not appear in the camera image and second how to update the plugin so they are available.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2020-07-25 08:55:00 -0500

srmainwaring gravatar image

updated 2020-07-25 09:31:07 -0500

I realise this is an old question but I've run into the same issue recently while looking at the osfr/vrx implementation of using RTT to visualise reflections and refractions from water. Here's is what I've found:

The clouds from SkyX don't appear in the camera visual because of the far clip plane settings. In the camera near / far clip distance is set to (0.1, 5000), whereas in the camera sensor the sdf defaults are (0.1, 100). If you add a camera sensor with the same clip settings as the user camera the clouds appear.

The clouds don't appear in the topic topic visualisation window for the image because they are disabled in by the code:

// Disable clouds and moon on server side until fixed and also to improve
// performance
this->scene->SetSkyXMode(rendering::Scene::GZ_SKYX_ALL &
    ~rendering::Scene::GZ_SKYX_CLOUDS &

If you comment this code out and rebuild gazebo the clouds are included in the gazebo::msgs::ImagedStamped message. The following image shows the result of applying both changes:

image description

The comment in the code refers to something needing to be fixed, but does not explain further. It might because the clouds appear differently when generated on the client (main screen and camera visual) and server (topic visualisation) as they are generated independently and updated at different rates? It would be great if someone could clarify the original issue and I'd be happy to assist if I'm able to. The concern around performance could be addressed by adding a parameter to the camera sensors to disable the visualisation of the sky (with defaults that replicated the current behaviour).

There is a related issue when trying to render the clouds into a texture for reflections that has to do with when the SkyX component is updated, but I don't think it affects this issue (Sky rendering grey with RTT reflections (Gazebo11) #213)

edit flag offensive delete link more

answered 2018-08-06 11:54:00 -0500

chapulina gravatar image

This is a known issue, you can vote for it and it would be great if you could dig to figure out what exactly is the problem and possible solution.

edit flag offensive delete link more



Thank you very much for the input :-) I think the test case the other guys found is a bit easier to work with and also shows it is not a ROS camera plugin issue. I think it might be related to this issue: But I am not sure!, since my experience with the gazebo code is currently not that extensive. I will try to check out a separate version of Gazebo on my computer and see if I can fix it over the coming months.

mpc gravatar imagempc ( 2018-08-07 03:59:36 -0500 )edit

Question Tools

1 follower


Asked: 2018-08-06 08:45:35 -0500

Seen: 1,832 times

Last updated: Jul 25 '20