-
Notifications
You must be signed in to change notification settings - Fork 260
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
Use converters when recording a bag file #57
Use converters when recording a bag file #57
Conversation
0716186
to
eeff3fc
Compare
Fixes #16 |
eeff3fc
to
e479b2b
Compare
e479b2b
to
f0eb3ab
Compare
This PR is now based on #64 - after this PR is merged, the number of files changed will shrink to 63. The changeset still comprises a lot of files since we change the behaviour of the storage plugin: Instead of writing one topic type per storage storage, now every topic has its own type. This needs to be changed in the sqlite3 backend all the way to the printing statements. |
- Use converters in Writer::write() when input rmw serialization format is different from desired storage serialization format - Add new field in rosbag2::StorageOptions to keep track of the rmw format given by the user to store the message in
- Add 'serialization_format' field to TopicMetadata - Add 'serialization_forat' column in 'topics' table in sqlite storage - Remove 'storage_format' from BagMetadata and use the TopicMetadata field directly, instead - the field 'rmw_serialization_format' has been moved from rosbag2::StorageOptions to rosbag2_transport::RecordOptions, because it's a topic property rather than a storage one. - Currently all topics in a bag file must have the same serialization format - The tests have been updated accordingly
…rter plugin does not exist
… writer's destructor
- This assures that if one of the converter plugins does not exist, the database is not created
…r plugins do not exists - Both a test for record and play has been added
…specified at CLI level - Tests to check that the serialization format is written in the database have also been added.
- update pluginlib descriptions file after several renames - fix export of missing includes folder
- one of the main test goals can only be ssen by valgrind or sanitizers - enable leak sanitizer for gcc builds only (for now)
N.B. This exposes an pre-existing memory leak (not fixed here).
- topic_name member needs to be freed - provide a setter for convenience - Directly assigning a string literal in the test is not sufficient as this would be static memory that does not need to be freed.
This allows manual usage of valgrind.
f0eb3ab
to
aa73556
Compare
@@ -25,6 +25,7 @@ struct RecordOptions | |||
public: | |||
bool all; | |||
std::vector<std::string> topics; | |||
std::string rmw_serialization_format; |
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.
shouldn't this be a vector of strings? Ideally, each topic is associated with a serialization format (even if it's not supported yet).
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.
I would do this only when this feature is being implemented. I am not yet sure how this should look like (or even how the cli usage should be). E.g. a map might also be an alternative.
target_compile_definitions(test_ros2_message PRIVATE "ROSBAG2_BUILDING_DLL") | ||
if(NOT DISABLE_SANITIZERS) | ||
target_compile_options(test_ros2_message PUBLIC $<$<CXX_COMPILER_ID:GNU>:-fsanitize=leak>) | ||
target_link_libraries(test_ros2_message $<$<CXX_COMPILER_ID:GNU>:-fsanitize=leak>) |
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.
Just for the record: in the Jenkins CI jobs which are using Docker the leak sanitizer was never used for the test. See ros-infrastructure/ros_buildfarm#832.
* rosbag2_storage_mcap: add storage preset profiles Signed-off-by: James Smith <james@foxglove.dev> * mcap_vendor: update to mcap v0.5.0 Signed-off-by: James Smith <james@foxglove.dev> Signed-off-by: James Smith <james@foxglove.dev>
* rosbag2_storage_mcap: add storage preset profiles Signed-off-by: James Smith <james@foxglove.dev> * mcap_vendor: update to mcap v0.5.0 Signed-off-by: James Smith <james@foxglove.dev> Signed-off-by: James Smith <james@foxglove.dev>
This PR is based on #56. It includes:
-f, --serialization-format
for the CLI verbrecord
serialization-format
option defaults to thermw
format of the incoming messagesrmw
serialization format (for the moment, though, a bag file can be played only if all topics have the same format. Since it is not yet possible to edit a bag file, this is not a problem. The possibility to play a bag with different serialization formats will be added in a followup PR)