Skip to content

Add PhysX-only heterogeneous multitask manipulation environment - #7375

Merged
ooctipus merged 10 commits into
isaac-sim:developfrom
rebeccazhang0707:reb/multitask_manip_demo
Sep 2, 2026
Merged

ooctipus merged 10 commits into
isaac-sim:developfrom
rebeccazhang0707:reb/multitask_manip_demo

Conversation

@rebeccazhang0707

@rebeccazhang0707 rebeccazhang0707 commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Description

This PR adds IsaacContrib-Multitask-Manipulation, a contributed manager-based environment for training and evaluating one RSL-RL policy across three heterogeneous manipulation layouts:

  • OpenArm cube lifting
  • Franka drawer opening
  • UR10 end-effector reaching

The environment uses selection-aware physics-view indexing so that each asset only exists in its task subset while observations and actions remain fixed-width in global environment order.

Key changes:

  • Adds SceneEntitySelectionCfg to resolve task-local assets and map physics-view indices into global environment order, enabling heterogeneous scene subsets across reset, observation, action, reward, command, and termination terms.
  • Supports multitask training, task-subset evaluation, and single-task evaluation.
  • Adds a shared observation backbone with task-specific Gaussian policy and value heads.
  • Masks inactive action dimensions in sampling, entropy, log-probability, KL, and last-action observations.
  • Adds bounded targets, task-specific timeouts, lift and cabinet success metrics, and playback visualization.

Design motivation

The three tasks share manipulation structure but differ in robot state, action semantics, and reward scale. A fully shared policy with one padded action distribution would train irrelevant action dimensions and allow the task with the largest reward scale to dominate the update. The design therefore shares representations where transfer is useful while routing task-specific outputs and normalization where the contracts differ.

Challenge Solution Motivation
Heterogeneous scene ownership Add SceneEntitySelectionCfg, which maps global environment IDs to each asset's physics-view instance rows and scatters task-local values back into global environment order. An asset exists only in its task subset, so global environment indices cannot directly index its compact physics view. Explicit mapping prevents incorrect or out-of-range indexing and zero-fills environments where the asset is absent.
Varied observation dimensions Concatenate a task ID and zero-filled task blocks into one 95-dimensional policy observation: 3 task ID + 28 lift + 23 cabinet + 19 reach + 22 last action. Process it with a shared feature extractor. Gives RSL-RL one fixed observation contract while allowing the backbone to reuse features across tasks.
Varied action dimensions Use task-specific Gaussian action heads with dimensions (8, 8, 6) and task-specific scalar value heads. Mask inactive action dimensions in actions, log-probability, entropy, KL, and last-action observations. Prevents unrelated joints from contributing policy gradients while retaining shared actor and critic backbones.
Varied reward scaling Normalize PPO advantages independently for lift, cabinet, and reach rollouts. Prevents a task with larger reward magnitudes from dominating the shared PPO update.

No new dependencies are required.

Training and evaluation

Train:

uv run isaaclab train \
    --rl_library rsl_rl \
    --task IsaacContrib-Multitask-Manipulation \
    --num_envs 16384 \
    --seed 42 \
    --run_name multitask_manipulation

Evaluate a specific checkpoint:

uv run isaaclab play \
    --rl_library rsl_rl \
    --task IsaacContrib-Multitask-Manipulation \
    --num_envs 3 \
    --checkpoint logs/rsl_rl/multitask_manipulation/<run-dir>/model_3000.pt \
    --viz kit
multitask_manipulation_eval_compressed

Type of change

  • New feature (non-breaking change which adds functionality)
  • Documentation update

Screenshots

Multitask manipulation environment

Validation

  • uv run isaaclab -f
  • uv run --extra test --frozen python -m pytest source/isaaclab_tasks/test/contrib/test_multitask_manipulation_env_cfg.py -q (18 passed)
  • uv run --extra test --frozen python -m pytest source/isaaclab_tasks/test/contrib/test_contrib_environments.py -q -k IsaacContrib-Multitask-Manipulation (1 passed)
  • uv run python scripts/environments/list_envs.py --keyword Multitask --show_presets
  • uv run --isolated --extra test -- make -C docs current-docs

Checklist

  • I have read and understood the contribution guidelines.
  • I have run the pre-commit checks.
  • I have made corresponding changes to the documentation.
  • My changes generate no new task-local warnings.
  • I have added tests that cover the new behavior.
  • I have added a changelog fragment under source/isaaclab_tasks/changelog.d/.
  • My name already exists in CONTRIBUTORS.md.

@rebeccazhang0707
rebeccazhang0707 requested a review from a team August 27, 2026 00:27
@github-actions github-actions Bot added documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team labels Aug 27, 2026
@greptile-apps

greptile-apps Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR adds a PhysX-only manager-based manipulation environment that combines OpenArm lifting, Franka drawer opening, and UR10 reaching under one fixed observation/action interface.

  • Adds global-to-physics-view selection mappings for heterogeneous scene subsets.
  • Adds task-routed actor, critic, Gaussian distribution, and task-wise PPO advantage normalization.
  • Adds selection-aware actions, commands, observations, rewards, resets, and terminations.
  • Registers and documents the environment and adds focused configuration, model, and smoke tests.

Confidence Score: 5/5

The PR appears safe to merge because no concrete changed-code failure remains after checking the heterogeneous indexing, reset lifecycle, and RSL-RL model contracts.

The configured clone subsets, fixed observation and action layouts, selection-aware manager terms, task-routed policy behavior, and supported export path remain internally aligned, with focused tests covering the principal contracts.

