Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ce069f1816 |
@@ -0,0 +1,77 @@
|
||||
# VDCS-020:人机工程需要「关节链 + 关节限位 + IK 目标」约束
|
||||
|
||||
**Status**: open
|
||||
**来源**: ViewDesign F347 人机工程面板(`src/vd_ergonomics`)
|
||||
**优先级**: P2 — 不阻塞 RULA/NIOSH 评分,但阻塞按任务姿势(手到目标/脚踩地)自动摆姿
|
||||
**日期**: 2026-11-01
|
||||
**版本/commit**: VDCS 子模块 `9a0db45`(v2.1.0-1293)
|
||||
|
||||
## 现象
|
||||
|
||||
F347 目前只能让用户直接输入肩/肘/腕/颈/躯干/膝等关节角度,再按标准表做 RULA/NIOSH 评分。真实人机评审需要先「摆姿」:给定手部目标点、脚掌支撑面、躯干直立约束,由求解器给出满足关节限位的姿态。VDCS 现有能力是草图/装配几何约束(`constraint3d`、mate 等),全仓检索 `joint|inverse_kinematic|IK|angle_limit|angular_limit` **无结果**:没有关节链、关节限位或 IK 求解入口。
|
||||
|
||||
## 需求
|
||||
|
||||
```c
|
||||
typedef struct vdcs_joint_desc {
|
||||
vdcs_uid parent_body;
|
||||
vdcs_uid child_body;
|
||||
int type; /* 0 = revolute, 1 = prismatic, 2 = spherical */
|
||||
double axis[3]; /* 旋转轴/移动轴(父体坐标系) */
|
||||
double anchor[3]; /* 关节位置(父体坐标系) */
|
||||
double limit_min; /* rad 或 mm */
|
||||
double limit_max;
|
||||
} vdcs_joint_desc;
|
||||
|
||||
/* 关节链:父体 -> 子体,构成运动学树 */
|
||||
int vdcs_joint_chain_create(const vdcs_joint_desc* joints, int count,
|
||||
vdcs_uid* chain_out);
|
||||
|
||||
/* IK:给定末端目标位置/姿态与优先级,返回关节角 */
|
||||
typedef struct vdcs_ik_target {
|
||||
vdcs_uid end_body;
|
||||
double position[3];
|
||||
double orientation[4]; /* quaternion, 可传 NULL 表示仅位置 */
|
||||
int weight; /* 0 = 硬约束, >0 = 软约束权重 */
|
||||
} vdcs_ik_target;
|
||||
|
||||
typedef struct vdcs_ik_result {
|
||||
int converged;
|
||||
int iterations;
|
||||
double residual_mm;
|
||||
double residual_rad;
|
||||
int limit_clamped; /* 1 = 有限位被截断 */
|
||||
} vdcs_ik_result;
|
||||
|
||||
int vdcs_ik_solve(vdcs_uid chain, const vdcs_ik_target* targets, int count,
|
||||
vdcs_ik_result* result,
|
||||
double* joint_values_out, int* joint_count_inout);
|
||||
```
|
||||
|
||||
要求:
|
||||
- 支持 revolute / prismatic 关节链与串联树,关节角限位必须是硬约束(超出即 clamp 并置 `limit_clamped`);
|
||||
- IK 支持位置/姿态目标与软硬权重混合;不可达时返回最小二乘残差与 `converged=0`,不返回假成功;
|
||||
- 求解可事务化(与 VDCS-018 的批量驱动/回滚语义一致),失败回滚到初始关节值。
|
||||
|
||||
## 验收
|
||||
|
||||
1. 2 连杆平面臂(L1=300 mm,L2=250 mm),目标点在 400 mm 处 → 末端残差 ≤ 1 mm;
|
||||
2. 肩关节限位 [-90°, +120°],目标需 +150° → 输出被 clamp,`limit_clamped=1`,残差如实报告;
|
||||
3. 目标超出可达半径(600 mm)→ `converged=0`,残差 ≈ 不可达距离,关节角不被写成假解;
|
||||
4. 3 关节链 + 软姿态目标 → 迭代 ≤ 100,残差单调下降(可观测历史)。
|
||||
|
||||
## 影响
|
||||
|
||||
- F347 只能用原始关节角评分,无法验证「操作员能否够到按钮/踏板」的真实姿势;
|
||||
- 现有可达/视野分析仍是静态人体尺寸,不能与装配几何联动;
|
||||
- 若 VDCS 不提供,应用层只能自带一个简化 IK,误差与限位口径不可控。
|
||||
|
||||
## 请求
|
||||
|
||||
1. 评估在 VDCS 增加关节链 + IK 的可行性;若归 VDE(运动学/机构),请转 VDE 并告知;
|
||||
2. 若范围外,请明确「应用层自研 IK」的边界,避免两边重复实现;
|
||||
3. 补上述 4 条 GTest。
|
||||
|
||||
## 版本历史
|
||||
|
||||
- 2026-11-01: 初始提案(F347 摆姿需求;VDCS `9a0db45`)
|
||||
Reference in New Issue
Block a user