swri-robotics / mapviz

Modular ROS visualization tool for 2D data.
BSD 3-Clause "New" or "Revised" License
395 stars 152 forks source link

Check topic for type to determine which subscription callback to trigger #759

Closed agyoungs closed 2 years ago

agyoungs commented 2 years ago

Closes #756

agyoungs commented 2 years ago

@danthony06 Can you review this? The disadvantage to this approach is that if a topic doesn't exist when the plugin is initialized, the subscription will not be made. This could be addressed with a function override for plugins that gets triggered when new topics are identified. Thoughts?

The alternative approach is to use a generic subscription. However this will require de-serialization within the plugin.

danthony06 commented 2 years ago

Seems reasonable to me.