ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

What do you mean with hard code? Do you want to be able to pass in a type as a string definition like "geometry_msgs/PoseStamped" without have that type in your code? That is likely to be impossible as c++ needs to know about the type.

If you just want to access a specific known (at compile-time) type in general, generated messages provide a specialization of the Definition struct with a value() function that contains the message definition.