Commit Graph

48 Commits

Author SHA1 Message Date
5308552b40 修改贴合后,路径宽度和通行空间高度不正确的问题 2026-06-24 20:42:51 +08:00
66e68c6bd1 fix: 贴合地面后正确回写 correction 和 lift,确认/动画不再偏移
贴地后 overrideQ 是绝对旋转,但 _objectRotationCorrection 语义是
相对于 baseline(pathYaw) 的增量,且 PathAnimationManager 增量链从
CAD 姿态出发:finalQ = qup(pathYaw-currentYaw) * correctionHostQ * cadQ。
之前直接转 overrideQ 导致确认/动画时重复旋转。

核心改动:
- ComposeHostCorrection 接受 cadQ,从中提取 currentYaw,
  correctionHostQ = qup(currentYaw - pathYaw) * overrideQ
- HostQuaternionToCanonical 用相似变换 R_canon = M^-1 * R_host * M
  (非列向量映射,保证 Identity 不变性)
- CanonicalQuaternionToHostEulerCorrection 加 hostType 参数重载,
  去除全局 CoordinateSystemManager 依赖
- ComputeGroundLiftForCorrection:与自动调整同方法实测底边算 lift,
  finally 用新 correction+lift 完整重建(skipCadRestore=false),
  使物体停留在贴地等价姿态
- 新增 5 个增量链闭环单测(含 CAD 歪斜场景)
2026-06-24 08:24:38 +08:00
cf6b2ef959 fix: 修复 7 个 pre-existing 单测失败(optimizer 初始候选 + ZUp 测试语义)
ObjectPassageProjectionOptimizer.OptimizeWithEvaluator:
- 初始化 bestScore 评估 correction=Zero 作为初始候选
- 旧逻辑 bestScore=Invalid 导致 Zero 从未被评估,
  当 baseline 已对齐路径时随机采样必然替换它,refine 收敛不回 0
- 影响 3 个 Optimize 测试:baseline 已对齐时找不到 correction=0

ZUp 测试语义修正(4 个):
- LocalEulerRotationCorrection 语义:Y=up轴/yaw, Z=non-up轴
- ZUp 下 up=Z, non-up=Y,绕 Z(up) 转应使用 YDegrees 不是 ZDegrees
- 旧测试在 ZUp 下把 ZDegrees 当字面 Z 轴,与实现语义矛盾
2026-06-23 23:18:42 +08:00
f86e8c8bf4 fix: 贴合地面后绕垂直轴搜索最小截面 yaw,对齐路径方向
贴地旋转已固定俯仰/翻滚,只剩绕宿主 Up 的 yaw 自由度。
对 CAD 姿态天然歪斜的物体,假设 local +X 是长轴会失败,
改为搜索 [0,360) 使物体在路径方向的截面投影面积最小,
与自动调整同目标但单自由度搜索更稳定。

