# Revision history [back]

### Kinect (in gazebo) not publishing topics

Hi,

Update:

I have also tried rosrun gazebo --verbose and I get a warning - [Wrn] [msgs.cc:1655] Conversion of sensor type[depth] not suppported. I believe this may be due to <sensor name="camera" type="depth"> in XML below.

Question: I have been following this tutorial to simulate a Kinect in Gazebo and then publish image,pointcloud etc to ROS topics. However, rostopic list does not show the required topics in the output.

I have also looked at the following questions on this forum - this and this. The issue in the first one seems to be same as mine. The person suggested to use URDF files instead (which I will try but would still like to know why below approach is not working ).

Here is the relevant XML code for the model.sdf file in the kinect directory that I have modified according to the tutorial mentioned above -

  //some xml

<sensor name="camera" type="depth">
<alwaysOn>true</alwaysOn>
<update_rate>20</update_rate>
<camera>
<horizontal_fov>1.047198</horizontal_fov>
<image>
<width>640</width>
<height>480</height>
<format>R8G8B8</format>
</image>
<clip>
<near>0.05</near>
<far>3</far>
</clip>
</camera>
<plugin name="camera_plugin" filename="libgazebo_ros_openni_kinect.so">
<baseline>0.2</baseline>
<alwaysOn>true</alwaysOn>
<!-- Keep this zero, update_rate in the parent <sensor> tag
will control the frame rate. -->
<updateRate>0.0</updateRate>
<cameraName>camera_ir</cameraName>
<imageTopicName>/camera/depth/image_raw</imageTopicName>
<cameraInfoTopicName>/camera/depth/camera_info</cameraInfoTopicName>
<depthImageTopicName>/camera/depth/image_raw</depthImageTopicName>
<depthImageInfoTopicName>/camera/depth/camera_info</depthImageInfoTopicName>
<pointCloudTopicName>/camera/depth/points</pointCloudTopicName>
<pointCloudCutoff>0.05</pointCloudCutoff>
<distortionK1>0</distortionK1>
<distortionK2>0</distortionK2>
<distortionK3>0</distortionK3>
<distortionT1>0</distortionT1>
<distortionT2>0</distortionT2>
<CxPrime>0</CxPrime>
<Cx>0</Cx>
<Cy>0</Cy>
<focalLength>0</focalLength>
<hackBaseline>0</hackBaseline>
</plugin>
</sensor>

// some more xml


I would like to mention the following -

1. Note that in the XML code - The plugin is defined as a sensor plugin (I am aware that model and sensor plugins are different things in Gazebo and it can lead to an error if the right one is not used.)

2. I have been using the command - roslaunch gazebo_ros empty_world.launch to open the world.I then manually add the kinect model shown above.

3. I have also tried rosrun gazebo --verbose and I get a warning - [Wrn] [msgs.cc:1655] Conversion of sensor type[depth] not suppported.

4. Also, output of rostopic list after launching gazebo and adding the kinect ( Sorry unable to format this as code for some reason ) -

5. I have checked rostopic echo /clock , which means the Gazebo simulation is running. o I need to install that plugin libgazebo_ros_openni_kinect.so ? This seems more like an issue on the Gazebo side and hence I have posted here ( instead of ROS forum. )