Repository navigation
Conversation
Merged master commits and verdicts: - 665e8e2 fix: validate required launcher providers before setup superseded: CMD, friction/trigger motors and Referee are references in the static-assembly constructor; the manifest has no constructor_args and already declares QDU-Robomaster/Motor. 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.
HeroLauncher subscribed to "launcher_cmd" and "launcher_ref" by fixed names while CMD and Referee publish them under configurable ones. Param gains launcher_cmd_topic_name and launcher_ref_topic_name, defaulting to the old names.
List the new topic name parameters with their defaults, show them in the configuration example, and say which publisher setting each must match.
Reviewer's GuideThis PR migrates HeroLauncher to the XRobot 1.0 static-assembly and MODULE MANIFEST V2 conventions, consolidates construction parameters and dependency wiring, makes subscribed topics configurable, adopts the shared Module CI workflow, and updates licensing and usage documentation. Sequence diagram for configurable HeroLauncher topic subscriptionssequenceDiagram
participant Assembly as StaticAssembly
participant Hero as HeroLauncher
participant CMDTopic as CMDTopic
participant RefTopic as RefereeTopic
Assembly->>Hero: HeroLauncher(cmd, fric_motor_0, fric_motor_1, fric_motor_2, fric_motor_3, motor_trig, ref, param)
Hero->>Hero: ThreadFunc(HeroLauncher* self)
Hero->>CMDTopic: ASyncSubscriber(param.launcher_cmd_topic_name)
Hero->>RefTopic: ASyncSubscriber(param.launcher_ref_topic_name)
CMDTopic-->>Hero: LauncherCMD
RefTopic-->>Hero: LauncherPack
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="HeroLauncher.hpp" line_range="100-106" />
<code_context>
- * @param task_stack_depth 线程栈深
- * @param launcher_param 发射器参数
+ * @param param Value configuration.
* @param cmd CMD 模块指针
- * @param fric_setpoint_speed_0 第一级摩擦轮目标转速
- * @param fric_setpoint_speed_1 第二级摩擦轮目标转速
- * @param pid_fric_speed_0 摩擦轮0 PID参数
- * @param pid_fric_speed_1 摩擦轮1 PID参数
- * @param pid_fric_speed_2 摩擦轮2 PID参数
- * @param pid_fric_speed_3 摩擦轮3 PID参数
* @param fric_motor_0 摩擦轮0电机指针
* @param fric_motor_1 摩擦轮1电机指针
* @param fric_motor_2 摩擦轮2电机指针
* @param fric_motor_3 摩擦轮3电机指针
* @param motor_trig_ 拨弹电机指针
- * @param thread_priority 线程优先级
*/
</code_context>
<issue_to_address>
**nitpick:** The constructor documentation still describes the dependency parameters as pointers and omits the required `ref` dependency, while the signature now requires references. Callers following the documented interface pass pointer arguments or fail to account for the referee argument, causing compilation errors or incorrect integration.
**Triggers:** When a consumer integrates the module from the constructor documentation rather than inspecting the header signature.
**Suggested fix:** Rewrite every constructor parameter entry to describe references, include `ref`, and document the grouped `Param` fields accurately.
```suggestion
* @param param 配置参数,包括线程栈深度、发射器参数、摩擦轮目标转速、各 PID 参数、线程优先级以及命令和裁判系统 Topic 名称
* @param cmd CMD 模块引用
* @param fric_motor_0 摩擦轮0电机引用
* @param fric_motor_1 摩擦轮1电机引用
* @param fric_motor_2 摩擦轮2电机引用
* @param fric_motor_3 摩擦轮3电机引用
* @param motor_trig 拨弹电机引用
* @param ref 裁判系统引用
```
</issue_to_address>Sourcery assessment
Needs a human reviewer. The PR replaces the repository-owned CI with a mutable reusable workflow from another repository and substantially changes the module's construction and motor-control interface. If either is wrong, CI code could execute with repository permissions or the launcher could issue unsafe motor commands; reverting restores the prior code, but any exposed credentials or physical damage would not be undone.
| * @param param Value configuration. | ||
| * @param cmd CMD 模块指针 | ||
| * @param fric_setpoint_speed_0 第一级摩擦轮目标转速 | ||
| * @param fric_setpoint_speed_1 第二级摩擦轮目标转速 | ||
| * @param pid_fric_speed_0 摩擦轮0 PID参数 | ||
| * @param pid_fric_speed_1 摩擦轮1 PID参数 | ||
| * @param pid_fric_speed_2 摩擦轮2 PID参数 | ||
| * @param pid_fric_speed_3 摩擦轮3 PID参数 | ||
| * @param fric_motor_0 摩擦轮0电机指针 | ||
| * @param fric_motor_1 摩擦轮1电机指针 | ||
| * @param fric_motor_2 摩擦轮2电机指针 | ||
| * @param fric_motor_3 摩擦轮3电机指针 | ||
| * @param motor_trig_ 拨弹电机指针 |
There was a problem hiding this comment.
nitpick: The constructor documentation still describes the dependency parameters as pointers and omits the required ref dependency, while the signature now requires references. Callers following the documented interface pass pointer arguments or fail to account for the referee argument, causing compilation errors or incorrect integration.
Triggers: When a consumer integrates the module from the constructor documentation rather than inspecting the header signature.
Suggested fix: Rewrite every constructor parameter entry to describe references, include ref, and document the grouped Param fields accurately.
| * @param param Value configuration. | |
| * @param cmd CMD 模块指针 | |
| * @param fric_setpoint_speed_0 第一级摩擦轮目标转速 | |
| * @param fric_setpoint_speed_1 第二级摩擦轮目标转速 | |
| * @param pid_fric_speed_0 摩擦轮0 PID参数 | |
| * @param pid_fric_speed_1 摩擦轮1 PID参数 | |
| * @param pid_fric_speed_2 摩擦轮2 PID参数 | |
| * @param pid_fric_speed_3 摩擦轮3 PID参数 | |
| * @param fric_motor_0 摩擦轮0电机指针 | |
| * @param fric_motor_1 摩擦轮1电机指针 | |
| * @param fric_motor_2 摩擦轮2电机指针 | |
| * @param fric_motor_3 摩擦轮3电机指针 | |
| * @param motor_trig_ 拨弹电机指针 | |
| * @param param 配置参数,包括线程栈深度、发射器参数、摩擦轮目标转速、各 PID 参数、线程优先级以及命令和裁判系统 Topic 名称 | |
| * @param cmd CMD 模块引用 | |
| * @param fric_motor_0 摩擦轮0电机引用 | |
| * @param fric_motor_1 摩擦轮1电机引用 | |
| * @param fric_motor_2 摩擦轮2电机引用 | |
| * @param fric_motor_3 摩擦轮3电机引用 | |
| * @param motor_trig 拨弹电机引用 | |
| * @param ref 裁判系统引用 |
XRobot 1.0: merge feat/static-assembly-20260915 into dev
Apply the pre-release audit recommendations (audit/apply-20261004)
把 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
提交 / Commits
Summary by Sourcery
Migrate HeroLauncher to the XRobot 1.0 static assembly conventions and shared module tooling.
New Features:
Enhancements:
CI:
Documentation: