Skip to content

Adds changes for rsl_rl 3.0.0 #2962

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

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

Conversation

ClemensSchwarke
Copy link
Collaborator

Description

This PR adds the necessary changes to work with the new version of RSL RL.

Type of change

  • New feature (non-breaking change which adds functionality)

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
Copy link
Contributor

Thanks for the changes, this is awesome! Looks like it could have some breaking changes for existing cfgs, should we include a check for the RSL RL version to force a version update if users have older versions installed?

@ClemensSchwarke
Copy link
Collaborator Author

Thanks for the changes, this is awesome! Looks like it could have some breaking changes for existing cfgs, should we include a check for the RSL RL version to force a version update if users have older versions installed?

Ah yes that would make a lot of sense I think. We could alternatively just keep all the configs unmodified as the new rsl rl version is backwards compatible, but I thought it would be nicer to show the updated way of handling normalization in the example configs. Any opinions on this?

@kellyguo11
Copy link
Contributor

Thanks for the changes, this is awesome! Looks like it could have some breaking changes for existing cfgs, should we include a check for the RSL RL version to force a version update if users have older versions installed?

Ah yes that would make a lot of sense I think. We could alternatively just keep all the configs unmodified as the new rsl rl version is backwards compatible, but I thought it would be nicer to show the updated way of handling normalization in the example configs. Any opinions on this?

I think showing the new features would be nice as well. @Mayankm96 @ooctipus @pascal-roth @jtigue-bdai what are your thoughts?

Copy link
Collaborator

@pascal-roth pascal-roth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pushing that out.

I agree we should update to the new normalisation definition but currently it is not backward compatible, should have that fixed

@@ -14,9 +14,10 @@ class AllegroHandPPORunnerCfg(RslRlOnPolicyRunnerCfg):
max_iterations = 10000
save_interval = 250
experiment_name = "allegro_hand"
empirical_normalization = True
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not backwards compatible here, the key is missing in the new confit class (the key is missing in the config)

@ClemensSchwarke
Copy link
Collaborator Author

Thanks for pushing that out.

I agree we should update to the new normalisation definition but currently it is not backward compatible, should have that fixed

@pascal-roth So you are saying forcing the new rsl rl version is not the way to go?

@pascal-roth
Copy link
Collaborator

Thanks for pushing that out.

I agree we should update to the new normalisation definition but currently it is not backward compatible, should have that fixed

@pascal-roth So you are saying forcing the new rsl rl version is not the way to go?

No, we should update.

But in the RunnerCfg, you still need to have an attribute called: Empiricial Normalization, which throws a depreciation warning and sets the new actor and critic normalisation

Copy link
Collaborator

@pascal-roth pascal-roth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

FYI for other reviewers, checked RSL-RL and depreciation warning is thrown there https://github.com/leggedrobotics/rsl_rl/blob/main/rsl_rl/runners/on_policy_runner.py#L406

@kellyguo11
Copy link
Contributor

@ClemensSchwarke looks like we might be hitting some package dependency errors in CI, are these expected?

#14 171.1 ERROR: Cannot install None, isaaclab-rl[all]==0.1.8 and isaaclab_rl because these package versions have conflicting dependencies.
#14 171.1 
#14 171.1 The conflict is caused by:
#14 171.1     isaaclab-rl 0.1.8 depends on torch==2.5.1
#14 171.1     isaaclab-rl[all] 0.1.8 depends on torch==2.5.1
#14 171.1     rsl-rl-lib 3.0.0 depends on torch>=2.6.0
#14 171.1 
#14 171.1 To fix this you could try to:
#14 171.1 1. loosen the range of package versions you've specified
#14 171.1 2. remove package versions to allow pip attempt to solve the dependency conflict
#14 171.1 
#14 171.1 ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

@KingsleyLiu-NV
Copy link

Hi @ClemensSchwarke @kellyguo11, does rsl-rl 3.0 support convolution networks? If not, it still requires some customization and two PRs (one for isaaclab and one for rsl-rl) to enable the tiled-camera navigation example in PR 2027.

