-
Notifications
You must be signed in to change notification settings - Fork 72
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
Add ROS2 support #129
Comments
You are correct, ROS2 bag files have a different format; in fact, rosbag2 is designed to have a plugin-based storage backend, so it is not technically tied to any specific format at all, although the default implementation stores data as SQLite databases. The Bag Database doesn't currently support ROS2 bags, although I'd like to add support for them in the future. In order support ROS2 bags, it would need a Java library that is capable of reading them; just reading SQLite databases is easy, but things get a little bit more complicated because the default rosbag2 implementation serializes messages using the DDS cdr format, so extracting useful information from the messages would also require being able to deserialize that. |
I see... thank you for your answer! Cheers! |
Not sure if it helps, but there is already some ROS2 - java combining going on: |
There's been some movement on making ros2 bags fully self describing, which would help out this issue quite a bit. See the discussion on this issue: ros2/rosbag2#782 |
Oh that'd be nice. I was just looking into this again the other day, actually... Basically, there are two problems right now standing in the way of this:
It might be possible to incorporate ros2-java into it in order to use Fast DDS to deserialize messages... while it'd be nice to have a pure Java implementation that doesn't rely on having a whole ROS stack included in the image to function, it's probably worth investigating to get a feel for how difficult that would be to use vs. writing our own CDR deserializer. |
I haven't looked into the Java CDR decoding, but it would really be nice to not have a dependency on actual ROS. We could hard code a few definitions for GPS and image messages that we really care about for some of the core functionality, and then wait for the bag format to get updated, but I'm not holding my breath on that. |
@pjreed what if as part of the Docker image building process, we cloned the standard ROS message definitions, and optionally user defined repos, built the message definitions/CDR representations, and then found a Java library for deserializing CDR formatted messages? We could then use the message definitions we built in the first stage and for deserializing information in the database. That way, we wouldn't have a runtime dependency on ROS but could still get some level of introspection. |
That's a possibility, but finding a Java library that can deserialize CDR data is the hard part; I've spent a while looking around and haven't found anything. I've seen a few DDS implementations that advertise Java support, but all of them are just JNI wrappers around C/C++ libraries, and the ones that look decent are not open source. So far I haven't found any standalone CDR libaries. |
I assume you're talking about something like OpenDDS? https://github.com/objectcomputing/OpenDDS |
Yep. I have specifically had enough experiences with ACE/TAO in the past that I'm shy about touching anything that uses it. I do see that they provide a pre-built Docker image, so maybe it would be possible to do something like make our own image based on that which can take in message definitions, serialized data, and output it in some other format we can easily interpret... but that might be just as much work as making our own CDR parser. |
Just thought I'd point out that, while it's not useful for ingesting things on the backend, here's a Typescript-based CDR implementation and ROS2 message deserializer: Might be useful as a reference for writing our own. |
I'm hoping with some of the conversations that have occurred in the Tooling
WG that this might be resolved in the near future. I'll push on it again in
the next WG meeting, and see if we can get more traction.
…On Tue, Aug 24, 2021 at 4:48 PM P. J. Reed ***@***.***> wrote:
Just thought I'd point out that, while it's not useful for ingesting
things on the backend, here's a Typescript-based CDR implementation and
ROS2 message deserializer:
https://github.com/foxglove/cdr
https://github.com/foxglove/rosmsg2-serialization
Might be useful as a reference for writing our own.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#129 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABBZWHFRDVPD2KYT2MURLRTT6QHRZANCNFSM4TT6PE5Q>
.
|
It sounds like the H-release of ROS2 will have the ability to store message definitions in the bag file, which should make it more feasible to implement ROS 2 support. |
Hi all, I'm currently working on a project that sets out to acquire large datasets (3D LiDAR, camera data, GNSS, etc.) of outdoor environments. We would like to use bag-database for that, but are using ROS2. Are there any news on whether/when bag-database will be able to handle ROS2 bags as well? From the looks of it, this project could be very helpful in maintaining a consistent overview on our ros bags and their data! |
@gjaeger1 It might be worth revisiting this. ROS2 bag support still will be tricky. Support for storing message definitions in an MCAP file, not a bag file, was recently added: ros2/rosbag2#782. Unfortunately, embedding those message definitions in an MCAP file still requires having those message definitions available on the system doing the recording. So unlike ROS1, you can't attach a computer with a minimal ROS installation to your robot and have it read the message definitions off the wire for storage in a ROS bag. That being said, adding support for MCAP at this point seems reasonable. There's a bunch of different languages supported for it (https://github.com/foxglove/mcap), so we may be able to just pull off of their native interface to add it to the bag database. |
Just wanted to see if there are any new developments with regards to mcap support? |
It looks like we'll have to write our own MCAP decoder or wrap one of the
existing implementations. Let me look at this a little bit over the
weekend, because I was thinking about it today.
…On Thu, May 2, 2024, 10:03 PM Sebastian Scherer ***@***.***> wrote:
Just wanted to see if there are any new developments with regards to mcap
support?
—
Reply to this email directly, view it on GitHub
<#129 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABBZWHGEAZMK6ZSNODJDDNTZAL473AVCNFSM4TT6PE52U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBZGIYDIOJUGMYA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Did you get a chance to look? |
any updates on the support of mcap ? |
This is something I am interested in too, an potentially can contribute some cycles to help get up and running. If you have some idea of what would be a good path forward, I can start looking into it |
Hello everyone!
I might be mistaken, but ROS2 bag files have a different format than ROS1.
Does bag-database support ROS2 bag files?
Thank you!
The text was updated successfully, but these errors were encountered: