Skip to main content

Crate mcap2arrow_ros2msg

Crate mcap2arrow_ros2msg 

Source
Expand description

ROS 2 .msg → CDR decoder for mcap2arrow.

Implements MessageDecoder for the (schema_encoding = ros2msg, message_encoding = cdr) key.

Unlike the IDL decoder, a .msg schema is a single file, so no multi-section bundle splitting is needed. builtin_interfaces types (Time, Duration) are injected automatically via resolve_single_struct.

§Pipeline

schema bytes (UTF-8 .msg)
  └─ parse_msg             – re_ros_msg parser → StructDef
      └─ resolve_single_struct  – type resolution → ResolvedSchema
          └─ decode_cdr_to_value – CDR bytes → Value

Structs§

Ros2MsgDecoder
MessageDecoder for ROS 2 .msg schemas with CDR-encoded messages.

Functions§

parse_msg
Parse .msg format and generate StructDef
resolve_for_cdr
Parse and resolve a .msg schema into a ResolvedSchema ready for CDR decoding.