Skip to content
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

Deserialize messages in bag using the message definitions in the bag #1801

Open
jackiescanlon opened this issue Sep 10, 2024 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@jackiescanlon
Copy link

Description

Right now with rosbag2_py it seems that its possible to:

  1. Get the message definitions stored in an .mcap in string format (source)
  2. Get the messages stored in an .mcap by deserializing with the associated message definition (example)

However, I cannot find a way to connect the two things, i.e., deserialize the messages via the definitions in the bag. There doesn't seem to be a (simple) way to turn the string message definitions into actual message defs that the deserializer can use. All the examples I can find for deserialization in python involve using the message definitions available in the local environment, not the ones in the bag.

Let me know if I am overlooking some part of the API that does do this currently.

Related Issues

  1. I found Store message definition in bag #782 which seems to have covered the problem of the message definitions not being stored in bag files at all in ROS 2, but using the stored definitions for deserialization does not appear to be covered by that ticket.
  2. There's some comments on Type Description Distribution (REP-2011 subset / REP-2016) - formerly "message definitions on-the-wire" ros2#1159 (comment) requesting this also, but as far as I can tell no separate ticket was ever created for this.
  3. Those comments reference Dynamic Subscription (REP-2011 subset) ros2#1374. I didn't see anything obvious in there that seems to cover the issue I'm describing but perhaps I overlooked it? Not sure.

Completion Criteria

  • A python API exists with which the user can deserialize bag messages using definitions stored in the bag, with no reliance on local environment definitions (i.e., no need to use rosidl_runtime_py to grab local defs)

Implementation Notes / Suggestions

None

Testing Notes / Suggestions

None

@MichaelOrlov
Copy link
Contributor

@jackiescanlon

@jackiescanlon
Copy link
Author

Thanks @MichaelOrlov , I've made ros2/ros2#1603 accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants