Guideline to implement own sensor plugins: Usage of Message Passing or Inheritance?

asked 2018-01-03 10:18:15 -0500

Illuminatur gravatar image

Hi guys,

as far as i've understood there are two possibilities to implement an own sensor plugin: Using message passing or inheritance concepts, e.g. as described here for a ModelPlugin.

So, for example, for implementing an own Ray sensor plugin, i could follow one of the following approaches:

  • Message Passing: I could also instantiate a transport node in order to subscribe to the published message of the super class.
  • Inheritance: Create a method MySensorPlugin::OnNewLaserScan(), which implements the virtual function RayPlugin::OnNewLaserScan() and therefore is called every time a new laser scan is measured, since it has been registered as a callback somewhere in the RayPlugin.

So my question is now, what is the appropriate way of handling this issue? What is the expected way of implementing an own sensor plugin?

With best regards and thanks in advance!

edit retag flag offensive close merge delete