Skip to content

Commit

Permalink
Fix linters and address review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
  • Loading branch information
emersonknapp committed Dec 2, 2021
1 parent 200ae66 commit 7ba2e3e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions rosbag2_transport/include/rosbag2_transport/bag_rewrite.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions rosbag2_transport/src/rosbag2_transport/bag_rewrite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<rosbag2_storage::SerializedBagMessage> get_next(
const std::vector<std::unique_ptr<rosbag2_cpp::Reader>> & input_bags,
std::vector<std::shared_ptr<rosbag2_storage::SerializedBagMessage>> & next_messages)
Expand Down
6 changes: 5 additions & 1 deletion rosbag2_transport/test/rosbag2_transport/test_rewrite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@

#include <gmock/gmock.h>

#include <string>
#include <vector>
#include <utility>

#include "rcpputils/filesystem_helper.hpp"
#include "rosbag2_transport/bag_rewrite.hpp"
#include "rosbag2_transport/reader_writer_factory.hpp"
Expand Down Expand Up @@ -72,7 +76,7 @@ class TestRewrite : public Test
const rcpputils::fs::path output_dir_;
std::vector<rosbag2_storage::StorageOptions> input_bags_;
std::vector<std::pair<rosbag2_storage::StorageOptions, rosbag2_transport::RecordOptions>>
output_bags_;
output_bags_;
};

TEST_F(TestRewrite, test_noop_rewrite) {
Expand Down

0 comments on commit 7ba2e3e

Please sign in to comment.