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

Normalize task scene bindings to canonical env-regex form#6534
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
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