Skip to content

Merge dev into master for XRobot 1.0 - #39

Merged
Jiu-xiao merged 18 commits into
masterfrom
dev
Oct 4, 2026
Merged

Jiu-xiao merged 18 commits into
masterfrom
dev

Conversation

@Jiu-xiao

@Jiu-xiao Jiu-xiao commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

把 dev 合入 master。迁移到 XRobot 1.0 的模块约定(静态装配),具体改动见下方提交列表。

Merges dev into master. Migrates the Module to the XRobot 1.0 conventions (static assembly); the commits below list the changes.

合并顺序:libxr、CodeGenerator、扩展和 XRobot 先合并并发布(xrobot 1.0.0、libxr 6.0.0、扩展 2.0.0,XRobot 打 v1);模块的 PR 在 xrobot 1.0.0 发布之后再合并,因为模块 master 合入后,xrobot 0.3.x 拉到的就是 MODULE MANIFEST V2 的模块。

Merge order: libxr, CodeGenerator, the extension and XRobot are merged and released first (xrobot 1.0.0, libxr 6.0.0, extension 2.0.0, XRobot tag v1); the Module PRs follow after xrobot 1.0.0 is released, because once a Module's master carries MODULE MANIFEST V2, xrobot 0.3.x fetches that format.

验证 / Verification

  • dev 上的 Module CI 通过(2026-10-03,XRobot dev ac729b0d、LibXR dev 585b59f)。

提交 / Commits

  • feat: adopt static module construction (5d9dd37)
  • Migrate to static assembly (6913e06)
  • Merge origin/master into feat/static-assembly-20260915 (ba72b66)
  • Remove the empty OnMonitor hook (15fe069)
  • Add the Apache-2.0 license (2cde234)
  • Use the shared XRobot Module CI workflow (ceb4928)
  • Rewrite the README for XRobot 1.0 (7b659a4)
  • Take the subscribed topic names from Param (e816a5d)
  • Document the configurable topic names (ae70cd3)

Summary by Sourcery

Migrate the Chassis module to XRobot 1.0 static assembly while updating its configuration, documentation, licensing, and CI integration.

New Features:

  • Support configurable topic names for chassis commands, referee data, and Omni gimbal orientation input.
  • Add Apache-2.0 licensing for the module.

Bug Fixes:

  • Require the steering motors used by Helm to be present before starting its control loop.

Enhancements:

  • Migrate chassis construction and module metadata to the XRobot 1.0 static-assembly conventions across Mecanum, Omni, Helm, and the Chassis wrapper.
  • Refresh the README with XRobot 1.0 integration, configuration, dependencies, and usage guidance.

CI:

  • Replace the custom module build workflow with the shared XRobot Module CI workflow.

Documentation:

  • Rewrite the user-facing documentation for the XRobot 1.0 module interface and configuration.

Chores:

  • Remove the obsolete empty monitoring hook and legacy application-framework integration.

Merged master commits and verdicts:
- 37e85df fix: validate required chassis providers before setup
  - manifest constructor_args ('@nullptr' providers, length/width syntax) and
    depends list: superseded; the static-assembly manifest has no
    constructor_args and already declares BMI088, PowerControl, Referee,
    Motor and SuperPower.
  - null checks for wheel motors, CMD, PowerControl and Referee: superseded;
    these are references in the static-assembly constructor.
  - std::optional<ChassisType> deferred construction: superseded; chassis_ is
    constructed directly from the reference dependencies.
  - Helm steer-motor null checks: kept (ported). Steer motors remain optional
    pointers in Chassis because Omni/Mecanum do not use them, but Helm
    dereferences all four unconditionally; the assertions now run in the
    Helm constructor before its control thread is created.

Conflicts resolved in favour of the static-assembly branch.
The static-assembly entry calls OnMonitor() only for modules that declare it; the empty body was left over from the removed application framework.
The XRobot ecosystem Modules are published under the Apache License 2.0; the text
is identical to xrobot-org/XRobot/LICENSE.
Replace the generated inline workflow with a caller of
xrobot-org/XRobot/.github/workflows/module-ci.yml, which resolves the
dependencies, compiles the Module sources and a generated constructor probe
against LibXR.

