Skip to content

Add more docs and a clean integration example publisher.#29

Open
sgillen wants to merge 6 commits intomainfrom
sgillen/agent_md
Open

Add more docs and a clean integration example publisher.#29
sgillen wants to merge 6 commits intomainfrom
sgillen/agent_md

Conversation

@sgillen
Copy link
Collaborator

@sgillen sgillen commented Feb 16, 2026

Adds a new architecture doc, a clean example on how to integrate greenwave diagnostics inline, and a small Agents.md file.

@greptile-apps
Copy link

greptile-apps bot commented Feb 16, 2026

Greptile Summary

Added comprehensive documentation and a clean example node demonstrating inline greenwave diagnostics integration. The PR consolidates scattered documentation into docs/DESIGN_AND_IMPLEMENTATION.md, adds AGENTS.md for AI assistants, and provides example_greenwave_publisher_node as a reference implementation for users who want to publish diagnostics directly from their nodes without the overhead of the central monitor.

Key changes:

  • New DESIGN_AND_IMPLEMENTATION.md with step-by-step integration guide
  • example_greenwave_publisher_node demonstrates the inline diagnostics pattern with IMU publishing at 30 Hz
  • AGENTS.md provides repository structure and development guidelines
  • Consolidated service documentation from separate file into main design doc
  • Updated README to reference new comprehensive documentation

Confidence Score: 4/5

  • This PR is safe to merge with minor test pattern concern already noted
  • Documentation is comprehensive and well-written, example code follows ROS2 best practices, and CMakeLists.txt changes are correct. Test file has a known pattern issue (already commented on in previous thread) where rclcpp::init() in SetUp() would fail if tests run multiple times, but this doesn't affect runtime code.
  • The test file greenwave_monitor/test/test_example_greenwave_publisher.cpp uses a pattern that could fail in multi-run scenarios (already noted in previous review thread)

Important Files Changed

Filename Overview
docs/DESIGN_AND_IMPLEMENTATION.md Comprehensive new architecture and integration guide with clear examples
greenwave_monitor/src/example_greenwave_publisher_node.cpp New example implementation demonstrating inline greenwave diagnostics integration
greenwave_monitor/test/test_example_greenwave_publisher.cpp New test file with rclcpp init pattern that would fail if tests run multiple times

Sequence Diagram

sequenceDiagram
    participant User as User Node
    participant GW as GreenwaveDiagnostics
    participant Pub as ROS Publisher
    participant Diag as /diagnostics Topic
    participant UI as Dashboard

    Note over User,GW: Initialization Phase
    User->>GW: Create GreenwaveDiagnostics(topic, config)
    User->>User: Start publish_timer (30 Hz)
    User->>User: Start diagnostics_timer (1 Hz)

    Note over User,UI: Publishing Phase
    loop Every 1/30 second
        User->>User: publish_message()
        User->>Pub: publish(IMU message)
        User->>GW: updateDiagnostics(timestamp_ns)
        GW->>GW: Track rate, latency, jitter
    end

    Note over GW,UI: Diagnostics Publishing Phase
    loop Every 1 second
        User->>GW: publishDiagnostics()
        GW->>GW: Calculate frame_rate_node, frame_rate_msg
        GW->>Diag: Publish DiagnosticArray
        Diag->>UI: Forward diagnostics
        UI->>UI: Update display
    end
Loading

Last reviewed commit: 8d6aeca

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@sgillen sgillen changed the title Docs + Agent.md Add more docs and a clean integration example publisher. Feb 19, 2026
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

11 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

protected:
void SetUp() override
{
rclcpp::init(0, nullptr);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rclcpp::init() called in SetUp() will cause tests to fail if run multiple times in same process, since ROS context is already initialized

Suggested change
rclcpp::init(0, nullptr);
if (!rclcpp::ok()) {
rclcpp::init(0, nullptr);
}

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

11 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments