# Libgazebo\_ros\_camera Problem

**URL:** <https://discourse.openrobotics.org/t/libgazebo-ros-camera-problem/48832>\
**Category:** Gazebo Help\
**Created:** [March 7, 2018, 5:30am UTC](https://discourse.openrobotics.org/t/libgazebo-ros-camera-problem/48832 "2018-03-07T05:30:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ahrovan](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/ahrovan/32/27459_2.png) [@Ahrovan](https://discourse.openrobotics.org/u/Ahrovan)\
**Post date:** [March 7, 2018, 5:30am UTC](https://discourse.openrobotics.org/t/libgazebo-ros-camera-problem/48832/1 "2018-03-07T05:30:02Z")

</div>

sitl\_gazebo has problem with run libgazebo\_ros\_camera, I followed the ([ros\_interface](https://dev.px4.io/en/simulation/ros_interface.html)) for install and run gazebo simulation. Everything works fine, but after adding the camera, the following error occurs:

```
roslaunch px4 mavros_posix_sitl.launch
gzserver: /build/ogre-1.9-mqY1wq/ogre-1.9-1.9.0+dfsg1/OgreMain/src/OgreRenderSystem.cpp:546: virtual void Ogre::RenderSystem::setDepthBufferFor(Ogre::RenderTarget*): AssertionbAttached && "A new DepthBuffer for a RenderTarget was created, but after creation" "it says it's incompatible with that RT"' failed.
Aborted
[gazebo-3] process has died [pid 20750, exit code 134, cmd /opt/ros/kinetic/lib/gazebo_ros/gzserver -e ode /home/cv/src/Firmware/Tools/sitl_gazebo/worlds/empty.world __name:=gazebo__ log:=/home/cv/.ros/log/68ef15b6-1e60-11e8-b0c8-000c29ddf392/gazebo-3.log].
log file: /home/cv/.ros/log/68ef15b6-1e60-11e8-b0c8-000c29ddf392/gazebo-3*.log

```

this code added to iris.sdf:  
`<joint name='DownCam_joint' type='fixed'> <child>camera_link</child> <parent>base_link</parent> </joint> <link name='camera_link'> <pose frame=''>0.1 0 0.194923 0 0 0</pose> <inertial> <pose frame=''>0 0 0 0 0 0</pose> <mass>1e-05</mass> <inertia> <ixx>0.0001</ixx> <ixy>0</ixy> <ixz>0</ixz> <iyy>0.0002</iyy> <iyz>0</iyz> <izz>0.0002</izz> </inertia> </inertial> <visual name='visual'> <geometry> <box> <size>0.005 0.005 0.005</size> </box> </geometry> </visual> <sensor name='FrontCam' type='camera'> <update_rate>30</update_rate> <camera name='head'> <horizontal_fov>1.39626</horizontal_fov> <image> <width>720</width> <height>480</height> <format>R8G8B8</format> </image> <clip> <near>0.02</near> <far>300</far> </clip> <noise> <type>gaussian</type> <mean>0</mean> <stddev>0.007</stddev> </noise> </camera> <plugin name='camera_controller' filename='libgazebo_ros_camera.so'> <alwaysOn>true</alwaysOn> <updateRate>0.0</updateRate> <cameraName>birrobotic/FrontCam</cameraName> <imageTopicName>image_raw</imageTopicName> <cameraInfoTopicName>camera_info</cameraInfoTopicName> <frameName>camera_link</frameName> <hackBaseline>0.07</hackBaseline> <distortionK1>0.0</distortionK1> <distortionK2>0.0</distortionK2> <distortionK3>0.0</distortionK3> <distortionT1>0.0</distortionT1> <distortionT2>0.0</distortionT2> </plugin> </sensor> <self_collide>0</self_collide> <enable_wind>0</enable_wind> <kinematic>0</kinematic> </link>`

How to install libgazebo\_ros\_camera for sitl\_gazebo to publish camera images?  
I used this GitHub branch [GitHub - PX4/PX4-SITL\_gazebo-classic: Set of plugins, models and worlds to use with OSRF Gazebo Simulator in SITL and HITL.](https://github.com/PX4/sitl_gazebo)

---

<div class="post-metadata">

**Author:** ![chapulina\_gazebo](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/chapulina_gazebo/32/1637_2.png) [@chapulina\_gazebo](https://discourse.openrobotics.org/u/chapulina_gazebo)\
**Post date:** [May 9, 2018, 3:02pm UTC](https://discourse.openrobotics.org/t/libgazebo-ros-camera-problem/48832/2 "2018-05-09T15:02:25Z")

</div>

This kind of technical question is more suitable for [http://answers.gazebosim.org/](http://answers.gazebosim.org/)
