You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When logging data with a custom logger, I store both ROS2 data and additional custom data in MCAP files. Currently, attempting to play back these files with ros2 bag play results in an error due to mixed serialization formats. It would be useful if we could selectively play back compatible topics without encountering this issue.
Current Behavior
Attempting playback with ros2 bag play returns the error:
"Topics with different RMW serialization formats have been found. All topics must have the same serialization format."
Even if specific topics are specified with the --topics flag, ros2 bag play checks all topics, rather than just those specified.
Desired Behavior
Ignore topics with unknown serialization formats: ros2 bag play should play back topics with compatible formats (like cdr) and skip topics with unknown formats.
Selective topic playback: When specific topics are listed with the --topics flag, only these topics should be validated and played back, ignoring the others.
Completion Criteria
The solution should allow for playback of compatible topics without errors.
Topics specified with --topics should be the only ones validated for serialization format.
Suggested Implementation
Option 1: Update mcap_storage.cpp to generate metadata only for topics with "known" formats, ensuring playback compatibility.
Note: This approach may need updates if new formats are introduced in the future.
Option 2: Modify the behavior of the --topics flag in ros2 bag play to validate only the specified topics.
Testing
Generate an MCAP file with a mix of valid cdr messages and messages in an unknown format.
Confirm that ros2 bag play:
Ignores unknown formats and plays compatible data.
Plays only specified topics when using the --topics flag, without checking non-specified topics.
The text was updated successfully, but these errors were encountered:
IMO this sounds reasonable and more reliable behavior.
Ignore topics with unknown serialization formats: ros2 bag play should play back topics with compatible formats (like cdr) and skip topics with unknown formats.
probably it should not ignore, but it can print the warning that this topic data is unknown serialization formats or something like that.
I agree that it is nice to have feature/behavior.
As regards the implementation proposal. It should be generic and not specific to some storage plugin.
Therefore only option 2 is valid in this case.
Option 2: Modify the behavior of the --topics flag in ros2 bag play to validate only the specified topics.
Summary
When logging data with a custom logger, I store both ROS2 data and additional custom data in MCAP files. Currently, attempting to play back these files with
ros2 bag play
results in an error due to mixed serialization formats. It would be useful if we could selectively play back compatible topics without encountering this issue.Current Behavior
Attempting playback with
ros2 bag play
returns the error:Even if specific topics are specified with the
--topics
flag,ros2 bag play
checks all topics, rather than just those specified.Desired Behavior
ros2 bag play
should play back topics with compatible formats (likecdr
) and skip topics with unknown formats.--topics
flag, only these topics should be validated and played back, ignoring the others.Completion Criteria
--topics
should be the only ones validated for serialization format.Suggested Implementation
Option 1: Update
mcap_storage.cpp
to generate metadata only for topics with "known" formats, ensuring playback compatibility.Option 2: Modify the behavior of the
--topics
flag inros2 bag play
to validate only the specified topics.Testing
cdr
messages and messages in an unknown format.ros2 bag play
:--topics
flag, without checking non-specified topics.The text was updated successfully, but these errors were encountered: