ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
ROS 2 Crystal does have that information: MessageClass.get_fields_and_field_types()
(see https://github.com/ros2/rosidl_python/blob/0f5c8f360be92566ad86f4b29f3db1febfca2242/rosidl_generator_py/resource/_msg.py.em#L202-L203)
Note that the API and returned information for this kind of introspection is likely going to change in the next ROS 2 release (Dashing) so check the migration in the future to check for information.