Normalize task scene bindings to canonical env-regex form#6534
Conversation
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.
Greptile SummaryThis PR normalizes task scene prim path bindings from the expanded form (
Confidence Score: 4/5Safe 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
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
%%{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
Reviews (1): Last reviewed commit: "Normalize task scene bindings to canonic..." | Re-trigger Greptile |
| 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), | ||
| ), | ||
| ), | ||
| ], | ||
| ) |
There was a problem hiding this comment.
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!
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
Checklist
pre-commitchecks with./isaaclab.sh --formatsource/<pkg>/changelog.d/CONTRIBUTORS.md🤖 Generated with Claude Code