From 2e6ec0dc49f9bf5bf7858784bec6805ac6963490 Mon Sep 17 00:00:00 2001 From: Emerson Knapp <537409+emersonknapp@users.noreply.github.com> Date: Thu, 28 Oct 2021 09:10:14 -0700 Subject: [PATCH] Need to pass introspection TS to converter plugin for it to be useful (#896) Signed-off-by: Emerson Knapp --- rosbag2_cpp/src/rosbag2_cpp/converter.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/rosbag2_cpp/src/rosbag2_cpp/converter.cpp b/rosbag2_cpp/src/rosbag2_cpp/converter.cpp index dae0a7a2d5..e12859f5a5 100644 --- a/rosbag2_cpp/src/rosbag2_cpp/converter.cpp +++ b/rosbag2_cpp/src/rosbag2_cpp/converter.cpp @@ -66,7 +66,6 @@ Converter::~Converter() std::shared_ptr Converter::convert( std::shared_ptr message) { - auto ts = topics_and_types_.at(message->topic_name).rmw_type_support; auto introspection_ts = topics_and_types_.at(message->topic_name).introspection_type_support; auto allocator = rcutils_get_default_allocator(); std::shared_ptr allocated_ros_message = @@ -77,13 +76,13 @@ std::shared_ptr Converter::convert( rosbag2_cpp::introspection_message_set_topic_name( allocated_ros_message.get(), message->topic_name.c_str()); allocated_ros_message->time_stamp = message->time_stamp; - input_converter_->deserialize(message, ts, allocated_ros_message); + input_converter_->deserialize(message, introspection_ts, allocated_ros_message); // re-serialize output_message->serialized_data = rosbag2_storage::make_empty_serialized_message(0); output_message->topic_name = std::string(allocated_ros_message->topic_name); output_message->time_stamp = allocated_ros_message->time_stamp; - output_converter_->serialize(allocated_ros_message, ts, output_message); + output_converter_->serialize(allocated_ros_message, introspection_ts, output_message); return output_message; }