- 新增 AlignToGroundMinCrossSectionYawSearcher(粗搜5°+细搜1°)
- 复用 ObjectPassageProjectionOptimizer.ProjectExtent 的 AABB 投影公式
- 新增 7 个单测覆盖平地/倾斜/CAD歪斜/垂直退化/立方体
- 经多物体实测验证:Chair Lounge Couch / Chair Sitting Square 均正确对齐
2026-06-23 23:09:59 +08:00
7187bcf622 自动最优朝向: 黑盒实测模式
- 新增 ObjectPassageProjectionOptimizer(SO(3)粗搜索+Nelder-Mead)
- EditRotationWindow 加入"自动调整"按钮
- AnimationControlViewModel 实现黑盒实测评估(临时摆位→读BoundingBox→恢复)
- 设计文档和实现计划
2026-05-27 12:24:01 +08:00
454f1e6584 Fix auto path grid restore and validation 2026-04-26 19:11:03 +08:00
1a9d0972f0 Fix auto path obstacle geometry collection 2026-04-14 09:22:01 +08:00
fdb857af17 Refactor auto path planning coordinate semantics 2026-04-13 10:31:14 +08:00
315fa46043 Unify planar collision pose replay 2026-04-12 15:01:33 +08:00
5a03c3aa6c preserve planar collision pose rotations 2026-04-10 22:02:43 +08:00
da5f8a1ae1 add ground object lift adjustment 2026-04-09 23:53:40 +08:00
4fbab52880 clean legacy planar pose branches 2026-04-09 23:08:59 +08:00
3892ddabab Stabilize ground incremental rotation and extent tests 2026-04-09 21:09:43 +08:00
405f721811 Ground real-object incremental path updates 2026-04-08 23:06:42 +08:00
8a7563a4fe Clarify ground tracked-point semantics 2026-04-06 08:55:53 +08:00
4ec4cf77ee Refine path viewpoint behavior and config editing 2026-04-02 22:14:26 +08:00
24951d4205 Stabilize hoisting start-pose logging and caching 2026-04-02 01:32:31 +08:00
9e8fea3241 Unify real-object override rotation application 2026-04-02 00:19:36 +08:00
7ff510daf0 Use actual hoisting pose without fragment fallback 2026-04-02 00:15:58 +08:00
953306fdb1 Stabilize hoisting pose flow and bounds inspection 2026-04-01 23:53:11 +08:00
e71ea81cdf Fix rail assembly normals and tighten rail camera 2026-04-01 20:12:57 +08:00
2e0b26e032 Refine rail assembly workflow and viewpoint strategies 2026-04-01 10:47:34 +08:00
d4c49fc227 Stabilize hoisting pose adjustment flow 2026-03-31 00:14:18 +08:00
cb56737041 Preserve terminal pose when translating rail objects to path start 2026-03-30 23:35:01 +08:00
9093374399 Use actual hoisting pose baseline for real objects 2026-03-29 23:36:43 +08:00
382923fa32 Relax fragment pose parsing and add fallback 2026-03-29 01:17:06 +08:00
f4735b164e Refine rail real-object pose handling 2026-03-28 22:22:18 +08:00
7851e6affa Map real-object angle adjustments from host axes 2026-03-28 22:21:11 +08:00
2b6f54898a Fix rail assembly anchor alignment 2026-03-26 13:37:33 +08:00
3a5693a453 Add rail mount placement controls and persistence 2026-03-26 01:01:01 +08:00
921dc07856 Fix ground real-object forward axis and compensation 2026-03-25 17:19:21 +08:00
aabf263f0d Fix host rotation adapter split for real and virtual objects 2026-03-25 11:18:03 +08:00
029c7e37ad Checkpoint current pose and path state 2026-03-25 01:41:15 +08:00
138eb43a67 Unify real-object rail pose interpretation 2026-03-25 00:11:07 +08:00
6c74ea1319 Fix host-axis rotation correction for real objects 2026-03-24 21:59:53 +08:00
290df34dec Interpret fragment up for real object pose 2026-03-24 21:04:24 +08:00
8d10f959b2 Add fragment up detection and real object pose probes 2026-03-24 19:06:50 +08:00
eaf24420b7 修正真实物体的旋转和通行空间不适配的问题 2026-03-23 22:46:38 +08:00
d52b1aef08 Checkpoint animation rotation refactor state 2026-03-23 21:00:02 +08:00
1cf4fe5967 Align terminal rail normals and object space rendering 2026-03-23 12:25:00 +08:00
e9128282b5 Fix rail rotation correction semantics 2026-03-23 00:11:49 +08:00
93ad55c725 Refine assembly installation workflow UI 2026-03-22 23:58:11 +08:00
70aaff10bf Add assembly end-face guided optical axis 2026-03-22 19:45:09 +08:00
1802eda971 Separate asset axis conventions from host coordinates 2026-03-22 13:30:35 +08:00
8f55b5e9a1 Fix YUp hoisting path rendering and finish sync 2026-03-22 12:21:25 +08:00
042b9a2804 Refine canonical pose flow and handoff notes 2026-03-22 00:00:16 +08:00
7ccce8cf5a Stabilize rail collision pose recovery and canonical tracking 2026-03-21 21:58:11 +08:00
3fd184934b Establish canonical coordinate framework with tests 2026-03-21 06:10:34 +08:00