Skip to content

Normalize task scene bindings to canonical env-regex form - #6534

Merged
ooctipus merged 1 commit into
isaac-sim:developfrom
ooctipus:octi/task-declarative-bindings
Jul 15, 2026
Merged

ooctipus merged 1 commit into
isaac-sim:developfrom
ooctipus:octi/task-declarative-bindings

Conversation

@ooctipus

Copy link
Copy Markdown
Collaborator

Description

Replaces expanded /World/envs/env_.* prim paths with the canonical {ENV_REGEX_NS} macro across task scene configurations, declares the Franka Cabinet robot and end-effector frame in the scene configuration instead of mutating them after construction, and aligns the Reach and OpenArm Lift table bindings and initial states.

These are behavior-preserving config normalizations ({ENV_REGEX_NS} expands to the same regex at scene construction). They are split out of #6529, which composes task scenes and requires the canonical literal-binding form.

Type of change

  • This change requires a documentation update (changelog fragment included)

Checklist

  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have added a changelog fragment under source/<pkg>/changelog.d/
  • My name is in the CONTRIBUTORS.md

🤖 Generated with Claude Code

Replace expanded '/World/envs/env_.*' prim paths with the canonical
'{ENV_REGEX_NS}' macro across task scene configurations, declare the
Franka Cabinet robot and end-effector frame in the scene configuration
instead of mutating them after construction, and align the Reach and
OpenArm Lift table bindings and initial states.
@github-actions github-actions Bot added the isaac-lab Related to Isaac Lab team label Jul 15, 2026
@greptile-apps

greptile-apps Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR normalizes task scene prim path bindings from the expanded form (/World/envs/env_.*/Leaf) to the canonical {ENV_REGEX_NS}/Leaf macro across 13 config files. It also refactors the Franka Cabinet environment to declare its robot and end-effector frame in a new FrankaCabinetSceneCfg class instead of mutating them in __post_init__.

  • Path normalization: All prim_path=\"/World/envs/env_.*/…\" strings replaced with \"{ENV_REGEX_NS}/…\" across contrib and core task configs; InteractiveScene._process_scene_cfg applies .format(ENV_REGEX_NS=…) identically to both forms, so this is behavior-preserving.
  • Declarative Franka Cabinet scene: Introduces FrankaCabinetSceneCfg(CabinetSceneCfg) with class-level robot and ee_frame fields, removing the prior self.scene.robot = … and self.scene.ee_frame = … assignments from FrankaCabinetEnvCfg.__post_init__; FrankaCabinetEnvCfg now declares scene: FrankaCabinetSceneCfg explicitly.
  • Implicit bug fixes in locomanip configs: locomanipulation_g1_env_cfg.py and fixed_base_upper_body_ik_g1_env_cfg.py previously assigned robot = G1_29DOF_CFG directly; since G1_29DOF_CFG has prim_path=MISSING, the scene's .format() call on construction would have raised an AttributeError. The PR adds .replace(prim_path=\"{ENV_REGEX_NS}/Robot\") to fix this.

Confidence Score: 4/5

Safe to merge; all path normalisations are behaviour-preserving and the Franka Cabinet refactor produces an identical configuration at runtime.

The macro substitutions expand identically to the old regex strings via InteractiveScene's format call. The FrankaCabinetSceneCfg class correctly reproduces the prior post_init assignments. The locomanip files resolve a previously latent prim_path=MISSING issue. The only concern is a dropped ordering comment on the ee_frame target_frames list that documents a constraint relied upon by downstream MDP reward indexing.

source/isaaclab_tasks/isaaclab_tasks/core/cabinet/config/franka/joint_pos_env_cfg.py — confirm the dropped TCP/finger ordering comment is acceptable, or restore it on the new class-level ee_frame declaration.

Important Files Changed

