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

Fixes action reset of pre_trained_policy_action #1623

Merged

Conversation

nicolaloi
Copy link
Contributor

Description

Currently, the PreTrainedPolicyAction class does not reset the actions in the low-level observations when a new episode starts.

In my custom legged robot navigation task, the behavior was correct only during the first training episode but failed from the second episode onward. At the start of a new episode, the action observations are not reset and retain the last actions from the previous episode. This can impact training, as in my case, where the actions at the end of an episode differ significantly from those required at the beginning of an episode.

This PR resolves the issue by resetting the low-level action observations at the beginning of each new episode.

Type of change

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

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

@kellyguo11 kellyguo11 merged commit de76c2e into isaac-sim:main Jan 8, 2025
5 checks passed
hapatel-bdai pushed a commit that referenced this pull request Jan 21, 2025
# Description

Currently, the
[PreTrainedPolicyAction](https://github.com/isaac-sim/IsaacLab/blob/v1.4.0/source/extensions/omni.isaac.lab_tasks/omni/isaac/lab_tasks/manager_based/navigation/mdp/pre_trained_policy_action.py#L24)
class does not reset the actions in the low-level observations when a
new episode starts.

In my custom legged robot navigation task, the behavior was correct only
during the first training episode but failed from the second episode
onward. At the start of a new episode, the action observations are not
reset and retain the last actions from the previous episode. This can
impact training, as in my case, where the actions at the end of an
episode differ significantly from those required at the beginning of an
episode.

This PR resolves the issue by resetting the low-level action
observations at the beginning of each new episode.


## Type of change

<!-- As you go through the list, delete the ones that are not
applicable. -->

- 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

<!--
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
-->
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.

2 participants