Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug of base_height_l2 reward function #1931

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

xliu0105
Copy link

Description

When using the manager-based env, configuring the terrain to be rough, using 'base_height_l2' in the reward term, and using raycaster to adjust the target height to account for the terrain, the program will calculate 'Nan' or 'inf', or suddenly calculate a singular value at a certain moment, causing the code to crash. Therefore, the following modifications are made:

  • Determine whether there are Nan, inf or singular values
  • Calculate the number of ray_hits for Nan, inf and singular values ​​in each environment respectively
  • Remove Nan, inf and singular values and calculate the average of the valid values
  • If all ray_hits values ​​in an environment are Nan, inf or singular values, use its root height as target_hight

NOTE: I think the cause of this bug may be in the underlying structure of Isaaclab or Isaacsim. The modifications I made can only avoid training failures due to data anomalies. I hope the maintainers can investigate the underlying cause of this problem.

Fixes #1928

Type of change

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

Screenshots

None

Checklist

  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the changelog and the corresponding version in the extension's config/extension.toml file
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug Report] base_height_l2 Bug
1 participant