Skip to content

fix: observe Aimer-owned fire topic - #2

Merged
Jiu-xiao merged 1 commit into
masterfrom
fix/topic-owner-debug-20260911
Sep 11, 2026
Merged

Jiu-xiao merged 1 commit into
masterfrom
fix/topic-owner-debug-20260911

Conversation

@Jiu-xiao

@Jiu-xiao Jiu-xiao commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Find existing host/fire_notify instead of creating it with a different C++ payload type. Retain raw decoding and all firing/heat/timing behavior. Missing Aimer topic produces a log and exception.

Validation

Existing local exact-commit validation was inspected before delivery (not rerun for PR creation).

  • Fresh clone / module initialization / Dev Container / Debug build / compile_commands.json / clangd: PASS.
  • Target: sync/detector/tracker 348/348/348, 600 detections and valid PnP results, 348 nonzero commands, 108 fire requests.
  • Empty: 650/649/649 frames, zero detections/tracking/nonzero commands/fire requests; one source frame in flight at shutdown.
  • SharedFrame identity, timestamps, geometry and order: PASS.
  • Windows-native Webots + Docker Debug controller, OpenVINO CPU, all three preview streams, incremental C++ build and SIGINT/restart with Webots left open: PASS in the recorded workflow.
  • This is bounded functional validation, not throughput, long-term stability, destruction/drain or MCU hardware acceptance.
  • Local evidence: C:/Users/a2592/webots-doc-validation-20260911/VALIDATION.md and BSP .vscode-runs/acceptance-{target,empty}-long.

Coordinated sources

WebotsGimbal 18698d0; WebotsFireNotify 06e36ce; bsp-webots-autoaim 8bc0543.
All use branch fix/topic-owner-debug-20260911. Initialize Camera/Aimer topic owners before the Webots consumers. Deploy the BSP and module changes together; a new module with the old BSP initialization order fails explicitly.
MCU firmware, Aimer payload/wire layout, Camera and LibXR are unchanged.

Summary by Sourcery

Observe the Aimer-owned fire notification topic while preserving existing firing, heat, timing, and raw-decoding behavior.

Bug Fixes:

  • Use the existing Aimer-owned fire_notify topic instead of creating a conflicting payload type.
  • Report missing required fire topics through logging and an exception.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry @Jiu-xiao, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 2 days and 4 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@sourcery-ai

sourcery-ai Bot commented Sep 11, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

WebotsFireNotify now observes the existing host fire_notify topic owned by Aimer, eliminating a duplicate topic with a different C++ payload type while retaining fire-processing behavior. Initialization fails with a log and exception if the required topic is unavailable; coordinated BSP/module startup ordering must ensure topic owners are initialized first.

Sequence diagram for required fire topic initialization

sequenceDiagram
    participant WebotsFireNotify
    participant LibXR_Topic
    participant Logger
    participant Aimer

    WebotsFireNotify->>LibXR_Topic: LibXR::Topic::Find fire_notify
    alt topic exists
        LibXR_Topic-->>WebotsFireNotify: topic handle
        Aimer->>fire_notify: publish fire requests
        fire_notify-->>WebotsFireNotify: observe existing payload
        WebotsFireNotify->>WebotsFireNotify: HandleFireRequest
    else topic missing
        LibXR_Topic-->>WebotsFireNotify: nullptr
        WebotsFireNotify->>Logger: XR_LOG_ERROR
        WebotsFireNotify-->>WebotsFireNotify: throw std::runtime_error
    end
Loading

File-Level Changes

Change Details Files
Use the existing Aimer-owned fire notification topic instead of creating a second topic with a potentially incompatible payload type.
  • Look up the required fire_notify topic in the host domain during application initialization.
  • Log an error and throw when the topic is missing, making incorrect source initialization fail explicitly.
  • Preserve the existing raw decoding and fire, heat, and timing behavior.
  • Keep creation of the Webots launcher state topic unchanged.
WebotsFireNotify.hpp

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@Jiu-xiao
Jiu-xiao merged commit cf52dd0 into master Sep 11, 2026
3 checks passed
@Jiu-xiao
Jiu-xiao deleted the fix/topic-owner-debug-20260911 branch September 11, 2026 15:37
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