Conversation
There was a problem hiding this comment.
Pull request overview
Adds new history snapshots for procedurally generated biped/quadruped/quad-wheel builders, corresponding IsaacLab spawner configs, and various demo scene scripts.
Changes:
- Adds
.historysnapshots of builder implementations (BipedBuilder,QuadrupedBuilder) and builder package exports. - Adds
.historysnapshots of IsaacLabSpawnerCfgutilities for spawning procedural assets (quadruped/biped/quad-wheel). - Adds
.historysnapshots of demo scripts (quadruped/biped/quadwheel scenes) and README variants.
Reviewed changes
Copilot reviewed 104 out of 273 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| .history/src/metamorphosis/builder/biped_20260121185251.py | Adds a history snapshot of a simple BipedBuilder MuJoCo spec generator. |
| .history/src/metamorphosis/builder/biped_20260121185105.py | Duplicate history snapshot of the same BipedBuilder implementation. |
| .history/src/metamorphosis/builder/biped_20260121173201.py | Duplicate history snapshot of the same BipedBuilder implementation. |
| .history/src/metamorphosis/builder/biped_20260121170854.py | Adds a history snapshot intended for quadruped generation but with naming/type issues. |
| .history/src/metamorphosis/builder/biped_20260121170841.py | Adds a history snapshot of QuadrupedBuilder and QuadrupedParam. |
| .history/src/metamorphosis/builder/__init___20260121185311.py | Adds a history snapshot exporting QuadrupedBuilder and BipedBuilder. |
| .history/src/metamorphosis/builder/__init___20260121185305.py | Adds a history snapshot exporting only QuadrupedBuilder (despite importing BipedBuilder). |
| .history/src/metamorphosis/builder/__init___20260121160713.py | Adds a history snapshot exporting QuadrupedBuilder. |
| .history/src/metamorphosis/asset_cfg_20260130194013.py | Adds a history snapshot of spawner configs for quadruped/biped/quad-wheel assets. |
| .history/src/metamorphosis/asset_cfg_20260130194007.py | Adds a history snapshot of spawner configs (slightly different biped config wiring). |
| .history/src/metamorphosis/asset_cfg_20260121185731.py | Adds a history snapshot of spawner configs for quadruped + biped (torso-based biped). |
| .history/src/metamorphosis/asset_cfg_20260121185720.py | Duplicate history snapshot of quadruped + biped spawner configs. |
| .history/src/metamorphosis/asset_cfg_20260121185535.py | Duplicate history snapshot of quadruped + biped spawner configs. |
| .history/src/metamorphosis/asset_cfg_20260121185313.py | Adds a history snapshot of quadruped spawner config with biped import present. |
| .history/src/metamorphosis/asset_cfg_20260121184428.py | Adds a history snapshot of quadruped spawner config with biped import present. |
| .history/src/metamorphosis/asset_cfg_20260121160713.py | Adds a history snapshot of quadruped-only spawner config. |
| .history/scripts/quadwheel_scene_20260130184225.py | Adds a history snapshot demo scene script for the quad-wheel robot. |
| .history/scripts/quadwheel_scene_20260130184223.py | Duplicate history snapshot of quad-wheel demo scene script. |
| .history/scripts/quadwheel_scene_20260130183742.py | Duplicate history snapshot of quad-wheel demo scene script. |
| .history/scripts/quadruped_scene_20260130183815.py | Adds a history snapshot demo scene script for the quadruped robot. |
| .history/scripts/biped_scene_20260131020605.py | Adds a history snapshot demo scene script for the biped robot (G1-style params). |
| .history/scripts/biped_scene_20260131020237.py | Adds a history snapshot biped demo variant (missing hip roll actuator). |
| .history/scripts/biped_scene_20260131020228.py | Adds a history snapshot biped demo variant (includes hip roll joint in init). |
| .history/scripts/biped_scene_20260131005841.py | Adds a history snapshot biped demo variant (prints hip capsule params). |
| .history/scripts/biped_scene_20260130204344.py | Adds a history snapshot biped demo variant (hip capsule range). |
| .history/scripts/biped_scene_20260130203644.py | Adds a history snapshot biped demo variant (pelvis height range typo-like value). |
| .history/scripts/biped_scene_20260130202439.py | Adds a history snapshot biped demo variant (pelvis height range). |
| .history/scripts/biped_scene_20260130202408.py | Adds a history snapshot biped demo variant. |
| .history/scripts/biped_scene_20260130202313.py | Adds a history snapshot biped demo variant (alternate pelvis/hip ranges). |
| .history/scripts/biped_scene_20260130202148.py | Adds a history snapshot biped demo variant (tall pelvis). |
| .history/scripts/biped_scene_20260130201516.py | Adds a history snapshot biped demo variant. |
| .history/scripts/biped_scene_20260130194706.py | Adds a history snapshot biped demo variant (hip capsule range). |
| .history/scripts/biped_scene_20260130194657.py | Adds a history snapshot biped demo variant (pelvis sphere + hip ellipsoid). |
| .history/scripts/biped_scene_20260130193838.py | Adds a history snapshot biped demo variant (pelvis sphere + ellipsoid). |
| .history/scripts/biped_scene_20260130193830.py | Adds a history snapshot biped demo variant (prints pelvis mass fields). |
| .history/scripts/biped_scene_20260130191013.py | Adds a history snapshot biped demo variant (smaller pelvis/leg ranges). |
| .history/scripts/biped_scene_20260130191004.py | Adds a history snapshot biped demo variant (prints params for all envs). |
| .history/scripts/biped_scene_20260130190956.py | Adds a history snapshot biped demo variant (larger pelvis/leg ranges). |
| .history/scripts/biped_scene_20260130190943.py | Adds a history snapshot biped demo variant (single “legs” actuator group). |
| .history/scripts/biped_scene_20260130183643.py | Adds a history snapshot biped demo variant (standing pose). |
| .history/scripts/biped_scene_20260130152701.py | Adds a history snapshot biped demo variant (older). |
| .history/scripts/0_single_20260130153040.py | Adds a history snapshot single-scene spawner example. |
| .history/scripts/0_single_20260130152701.py | Duplicate history snapshot single-scene spawner example. |
| .history/README_20260131225918.md | Adds a history snapshot README with usage instructions and citation. |
| .history/README_20260131225857.md | Duplicate history snapshot README with usage instructions and citation. |
| .history/README_20260130183856.md | Adds a history snapshot README (contains “Metamorphology” section title). |
| .history/README_20260130183848.md | Adds a history snapshot README variant with extra spacing. |
| .history/README_20260130175547.md | Adds a history snapshot README variant (missing --num_envs in example). |
| .history/README_20260130175534.md | Adds a history snapshot README variant (missing biped example command). |
| .history/README_20260130153232.md | Adds a history snapshot README variant (empty code block sections). |
| .history/README_20260130153042.md | Adds a history snapshot README variant (Morphology Randomization section). |
| .history/README_20260130152909.md | Adds a history snapshot README variant (typos in headings/commands). |
| .history/README_20260130152721.md | Adds a history snapshot README variant (shorter form). |
| .history/README_20260121160713.md | Adds a history snapshot README variant (older TODO list). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -0,0 +1,127 @@ | |||
| import mujoco | |||
There was a problem hiding this comment.
These changes add many files under .history/, which are typically editor/local-history artifacts and should not be committed. Recommend removing the .history/ directory from version control and adding it to .gitignore to avoid repo bloat and multiple inconsistent snapshots being treated as source.
| class BipedParam(NamedTuple): | ||
| base_length: float | ||
| base_width: float | ||
| base_height: float | ||
| thigh_length: float | ||
| calf_length: float | ||
| thigh_radius: float | ||
|
|
||
|
|
||
| class QuadrupedBuilder(BuilderBase): |
There was a problem hiding this comment.
This file defines BipedParam but the builder uses QuadrupedParam in type annotations and instantiation, which will raise NameError at runtime (and breaks type checking). Align the naming consistently (either define QuadrupedParam and use it everywhere, or update the builder signatures/instantiation to use BipedParam).
| base_height_range: tuple[float, float] = (0.15, 0.25), | ||
| leg_length_range: tuple[float, float] = (0.4, 0.8), | ||
| calf_length_ratio: tuple[float, float] = (0.9, 1.0), | ||
| valid_filter: Callable[[QuadrupedParam], bool] = lambda _: True, |
There was a problem hiding this comment.
This file defines BipedParam but the builder uses QuadrupedParam in type annotations and instantiation, which will raise NameError at runtime (and breaks type checking). Align the naming consistently (either define QuadrupedParam and use it everywhere, or update the builder signatures/instantiation to use BipedParam).
| thigh_length = base_length * random.uniform(*self.leg_length_range) | ||
| calf_length = thigh_length * random.uniform(*self.calf_length_ratio) | ||
| thigh_radius = random.uniform(0.03, 0.05) | ||
| param = QuadrupedParam( |
There was a problem hiding this comment.
This file defines BipedParam but the builder uses QuadrupedParam in type annotations and instantiation, which will raise NameError at runtime (and breaks type checking). Align the naming consistently (either define QuadrupedParam and use it everywhere, or update the builder signatures/instantiation to use BipedParam).
| raise ValueError("Failed to sample valid parameters") | ||
| return param | ||
|
|
||
| def generate_mjspec(self, param: QuadrupedParam) -> mujoco.MjSpec: |
There was a problem hiding this comment.
This file defines BipedParam but the builder uses QuadrupedParam in type annotations and instantiation, which will raise NameError at runtime (and breaks type checking). Align the naming consistently (either define QuadrupedParam and use it everywhere, or update the builder signatures/instantiation to use BipedParam).
| builder = BipedBuilder( | ||
| pelvis_radius_range=cfg.pelvis_radius_range, | ||
| waist_height_range=cfg.waist_height_range, | ||
| hip_spacing_range=cfg.hip_spacing_range, | ||
| hip_ellipsoid_range=cfg.hip_ellipsoid_range, | ||
| leg_length_range=cfg.leg_length_range, | ||
| shin_ratio_range=cfg.shin_ratio_range, | ||
| ) |
There was a problem hiding this comment.
Within this PR’s .history snapshots, BipedBuilder is also defined with a different constructor signature (e.g., torso-based ranges). This call will raise TypeError: __init__() got an unexpected keyword argument ... unless the real (non-history) BipedBuilder matches these arguments. Align the spawn_biped wiring to the actual BipedBuilder.__init__ parameters you intend to ship.
| def spawn( | ||
| prim_path: str, | ||
| cfg: "ProceduralQuadrupedCfg", | ||
| translation: tuple[float, float, float] | None = None, | ||
| orientation: tuple[float, float, float, float] | None = None, | ||
| ): |
There was a problem hiding this comment.
translation and orientation are accepted but not used in the function body, so callers cannot control spawn transforms through the standard IsaacLab spawner interface. Forward these through to the underlying spawn call (e.g., builder.spawn(...)) or apply them to the spawned prim; apply the same fix to spawn_biped and spawn_quadwheel in this file.
| - [x] `QuadrupedBuilder12Dof` and `QuadrupedBuilder16Dof`. | ||
| - [ ] A minimal RL baseline. | ||
|
|
||
| ## Instaillation |
There was a problem hiding this comment.
Correct the heading typo to improve readability.
| ## Instaillation | |
| ## Installation |
| python scripts/quadruped_scene.py --num_envs 32 | ||
|
|
||
| #QuadrupedBuilder16Dof(quadwheel) | ||
| python scripts/quawheel_scene.py |
There was a problem hiding this comment.
The script name appears misspelled; this will cause copy-paste usage failures.
| python scripts/quawheel_scene.py | |
| python scripts/quadwheel_scene.py |
| # Set wheel joints to rotate forward (indices 12-15 for the 4 wheels) | ||
| wheel_velocity[:, 12:16] = 5.0 # 5 rad/s forward rotation | ||
|
|
There was a problem hiding this comment.
Hard-coding wheel joint indices (12:16) is brittle and will break if joint ordering changes (e.g., morphology randomization or builder updates). Prefer deriving indices from articulation.joint_names (e.g., regex match .*_wheel_joint) and setting only those indices.
| # Set wheel joints to rotate forward (indices 12-15 for the 4 wheels) | |
| wheel_velocity[:, 12:16] = 5.0 # 5 rad/s forward rotation | |
| # Derive wheel joint indices dynamically from articulation.joint_names | |
| wheel_joint_indices = [ | |
| i for i, name in enumerate(articulation.joint_names) if name.endswith("_wheel_joint") | |
| ] | |
| if wheel_joint_indices: | |
| # Set wheel joints to rotate forward (e.g., 5 rad/s forward rotation) | |
| wheel_velocity[:, wheel_joint_indices] = 5.0 | |
| else: | |
| # No wheel joints found; leave wheel_velocity as zeros | |
| print("[WARN]: No wheel joints found matching '*_wheel_joint'; wheels will not be commanded.") |
No description provided.