Skip to content

Commit 964b0ae

Browse files
authored
Add empty type key hash to GraphCache (#189)
Signed-off-by: acuadros95 <[email protected]>
1 parent 0394612 commit 964b0ae

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

micro_ros_agent/src/agent/graph_manager/graph_manager.cpp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,8 @@ void GraphManager::add_datawriter(
374374
"rmw_fastrtps_cpp", participant_guid);
375375
const rmw_qos_profile_t qos_profile = fastdds_qos_to_rmw_qos(writer_qos);
376376

377-
graphCache_.add_entity(datawriter_gid, topic_name,
378-
type_name, participant_gid, qos_profile, false);
377+
graphCache_.add_entity(datawriter_gid, topic_name, type_name,
378+
rosidl_get_zero_initialized_type_hash(), participant_gid, qos_profile, false);
379379
}
380380

381381
void GraphManager::remove_datawriter(
@@ -411,8 +411,13 @@ void GraphManager::add_datareader(
411411
"rmw_fastrtps_cpp", participant_guid);
412412
const rmw_qos_profile_t qos_profile = fastdds_qos_to_rmw_qos(reader_qos);
413413

414-
graphCache_.add_entity(datareader_gid, topic_name,
415-
type_name, participant_gid, qos_profile, true);
414+
// TODO(acuadros95): Use typesupport to calculate type hash on micro-ROS and save and get it from reader_qos.user_data.
415+
// Related PRs:
416+
// https://github.com/ros2/rmw_dds_common/pull/70
417+
// https://github.com/ros2/rmw_fastrtps/pull/671
418+
// https://github.com/ros2/rmw_fastrtps/pull/680
419+
graphCache_.add_entity(datareader_gid, topic_name, type_name,
420+
rosidl_get_zero_initialized_type_hash(), participant_gid, qos_profile, true);
416421
}
417422

418423
void GraphManager::remove_datareader(

0 commit comments

Comments
 (0)