Skip to content

Commit

Permalink
Fix transform bug
Browse files Browse the repository at this point in the history
Signed-off-by: roncapat <[email protected]>
  • Loading branch information
roncapat committed Oct 25, 2023
1 parent 1021568 commit d8d215c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion rosbag2_storage_mcap/src/mcap_storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@ void MCAPStorage::create_topic(const rosbag2_storage::TopicMetadata & topic,
to_encode.reserve(topic_info.topic_metadata.offered_qos_profiles.size());
std::transform(topic_info.topic_metadata.offered_qos_profiles.begin(),
topic_info.topic_metadata.offered_qos_profiles.end(),
to_encode.begin(),
std::back_inserter(to_encode),
[](auto & qos) {
return static_cast<rosbag2_storage::Rosbag2QoS>(qos);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ void SqliteStorage::create_topic(
std::transform(
topic.offered_qos_profiles.begin(),
topic.offered_qos_profiles.end(),
to_encode.begin(),
std::back_inserter(to_encode),
[](auto & qos) {return static_cast<rosbag2_storage::Rosbag2QoS>(qos);});
auto yaml_node = YAML::convert<std::vector<rosbag2_storage::Rosbag2QoS>>::encode(to_encode);
auto insert_topic =
Expand Down
2 changes: 1 addition & 1 deletion rosbag2_transport/src/rosbag2_transport/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ rclcpp::QoS publisher_qos_for_topic(
std::vector<rosbag2_storage::Rosbag2QoS> casted;
casted.reserve(topic.offered_qos_profiles.size());
std::transform(
topic.offered_qos_profiles.begin(), topic.offered_qos_profiles.end(), casted.begin(),
topic.offered_qos_profiles.begin(), topic.offered_qos_profiles.end(), , std::back_inserter(casted),
[](auto & qos) {return static_cast<rosbag2_storage::Rosbag2QoS>(qos);});
return rosbag2_storage::Rosbag2QoS::adapt_offer_to_recorded_offers(topic.name, casted);
}
Expand Down
2 changes: 1 addition & 1 deletion rosbag2_transport/test/rosbag2_transport/test_record.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ TEST_F(RecordIntegrationTestFixture, qos_is_stored_in_metadata)
std::vector<rosbag2_storage::Rosbag2QoS> to_encode;
to_encode.reserve(offered_qos_profiles.size());
std::transform(
offered_qos_profiles.begin(), offered_qos_profiles.end(), to_encode.begin(),
offered_qos_profiles.begin(), offered_qos_profiles.end(), std::back_inserter(to_encode),
[](auto & qos) {return static_cast<rosbag2_storage::Rosbag2QoS>(qos);});
std::string serialized_profiles = YAML::convert<std::vector<rosbag2_storage::Rosbag2QoS>>::encode(
to_encode).as<std::string>();
Expand Down

0 comments on commit d8d215c

Please sign in to comment.