Gazebo | Ignition | Community
Ask Your Question

Tekkk's profile - activity

2018-11-05 14:43:29 -0500 marked best answer Create a completely new sensor type

I want to create a Doppler Velocity Log (DVL) sensor that would simply contain 4 RaySensor and a Pose element. In every tutorial that I saw about SensorPlugins, people used existing sensors and extended them. Is it possible to create a completely new sensor type ( <sensor type="dvl" name="super_name"> ... </sensor> )and add it to gazebo instead of using an existing sensor type and extending it? Google doesn't help me to answer this question unfortunately

Assuming that it is possible to create a new Sensor Type, is it possible to create RaySensor objects directly from a .cpp file instead of having to create them with an sdf file? If I look at the documentation for RaySensor, it seems that we can only define the value of some attributes of a RaySensor (like the ray counts or the min-max ranges for example that only have getters but no setters) by using the RaySensor::load(...) function. Isn't there any other possibility to create a RaySensor object directly in c++ and passing the ray-counts and some other value in a constructor?

2018-11-04 22:32:41 -0500 received badge  Famous Question (source)
2018-11-01 10:22:31 -0500 received badge  Famous Question (source)
2018-09-05 02:26:12 -0500 marked best answer 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

#ifndef _GAZEBO_DVL_PLUGIN_HPP_
#define _GAZEBO_DVL_PLUGIN_HPP_
#include <gazebo/common/common.hh>
#include <gazebo/sensors/Sensor.hh>

namespace gazebo {
    class DvlPlugin : public gazebo::SensorPlugin
    {
    public:
        DvlPlugin(){}
        ~DvlPlugin(){}
        void Load(gazebo::sensors::SensorPtr sensor, sdf::ElementPtr sdf);
    };
    GZ_REGISTER_SENSOR_PLUGIN(DvlPlugin) 
}
#endif

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>
                <inertial><mass>0.01</mass></inertial>
                <sensor type="dvl" name="dvl_test">
                    <plugin name="gazebo_dvl" filename="libgazebo_dvl.so"/>
                </sensor>
            </link>
        </model>
    </world>
</sdf>

I get the error [Err] [SensorManager.cc:276] Unable to create sensor of type[dvl] (which means, when we look the SensorManager.cc 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.

2018-09-05 02:26:12 -0500 received badge  Scholar (source)
2018-09-05 02:26:07 -0500 answered a question Unable to create sensor of type

The error was, as the SensorManager says, that there was not a sensor of type dvl. Since I wanted to make a sensorplugi

2018-08-31 07:29:39 -0500 received badge  Notable Question (source)
2018-08-30 19:53:48 -0500 received badge  Notable Question (source)
2018-08-29 17:44:15 -0500 received badge  Popular Question (source)
2018-08-29 10:44:59 -0500 received badge  Popular Question (source)
2018-08-28 15:06:05 -0500 received badge  Organizer (source)
2018-08-28 12:28:19 -0500 asked a question Create a completely new sensor type

Create a completely new sensor type I want to create a Doppler Velocity Log (DVL) sensor that would simply contain 4 Ray

2018-08-28 09:49:39 -0500 asked a question Unable to create sensor of type

Unable to create sensor of type I want to write a Doppler Velocity Log (DVL) SensorPlugin for gazebo, but gazebo fails