Co-authored-by: Pascal Roth <57946385+pascal-roth@users.noreply.github.com>
Signed-off-by: Clemens Schwarke <96480707+ClemensSchwarke@users.noreply.github.com>
@ClemensSchwarke
Copy link
Collaborator Author

@ClemensSchwarke looks like we might be hitting some package dependency errors in CI, are these expected?

#14 171.1 ERROR: Cannot install None, isaaclab-rl[all]==0.1.8 and isaaclab_rl because these package versions have conflicting dependencies.
#14 171.1 
#14 171.1 The conflict is caused by:
#14 171.1     isaaclab-rl 0.1.8 depends on torch==2.5.1
#14 171.1     isaaclab-rl[all] 0.1.8 depends on torch==2.5.1
#14 171.1     rsl-rl-lib 3.0.0 depends on torch>=2.6.0
#14 171.1 
#14 171.1 To fix this you could try to:
#14 171.1 1. loosen the range of package versions you've specified
#14 171.1 2. remove package versions to allow pip attempt to solve the dependency conflict
#14 171.1 
#14 171.1 ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

@kellyguo11 I think we need 2.6 for tensordict. Do you think it is feasible to switch to torch 2.6 for isaac lab?

@kellyguo11
Copy link
Contributor

Yes, maybe we should cherry pick the changes we had internally to update torch to 2.7.0. The issue with only updating it in setup.py is that on windows, it'll end up installing the CPU build, which doesn't work for most of our workflows. I can put together a PR for main to update the torch installation.

@ClemensSchwarke could you also help comment on the CNN question from @KingsleyLiu-NV? Are we ok with accepting his PR for the RSL RL repo?

@ClemensSchwarke
Copy link
Collaborator Author

@kellyguo11 Ah I see, thanks a lot! I answered on slack, I think the CNN topic doesn't relate to this PR too much.

kellyguo11 added a commit that referenced this pull request Jul 23, 2025
# Description

As required by #2962 and
vulnerabilities in torch 2.5.1, this change updates torch to 2.7.0
during the installation of Isaac Lab.

Although inconsistent with Isaac Sim 4.5 (still on torch 2.5.1), Isaac
Lab should work fine with 2.7.0+cu128. This update will also allow us to
have better support for blackwell GPUs.

## 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)
- New feature (non-breaking change which adds functionality)
- This change requires a documentation update

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] 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
- [ ] 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

<!--
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: Kelly Guo <kellyg@nvidia.com>
@kellyguo11
Copy link
Contributor

@ClemensSchwarke could you take a look at test_rsl_rl_wrapper.py to see why it's timing out?

Copy link
Collaborator

@ooctipus ooctipus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested locally myself, looks pretty good!

@ooctipus
Copy link
Collaborator

ooctipus commented Jul 24, 2025

I looked into the test a bit,

the test test_random_actions fails because it seems like wrapper has removed the reset. While this doesn't introduce any error in pure rsl-rl training pipeline this might break some user's workflow if they customized older rsl_rl and depended on the reset to construct their own environment.

The test is relying on obs, extras = wrapper.reset to test both observation and extra.
But in newer wrapper code, you can't get observation and extra at the same time in any alternative without stepping physics. while you can get observation from wrapper.get_observation, extra is only accessible by calling wrapper.step. (Maybe we should call step rather than reset during the test?, or maybe the test doesn't reflect the new design philosophy and should be rewrite.)

I am unsure what the proper fix should be, probably rsl team has better idea, hope this provides some quick preview of source of test failure :))

@ClemensSchwarke
Copy link
Collaborator Author

Thanks a lot for checking @ooctipus!!! I think we shouldn't keep the reset function just for the case that someone used it in a custom environment, given that older rsl_rl versions will not work with the new play/train scripts in general. Thus, someone with customized rsl_rl code would need to port that or use older lab versions anyways. However, if people think the reset function is important and can be useful, we can also add it again.

@ooctipus
Copy link
Collaborator

I think keeping reset or not keeping reset all make sense. If we do not keep reset, then maybe can you help on fixing the test case so it is testing the new rsl-rl without reset instead testing the old one : ))

@ClemensSchwarke
Copy link
Collaborator Author

