1. Ingesting & Decoding Automotive Telemetry Logs (CAN Bus & ROS 2 / MCAP)
Parsing .blf, .asc, .mcap and DBC files with cantools, streaming gigabyte logs with Polars/Pandas
Automotive vehicle fleets generate terabytes of raw telemetry daily across CAN-FD networks, Ethernet TSN, and ROS 2 middleware.
DBC (Database CAN) decoding: Translating raw arbitration IDs and 64-bit byte payloads into physical engineering units (WheelSpeed_FL in km/h, SteeringAngle in deg) using start bits, bit lengths, byte ordering (Intel/Little Endian vs. Motorola/Big Endian), scaling factors, and offsets.
High-performance processing: Loading multi-gigabyte .blf or .csv fleet dumps causes memory crashes if loaded into memory all at once. Modern automotive data pipelines leverage generator streaming (can.BLFReader), Apache Arrow/Parquet, and Polars lazy evaluation (pl.scan_parquet) to achieve 10x throughput with minimal RAM footprint.
Core Architectural Takeaways
- Never load entire raw CAN dumps directly into RAM; stream with chunked generator pipelines or memory-mapped Parquet files.
- DBC endianness is critical: Intel starts at LSB, Motorola starts at MSB with reverse bit-indexing.
- Preserve original microsecond ECU timestamps for accurate sensor synchronization.
OEM & Tier-1 Technical Interview Guidance
Interview Question: How do you parse a 20GB CAN bus log file to extract wheel speeds without running out of RAM in Python?
Winning Answer: Use Python generator streaming via can.BLFReader or chunked reading with pandas.read_csv(chunksize=100000) or polars.scan_parquet(). Extract and scale only the target arbitration IDs (e.g. 0x1A0 for WheelSpeed) into typed arrays, and save downstream telemetry to Parquet partitioned by trip ID.
