Summarizing:

  1. Type erased messages are needed for applications such as rosbag, rqt_plot, PlotJuggler, MATLAB importers, etc. Any generic topic subscriber indeed.
  2. ShapeShifter had all the informations needed to do this: raw bytes buffer, Message definition and MD5Sum.
  3. ROS1 had just one protocol, whilst ROS2 can potentially have DDS or others.

THINGS WE MIGHT DO:

A) I guess that the first step is to add to ROSIDL the equivalent of ros::message_traits::Definition< Type >::value(). Preferably expressed as JSON or XML format.

B) It must be possible to subscribe to a topic in a “generic” way, i.e. bypassing the deserialization step and accessign the raw bytes of the message.

C) To implement a run-time deserializer, I don’t see any solution but implementing a different code for each protocol :frowning: No magic wands.