@jackie, by the way, I am afraid that (if I have understood correctly) what you mentioned about the “generic RVIZ” system is technically impossible (this is not a C++ problem, it is an intrinsic one).
When you have a “publisher/writer” that serializes an information and a “subscriber/reader” that receives it, these two pieces of software must agree on the SEMANTIC of the message (the “contract” if you prefer) and of course they must both know how the message was translated/marshalled/serialized into a blob.
A “generic” subscriber has no way, by definition of “generic”, to know in advance the type of the message, only its schema. The schema can give instructions about how to map the information into builtin types (this is what ros_type_introspection does), but it can not “understand” its semantic.
Imagine that you receive a message with this IDL schema
I know that they are three floating point numbers and an application like PlotJuggler can plot them on three curves sharing the same X axis.
But what should a subscribes like RVIZ do with this data?