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
metadata
:KeyValuePairs
Can be shown in can-be-shown-in
API reference links api-reference-links
- š C++ API docs for
McapChannel
- š Python API docs for
McapChannel
- š¦ Rust API docs for
McapChannel
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"},
),
)