I added the reset function again to the wrapper but not to rsl_rl, this way rsl_rl stays cleaner but the functionality is there. I also fixed the test to work with TensorDict. Let me know if that makes sense :)

zuxinrui pushed a commit to zuxinrui/IsaacLab that referenced this pull request Jul 29, 2025
# Description

As required by isaac-sim#2962 and
vulnerabilities in torch 2.5.1, this change updates torch to 2.7.0
during the installation of Isaac Lab.

Although inconsistent with Isaac Sim 4.5 (still on torch 2.5.1), Isaac
Lab should work fine with 2.7.0+cu128. This update will also allow us to
have better support for blackwell GPUs.

## 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)
- New feature (non-breaking change which adds functionality)
- This change requires a documentation update

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] 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
- [ ] 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

<!--
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
-->
@Mayankm96 Mayankm96 added the enhancement New feature or request label Jul 30, 2025
harry-wf-cheung pushed a commit to harry-wf-cheung/IsaacLab-Harry that referenced this pull request Jul 30, 2025
# Description

As required by isaac-sim#2962 and
vulnerabilities in torch 2.5.1, this change updates torch to 2.7.0
during the installation of Isaac Lab.

Although inconsistent with Isaac Sim 4.5 (still on torch 2.5.1), Isaac
Lab should work fine with 2.7.0+cu128. This update will also allow us to
have better support for blackwell GPUs.

## 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)
- New feature (non-breaking change which adds functionality)
- This change requires a documentation update

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] 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
- [ ] 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

<!--
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
-->
@ClemensSchwarke ClemensSchwarke force-pushed the feature/rsl_rl_3.0_update branch from 7b31bbc to e2425f0 Compare August 6, 2025 10:09
@KingsleyLiu-NV
Copy link

KingsleyLiu-NV commented Aug 7, 2025

Hi @ClemensSchwarke @kellyguo11 , since tensordict as input is a key feature of rsl-rl 3.0, why the rsl-rl exporter does not have a conditional branch handling that: exporter.py?

@ClemensSchwarke
Copy link
Collaborator Author

Hi @KingsleyLiu-NV, I am not sure if I understand you correctly. The exporter works for the current modules as it uses the dimension of the first layer of the network to infer the observation size. If you implement a different architecture, e.g., a CNN for images, the current exporter would not work. As we cannot cover all possible architectures users implement, the exporter needs to be adapted by the users in that case as well. However, we are thinking about moving the exporter inside rsl_rl to the corresponding modules. That would make it more clear that implementing a new module also necessitates implementing the corresponding export function. Does this answer your question?

kellyguo11 added a commit that referenced this pull request Aug 7, 2025
As required by #2962 and
vulnerabilities in torch 2.5.1, this change updates torch to 2.7.0
during the installation of Isaac Lab.

Although inconsistent with Isaac Sim 4.5 (still on torch 2.5.1), Isaac
Lab should work fine with 2.7.0+cu128. This update will also allow us to
have better support for blackwell GPUs.

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

- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- This change requires a documentation update

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] 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
- [ ] 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

<!--
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
-->
StephenWelch pushed a commit to StephenWelch/IsaacLab that referenced this pull request Aug 17, 2025
# Description

As required by isaac-sim#2962 and
vulnerabilities in torch 2.5.1, this change updates torch to 2.7.0
during the installation of Isaac Lab.

Although inconsistent with Isaac Sim 4.5 (still on torch 2.5.1), Isaac
Lab should work fine with 2.7.0+cu128. This update will also allow us to
have better support for blackwell GPUs.

## 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)
- New feature (non-breaking change which adds functionality)
- This change requires a documentation update

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] 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
- [ ] 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

<!--
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
-->
StephenWelch pushed a commit to StephenWelch/IsaacLab that referenced this pull request Aug 17, 2025
As required by isaac-sim#2962 and
vulnerabilities in torch 2.5.1, this change updates torch to 2.7.0
during the installation of Isaac Lab.

Although inconsistent with Isaac Sim 4.5 (still on torch 2.5.1), Isaac
Lab should work fine with 2.7.0+cu128. This update will also allow us to
have better support for blackwell GPUs.

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

- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- This change requires a documentation update

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] 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
- [ ] 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

<!--
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
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants