ros2 topic info -v reports Topic type hash: INVALID for every endpoint. Under rmw_cyclonedds the same command shows the real RIHS01 hash.
Cause: rmw_get_publishers_info_by_topic / rmw_get_subscriptions_info_by_topic fill node name, namespace, type, QoS and gid, but never call rmw_topic_endpoint_info_set_topic_type_hash (src/rmw_graph.cpp:404-418), so the hash stays zero-initialized. RegistryEntry has no field to carry it either.
Anything that reads type hashes from endpoint info (ros2 topic info -v, rosbag2 topic metadata) gets zeros with this RMW.
Fix outline:
- capture
type_supports->get_type_hash_func(type_supports) in rmw_create_publisher / rmw_create_subscription
- add the hash (1-byte version + 32-byte value) to
RegistryEntry / RegistryEntrySlot in registry.hpp (layout static_asserts need updating)
- set it via
rmw_topic_endpoint_info_set_topic_type_hash in both *_info_by_topic functions
For reference, rmw_cyclonedds encodes the hash into USER_DATA at endpoint creation and parses it back during discovery.
ros2 topic info -vreportsTopic type hash: INVALIDfor every endpoint. Under rmw_cyclonedds the same command shows the real RIHS01 hash.Cause:
rmw_get_publishers_info_by_topic/rmw_get_subscriptions_info_by_topicfill node name, namespace, type, QoS and gid, but never callrmw_topic_endpoint_info_set_topic_type_hash(src/rmw_graph.cpp:404-418), so the hash stays zero-initialized.RegistryEntryhas no field to carry it either.Anything that reads type hashes from endpoint info (
ros2 topic info -v, rosbag2 topic metadata) gets zeros with this RMW.Fix outline:
type_supports->get_type_hash_func(type_supports)inrmw_create_publisher/rmw_create_subscriptionRegistryEntry/RegistryEntrySlotin registry.hpp (layout static_asserts need updating)rmw_topic_endpoint_info_set_topic_type_hashin both*_info_by_topicfunctionsFor reference, rmw_cyclonedds encodes the hash into USER_DATA at endpoint creation and parses it back during discovery.