Skip to content

Draft: Add order-does-not-matter composite tasks#677

Draft
peterd-NV wants to merge 13 commits into
mainfrom
peterd/composite_task_v03
Draft

Draft: Add order-does-not-matter composite tasks#677
peterd-NV wants to merge 13 commits into
mainfrom
peterd/composite_task_v03

Conversation

@peterd-NV
Copy link
Copy Markdown
Collaborator

@peterd-NV peterd-NV commented May 13, 2026

Summary

Adds a new CompositeTaskBase class for generic order does not matter composite tasks.
Refactor SequentialTaskBase to inherit from CompositeTaskBase as special case of composite tasks.

Detailed description

  • What was the reason for the change?
  • What has been changed?
  • What is the impact of this change?

Copy link
Copy Markdown
Contributor

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

Choose a reason for hiding this comment

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

🤖 Isaac Lab Review Bot — PR #677

Title: Peterd/composite task v03
Author: @peterd-NV
Files Changed: 5 (composite_task_base.py, sequential_task_base.py tests, new composite task tests, environment config)


Summary

This PR introduces a CompositeTaskBase class that generalizes composite task handling where subtask completion order does not matter. The existing SequentialTaskBase is refactored to inherit from this new base class, preserving its sequential ordering semantics through method overrides.


📦 Update (5ceddde)

Changes since last review (43f9dac5ceddde):

  1. Type annotation fixes in composite_task_base.py:

    • Changed return types from configclass to Any for get_scene_cfg(), make_composite_task_events_cfg(), get_events_cfg(), make_composite_task_termination_cfg(), and get_termination_cfg()
    • Added from typing import Any import
    • Minor assertion message change for clarity
  2. New test file test_composite_open_door.py (379 lines):

    • Comprehensive tests for composite door-opening tasks with microwaves
    • Tests order-independence (both subtask completion orders work)
    • Tests multi-env support (2 envs)
    • Tests environment reset behavior when composite task completes
    • Good test coverage for the new CompositeTaskBase
  3. New test file test_composite_task_base.py (164 lines):

    • Unit tests for add_suffix_configclass_transform and remove_configclass_transform
    • Tests moved from test_sequential_task_base.py to the correct location
  4. Refactored test_sequential_task_base.py:

    • Removed configclass transform tests (moved to composite base tests)
    • Added proper sequential task behavior tests:
      • test_sequential_success_advances_in_order — verifies subtask N+1 cannot succeed until N has
      • test_sequential_success_latches — verifies once success is latched it stays True
      • test_sequential_desired_subtask_success_state — verifies desired state pattern matching
      • test_sequential_reset_clears_state_and_index — verifies reset behavior per-env
  5. Environment config update in gr1_put_and_close_door_environment.py:

    • Changed RANDOMIZATION_HALF_RANGE_X_M from 0.0 to 0.03
    • Changed RANDOMIZATION_HALF_RANGE_Y_M from 0.0 to 0.01
    • Enables position randomization for training robustness

✅ Assessment

The changes look good:

  • Type annotation fixes resolve potential type checking issues with configclass return types
  • New tests provide excellent coverage for composite task behavior
  • Sequential task tests now properly verify the sequential ordering semantics
  • Randomization config change is a reasonable training improvement

LGTM 👍

@peterd-NV peterd-NV changed the title Peterd/composite task v03 Draft: Add order-does-not-matter composite tasks May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant