• ooctipus's avatar
    Fixes test_modify_env_param_curr_term (#2950) · ff9c7529
    ooctipus authored
    This PR fixes the bug in the test `test_modify_env_param_curr_term`
    ```
        modify_reset_joint_pos = CurrTerm(
            func=mdp.modify_term_cfg,
            params={
                "address": "events.reset_pole_position.params.position_range", <------
                "modify_fn": replace_value,
                "modify_params": {"value": (-0.0, 0.0), "num_steps": 1},
            },
        )
    ```
    
    it is trying to modify `events.reset_**pole**_position`
    
    but in the assertion, it is checking `events.reset_**cart**_position`
    
    ```
    joint_ids = env.event_manager.cfg.reset_cart_position.params["asset_cfg"].joint_ids
    assert torch.all(robot.data.joint_pos[:, joint_ids] == 0.0)
    ```
    
    it wasn't an error before because reset_joints_by_offset function was
    buggy, and the tests suite passed before right before that bug was
    fixed. Now that bug fixed, we found out this bug.
    
    ## 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
    - [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
    -->
    
    ---------
    Signed-off-by: 's avatarKelly Guo <kellyg@nvidia.com>
    Signed-off-by: 's avatarooctipus <zhengyuz@nvidia.com>
    Co-authored-by: 's avatarKelly Guo <kellyg@nvidia.com>
    Co-authored-by: 's avatarKelly Guo <kellyguo123@hotmail.com>
    ff9c7529
Name
Last commit
Last update
.aws Loading commit data...
.github Loading commit data...
.vscode Loading commit data...
apps Loading commit data...
docker Loading commit data...
docs Loading commit data...
scripts Loading commit data...
source Loading commit data...
tools Loading commit data...
.dockerignore Loading commit data...
.flake8 Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.pre-commit-config.yaml Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS.md Loading commit data...
LICENSE Loading commit data...
LICENSE-mimic Loading commit data...
README.md Loading commit data...
SECURITY.md Loading commit data...
VERSION Loading commit data...
environment.yml Loading commit data...
isaaclab.bat Loading commit data...
isaaclab.sh Loading commit data...
pyproject.toml Loading commit data...