cmvr-es/model/xiaozhao/meshes/visual/README.md
lgv 90bae95654 feat(mujoco): integrate xiaozhao dual-arm and touch simulation
Update xiaozhao geometry, base axes, TCPs, neck joints and actuators.
Add mesh generation tools, simplified visuals, screen and hand tags,
and hand/head camera attachments.

Configure both arms and enable the right-arm visual touch workflow with
updated calibration, a camera-visible initial pose and higher-resolution
external perception. Keep touch tests distance-limited with ZeroSimTouch.

Release MuJoCo joint state control on torqueOff, latch the disabled state
until torqueOn, and add regression coverage for actuator and fallback modes.

Validation: isolated device/task initialization, camera acquisition and
AprilTag pose checks passed. Full visual-servo motion was not validated.
2026-11-17 17:26:05 +08:00

57 lines
3.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# MuJoCo 轻量外观网格
本目录保存 `xml/xiaozhao.xml` 的轻量 visual geom。手部从保留的高精度
`meshes/link7-left.obj` 减面生成,并同步写入 `meshes/link7-left.STL`、
`meshes/link7-right.STL`,因此 URDF 保持原引用即可使用轻量手部。
其他连杆的源 STL 保留。MuJoCo 手部碰撞仍使用高精度 OBJ,质量、惯性、
关节坐标、限位和执行器参数不受减面影响。
模型最初基于 urdf6 导入的 18 个 STL(含 3 个颈部网格),颈部现已同步 urdf7。
`neck_Link3` 的源网格局部坐标平移 `(0, 0.015, 0.0035) m`,相应轻量外观已从新 STL 重建;
颈部 J3 origin 更新为 `(0, 0.0035, -0.035) m`,维持头部零位外形。
头部相机同步迁移至 `neck_Link3` 的 `(0.0325, 0.10347742, 0.08039297) m`,
仍位于原相机窗口外 0.5 mm,零位朝 Base `+X`、向下约 30.9°。
其中 `link7-right.STL`
已由完整 `link7-left.STL` 关于局部 XY 平面镜像生成(Z 坐标取反)。右手 visual 同样由左手 visual 精确镜像,
左右手原始网格各 268,502 个三角面,当前 STL 和 visual 各 21,479 个,减少约 92%;
两侧使用相同减面精度,保留精确镜像关系。机器人使用的 18 个网格原始高精度源
共 1,904,402 个三角面,当前 URDF 引用的 STL 共 1,410,356 个,
MuJoCo 轻量外观共 538,499 个,相比高精度源减少约 71.72%。
目录仍保留未加载的旧 `hand-right-mirrored` 网格;包含该闲置资产的 manifest 统计
为 2,161,758 → 564,234 个三角面。
`base_link.obj` 是当前基座 STL 的无损转换;`link7-left.obj`、`link7-right.obj`
保留减面前的完整几何,用于 MuJoCo 碰撞及重复生成轻量手部,不能用减面后的 STL 覆盖。
旧 `hand-right-mirrored.STL/.obj` 保持原文件,URDF/XML 中已移除其额外几何。
碰撞 geom 设为 group 3,默认隐藏,避免与外观网格重复绘制。
需要检查碰撞外形时,可在 MuJoCo 中启用 Geom group 3。
在项目根目录重新生成(需要 Blender 4.5,使用其内置 Python/NumPy):
```bash
blender --background --factory-startup --threads 4 --python-exit-code 1 \
--python model/xiaozhao/simplify_visual_meshes.py
```
只重新生成手部时使用:
```bash
blender --background --factory-startup --threads 4 --python-exit-code 1 \
--python model/xiaozhao/simplify_visual_meshes.py -- --hands-only
```
两种命令都始终从高精度手部 OBJ 开始,左手减面后自动镜像生成右手,
同步更新两侧 STL、visual 和 `manifest.json`,不会在已经减面的手部上重复减面。
手部目标为原面数的 8%,检查原网格及输出网格的全部顶点和三角面中心,
双向距离及包围盒变化阈值为 0.9 mm;当前最大距离约 0.871 mm、RMS 约 0.072 mm。
其他连杆从 10% 面数开始,以 0.5 mm 双向采样距离及包围盒变化为阈值。
若超过对应阈值,脚本会增加保留面数。
所有网格保留原坐标和米制单位,不进行平移、旋转或缩放。
`manifest.json` 记录源文件 SHA-256、面数及每个网格的误差和采样设置;
当前最大包围盒端点变化约 0.201 mm。
顶点与面中心的检查仍是离散质量检查,不是连续全表面的严格误差上界。
减面脚本写本目录及两侧手部 STL,不自动改 URDF 或 XML。之后从 URDF 更新 XML 时,运行
`python3 model/xiaozhao/generate_mujoco_xml.py`,会自动应用独立的 visual mesh
引用和 collision group 3 设置。
环境背景、阴影、反射及仿真步长保持原配置。