Unable to publish Kinect data to ROS topics.

asked 2018-02-19 19:26:48 -0500

malhar gravatar image

updated 2018-02-20 09:24:42 -0500



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">
                <plugin name="camera_plugin" filename="libgazebo_ros_openni_kinect.so">
              <!-- Keep this zero, update_rate in the parent <sensor> tag
                will control the frame rate. -->

   // 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 ) -

    /clock /gazebo/link_states /gazebo/model_states /gazebo/parameter_descriptions /gazebo/parameter_updates /gazebo/set_link_state /gazebo/set_model_state /rosout /rosout_agg

  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. )

Thanks a lot !

edit retag flag offensive close merge delete


A few questions to specify: 1) How do you actually run Gazebo (with what command) so that the model gets spawned into the Gazebo world? It's important that you use a ros command for it ("rosrun gazebo_ros gazebo" for example) since the plugin needs to run on the ROS server. 2) I suggest you try running Gazebo with the --verbose option. It might tell you about certain errors that otherwise wouldn't be shown assuming you have any.

Raskkii gravatar imageRaskkii ( 2018-02-20 02:05:34 -0500 )edit

Hi, Thanks for your reply. I have tried both of them, and I don't see any errors when using rosrun gazebo --verbose. What else can I do ? ( I have updated the question with this information )

malhar gravatar imagemalhar ( 2018-02-20 06:34:25 -0500 )edit

Did you try running Gazebo with the following command: rosrun gazebo_ros gazebo --verbose

Raskkii gravatar imageRaskkii ( 2018-02-20 08:44:48 -0500 )edit

Hi, On running that command I am getting an warning in the console - [Wrn] [msgs.cc:1655] Conversion of sensor type[depth] not suppported.

malhar gravatar imagemalhar ( 2018-02-20 09:18:15 -0500 )edit