0
$\begingroup$

Gazebo Answers logo

Hello,

I put a black ambient/background to the scene of a world during a simulation, and I observe it with a model containing multiple cameras. The first camera included in the model will get the normal image as background, but the second onwards get a luminous one (or, when using plugins, it seems it is the first camera that actually produces an image that gets the good background).

Here is the model world used:

<?xml version ='1.0'?>
<sdf version ='1.4'>
  <world name='default'>
    <include>
      <uri>model://ground_plane</uri>
    </include>
    <include>
      <uri>model://sun</uri>
    </include>

    <include>
      <uri>model://hopping</uri>
    </include>

    <scene>
      <ambient>0 0 0 1</ambient>
      <background>0 0 0 1</background>
    </scene>
</world>
</sdf>

with hopping containing identical camera sensors (just with a name change):

<include>
  <uri>model://noisy_cam2</uri>
  <name>camera2</name>
  <pose>-0.05 -0.05 0.05 0 -0.785 -2.08</pose>
</include>
<joint name="camera_joint2" type="revolute">
  <child>camera2::link</child>
  <parent>chassis</parent>
  <axis>
    <xyz>0 0 1</xyz>
    <limit>
      <upper>0</upper>
      <lower>0</lower>
    </limit>
  </axis>
</joint>
<include>
  <uri>model://noisy_cam1</uri>
  <name>camera1</name>
  <pose>0.05 0.0 0.0 0 0 0</pose>
</include>
<joint name="camera_joint" type="revolute">
  <child>camera1::link</child>
  <parent>chassis</parent>
  <axis>
    <xyz>0 0 1</xyz>
    <limit>
      <upper>0</upper>
      <lower>0</lower>
    </limit>
  </axis>
</joint>

With gztopic view /gazebo/.../image, for instance, by changing the views, there are not the same (sorry, my karma is way too low for uploading images, so here are screenshots uploaded to imgur)

camera2 (normal black background)

camera1 (way too gray, background not black)

Other than this wrong background, the images are fine, if someone has any idea ?


Originally posted by altrouge on Gazebo Answers with karma: 26 on 2013-12-11

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Gazebo Answers logo

It seems it was due to the fact my cameras used noise. I used the model described in the tutorial,

<camera>
  <horizontal_fov>1.047</horizontal_fov>
  <image>
    <width>1024</width>
    <height>1024</height>
  </image>
  <clip>
    <near>0.1</near>
    <far>100</far>
  </clip>
  <noise>
    <type>gaussian</type>
    <mean>0.0</mean>
    <stddev>0.007</stddev>
  </noise>
</camera>

Without this noise, I don't have the background color error anymore. I don't really know if it was specific to my platform.


Originally posted by altrouge with karma: 26 on 2013-12-18

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.