During the coordinated 1.0 change the tools, LibXR and same-or-dev dependencies
come from dev.

Carried over from the old workflow:
- template arguments ["Mecanum"]
Describe the Module, its dependencies, its constructor (dependencies first, then
the value configuration) and its use with xrobot module add / setup / instance
add, with a configuration example seeded by the tool. Drop the dynamic-framework
text and the dead MIGRATION.md link.
The chassis types subscribed to "chassis_cmd", "chassis_ref" and (omni)
"gimbal_euler" by fixed names, while CMD, Referee and the AHRS modules
publish them under configurable names; renaming a topic in the config
silently cut the chassis off. Param gains chassis_cmd_topic_name,
chassis_ref_topic_name and gimbal_euler_topic_name, defaulting to the
old names, and passes them to Omni, Mecanum and Helm.
List the new topic name parameters with their defaults, show them in the
configuration example, and say which publisher setting each must match.
@sourcery-ai

sourcery-ai Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

This PR migrates the chassis module from the legacy dynamic/Application-based integration to XRobot 1.0 static assembly, including manifest and constructor changes, configurable topic subscriptions, shared CI adoption, and refreshed documentation and licensing.

Sequence diagram for configurable chassis topic subscriptions

sequenceDiagram
    participant Generator as XRobot static generator
    participant Chassis as Chassis
    participant Controller as Mecanum Omni or Helm
    participant Topics as LibXR topics

    Generator->>Chassis: construct with Param
    Chassis->>Controller: create concrete chassis
    Controller->>Topics: ASyncSubscriber(chassis_cmd_topic_name)
    Controller->>Topics: ASyncSubscriber(chassis_ref_topic_name)
    alt Omni
        Controller->>Topics: ASyncSubscriber(gimbal_euler_topic_name)
    end
    Controller->>Topics: StartWaiting()
    loop control thread
        Topics-->>Controller: Available()
        Controller->>Topics: GetData()
    end
Loading

File-Level Changes

Change Details Files
Migrated module metadata, construction, and dependency wiring to the XRobot 1.0 static-assembly model.
  • Removed legacy constructor/template/hardware manifest fields in favor of MODULE MANIFEST V2 dependency entries with branch-selection refs.
  • Replaced deferred optional chassis construction and Application inheritance with direct value construction and reference-based dependencies.
  • Updated Mecanum, Omni, and Helm constructors to accept static dependencies and consolidated configuration in Chassis::Param.
  • Added validation for required Helm steering motors and removed the empty monitor hook.
Chassis.hpp
Mecanum.hpp
Omni.hpp
Helm.hpp
Made chassis topic subscriptions configurable through module parameters.
  • Added configurable command, referee, and Omni Euler topic names with existing names as defaults.
  • Passed topic configuration into each chassis implementation and used it when creating subscribers.
  • Documented topic configuration and fixed-name Gimbal topics in the README.
Chassis.hpp
Helm.hpp
Mecanum.hpp
Omni.hpp
README.md
Replaced repository-specific CI with the shared XRobot Module CI workflow.
  • Delegated builds to XRobot's reusable module-ci workflow.
  • Pinned verification inputs to XRobot and LibXR dev branches and supplied the Mecanum template argument.
  • Removed local dependency cloning, generated test harness setup, module installation, and automatic tag creation.
.github/workflows/build.yml
Updated module documentation and repository licensing for XRobot 1.0.
  • Rewrote the README around static assembly, construction parameters, chassis variants, topics, dependencies, and usage examples.
  • Added the Apache-2.0 license.
README.md
LICENSE

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

@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.

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Needs a human reviewer. This replaces the local CI and chassis construction/control integration with a large API and runtime-behavior change, while the reusable workflow and dependencies follow mutable dev branches. A defect could drive the robot's motors or power limiting incorrectly and cause physical damage or other effects that reverting cannot undo, even though the code change itself can be reverted.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@Jiu-xiao
Jiu-xiao merged commit 517f43a into master Oct 4, 2026
3 checks passed
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