-
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
Store ROS_DISTRO as metadata.yaml and in the storage file #1086
Comments
@wkalt Could you please provide some rosbag2 db3 bag file which is failing converter to process it? |
@MichaelOrlov thanks, here's one @amacneil recorded on eloquent: |
patch to fix the converter for additional context: foxglove/mcap#570 |
@wkalt In rosbag2/rosbag2_storage/include/rosbag2_storage/yaml.hpp Lines 246 to 260 in e179c79
In particular offered_qos_profiles was introduced since metadata.version = 4rosbag2/rosbag2_storage/include/rosbag2_storage/yaml.hpp Lines 109 to 113 in e179c79
|
However we are not handling medata.version properly when trying to read out metadata from database directly. |
@MichaelOrlov to clarify, the specific request here is that this metadata (the ROS 2 release) is stored in the db3 file when using the sqlite plugin. We have users who open a sqlite file directly (i.e. no |
@amacneil I agree it would be nice if all metadata information from I can provide some fix to workaround this problem and support |
That's funny, we had the exact same issue in the I also think it would be fine to say that ROS 2 Iron+ does not support reading Eloquent bags. |
Now rolling and humble support reading Eloquent bags. |
Nice! #1090 for reference. |
Regarding the original title of this ticket, I think it would still be good to record the ROS distro in the db3 file. E.g. a
Probably some other keys could be added, like what DDS middleware was in use? It will help when we need to do things like guess which version of the message definitions to use. |
@amacneil As regards
Can you please clarify how dds middleware version and and ROS version could help in determining message definition version? We have a thoughts to store schema version, metadata version, metadata, and message definition directly to the |
Yes, I think both would be good (storing the schema, and also storing the ros distro). |
@MichaelOrlov I noticed your comment in #1143 (comment):
Storing ROS_DISTRO specifically would be useful for Foxglove, because we try to open db3 files using a bundled copy of the standard ROS schemas, but those schemas change from release to release (e.g. I don't feel strongly about how this is captured in the db3 file, but I think it would be useful. Are you open to that? Alternatively, if the full message schemas are stored in the db3 file it would also solve this problem, but we don't have bandwidth for that as all energy is going into MCAP. Storing ROS_DISTRO in db3 is a quick and easy fix (especially if it was backported to Humble, so that we can correctly interpret those files going forward). |
@amacneil Thanks a lot for the clarification.
Thoughts? Does it still make sense to pursue trying to store |
How is the ABI/API compatibility broken? If this information is not passed to the storage plugin the plugin could look at the environment |
@defunctzombie Good point. We might be able to add ROS_DISTRO as extra field when doing changes in the scope of the #1108. |
Agreed, I think we can add ROS_DISTRO to Humble and Galactic without breaking backwards compatibility, it is it strictly an addition to the db3 file, and shouldn't require changing any public interfaces? I understand your point about this not being a perfect heuristic for the different Marker message. Storing the full schemas in db3 file would be a better solution, but I assume you would not be able to backport db3 schemas to Humble because it would require breaking ABI compatibility? Since Humble is LTS and supported until 2027, I would be in favor of adding ROS_DISTRO to Galactic/Humble without breaking ABI, so that we have a heuristic (even if not perfect) we can use. We can still add schemas to db3 for Iron (unless you can think of a way to do that for Humble) which is a better long term solution. |
For what it is worth, Galactic is going EOL this month. So it is probably not worth making changes to it at this point. For Humble, as long as the new db3 files can be read by the old code and vice-versa, it is fine to add something to the schema. |
@clalancette good point, only identifying Humble db3 files would be sufficient. We can assume the pre-Humble Marker message unless we explicitly detect |
Awesome! @MichaelOrlov I agree this issue is resolved since when this issue was created the ask was to have it in the sql file. I don't see it in the mcap storage plugin so it does look like we'll need a new issue to add this information to that the file. |
Description
I recently discovered that ros2 db3 bag files recorded by different versions of ROS can have different database schemas. For example, bags recorded on eloquent do not have the offered_qos_profiles column in the topics table, which caused our (Foxglove's) db3 to mcap converter to fail on eloquent bags.
It would be helpful if the ros2 bag recorder wrote its ROS version to the db3 file, to enable consumers to cleanly dispatch to different parsing behavior.
Implementation Notes / Suggestions
Perhaps a new table like "metadata" or some similar concept.
The text was updated successfully, but these errors were encountered: