• Kelly Guo's avatar
    Fixes TiledCamera data types and rlgames training on CPU (#3808) · 79fc49dc
    Kelly Guo authored
    # Description
    
    We were incorrectly converting all numpy array data in the TiledCamera
    class into uint8 type warp arrays when simulation device is set to CPU.
    Some annotations like depth are float32 while segmentation data is
    uint32. The correct behavior should convert to warp arrays depending on
    the input data type of the numpy array.
    
    Additionally, rlgames configs were set to cuda device by default but
    were not being overridden when users specify the simulation device to
    CPU through cmdline. We should propagate the device setting to the
    rlgames configs so that we can run training on the same device, similar
    to how RSL RL is set up.
    
    Fixes #3526 
    
    ## Type of change
    
    - Bug fix (non-breaking change which fixes an issue)
    
    
    ## Checklist
    
    - [x] I have read and understood the [contribution
    guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
    - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
    `./isaaclab.sh --format`
    - [x] I have made corresponding changes to the documentation
    - [x] My changes generate no new warnings
    - [x] 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
    -->
    79fc49dc
benchmark_non_rl.py 7.54 KB