Fixes test_modify_env_param_curr_term (#2950)
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:
Kelly Guo <kellyg@nvidia.com>
Signed-off-by:
ooctipus <zhengyuz@nvidia.com>
Co-authored-by:
Kelly Guo <kellyg@nvidia.com>
Co-authored-by:
Kelly Guo <kellyguo123@hotmail.com>
Showing
Please register or sign in to comment