Important Files Changed

Filename Overview
source/isaaclab_tasks/isaaclab_tasks/contrib/multitask_manipulation/selection_utils.py Adds explicit bidirectional mapping between compact physics-view rows and global environment IDs, with validation and zero-filled scattering.
source/isaaclab_tasks/isaaclab_tasks/contrib/multitask_manipulation/multitask_env.py Overrides reset handling to reset heterogeneous articulation and rigid-object subsets while retaining the base manager reset order.
source/isaaclab_tasks/isaaclab_tasks/contrib/multitask_manipulation/multitask_env_cfg.py Composes the three task layouts and defines aligned fixed-width actions, observations, commands, rewards, task-specific terminations, and PhysX settings.
source/isaaclab_tasks/isaaclab_tasks/contrib/multitask_manipulation/agents/models.py Implements shared backbones with task-specific policy/value heads, masked Gaussian probability terms, and dedicated deterministic export adapters.
source/isaaclab_tasks/isaaclab_tasks/contrib/multitask_manipulation/agents/ppo.py Extends PPO to normalize rollout advantages independently for each task and expose per-task scale diagnostics.
source/isaaclab_tasks/isaaclab_tasks/contrib/multitask_manipulation/mdp/actions.py Routes fixed-width global action blocks to compact articulation views and bounds configured position targets.
source/isaaclab_tasks/isaaclab_tasks/contrib/multitask_manipulation/mdp/events.py Resets task-local roots and articulation state through selection-aware row mappings with task-specific randomization.
source/isaaclab_tasks/isaaclab_tasks/contrib/multitask_manipulation/mdp/rewards.py Adds zero-filled task-local shaping, success tracking, action penalties, and cabinet safety bounds.
source/isaaclab_tasks/test/contrib/test_multitask_manipulation_env_cfg.py Covers scene composition, dimensions, model routing, probability masking, PPO updates, safety guards, timeouts, export, and configuration invariants.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Env[Global environment batch] --> TaskID[Task one-hot observation]
  Env --> Selection[Global-to-physics-view selection]
  TaskID --> Backbone[Shared actor and critic backbones]
  Backbone --> LiftHead[OpenArm lift heads]
  Backbone --> CabinetHead[Franka cabinet heads]
  Backbone --> ReachHead[UR10 reach heads]
  LiftHead --> Actions[Fixed-width masked action batch]
  CabinetHead --> Actions
  ReachHead --> Actions
  Actions --> Selection
  Selection --> LiftView[Lift physics view]
  Selection --> CabinetView[Cabinet physics view]
  Selection --> ReachView[Reach physics view]
  LiftView --> Terms[Selection-aware observations, rewards, resets, and terminations]
  CabinetView --> Terms
  ReachView --> Terms
Loading

Reviews (1): Last reviewed commit: "Remove obsolete environment table entry" | Re-trigger Greptile

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

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.

Isaac Lab Review Bot

The additive contrib environment consistently wires the fixed 22-dimensional action contract, (8, 8, 6) task heads, one-hot task routing, selection-aware resets, and documentation integration. One cabinet reward path still combines tensors from independently ordered robot and cabinet physics views without applying the new environment-to-instance mapping.

  • Design and architecture: The selection abstraction coherently maps heterogeneous asset views into global environment order across resets, observations, actions, commands, and terminations. However, the cabinet reward implementation bypasses that abstraction when combining robot-view grasp values with cabinet-view drawer positions, undermining the ordering guarantees the design is intended to provide.
  • API: The change is additive, with registry, RSL-RL configuration entry points, MDP exports, gallery metadata, and the fixed observation/action contracts aligned. No compatibility issue with existing public APIs is established.
  • Implementation: In CabinetOpenDrawerBonus and cabinet_multi_stage_open, drawer_pos is in cabinet physics-view order while graspable and the associated environment IDs are derived from the robot view. Reindex the cabinet values through cabinet_cfg.instance_ids[env_ids] (or otherwise normalize both tensors to one explicit view basis) before combining and scattering them.

Minor fixes needed. Posted 1 actionable finding inline.

Automated review; human maintainers own approval decisions.

drawer_pos = torch.nan_to_num(drawer_pos, nan=0.0, posinf=0.0, neginf=0.0)
drawer_pos = torch.maximum(torch.minimum(drawer_pos, drawer_limits[:, 1]), drawer_limits[:, 0])
env_ids, graspable, _, _ = _cabinet_grasp_alignment(env, robot_cfg, cabinet_cfg)
self.succeeded[env_ids] |= drawer_pos > success_threshold

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.

🟡 Warning · Implementation — Cabinet reward mixes two physics-view orderings

drawer_pos follows the cabinet view, while env_ids and graspable follow the robot view; they are combined and scattered without the cabinet_cfg.instance_ids[env_ids] remap that _cabinet_frames applies for handle poses. cabinet_multi_stage_open performs the same mix but scatters through cabinet_cfg, so the two terms assume opposite bases and at most one can be correct. Reindex cabinet-view values through instance_ids before combining.

@ooctipus

ooctipus commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Thanks Rebecca looking awesome!

Reduce the default environment spacing to 2.0, replace the preview with a cropped JPEG, and remove the obsolete dedicated configuration test.
@kellyguo11

Copy link
Copy Markdown
Contributor

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Sep 2, 2026
@ooctipus
ooctipus merged commit 13296b1 into isaac-sim:develop Sep 2, 2026
47 of 48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants