McapChannel

āš ļø This type is unstable and may change significantly in a way that the data won't be backwards compatible. A channel within an MCAP file that defines how messages are structured and encoded.

Channels in MCAP files group messages by topic and define their encoding format. Each channel has a unique identifier and specifies the message schema and encoding used for all messages published to that topic.

See also archetypes.McapMessage for individual messages within a channel, archetypes.McapSchema for the data structure definitions, and the MCAP specification for complete format details.

Fields fields

Required required

Optional optional

Can be shown in can-be-shown-in

Example example

Simple MCAP channel simple-mcap-channel

"""Log a simple MCAP channel definition."""

import rerun as rr

rr.init("rerun_example_mcap_channel", spawn=True)

rr.log(
    "mcap/channels/camera",
    rr.McapChannel(
        id=1,
        topic="/camera/image",
        message_encoding="cdr",
        metadata={"frame_id": "camera_link", "encoding": "bgr8"},
    ),
)