Home | Tutorials | Wiki | Issues
Ask Your Question
0

Create a completely new sensor type

asked 2018-08-28 12:28:19 -0600

Tekkk gravatar image

updated 2018-08-28 15:06:05 -0600

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?

edit retag flag offensive close merge delete

Comments

This are to many questions :P. Okay first what do you mean with "a Pose Element"? Second i think and totally recommend to create a new sensor plugin. Should be possible to create a plugin that holds 4 RaySensors. For creating a new sensor you will need more time and better knowledge. Wouldn't recommend.

wentz gravatar imagewentz ( 2018-08-29 07:41:35 -0600 )edit

Were you able to make a new type of sensor? I also want to create a new sensor but I don't see yet how to link the new sensor class into Gazebo. Any clue will be appreciated. Thanks.

maikelo gravatar imagemaikelo ( 2018-10-31 16:46:16 -0600 )edit

I've just read your other question: http://answers.gazebosim.org/question/20324/unable-to-create-sensor-of-type/ i think you want to use: GZ_REGISTER_STATIC_SENSOR("dvl", DVLSensor) instead of: GZ_REGISTER_SENSOR_PLUGIN(DvlPlugin)

wentz gravatar imagewentz ( 2018-11-02 05:46:07 -0600 )edit
wentz gravatar imagewentz ( 2018-11-02 05:46:55 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-11-05 13:11:59 -0600

maikelo gravatar image

I found this other post: http://answers.gazebosim.org/question... which help me to make a new sensor for Gazebo. That solution works pretty well.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-08-28 12:28:19 -0600

Seen: 95 times

Last updated: Nov 05