Repository navigation
Add white appearance to DexForce H1 - #1341
Conversation
Confidence Score: 4/5
[Medium impact] The change affects the H1 appearance option in robot loading and preview workflows. The PR still needs a fix because saving and reopening a white H1 loads yellow. Findings
Fix with agent prompt### Issue 1
embodichain/extensions/robots/dexforce/h1/cfg.py:104-105
Saving a white H1 with `save_to_file()` and reopening it through `preview-robot --robot-config` loads yellow. `to_dict()` replaces the derived white `fpath` with the yellow source but does not include `class_type`. The preview reader therefore calls `RobotCfg.from_dict()`, which ignores `appearance`.
Preserve enough information for the file reader to restore white, and add a save-and-reload test through that reader.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.SummaryAdds a warm white appearance to
Reviews (2) · Last reviewed commit: "docs(robots): show the white DexForce H1..." · Reviewed by Greptile |
| if self._appearance_source is not None: | ||
| fields["fpath"] = self._appearance_source |
There was a problem hiding this comment.
Saved white robots turn yellow
Saving a white H1 with save_to_file() and reopening it through preview-robot --robot-config loads yellow. to_dict() replaces the derived white fpath with the yellow source but does not include class_type. The preview reader therefore calls RobotCfg.from_dict(), which ignores appearance.
Preserve enough information for the file reader to restore white, and add a save-and-reload test through that reader.
Prompt To Fix With AI
This is a comment left during a code review.
Path: embodichain/extensions/robots/dexforce/h1/cfg.py
Line: 104-105
Comment:
**Saved white robots turn yellow**
Saving a white H1 with `save_to_file()` and reopening it through `preview-robot --robot-config` loads yellow. `to_dict()` replaces the derived white `fpath` with the yellow source but does not include `class_type`. The preview reader therefore calls `RobotCfg.from_dict()`, which ignores `appearance`.
Preserve enough information for the file reader to restore white, and add a save-and-reload test through that reader.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Description
Add a warm white shell finish (
#E8E7E1) to the 31-jointDexforceH1preset. The catalog listsyellowandwhite, with yellow as the default. Select white in a robot declaration withclass_type: DexforceH1andappearance: white, or use the preview CLI.The white appearance derives its visual asset from the existing H1 archive. It replaces the shell base-color texture in 25 GLBs and uses the original URDF, joints, dark trim and visor. The derived asset is cached by the source content. The serialized preset retains the selected appearance and its source asset reference.
Stack
Layer 2 of 2 targets
codex/dexforce-h1and depends on the H1 preset PR #1335. The upstream H1 archive URL returned HTTP 404 during validation, so the local checks used the verified H1 cache from that PR.Type of change
Screenshots
Verified the white preset in a standalone 960 × 1200 DexSim OfflineRT capture with DLSS Ray Reconstruction Quality. The render shows the warm white shell alongside the original dark trim and visor.
Validation
Built the H1 page with Sphinx and verified the desktop and mobile layouts and both render manifest checksums.
Passed 258 focused tests across the H1 preset, robot catalog and preview entry points. The H1 cases cover the authored shell, trim and visor colors, the canonical URDF bytes, cached path reuse, serialization and invalid selection.
Loaded yellow and white together with Default and Newton. Both exposed the same 31 joints and limits and matched joint states after stepping.
Ran Black 26.10.1,
git diff --checkandpython docs/scripts/check_api_docs.py.Reviewed robot, simulation and asset context. The existing catalog selection and source asset contracts cover the H1-only appearance option.
Checklist
black .command to format the code base.