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

How to read a mcap file recorded with OMGIDL encoding using rosbag2 #1826

Open
karthiknit opened this issue Oct 2, 2024 · 2 comments
Open

Comments

@karthiknit
Copy link

karthiknit commented Oct 2, 2024

@MichaelOrlov I have a mcap file that contains data for foxglove::SceneUpdate message type with OMGIDL encoding. IDL file for this type is available here- https://github.com/foxglove/schemas/tree/main/schemas/omgidl/foxglove.
Is it possible to read the mcap file in such a scenario using rosbag2? Also, Is there anyway to convert omgidl encoded mcap file to ros2msg or ros2idl encoded mcap file.

For information on different encodings in mcap see here - https://docs.foxglove.dev/docs/connecting-to-data/frameworks/custom#schema-encodings

@MichaelOrlov
Copy link
Contributor

@karthiknit I am not familiar with Foxglove OMGIDL encoding. How is it different from the ros2idl?
The ros2idl is also a subset of the OMGIDL.
In theory, you should be able to open the recorded mcap file with the rosbag2:cpp or rosbag_py API.
However, to be able to playback such a file, you will need to have built and sourced typesupports generated from message definitions stored in the local file system.

cc: @defunctzombie

@defunctzombie
Copy link

Have you tried to read the file? It is unclear from your question if you simply want to read the file with one of the APIs or want to ros2 bag play the file. My advice would be to try the specific workflow you want and see what works and what doesn't and come back with specific questions about those workflows.

Also, Is there anyway to convert omgidl encoded mcap file to ros2msg or ros2idl encoded mcap file.

In theory yes since you can read the file using one of the many mcap language libraries and produce a new mcap file. What you would need to do specifically depends on what is in your original file and what expectations you have of "reading the file with rosbag2".

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

No branches or pull requests

3 participants