Unverified Commit 25f7a5da authored by Louis LE LAY's avatar Louis LE LAY Committed by GitHub

Removes redundant contact termination assignment in `H1RoughEnvCfg` (#1748)

# Description

In the `H1RoughEnvCfg` class, the `body_names` assignment for contact
termination was initialized twice, which was redundant. This PR removes
the duplicate assignment.

```
        # Terminations
        self.terminations.base_contact.params["sensor_cfg"].body_names = [".*torso_link"]

        # Rewards
        self.rewards.undesired_contacts = None
        self.rewards.flat_orientation_l2.weight = -1.0
        self.rewards.dof_torques_l2.weight = 0.0
        self.rewards.action_rate_l2.weight = -0.005
        self.rewards.dof_acc_l2.weight = -1.25e-7

        # Commands
        self.commands.base_velocity.ranges.lin_vel_x = (0.0, 1.0)
        self.commands.base_velocity.ranges.lin_vel_y = (0.0, 0.0)
        self.commands.base_velocity.ranges.ang_vel_z = (-1.0, 1.0)

        # terminations
        self.terminations.base_contact.params["sensor_cfg"].body_names = ".*torso_link"
```

## Type of change

- Bug fix (non-breaking change which fixes an issue)

## 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

---------
Signed-off-by: 's avatarKelly Guo <kellyg@nvidia.com>
Signed-off-by: 's avatarKelly Guo <kellyguo123@hotmail.com>
Co-authored-by: 's avatarKelly Guo <kellyg@nvidia.com>
Co-authored-by: 's avatarKelly Guo <kellyguo123@hotmail.com>
parent 1ad83e1b
[package] [package]
# Note: Semantic Versioning is used: https://semver.org/ # Note: Semantic Versioning is used: https://semver.org/
version = "0.10.34" version = "0.10.35"
# Description # Description
title = "Isaac Lab Environments" title = "Isaac Lab Environments"
......
Changelog Changelog
--------- ---------
0.10.35 (2025-05-22)
~~~~~~~~~~~~~~~~~~~~
Fixed
^^^^^
* Fixed redundant body_names assignment in rough_env_cfg.py for H1 robot.
0.10.34 (2025-06-16) 0.10.34 (2025-06-16)
~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
......
...@@ -97,9 +97,6 @@ class H1RoughEnvCfg(LocomotionVelocityRoughEnvCfg): ...@@ -97,9 +97,6 @@ class H1RoughEnvCfg(LocomotionVelocityRoughEnvCfg):
} }
self.events.base_com = None self.events.base_com = None
# Terminations
self.terminations.base_contact.params["sensor_cfg"].body_names = [".*torso_link"]
# Rewards # Rewards
self.rewards.undesired_contacts = None self.rewards.undesired_contacts = None
self.rewards.flat_orientation_l2.weight = -1.0 self.rewards.flat_orientation_l2.weight = -1.0
...@@ -112,7 +109,7 @@ class H1RoughEnvCfg(LocomotionVelocityRoughEnvCfg): ...@@ -112,7 +109,7 @@ class H1RoughEnvCfg(LocomotionVelocityRoughEnvCfg):
self.commands.base_velocity.ranges.lin_vel_y = (0.0, 0.0) self.commands.base_velocity.ranges.lin_vel_y = (0.0, 0.0)
self.commands.base_velocity.ranges.ang_vel_z = (-1.0, 1.0) self.commands.base_velocity.ranges.ang_vel_z = (-1.0, 1.0)
# terminations # Terminations
self.terminations.base_contact.params["sensor_cfg"].body_names = ".*torso_link" self.terminations.base_contact.params["sensor_cfg"].body_names = ".*torso_link"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment