Skip to content

Latest commit

 

History

History
37 lines (28 loc) · 1.85 KB

File metadata and controls

37 lines (28 loc) · 1.85 KB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Repository Overview

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.

Architecture

Core Interface

  • 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

Key Data Structures

  • 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

Parser Implementation Requirements

  1. Implement init() to set up the parser with topic type and schema
  2. Implement parse() to convert raw messages to FlatMessage format
  3. Implement getKeysList() to provide the string lookup table for KeyIndex values
  4. Support configurable policies for handling large vectors (clamp or discard)

Development Context

  • 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