Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Unable to create sensor of type

I want to write a Doppler Velocity Log (DVL) SensorPlugin for gazebo, but gazebo fails to load the plugin. My DvlPlugin.cpp looks like this

#include "DvlPlugin.hpp"

using namespace std;
using namespace gazebo;

void DvlPlugin::Load(sensors::SensorPtr sensor, sdf::ElementPtr pluginElement){
    gzmsg << "Load" << endl;

and my DvlPlugin.hpp looks like this

#include <gazebo/common/common.hh>
#include <gazebo/sensors/Sensor.hh>

namespace gazebo {
    class DvlPlugin : public gazebo::SensorPlugin
        void Load(gazebo::sensors::SensorPtr sensor, sdf::ElementPtr sdf);

So there is really nothing big that is done in the code, and everything compiles without errors. When I load following simple sdf file

<?xml version="1.0" ?>
<sdf version="1.6">
    <world name="worl_test">
        <model name="model_test">
            <link name="link_test">
                <pose>0 0 0 0 0 0</pose>
                <sensor type="dvl" name="dvl_test">
                    <plugin name="gazebo_dvl" filename=""/>

I get the error [Err] [] Unable to create sensor of type[dvl] (which means, when we look the code, that the Sensor dvl is not in the SensorFactory. Do you have an Idea why I get this error?

PS: I am under Ubuntu 16.04 and I use gazebo 7.