• ooctipus's avatar
    Supports sb3 wrapper to pre-process env's image obs-space to trigger sb3... · 3692aced
    ooctipus authored
    Supports sb3 wrapper to pre-process env's image obs-space to trigger sb3 natively supported cnn creation pipeline (#2812)
    
    # 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
    
    <!-- As you go through the list, delete the ones that are not
    applicable. -->
    
    - New feature (non-breaking change which adds functionality)
    
    ## Screenshots
    
    Please attach before and after screenshots of the change if applicable.
    
    <!--
    Example:
    
    | Before | After |
    | ------ | ----- |
    | _gif/png before_ | _gif/png after_ |
    
    To upload images to a PR -- simply drag and drop an image while in edit
    mode and it should upload the image directly. You can then paste that
    source into the above before/after sections.
    -->
    
    ## Checklist
    
    - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
    `./isaaclab.sh --format`
    - [ ] I have made corresponding changes to the documentation
    - [x] My changes generate no new warnings
    - [ ] I have added tests that prove my fix is effective or that my
    feature works
    - [x] I have updated the changelog and the corresponding version in the
    extension's `config/extension.toml` file
    - [x] I have added my name to the `CONTRIBUTORS.md` or my name already
    exists there
    
    <!--
    As you go through the checklist above, you can mark something as done by
    putting an x character in it
    
    For example,
    - [x] I have done this task
    - [ ] I have not done this task
    -->
    Co-authored-by: 's avatarKelly Guo <kellyg@nvidia.com>
    3692aced
Name
Last commit
Last update
..
rsl_rl Loading commit data...
__init__.py Loading commit data...
rl_games.py Loading commit data...
sb3.py Loading commit data...
skrl.py Loading commit data...