Repository navigation
Conversation
Add benchmark-only camera variants for Franka cloth and soft-body lifting across supported physics and renderer presets. Reuse these configurations in rendering tests and exclude benchmark tasks from generated training documentation.
Greptile SummaryThis PR introduces benchmark-only camera variants (
Confidence Score: 5/5Safe to merge — benchmark-only configs and test infrastructure with no changes to production training paths. All changes are additive: new benchmark env configs, test utilities refactoring, and a one-line docs-filter fix. The refactored _skip_if_physics_preset_unsupported correctly restores the Newton-only skip for cloth tasks under PhysX backends by unwrapping the top-level PresetCfg to its concrete default. The gym registration chain works via the existing import_packages mechanism. Unit tests cover registration, preset cascade, physics-preset parity with core variants, and replication-flag correctness. No files require special attention. Important Files Changed
Reviews (3): Last reviewed commit: "Code review feedbacks" | Re-trigger Greptile |
| env_cfg = FrankaClothCameraEnvCfg() | ||
|
|
||
| physics_preset_name = _physics_preset_name_deformable(physics_backend) | ||
| _skip_if_physics_preset_unsupported(env_cfg, physics_preset_name) |
There was a problem hiding this comment.
_skip_if_physics_preset_unsupported is now a no-op for the new benchmark config
_skip_if_physics_preset_unsupported accesses env_cfg.sim.physics. FrankaClothCameraEnvCfg is a PresetCfg whose top-level attributes are data-type variants, not an env config, so getattr(env_cfg, "sim", None) returns None and the function returns immediately without checking anything.
Before this PR the helper received a concrete FrankaClothEnvCfg subclass whose sim.physics was franka_cloth_env_cfg.PhysicsCfg (Newton-only). For physics_backend="physx" or "ovphysx" that preset is absent, so the check issued a clean pytest.skip. Both PHYSICS_RENDERER_AOV_COMBINATIONS and KITLESS_PHYSICS_RENDERER_AOV_COMBINATIONS include those backends, so cloth tests previously skipped them. After this change the skip never fires: the preset string physx or ovphysx is passed to _apply_overrides_to_env_cfg, which will either error during resolution or silently fall back to the Newton default, making the test either crash or run with the wrong physics backend.
| class BaseFrankaClothCameraEnvCfg(FrankaClothEnvCfg): | ||
| """Camera variant of the Franka cloth lift environment.""" | ||
|
|
||
| scene = FrankaClothCameraSceneCfg(num_envs=4, env_spacing=3.0, replicate_physics=True) |
There was a problem hiding this comment.
Missing type annotation on the
scene field override, inconsistent with BaseFrankaSoftCameraEnvCfg (which writes scene: FrankaSoftCameraSceneCfg = ...) and with every other field override in the codebase. Python's dataclass machinery — and by extension Isaac Lab's configclass — only treats an assignment as a field override when a type annotation is present; without it the line is a plain class variable that does not replace the parent's scene default. If configclass follows standard dataclass semantics the child will silently keep FrankaClothSceneCfg(num_envs=128, …) (the parent's default) and tiled_camera will never be registered in the scene.
| scene = FrankaClothCameraSceneCfg(num_envs=4, env_spacing=3.0, replicate_physics=True) | |
| scene: FrankaClothCameraSceneCfg = FrankaClothCameraSceneCfg(num_envs=4, env_spacing=3.0, replicate_physics=True) |
AntoineRichard
left a comment
There was a problem hiding this comment.
I don't see the benefit of this vs overriding things through the CLI of the benchmark command.
|
Closing this so @mmichelis can refactor this properly into his contrib task. |
Description
Add benchmark-only camera variants for Franka cloth and soft-body lifting across supported physics and renderer presets.
Reuse these configurations in rendering tests and exclude benchmark tasks from generated training documentation.
Benchmark script example:
Type of change
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there