Gazebo | Ignition | Community
Ask Your Question

gazebo 1.9, incorrect plugin type?

asked 2013-10-12 02:29:08 -0500

ncr7 gravatar image

updated 2013-10-12 02:31:16 -0500

I have been trying to get the kinect sensor to work in gazebo 1.9 with ROS Groovy from the following tutorial,

But I keep getting the following error.

 Error [] Model[robot] is attempting to load a plugin, but detected an incorrect 
 plugin type. Plugin filename[] name[head_camera_controller]
 gzserver: /usr/include/boost/smart_ptr/shared_ptr.hpp:418: T* boost::shared_ptr<T>::operator->()
 const [with T = gazebo::sensors::Sensor]: Assertion `px != 0' failed.

In my URDF, I have the following listed at the end of the file after gazebo robot joint are referenced.

  <plugin name="head_camera_controller" filename="">

Any ideas as to why I am getting this error?

It seems that I have an issue with gazebo sensor plugins. The joint controller plugins are working fine though...

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-10-14 05:43:53 -0500

psei gravatar image

updated 2013-10-15 05:47:05 -0500

There are different types of plugins, I think there are model-, sensor- and worldplugins. is a sensor plugin, and the way you have coded your URDF it is treated as a model plugin.

Let me show the difference:


defines a model plugin. But you need a sensor plugin. Try this:

<gazebo reference="my_sensor_link">

My URDF for kinect cam looks like this:

<!-- SENSOR -->
<gazebo reference="openni_camera_link">
    <sensor type="depth" name="openni_camera_camera">       

        <plugin name="camera_controller" filename="">
edit flag offensive delete link more


Thanks! that worked. I don't know if you had any issue with how the point cloud is getting displayed. I seem to have the Kinect collecting points along its x-axis but displaying them in rviz along the z-axis. I'm playing with the link joints rotation, but I don't think that will change the difference between the collection and display position.

ncr7 gravatar imagencr7 ( 2013-10-14 12:52:11 -0500 )edit

If I understand you right, I had exact the same problem and I solved it as following:

psei gravatar imagepsei ( 2013-10-15 05:35:32 -0500 )edit

Thanks for your great answer! Helped me out a lot!

MahdiehNejati gravatar imageMahdiehNejati ( 2015-11-12 16:03:20 -0500 )edit

I had this problem with a gps_plugin. It seemed that I solved the error by following your solution. However, it is true that I am not having anymore the error but the plugin is not working well anymore.

desmond13 gravatar imagedesmond13 ( 2020-11-29 12:39:13 -0500 )edit
Login/Signup to Answer

Question Tools


Asked: 2013-10-12 02:29:08 -0500

Seen: 5,582 times

Last updated: Oct 15 '13