-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make rosbag2 a metapackage #241
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple comments:
- The removal of type aliases in
types.hpp
could have been done separately - Could the code in
rosbag2_cpp
use the namespacerosbag2
?
I want to give this PR another run through since its large.
The namespace should always reflect the package name otherwise this would lead to confusion IMO. Also discussed here: #174 (comment) As for the types, I agree this could have been separately, but really, this PR is already changing so many files and namespaces, that removing the aliases for the types doesn't make a huge impact either. |
#include "test_msgs/message_fixtures.hpp" | ||
|
||
using rosbag2::converter_interfaces::SerializationFormatConverter; | ||
#include "../../../src/rosbag2_converter_default_plugins/cdr/cdr_converter.hpp" | ||
#include "../../../src/rosbag2_converter_default_plugins/logging.hpp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably for another PR, but shouldn't these be found via the CMakeLists.txt
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is ok since the package's structure is known to the tests, but it can be fragile. You could create a relative path in CMake and pass it as a compiler definition instead. At least then it wouldn't be hardcoded in so many places. But the use of a relative path here is in principle safe.
LGTM. It seems all the packages have been renamed correctly. |
@Karsten1987 I think you should get more people's input before merging due to how big this is. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable to me. It's a lot of churn, but now's the time to do it.
19b9b26
to
457db9f
Compare
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
457db9f
to
53b82aa
Compare
@Karsten1987 the build is probably going to fail due to a new unit test I added in the compression metadata PR that was just merged. I can add the fix if you want. The changes needed are: diff --git a/rosbag2_cpp/test/rosbag2_cpp/test_info.cpp b/rosbag2_cpp/test/rosbag2_cpp/test_info.cpp
index 40608fc..b3cec52 100644
--- a/rosbag2_cpp/test/rosbag2_cpp/test_info.cpp
+++ b/rosbag2_cpp/test/rosbag2_cpp/test_info.cpp
@@ -64,7 +64,7 @@ TEST_F(TemporaryDirectoryFixture, read_metadata_supports_version_2) {
fout << bagfile;
}
- rosbag2::Info info;
+ rosbag2_cpp::Info info;
const auto metadata = info.read_metadata(temporary_dir_path_, "sqlite3");
EXPECT_EQ(metadata.version, 2); and diff --git a/rosbag2_cpp/test/rosbag2_cpp/test_sequential_writer.cpp b/rosbag2_cpp/test/rosbag2_cpp/test_sequential_writer.cpp
index 278913c..a77c46d 100644
--- a/rosbag2_cpp/test/rosbag2_cpp/test_sequential_writer.cpp
+++ b/rosbag2_cpp/test/rosbag2_cpp/test_sequential_writer.cpp
@@ -141,9 +141,9 @@ TEST_F(SequentialWriterTest, open_throws_error_if_converter_plugin_does_not_exis
}
TEST_F(SequentialWriterTest, open_throws_error_on_invalid_splitting_size) {
- auto sequential_writer = std::make_unique<rosbag2::writers::SequentialWriter>(
+ auto sequential_writer = std::make_unique<rosbag2_cpp::writers::SequentialWriter>(
std::move(storage_factory_), converter_factory_, std::move(metadata_io_));
- writer_ = std::make_unique<rosbag2::Writer>(std::move(sequential_writer));
+ writer_ = std::make_unique<rosbag2_cpp::Writer>(std::move(sequential_writer));
// Set minimum file size greater than max bagfile size option
const uint64_t min_split_file_size = 10; |
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
@Karsten1987 I think we're good for merge on green CI. |
fixes #174
As discussed in the top level ticket, this PR renames the existing
rosbag2
package torosbag2_cpp
and introducesrosbag2
as a simple metapackage with only listing runtime dependencies.The renaming also entails changing the namespace accordingly, which makes that PR pretty brutal.
Signed-off-by: Karsten Knese karsten@openrobotics.org