Filename Overview
source/isaaclab_tasks/isaaclab_tasks/core/cabinet/config/franka/joint_pos_env_cfg.py Adds FrankaCabinetSceneCfg with declarative robot/ee_frame fields and updates FrankaCabinetEnvCfg to use it; an important ordering comment about TCP vs finger frames was not preserved in the new class-level declaration.
source/isaaclab_tasks/isaaclab_tasks/contrib/locomanip_pick_place/locomanipulation_g1_env_cfg.py Fixes robot prim_path from MISSING (G1_29DOF_CFG bare) to {ENV_REGEX_NS}/Robot and normalizes packing_table prim_path.
source/isaaclab_tasks/isaaclab_tasks/contrib/locomanip_pick_place/fixed_base_upper_body_ik_g1_env_cfg.py Same G1_29DOF_CFG prim_path fix and PackingTable normalization as locomanipulation_g1_env_cfg.py.
source/isaaclab_tasks/isaaclab_tasks/core/reach/reach_env_cfg.py Pure prim_path normalization for TableCfg.physx and TableCfg.newton_mjwarp to canonical {ENV_REGEX_NS}/Table form.
source/isaaclab_tasks/isaaclab_tasks/core/lift/config/franka_soft/franka_soft_env_cfg.py Normalizes robot and two DeformableObjectCfg prim_paths to {ENV_REGEX_NS} form.
source/isaaclab_tasks/isaaclab_tasks/contrib/assemble_trocar/g129_dex3_env_cfg.py Normalizes four prim_paths (scene, trocar_1, trocar_2, surgical_tray) to {ENV_REGEX_NS} form.
source/isaaclab_tasks/isaaclab_tasks/core/dexsuite/dexsuite_env_cfg.py Single-line normalization of the table prim_path in SceneCfg.
source/isaaclab_tasks/isaaclab_tasks/contrib/pick_place/pickplace_gr1t2_env_cfg.py Normalizes packing_table and robot prim_paths to {ENV_REGEX_NS} form.
source/isaaclab_tasks/isaaclab_tasks/contrib/assemble_trocar/config/robot_config.py Updates make_g1_29dof_dex3_cfg default prim_path parameter from expanded regex to canonical macro form.

Class Diagram

%%{init: {'theme': 'neutral'}}%%
classDiagram
    class InteractiveSceneCfg {
        +num_envs: int
        +env_spacing: float
    }

    class CabinetSceneCfg {
        +robot: ArticulationCfg = MISSING
        +ee_frame: FrameTransformerCfg = MISSING
        +cabinet: ArticulationCfg
        +cabinet_frame: FrameTransformerCfg
    }

    class FrankaCabinetSceneCfg {
        +robot = FRANKA_PANDA_CFG
        +ee_frame = FrameTransformerCfg
    }

    class CabinetEnvCfg {
        +scene: CabinetSceneCfg
        +__post_init__()
    }

    class FrankaCabinetEnvCfg {
        +scene: FrankaCabinetSceneCfg
        +__post_init__() sets actions and rewards
    }

    class FrankaCabinetEnvCfg_PLAY {
        +__post_init__() reduces num_envs
    }

    InteractiveSceneCfg <|-- CabinetSceneCfg
    CabinetSceneCfg <|-- FrankaCabinetSceneCfg
    CabinetEnvCfg <|-- FrankaCabinetEnvCfg
    FrankaCabinetEnvCfg <|-- FrankaCabinetEnvCfg_PLAY
    FrankaCabinetEnvCfg *-- FrankaCabinetSceneCfg
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
classDiagram
    class InteractiveSceneCfg {
        +num_envs: int
        +env_spacing: float
    }

    class CabinetSceneCfg {
        +robot: ArticulationCfg = MISSING
        +ee_frame: FrameTransformerCfg = MISSING
        +cabinet: ArticulationCfg
        +cabinet_frame: FrameTransformerCfg
    }

    class FrankaCabinetSceneCfg {
        +robot = FRANKA_PANDA_CFG
        +ee_frame = FrameTransformerCfg
    }

    class CabinetEnvCfg {
        +scene: CabinetSceneCfg
        +__post_init__()
    }

    class FrankaCabinetEnvCfg {
        +scene: FrankaCabinetSceneCfg
        +__post_init__() sets actions and rewards
    }

    class FrankaCabinetEnvCfg_PLAY {
        +__post_init__() reduces num_envs
    }

    InteractiveSceneCfg <|-- CabinetSceneCfg
    CabinetSceneCfg <|-- FrankaCabinetSceneCfg
    CabinetEnvCfg <|-- FrankaCabinetEnvCfg
    FrankaCabinetEnvCfg <|-- FrankaCabinetEnvCfg_PLAY
    FrankaCabinetEnvCfg *-- FrankaCabinetSceneCfg
