How to set camera to give not transparent output

asked 2017-07-25 09:19:24 -0600

kchledowski gravatar image

Hello,

I am using a camera in my drone, in the gazebo environment. My .world file contains below code for it:

    <sensor name='bottom_camera_sensor' type='camera'>
      <update_rate>60</update_rate>
      <camera name='head'>
        <horizontal_fov>1.41372</horizontal_fov>
        <image>
          <width>640</width>
          <height>360</height>
          <format>R8G8B8</format>
        </image>
        <clip>
          <near>0.01</near>
          <far>100</far>
        </clip>
      </camera>
      <plugin name='bottom_camera_controller' filename='libgazebo_ros_camera.so'>
        <cameraName>/ardrone/bottom</cameraName>
        <alwaysOn>true</alwaysOn>
        <updateRate>60</updateRate>
        <imageTopicName>/ardrone/bottom/image_raw</imageTopicName>
        <cameraInfoTopicName>/ardrone/bottom/camera_info</cameraInfoTopicName>
        <frameName>ardrone_base_bottomcam</frameName>
        <robotNamespace>/</robotNamespace>
      </plugin>
      <pose frame=''>0.15 0 0 3.14159 1.57079 3.14159</pose>
    </sensor>

Unfortunately, the camera gives transparent output, i.e. I can see a can of beer through a table and a box, as in the image below:

C:\fakepath\camerrra.png

I am wondering, if there is a way to change the output to non-transparent. I was using rqt_image_view, and ROS Indigo with Gazebo 7.3.0.

Thanks!

edit retag flag offensive close merge delete