Skip to content

Support sb3 wrapper to pre-process env's image obs-space to trigger sb3 natively supported cnn creation pipeline #2812

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ooctipus
Copy link
Contributor

Description

This PR modifies the SB3 Wrapper so that it utilizes the
SB3 natively supported encoder creation on properly defined composite observation space,

SB3's automatic CNN encoding will apply when

  1. if observation space of that term is of shape, GrayScale, RGB, or RGBD
  2. if agent_cfg has normalized flag, expects data to have channel as the first dimension, and data pre_normalized
  3. if agent doesn't has normalized flag, expects data to have space min=0, max=255, dtype=uint8

This PR makes sure the sb3 wrapper adjust environment image term to meet either condition 2 or condition 3 by looking at space's min and max, so sb3 creation pipeline will be applied automatically.

Type of change

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

Screenshots

Please attach before and after screenshots of the change if applicable.

Checklist

  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the changelog and the corresponding version in the extension's config/extension.toml file
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

@ooctipus ooctipus force-pushed the feat/support_sb3_with_composite_obs_space branch from ddfc016 to 887c8d2 Compare June 29, 2025 21:31
@ooctipus ooctipus changed the title support composite obs space in manager based env Support composite obs space in manager based env Jun 29, 2025
@ooctipus ooctipus changed the title Support composite obs space in manager based env Support sb3 wrapper to pre-process env's image obs-space to trigger sb3 natively supported cnn creation pipeline Jun 29, 2025
@ooctipus ooctipus force-pushed the feat/support_sb3_with_composite_obs_space branch from 887c8d2 to 0ded984 Compare June 29, 2025 21:42
@ooctipus ooctipus force-pushed the feat/support_sb3_with_composite_obs_space branch from 0ded984 to 75fb557 Compare June 29, 2025 21:44
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