|
17 | 17 | #include "serialized_bag_message.hpp" |
18 | 18 | #include "utils.hpp" |
19 | 19 |
|
| 20 | +#include <rclcpp/typesupport_helpers.hpp> |
20 | 21 | #include <rosbag2_cpp/reader.hpp> |
21 | 22 | #include <rosbag2_cpp/readers/sequential_reader.hpp> |
22 | | -#include <rosbag2_cpp/typesupport_helpers.hpp> |
23 | 23 | #include <rosbag2_storage/storage_filter.hpp> |
24 | 24 | #include <rosbag2_storage/storage_options.hpp> |
25 | 25 |
|
@@ -79,12 +79,16 @@ void PerceptionReplayerCommon::load_rosbag( |
79 | 79 | // try to load type support for each topic |
80 | 80 | for (const auto & topic_meta : topics) { |
81 | 81 | try { |
82 | | - auto library = |
83 | | - rosbag2_cpp::get_typesupport_library(topic_meta.type, "rosidl_typesupport_cpp"); |
| 82 | + auto library = rclcpp::get_typesupport_library(topic_meta.type, "rosidl_typesupport_cpp"); |
84 | 83 | type_support_libs[topic_meta.name] = library; |
85 | 84 |
|
| 85 | +#ifdef ROS_DISTRO_HUMBLE |
86 | 86 | const rosidl_message_type_support_t * type_support = |
87 | | - rosbag2_cpp::get_typesupport_handle(topic_meta.type, "rosidl_typesupport_cpp", library); |
| 87 | + rclcpp::get_typesupport_handle(topic_meta.type, "rosidl_typesupport_cpp", *library); |
| 88 | +#else |
| 89 | + const rosidl_message_type_support_t * type_support = |
| 90 | + rclcpp::get_message_typesupport_handle(topic_meta.type, "rosidl_typesupport_cpp", *library); |
| 91 | +#endif |
88 | 92 |
|
89 | 93 | if (type_support) { |
90 | 94 | type_support_map[topic_meta.name] = std::shared_ptr<const rosidl_message_type_support_t>( |
|
0 commit comments