Skip to content

Merge dev into master for XRobot 1.0 - #5

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

Jiu-xiao merged 13 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 (1cffe57)
  • Migrate to static assembly (57de95b)
  • Merge origin/master into feat/static-assembly-20260915 (8f4c5e4)
  • Remove the empty OnMonitor hook (e623c71)
  • Add the Apache-2.0 license (59e0852)
  • Use the shared XRobot Module CI workflow (350c9d8)
  • Rewrite the README for XRobot 1.0 (de75d23)

Summary by Sourcery

Migrate the CMD module to the XRobot 1.0 static assembly conventions and shared module CI workflow.

New Features:

  • Adopt the XRobot 1.0 static module assembly model with manifest v2 metadata and constructor-based configuration.
  • Document the CMD module’s control inputs, operating modes, published topics, configuration, and dependencies in Chinese and English.

Enhancements:

  • Refactor CMD into a standalone statically constructed module with default constructor arguments and no application-manager or hardware-container dependency.
  • Remove the unused monitoring hook and improve module API documentation and inline comments.
  • Add an Apache-2.0 license.

CI:

  • Replace the bespoke module build workflow with the shared XRobot Module CI workflow using development branches for XRobot and LibXR.

Documentation:

  • Rewrite the README for XRobot 1.0 module configuration and usage conventions.

Merged master commits and verdicts:
- 346b06f fix: migrate topic creation to typed API
  already implemented: the static-assembly CMD constructor already creates
  the chassis/gimbal/launcher topics with LibXR::Topic::CreateTopic<T>.

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

sourcery-ai Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Migrates CMD to XRobot 1.0 static module assembly by making it a standalone configurable class with MODULE MANIFEST V2 metadata, adopts the shared dev-based Module CI workflow, refreshes documentation for the new CLI and generated configuration, and adds an Apache-2.0 license.

Sequence diagram for static CMD construction and command publishing

sequenceDiagram
    participant Main as GeneratedMain
    participant CMD as CMD
    participant Source as ControlSource
    participant Topics as LibXRTopics

    Main->>CMD: CMD(mode, chassis_cmd_topic_name, gimbal_cmd_topic_name, launcher_cmd_topic_name)
    CMD->>Topics: CreateTopic<ChassisCMD>(chassis_cmd_topic_name)
    CMD->>Topics: CreateTopic<GimbalCMD>(gimbal_cmd_topic_name)
    CMD->>Topics: CreateTopic<LauncherCMD>(launcher_cmd_topic_name)
    Source->>CMD: FeedRC(Data) or FeedAI(Data)
    CMD->>CMD: ProcessAndPublish()
    CMD->>Topics: Publish chassis, gimbal, and launcher commands
Loading

File-Level Changes

Change Details Files
Migrated the CMD module from runtime application registration to XRobot 1.0 static assembly.
  • Removed the LibXR::Application inheritance and hardware/application constructor parameters.
  • Added defaulted constructor arguments so the generator can instantiate CMD from manifest configuration.
  • Replaced constructor argument metadata with MODULE MANIFEST V2 dependency metadata.
  • Removed the empty OnMonitor override and retained topic/event initialization in the standalone class.
CMD.hpp
Updated CI to use the shared XRobot Module CI workflow and development dependency references.
  • Replaced the bespoke container, dependency checkout, module setup, build, and tagging steps with the reusable workflow.
  • Configured XRobot, LibXR, and dependency references to dev and passed empty template arguments.
.github/workflows/build.yml
Documented the XRobot 1.0 module interface, behavior, manifest format, and static assembly workflow.
  • Described control-source selection, control modes, event behavior, topics, and public APIs.
  • Updated usage examples from legacy commands to xrobot module/setup/instance commands.
  • Documented the new generated YAML structure and instance ordering requirements.
README.md
Added project licensing.
  • Added the Apache-2.0 license text.
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 refactors the control-command module and its generated integration, including the path that publishes chassis, gimbal, and launcher commands; a defect could send incorrect commands or permit an unintended fire command, and reverting would not undo any physical action already taken. The CI also moves execution to an external reusable workflow and mutable dev references, creating a supply-chain and build-trust dependency that should be reviewed.


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

@Jiu-xiao
Jiu-xiao merged commit 8f6370b 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