Loading

Reviews (1): Last reviewed commit: "Normalize task scene bindings to canonic..." | Re-trigger Greptile

Comment on lines +29 to +56
ee_frame = FrameTransformerCfg(
prim_path="{ENV_REGEX_NS}/Robot/panda_link0",
debug_vis=False,
visualizer_cfg=FRAME_MARKER_SMALL_CFG.replace(prim_path="/Visuals/EndEffectorFrameTransformer"),
target_frames=[
FrameTransformerCfg.FrameCfg(
prim_path="{ENV_REGEX_NS}/Robot/panda_hand",
name="ee_tcp",
offset=OffsetCfg(
pos=(0.0, 0.0, 0.1034),
),
),
FrameTransformerCfg.FrameCfg(
prim_path="{ENV_REGEX_NS}/Robot/panda_leftfinger",
name="tool_leftfinger",
offset=OffsetCfg(
pos=(0.0, 0.0, 0.046),
),
),
FrameTransformerCfg.FrameCfg(
prim_path="{ENV_REGEX_NS}/Robot/panda_rightfinger",
name="tool_rightfinger",
offset=OffsetCfg(
pos=(0.0, 0.0, 0.046),
),
),
],
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Ordering comment dropped during refactor

The old __post_init__ code included # IMPORTANT: The order of the frames in the list is important. The first frame is the tool center point (TCP) / the other frames are the fingers. The MDP rewards reference frame indices by position (target_frames[0] = TCP, target_frames[1/2] = fingers), so this ordering constraint is still real. Adding the comment to ee_frame here would preserve that intent for future maintainers who subclass or copy this config.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@ooctipus
ooctipus merged commit a478402 into isaac-sim:develop Jul 15, 2026
63 of 65 checks passed
ooctipus added a commit that referenced this pull request Jul 23, 2026
> [!IMPORTANT]
> **Depends on #6534** (task scene-binding normalization). Merge #6534
first — this PR's task-side diffs assume the canonical `{ENV_REGEX_NS}`
bindings introduced there.

## Summary
- Added heterogeneous clone-plan support so one `InteractiveScene` can
instantiate different task asset sets across different environment rows.
- Added `scene_add` composition utilities for folding registered task
scene configs into a single declarative scene with clone combinations.
- Added `scripts/demos/multitask_clone_scene.py`, which composes
supported task scenes, skips global floor/light assets, and runs the
resulting scene directly without task envs or managers.
- Converted env-local static task props such as tables, stands, and
static scene props from plain `AssetBaseCfg` to kinematic
`RigidObjectCfg`, so they participate in normal physics/USD replication
instead of needing scene-level special
<img width="1349" height="752" alt="Screenshot from 2026-07-14 19-56-19"
src="https://github.com/user-attachments/assets/f8a06a24-e7d2-4532-8b83-086d7c803124"
/>
handling.

## Motivation
This PR is meant to support multitask scene demos where each cloned
environment may contain a different robot/task asset bundle. The
previous clone flow assumed every env received the same source assets,
which made it hard to build one scene from multiple existing task
configs without manually rewriting each task into a shared schema.

The composition path keeps the existing task scene configs as the source
of truth. It reads their declarative scene fields, deduplicates
equivalent asset slots, and emits clone-combination rows that the cloner
can use to populate only the assets needed by each task group.

## Design Notes
- `scene_add` only composes env-scoped, spawned, physics-backed assets
rooted at literal `{ENV_REGEX_NS}/Leaf` paths. Global floors/lights
should be skipped during composition and added once to the composed
scene.
- Plain env-scoped `AssetBaseCfg` is rejected in `scene_add`; env-local
props that need per-env instances should be modeled as `RigidObjectCfg`
or `ArticulationCfg` instead.
- Static props that should not move are represented as kinematic rigid
objects, which keeps them fixed while letting the existing backend
replication paths handle them.
- The demo filters out scenes outside its current scope, including
Newton-only scenes and scenes without a level-0 declarative flat floor.

## Test Plan
- `./isaaclab.sh -p -m py_compile
source/isaaclab/isaaclab/scene/interactive_scene.py
source/isaaclab/isaaclab/scene/scene_composition.py
source/isaaclab_tasks/isaaclab_tasks/core/lift/lift_env_cfg.py
source/isaaclab_tasks/isaaclab_tasks/core/lift/config/franka_soft/franka_soft_env_cfg.py
source/isaaclab_tasks/isaaclab_tasks/core/reach/reach_env_cfg.py
source/isaaclab_tasks/isaaclab_tasks/contrib/stack/stack_env_cfg.py
source/isaaclab_tasks/isaaclab_tasks/contrib/stack/stack_instance_randomize_env_cfg.py
source/isaaclab_tasks/isaaclab_tasks/contrib/deploy/reach/reach_env_cfg.py
source/isaaclab_tasks/isaaclab_tasks/contrib/deploy/gear_assembly/gear_assembly_env_cfg.py
source/isaaclab_tasks/isaaclab_tasks/contrib/lift/config/openarm/lift_openarm_env_cfg.py
source/isaaclab_tasks/isaaclab_tasks/contrib/reach/config/openarm/unimanual/reach_openarm_uni_env_cfg.py
source/isaaclab_tasks/isaaclab_tasks/core/lift/config/franka_soft/franka_cloth_env_cfg.py
source/isaaclab_tasks/isaaclab_tasks/contrib/assemble_trocar/g129_dex3_env_cfg.py
source/isaaclab_tasks/isaaclab_tasks/contrib/place/config/agibot/place_toy2box_rmp_rel_env_cfg.py
source/isaaclab_tasks/isaaclab_tasks/contrib/place/config/agibot/place_upright_mug_rmp_rel_env_cfg.py
source/isaaclab_tasks/isaaclab_tasks/contrib/pick_place/nutpour_gr1t2_base_env_cfg.py
source/isaaclab_tasks/isaaclab_tasks/contrib/pick_place/exhaustpipe_gr1t2_base_env_cfg.py
source/isaaclab_tasks/isaaclab_tasks/contrib/locomanip_pick_place/locomanipulation_g1_env_cfg.py
source/isaaclab_tasks/isaaclab_tasks/contrib/locomanip_pick_place/fixed_base_upper_body_ik_g1_env_cfg.py
source/isaaclab_tasks/isaaclab_tasks/contrib/pick_place/pickplace_gr1t2_env_cfg.py
source/isaaclab_tasks/isaaclab_tasks/contrib/pick_place/pickplace_unitree_g1_inspire_hand_env_cfg.py`
- Searched for remaining env-scoped plain table/stand/scene/cube
`AssetBaseCfg` assignments after converting static props to
`RigidObjectCfg`.
matthewtrepte pushed a commit to matthewtrepte/IsaacLab that referenced this pull request Aug 4, 2026
…6534)

