A technical walkthrough of parsing MCAP file format using Haskell's Megaparsec library. Covers the file structure (magic bytes, headers, records), implements parsers for 15 different record types, and demonstrates how to handle nested chunk records containing message data. Includes working code examples that print the hierarchical structure of MCAP files used in ROS2 robotics applications.

10m read timeFrom mmhaskell.com
Post cover image
Table of contents
MCap File StructureRecord TypesParsing RecordsA Basic ExecutableParsing Record DataWriting a Chunk ParserConclusion

Sort: