Repository navigation
Adds action clipping to rsl-rl wrapper - #2019
Merged
Merged
Conversation
2 of 8 tasks
kellyguo11
approved these changes
Mar 10, 2025
2 of 3 tasks
jtigue-bdai
pushed a commit
that referenced
this pull request
Apr 14, 2025
# Description Currently, the actions from the policy are directly applied to the environment and also often fed back to the policy using the last action as observation. Doing this can lead to instability during training since applying a large action can introduce a negative feedback loop. More specifically, applying a very large action leads to a large last_action observations, which often results in a large error in the critic, which can lead to even larger actions being sampled in the future. This PR aims to fix this for RSL-RL library, by clipping the actions to (large) hard limits before applying them to the environment. This prohibits the actions from growing continuously and greatly improves training stability. Fixes #984, #1732, #1999 ## Type of change - Bug fix (non-breaking change which fixes an issue) - New feature (non-breaking change which adds functionality) ## 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 - [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
ToxicNS
pushed a commit
to ToxicNS/IsaacLab
that referenced
this pull request
Apr 24, 2025
# Description Currently, the actions from the policy are directly applied to the environment and also often fed back to the policy using the last action as observation. Doing this can lead to instability during training since applying a large action can introduce a negative feedback loop. More specifically, applying a very large action leads to a large last_action observations, which often results in a large error in the critic, which can lead to even larger actions being sampled in the future. This PR aims to fix this for RSL-RL library, by clipping the actions to (large) hard limits before applying them to the environment. This prohibits the actions from growing continuously and greatly improves training stability. Fixes isaac-sim#984, isaac-sim#1732, isaac-sim#1999 ## Type of change - Bug fix (non-breaking change which fixes an issue) - New feature (non-breaking change which adds functionality) ## 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 - [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
LJones-alt
pushed a commit
to LJones-alt/IsaacLab-Laura
that referenced
this pull request
Jul 1, 2026
# Description Currently, the actions from the policy are directly applied to the environment and also often fed back to the policy using the last action as observation. Doing this can lead to instability during training since applying a large action can introduce a negative feedback loop. More specifically, applying a very large action leads to a large last_action observations, which often results in a large error in the critic, which can lead to even larger actions being sampled in the future. This PR aims to fix this for RSL-RL library, by clipping the actions to (large) hard limits before applying them to the environment. This prohibits the actions from growing continuously and greatly improves training stability. Fixes isaac-sim#984, isaac-sim#1732, isaac-sim#1999 ## Type of change - Bug fix (non-breaking change which fixes an issue) - New feature (non-breaking change which adds functionality) ## 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 - [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
7 tasks done
AntoineRichard
pushed a commit
that referenced
this pull request
Nov 16, 2026
# Description Follow-up to #8715 for the two action terms it didn't cover. `RMPFlowAction` and `NonHolonomicAction` still resolved `ActionTermCfg.clip` keys against joint names and then indexed the action vector with those joint indices: - `RMPFlowAction` has a task-space action (6-D relative, 7-D absolute pose). With a 7-joint arm in relative mode, `clip={".*": ...}` raised `IndexError: index 6 is out of bounds for dimension 0 with size 6`; with fewer joints, joint ranges were applied to pose components. - `NonHolonomicAction` has a 2-D action (forward velocity, turning rate) but matched the keys against its three dummy base joints. Both terms now expose `action_names` and resolve `clip` against them, as #8715 did for DiffIK and OSC: - RMPFlow: `pos_x`, `pos_y`, `pos_z`, then `rot_x`, `rot_y`, `rot_z` (relative) or `quat_x`, `quat_y`, `quat_z`, `quat_w` (absolute). It reuses `_resolve_task_space_clip`, so keys that match nothing or a quaternion component raise. - Non-holonomic: `lin_vel_x`, `ang_vel_z`. Unmatched keys raise through the strict name resolver. No task in the repo sets `clip` on either term. Fixes #1732 (together with #2019 for raw-action clipping in the RL wrappers and #8715 for the other task-space terms). ## Type of change - Bug fix - Breaking change: `clip` keys that name joints on these two terms now raise a `ValueError`; use the action names listed above (recorded as **Breaking** in the changelog, with a major bump) ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `uv run isaaclab --format` - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have validated the changed behavior with focused coverage and applied the [test-audit criteria](https://github.com/isaac-sim/IsaacLab/blob/HEAD/skills/developer/test-audit/SKILL.md) to any test changes - [x] I have added a changelog fragment under `source/<pkg>/changelog.d/` for every touched package (do **not** edit `CHANGELOG.rst` or bump package versions — CI handles that) - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there Testing: the existing DiffIK clip tests are parametrized over RMPFlow: valid keys clip the processed pose actions, joint-name keys raise, and quaternion keys raise. On `main` the RMPFlow cases fail (joint-name keys hit `IndexError: index 6 is out of bounds for dimension 0 with size 6`; the other keys don't match any joint name). With this change all 20 tests in `source/isaaclab/test/envs/mdp/test_actions.py` pass. The non-holonomic change has no test coverage here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Currently, the actions from the policy are directly applied to the environment and also often fed back to the policy using the last action as observation.
Doing this can lead to instability during training since applying a large action can introduce a negative feedback loop.
More specifically, applying a very large action leads to a large last_action observations, which often results in a large error in the critic, which can lead to even larger actions being sampled in the future.
This PR aims to fix this for RSL-RL library, by clipping the actions to (large) hard limits before applying them to the environment. This prohibits the actions from growing continuously and greatly improves training stability.
Fixes #984, #1732, #1999
Type of change
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there