# Description

Replaces expanded `/World/envs/env_.*` prim paths with the canonical
`{ENV_REGEX_NS}` macro across task scene configurations, declares the
Franka Cabinet robot and end-effector frame in the scene configuration
instead of mutating them after construction, and aligns the Reach and
OpenArm Lift table bindings and initial states.

These are behavior-preserving config normalizations (`{ENV_REGEX_NS}`
expands to the same regex at scene construction). They are split out of
isaac-sim#6529, which composes task scenes and requires the canonical
literal-binding form.

## Type of change

- This change requires a documentation update (changelog fragment
included)

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] I have added a changelog fragment under
`source/<pkg>/changelog.d/`
- [x] My name is in the `CONTRIBUTORS.md`

🤖 Generated with [Claude Code](https://claude.com/claude-code)
matthewtrepte pushed a commit to matthewtrepte/IsaacLab that referenced this pull request Aug 4, 2026
> [!IMPORTANT]
> **Depends on isaac-sim#6534** (task scene-binding normalization). Merge isaac-sim#6534
first — this PR's task-side diffs assume the canonical `{ENV_REGEX_NS}`
bindings introduced there.

## Summary
- Added heterogeneous clone-plan support so one `InteractiveScene` can
instantiate different task asset sets across different environment rows.
- Added `scene_add` composition utilities for folding registered task
scene configs into a single declarative scene with clone combinations.
- Added `scripts/demos/multitask_clone_scene.py`, which composes
supported task scenes, skips global floor/light assets, and runs the
resulting scene directly without task envs or managers.
- Converted env-local static task props such as tables, stands, and
static scene props from plain `AssetBaseCfg` to kinematic
`RigidObjectCfg`, so they participate in normal physics/USD replication
instead of needing scene-level special
<img width="1349" height="752" alt="Screenshot from 2026-07-14 19-56-19"
src="https://github.com/user-attachments/assets/f8a06a24-e7d2-4532-8b83-086d7c803124"
/>
handling.

## Motivation
This PR is meant to support multitask scene demos where each cloned
environment may contain a different robot/task asset bundle. The
previous clone flow assumed every env received the same source assets,
which made it hard to build one scene from multiple existing task
configs without manually rewriting each task into a shared schema.

The composition path keeps the existing task scene configs as the source
of truth. It reads their declarative scene fields, deduplicates
equivalent asset slots, and emits clone-combination rows that the cloner
can use to populate only the assets needed by each task group.

## Design Notes
- `scene_add` only composes env-scoped, spawned, physics-backed assets
rooted at literal `{ENV_REGEX_NS}/Leaf` paths. Global floors/lights
should be skipped during composition and added once to the composed
scene.
- Plain env-scoped `AssetBaseCfg` is rejected in `scene_add`; env-local
props that need per-env instances should be modeled as `RigidObjectCfg`
or `ArticulationCfg` instead.
- Static props that should not move are represented as kinematic rigid
objects, which keeps them fixed while letting the existing backend
replication paths handle them.
- The demo filters out scenes outside its current scope, including
Newton-only scenes and scenes without a level-0 declarative flat floor.

## Test Plan
- `./isaaclab.sh -p -m py_compile
source/isaaclab/isaaclab/scene/interactive_scene.py
source/isaaclab/isaaclab/scene/scene_composition.py
source/isaaclab_tasks/isaaclab_tasks/core/lift/lift_env_cfg.py
source/isaaclab_tasks/isaaclab_tasks/core/lift/config/franka_soft/franka_soft_env_cfg.py
source/isaaclab_tasks/isaaclab_tasks/core/reach/reach_env_cfg.py
source/isaaclab_tasks/isaaclab_tasks/contrib/stack/stack_env_cfg.py
source/isaaclab_tasks/isaaclab_tasks/contrib/stack/stack_instance_randomize_env_cfg.py
source/isaaclab_tasks/isaaclab_tasks/contrib/deploy/reach/reach_env_cfg.py
source/isaaclab_tasks/isaaclab_tasks/contrib/deploy/gear_assembly/gear_assembly_env_cfg.py
source/isaaclab_tasks/isaaclab_tasks/contrib/lift/config/openarm/lift_openarm_env_cfg.py
source/isaaclab_tasks/isaaclab_tasks/contrib/reach/config/openarm/unimanual/reach_openarm_uni_env_cfg.py
source/isaaclab_tasks/isaaclab_tasks/core/lift/config/franka_soft/franka_cloth_env_cfg.py
source/isaaclab_tasks/isaaclab_tasks/contrib/assemble_trocar/g129_dex3_env_cfg.py
source/isaaclab_tasks/isaaclab_tasks/contrib/place/config/agibot/place_toy2box_rmp_rel_env_cfg.py
source/isaaclab_tasks/isaaclab_tasks/contrib/place/config/agibot/place_upright_mug_rmp_rel_env_cfg.py
source/isaaclab_tasks/isaaclab_tasks/contrib/pick_place/nutpour_gr1t2_base_env_cfg.py
source/isaaclab_tasks/isaaclab_tasks/contrib/pick_place/exhaustpipe_gr1t2_base_env_cfg.py
source/isaaclab_tasks/isaaclab_tasks/contrib/locomanip_pick_place/locomanipulation_g1_env_cfg.py
source/isaaclab_tasks/isaaclab_tasks/contrib/locomanip_pick_place/fixed_base_upper_body_ik_g1_env_cfg.py
source/isaaclab_tasks/isaaclab_tasks/contrib/pick_place/pickplace_gr1t2_env_cfg.py
source/isaaclab_tasks/isaaclab_tasks/contrib/pick_place/pickplace_unitree_g1_inspire_hand_env_cfg.py`
- Searched for remaining env-scoped plain table/stand/scene/cube
`AssetBaseCfg` assignments after converting static props to
`RigidObjectCfg`.
@ooctipus
ooctipus deleted the octi/task-declarative-bindings branch October 14, 2026 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants