diff --git a/rosbag2_transport/include/rosbag2_transport/bag_rewrite.hpp b/rosbag2_transport/include/rosbag2_transport/bag_rewrite.hpp index c93ab3f05a..3bc343f2cd 100644 --- a/rosbag2_transport/include/rosbag2_transport/bag_rewrite.hpp +++ b/rosbag2_transport/include/rosbag2_transport/bag_rewrite.hpp @@ -32,6 +32,9 @@ namespace rosbag2_transport /// - compress /// - serialization format conversion /// +/// Note: If a serialization format is not specified for an output bag's RecordOptions, +/// any topic going into it will use the serialization format of the last input with that topic. +/// /// \param input_options vector of settings to create Readers for bags to read messages from /// \param output_bags - full "recording" configuration of the bag(s) to write messages to /// Each output bag will be passed messages from every input bag, diff --git a/rosbag2_transport/src/rosbag2_transport/bag_rewrite.cpp b/rosbag2_transport/src/rosbag2_transport/bag_rewrite.cpp index 86f2fc5fdf..9a139ad3fb 100644 --- a/rosbag2_transport/src/rosbag2_transport/bag_rewrite.cpp +++ b/rosbag2_transport/src/rosbag2_transport/bag_rewrite.cpp @@ -35,6 +35,7 @@ namespace /// Find the next chronological message from all opened input bags. /// Updates the next_messages queue as necessary. /// next_messages is needed because Reader has no "peek" interface, we cannot put a message back. +/// Returns nullptr when all input bags have been fully read. std::shared_ptr get_next( const std::vector> & input_bags, std::vector> & next_messages) diff --git a/rosbag2_transport/test/rosbag2_transport/test_rewrite.cpp b/rosbag2_transport/test/rosbag2_transport/test_rewrite.cpp index 2e8b96b6ac..a68de13e80 100644 --- a/rosbag2_transport/test/rosbag2_transport/test_rewrite.cpp +++ b/rosbag2_transport/test/rosbag2_transport/test_rewrite.cpp @@ -14,6 +14,10 @@ #include +#include +#include +#include + #include "rcpputils/filesystem_helper.hpp" #include "rosbag2_transport/bag_rewrite.hpp" #include "rosbag2_transport/reader_writer_factory.hpp" @@ -72,7 +76,7 @@ class TestRewrite : public Test const rcpputils::fs::path output_dir_; std::vector input_bags_; std::vector> - output_bags_; + output_bags_; }; TEST_F(TestRewrite, test_noop_rewrite) {