MCAP Support Lands in Rerun

原始链接: https://rerun.io/blog/introducing-experimental-support-for-mcap-file-format

Rerun 增加了对 MCAP 的实验性支持,MCAP 是一种流行的机器人日志数据开源格式,旨在简化现有机器人数据的可视化,而无需更改工作流程。 这满足了社区日益增长的需求,因为 MCAP 现在是 ROS2 bag 的默认格式。 Rerun 通过将 MCAP 主题视为 Rerun 实体,将消息视为组件,来弥合 MCAP 的主题/消息模型与其自身实体组件系统之间的差距。 数据分层处理:`ros2msg` 层为标准 ROS2 消息(如图像和点云)提供语义解释,`protobuf` 层以结构化的方式解码消息,`raw` 层保留原始字节。 用户可以将 MCAP 文件拖放到 Rerun 中,或使用 CLI,并可以选择转换为 `.rrd` 文件以获得扩展功能。 最初的支持侧重于常见的 ROS2 消息类型,但自定义消息和 ROS1 支持目前有限。 超过可用 RAM 的大型 MCAP 文件也尚未支持。 团队欢迎通过 Discord 和 GitHub 提供社区反馈,以改进和扩展 MCAP 兼容性,进一步履行他们对开源机器人可视化的承诺。

黑客新闻 新 | 过去 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 MCAP 支持登陆 Rerun (rerun.io) 9点 由 Tycho87 22小时前 | 隐藏 | 过去 | 收藏 | 讨论 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请YC | 联系 搜索:
相关文章

原文

In the most recent release, we're adding experimental MCAP support to Rerun to make it easier to visualize your existing robot data without changing your current workflows or data formats. This is still an early feature, but we're eager to share this development with the community. We believe it should be easy to visualize robotics data, no matter the format.

Let's get into what we've built and why we think it's important. Firstly, MCAP is an open-source format for storing (generally robotics) log data.

From mcap.dev:

MCAP is an open-source container file format for multimodal log data. It supports multiple channels of timestamped pre-serialized data, and is ideal for use in pub/sub or robotics applications.

Motivations motivations

MCAP has been the default bag format in ROS2 since May 2023, and over the past year, we've seen more interest from the community in the ability to visualize MCAP data with Rerun.

At Rerun, we believe strongly that open-source visualization for robotics data is crucial for the future of robotics research and development. We're excited to start this journey with MCAP support, and we're committed to making it as robust and user-friendly as possible. We welcome feedback from the community to help us improve our support.

We want to discuss a bit about our approach to MCAP support in Rerun before we share how to get started.

The data model the-data-model

As you may know, Rerun's data model is based on an entity component system that is distinct from the topic/message model of MCAP.

We had to make some decisions in order to bridge the gap. Those decisions are primarily:

  1. MCAP topics correspond to Rerun entities.
  2. MCAP topics are stored in Rerun chunks.
  3. MCAP message contents will be extracted into Rerun components and grouped under the corresponding Rerun archetype.
  4. log_time and publish_time from MCAP messages will carry over to Rerun as two different timelines.

Lots of design choices are embedded in these assumptions. Let's get into some more detail.

Rerun uses a layered architecture to process MCAP files at different levels of abstraction. This design allows the same MCAP file to be ingested in multiple ways simultaneously, from raw bytes to semantically meaningful visualizations. This builds on some recent Rerun internals that we'll be diving deeper into in the coming months.

Each layer extracts different types of information from the MCAP source and maps to distinct Rerun archetypes.

For the purposes of this post, Rerun extracts data from the MCAP files into layers. Those layers are subsequently queryable (and visualizable) by our users. By default, Rerun analyzes an MCAP file to determine which layers are active to provide the most comprehensive view of your data, while avoiding duplication.

Message interpretation message-interpretation

At the core of MCAP support is how we interpret the contents of MCAP messages. This is critical to touch on but also under development and subject to change.

ROS2 semantic interpretation

The ros2msg layer provides semantic interpretation and visualization of standard ROS2 message types. This creates meaningful Rerun visualization components from data.

This layer understands the semantics of ROS2 messages and creates appropriate visualizations: images become Image, point clouds become Points3D, IMU messages become SeriesLines with the data plotted over time, and so on. This makes it easy to get up and running quickly.

This layer supports standard ROS2 packages including sensor_msgs, geometry_msgs, std_msgs, and builtin_interfaces. This layer provides visualization of sensor data like cameras and LiDAR with minimal setup required as well.

Protobuf decoding

Protobuf decoding/interpretation works a little differently than the ROS2 implementation.

The protobuf layer automatically decodes protobuf-encoded messages using reflection. This creates structured component data based on the protobuf schema.

To do this, we parse the protobuf definitions in the schema of the topic and use that to parse the (nested) protobuf types into Arrow types. Message fields then become Rerun components that you can query and analyze.

However, this layer provides structured access without semantic visualization meaning. While the data becomes queryable, it won't automatically appear as meaningful visualizations like images or point clouds, it gives you the data structure, not the visual interpretation.

This is an important nuance and one that we'll dive deeper into as we talk more about querying this kind of data in follow-up posts. Suffice it to say that we make the data available, but not necessarily usable for immediate visualization, like we do with ROS2.

Accessing layer data accessing-layer-data

Each layer creates different archetypes on the same entity paths (derived from MCAP channel topics) that can be accessed through Rerun's SDK:

  • Data from the protobuf layer appears as structured components that can be queried by field name
  • Data from the ros2msg layer appears as native Rerun visualization components (Image, Points3D, etc.)
  • Data from the raw layer appears as blob components containing the original message bytes
  • Metadata from schema, stats, and recording_info layers appears as dedicated metadata entities

For more information on querying data and working with archetypes, see how to query data out of Rerun.

Getting started is easy!

You can drag-and-drop MCAP files directly into the Rerun viewer or use File > Open to load them.

mcap-demo

Of course, you can also load MCAP files directly into Rerun using the CLI:

Conversion conversion

Alternatively, you can convert an MCAP file into a .rrd file:

You can do that on a per-layer basis as well:

Doing this conversion will enable more capabilities that we'll talk about in upcoming blog posts.

Our initial implementation focuses on common ROS2 message types that are heavily used for visualization:

  • sensor_msgs
  • std_msgs
  • geometry_msgs
  • builtin_interfaces

We've prioritized message types that map well to Rerun's existing visualization capabilities, but we will cover more and more over time—input from the community on what messages to add will help us prioritize.

This is a significant first step towards making state-of-the-art open source visualization accessible to wider parts of the robotics ecosystem. But our MCAP support is still nascent.

As it stands, many message types, especially custom messages, are not yet supported and will not map cleanly to Rerun archetypes. tf transforms are missing (in progress), ROS1 messages are not supported, and there are a number of other limitations:

  1. MCAP files larger than available RAM cannot currently be processed.
  2. ROS1 messages are not supported in this initial release.
  3. Custom messages are not yet supported or at least need to be converted to a Rerun archetype.

This is all subject to change as we continue to develop our MCAP support.

We're excited to continue work here and invite you to provide your feedback on what we're doing! Join the Discord to discuss or submit issues on GitHub.

Read more in-depth about MCAP layers and MCAP message formats.

联系我们 contact @ memedata.com