feat(map): MapTrackerMove引入积极转向策略和自适应转速#1039
Merged
isHarryh merged 6 commits intoMaaEnd:mainfrom Mar 6, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Hey - 我在这里给出了一些高层次的反馈:
- 在自适应旋转模块中,建议当 |actualRotDelta| 低于一个较小阈值时直接跳过更新,而不是只依赖 1e-6 的 epsilon,这样可以避免在接近零旋转时产生非常大的
idealSpeed值,使整体逻辑更健壮。 - 用于更新
rotationSpeed的权重常数0.618和0.382如果提取为具名常量(例如ROTATION_SPEED_DECAY、ROTATION_SPEED_LEARN_RATE),会更方便理解和调参。
给 AI Agent 的提示
Please address the comments from this code review:
## Overall Comments
- 在自适应旋转模块中,建议当 |actualRotDelta| 低于一个较小阈值时直接跳过更新,而不是只依赖 1e-6 的 epsilon,这样可以避免在接近零旋转时产生非常大的 `idealSpeed` 值,使整体逻辑更健壮。
- 用于更新 `rotationSpeed` 的权重常数 `0.618` 和 `0.382` 如果提取为具名常量(例如 `ROTATION_SPEED_DECAY`、`ROTATION_SPEED_LEARN_RATE`),会更方便理解和调参。帮我变得更有用!请在每条评论上点 👍 或 👎,我会根据你的反馈改进后续评审。
Original comment in English
Hey - I've left some high level feedback:
- In the adaptive rotation block, consider skipping the update when |actualRotDelta| is below a small threshold instead of relying only on the 1e-6 epsilon, to avoid very large
idealSpeedvalues from near-zero rotations and make the logic more robust. - The weighting constants
0.618and0.382used for updatingrotationSpeedwould be easier to reason about and tune if extracted into named constants (e.g.,ROTATION_SPEED_DECAY,ROTATION_SPEED_LEARN_RATE).
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In the adaptive rotation block, consider skipping the update when |actualRotDelta| is below a small threshold instead of relying only on the 1e-6 epsilon, to avoid very large `idealSpeed` values from near-zero rotations and make the logic more robust.
- The weighting constants `0.618` and `0.382` used for updating `rotationSpeed` would be easier to reason about and tune if extracted into named constants (e.g., `ROTATION_SPEED_DECAY`, `ROTATION_SPEED_LEARN_RATE`).Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Contributor
There was a problem hiding this comment.
Pull request overview
此 PR 为 MapTrackerMove 动作引入“更积极的转向策略”与“自适应转速调整”,同时移除 rotation_speed / rotation_timeout 两个高级可选参数,并同步更新中英文开发文档;此外对 MapTrackerInfer 的 rotStep 计算做了更连续的自适应调整。
Changes:
MapTrackerMove:新增自适应转向速度状态与计算逻辑,并调整转向/移动策略(大偏差更保守、小偏差更积极)。MapTrackerMove:移除rotation_speed、rotation_timeout参数及其默认值/校验;文档同步删除对应说明。MapTrackerInfer:将rotStep从分段逻辑改为基于precision的连续映射,并限制在区间内。
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/zh_cn/developers/map-tracker.md | 删除 rotation_speed / rotation_timeout 参数说明(中文文档同步) |
| docs/en_us/developers/map-tracker.md | 删除 rotation_speed / rotation_timeout 参数说明(英文文档同步) |
| agent/go-service/map-tracker/move.go | 引入自适应转速与新的转向策略;移除旧参数及其校验;新增 calcAppliedDeltaRotation |
| agent/go-service/map-tracker/infer.go | rotStep 计算改为连续映射并钳制范围 |
| agent/go-service/map-tracker/const.go | 增加旋转速度上下限与默认值常量;移除旧参数默认值 |
Member
Author
|
此 PR 未对任务节点造成影响,属于非破坏性的、可兼容的变更,将直接合并。 |
MistEO
pushed a commit
that referenced
this pull request
Mar 9, 2026
## 概要 此 PR 向 MapTrackerMove 节点引入了积极转向策略和自适应转速调整特性。 此外,移除了该节点的两个高级可选参数,但未对现有 pipeline 造成影响。 ## 由 Sourcery 提供的总结 在简化旋转配置参数的同时,为 MapTrackerMove 引入自适应旋转控制以及更激进的方向校正。 新功能: - 增加自适应旋转速度机制,可根据最近的移动和方向变化学习合适的相机旋转速度。 - 优化旋转调整行为,区分严重与轻度的方向偏差,并据此选择合适的移动模式。 - 使推断旋转步骤动态依赖精度,并支持可配置的上下限。 增强改进: - 改进导航日志记录,为调试提供更丰富的位置和旋转上下文信息。 - 引入辅助常量和实用工具,用于基于当前增量与速度计算增强的旋转调整。 - 从 MapTrackerMove 的参数和默认值中移除 `rotation_speed` 和 `rotation_timeout`,在简化配置的同时保留现有流水线行为。 文档: - 更新中英文开发者文档,从 MapTrackerMove 中移除已废弃的 `rotation_speed` 和 `rotation_timeout` 参数。 <details> <summary>Original summary in English</summary> ## Summary by Sourcery Introduce adaptive rotation control and more aggressive orientation correction in MapTrackerMove while simplifying rotation configuration parameters. New Features: - Add an adaptive rotation speed mechanism that learns appropriate camera rotation speed from recent movement and orientation changes. - Refine rotation adjustment behavior to distinguish between severe and moderate misalignment, choosing appropriate movement modes accordingly. - Make infer rotation step dynamically depend on precision with configurable bounds. Enhancements: - Improve navigation logging with richer position and rotation context for debugging. - Introduce helper constants and a utility for computing augmented rotation adjustments based on current delta and speed. - Remove rotation_speed and rotation_timeout from MapTrackerMove parameters and defaults to simplify configuration while preserving existing pipeline behavior. Documentation: - Update Chinese and English developer documentation to remove the deprecated rotation_speed and rotation_timeout parameters from MapTrackerMove. </details>
MistEO
pushed a commit
that referenced
this pull request
Mar 9, 2026
## 概要 此 PR 向 MapTrackerMove 节点引入了积极转向策略和自适应转速调整特性。 此外,移除了该节点的两个高级可选参数,但未对现有 pipeline 造成影响。 ## 由 Sourcery 提供的总结 在简化旋转配置参数的同时,为 MapTrackerMove 引入自适应旋转控制以及更激进的方向校正。 新功能: - 增加自适应旋转速度机制,可根据最近的移动和方向变化学习合适的相机旋转速度。 - 优化旋转调整行为,区分严重与轻度的方向偏差,并据此选择合适的移动模式。 - 使推断旋转步骤动态依赖精度,并支持可配置的上下限。 增强改进: - 改进导航日志记录,为调试提供更丰富的位置和旋转上下文信息。 - 引入辅助常量和实用工具,用于基于当前增量与速度计算增强的旋转调整。 - 从 MapTrackerMove 的参数和默认值中移除 `rotation_speed` 和 `rotation_timeout`,在简化配置的同时保留现有流水线行为。 文档: - 更新中英文开发者文档,从 MapTrackerMove 中移除已废弃的 `rotation_speed` 和 `rotation_timeout` 参数。 <details> <summary>Original summary in English</summary> ## Summary by Sourcery Introduce adaptive rotation control and more aggressive orientation correction in MapTrackerMove while simplifying rotation configuration parameters. New Features: - Add an adaptive rotation speed mechanism that learns appropriate camera rotation speed from recent movement and orientation changes. - Refine rotation adjustment behavior to distinguish between severe and moderate misalignment, choosing appropriate movement modes accordingly. - Make infer rotation step dynamically depend on precision with configurable bounds. Enhancements: - Improve navigation logging with richer position and rotation context for debugging. - Introduce helper constants and a utility for computing augmented rotation adjustments based on current delta and speed. - Remove rotation_speed and rotation_timeout from MapTrackerMove parameters and defaults to simplify configuration while preserving existing pipeline behavior. Documentation: - Update Chinese and English developer documentation to remove the deprecated rotation_speed and rotation_timeout parameters from MapTrackerMove. </details>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
此 PR 向 MapTrackerMove 节点引入了积极转向策略和自适应转速调整特性。
此外,移除了该节点的两个高级可选参数,但未对现有 pipeline 造成影响。
由 Sourcery 提供的总结
在简化旋转配置参数的同时,为 MapTrackerMove 引入自适应旋转控制以及更激进的方向校正。
新功能:
增强改进:
rotation_speed和rotation_timeout,在简化配置的同时保留现有流水线行为。文档:
rotation_speed和rotation_timeout参数。Original summary in English
Summary by Sourcery
Introduce adaptive rotation control and more aggressive orientation correction in MapTrackerMove while simplifying rotation configuration parameters.
New Features:
Enhancements:
Documentation: