This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a Plugin Parser SDK for PlotJuggler that provides an interface for creating schema parser plugins. These plugins decompose serialized messages (like ROS, Protobuf, JSON, BSON) into vectors of key/value pairs for visualization and analysis.
- SchemaParserBase (include/schema_parser_base.hpp): Pure virtual interface that all parser plugins must implement
- Key method:
parse(BufferView message)- converts serialized message blobs into FlatMessage structures - Output format: FlatMessage containing:
- Timestamp (microseconds since epoch)
- number_data: Vector of (KeyIndex, VarNumber) pairs for numeric values
- string_data: Vector of (KeyIndex, string) pairs for string values
- blob_data: Vector of (KeyIndex, BufferView) pairs for raw binary data
- VarNumber: Can hold any arithmetic type (int8-64, uint8-64, float32/64, bool)
- BufferView: Zero-copy view into raw data (pointer + size)
- KeyIndex: int32_t index pointing to a string in the keys table
- FlatMessage: The standardized output format for all parsers
- Implement
init()to set up the parser with topic type and schema - Implement
parse()to convert raw messages to FlatMessage format - Implement
getKeysList()to provide the string lookup table for KeyIndex values - Support configurable policies for handling large vectors (clamp or discard)
- ROS 2 Humble is configured (.vscode/settings.json)
- The parser decomposes hierarchical messages into flat key/value pairs
- Keys use path notation (e.g., "position/x", "orientation/w") for nested fields
- Zero-copy design for blob data to minimize memory overhead