Skip to content

Conversation

oxkitsune
Copy link
Member

@oxkitsune oxkitsune commented Sep 29, 2025

What

Adds support for dynamically deserializing ROS2 MCAP messages into arrow data.

This is done by parsing the ROS2 message definition and using the type definition to deserialize the CDR-encoded data into arrow types.

TODO:

  • Remove extra data logged in ROS2 semantic parsers

@oxkitsune oxkitsune added 📺 re_viewer affects re_viewer itself include in changelog 🧢 MCAP Everything related to the MCAP support labels Sep 29, 2025
Copy link

github-actions bot commented Sep 29, 2025

Web viewer built successfully.

Result Commit Link Manifest
0ff050b https://rerun.io/viewer/pr/11367 +nightly +main

Note: This comment is updated whenever you push a commit.

@jprochazk
Copy link
Member

Is this the right "spec" for ROS2? (do we care about ROS1) https://docs.ros.org/en/kilted/Concepts/Basic/About-Interfaces.html#interfaces

@oxkitsune
Copy link
Member Author

Is this the right "spec" for ROS2? (do we care about ROS1) docs.ros.org/en/kilted/Concepts/Basic/About-Interfaces.html#interfaces

This implements the spec for ROS2 .msg messages, which is only slightly different from the ROS1 message spec. Adding support for ROS1 in the future is trivial with this in place.

This does not implement parsing of ROS2 .idl message definitions

Copy link
Member

@grtlr grtlr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've reviewed the interface of the reflection-based parser and re_mcap and that part LGTM. This is so cool to have!

Please let me know if you want a more detailed review of the parser too.

| re_mcap | Convert MCAP into Rerun-compatible data. |
| re_memory | Run-time memory tracking and profiling. |
| re_perf_telemetry | In and out of process performance profiling utilities for Rerun & Redap |
| re_ros_msg | Parsing and deserializing ROS messages |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we still need to update the Architecture figma (see component above table).

if let Some(field_value) = message_fields.get(&spec_field.name) {
append_value(field_builder, field_value, schema)?;
} else {
//TODO(gijsd): Field is missing in the message, append null
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need that comment?


// For nested messages, we need to find the matching specification from dependencies
// Since we don't have type information here, we'll try to match by field names
let matching_spec = find_matching_message_spec(schema, message_fields);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is quadratic over the number of dependencies. append_value is called a lot, does it make sense to cache / precompute all specs when creating the parser? append_value could then take a &self?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
include in changelog 🧢 MCAP Everything related to the MCAP support 📺 re_viewer affects re_viewer itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants