• Tyler Lum's avatar
    Fixes wait time in `play.py` by using `env.step_dt` (#2239) · 5716d560
    Tyler Lum authored
    # Description
    
    When running `play.py` with `--real-time`, the dt used to calculate this
    is incorrect. It is currently using `env.physics_dt`, which is `sim_dt`.
    However, if the decimation is >1, then the effective dt is
    `env.step_dt`, which is `sim_dt * decimation`. We are running 1
    env.step() per loop, so this should definitely be `env.step_dt`.
    
    This affects all reinforcement_learning/<rl_library>/play.py files. This
    updates all of these appropriately
    
    Fixes #2230 
    
    ## Checklist
    
    - [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] (No need for test for small change in script) I have added tests
    that prove my fix is effective or that my feature works
    - [x] (No need for changelog in scripts) 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
    Signed-off-by: 's avatarTyler Lum <tylergwlum@gmail.com>
    5716d560
play.py 7.89 KB