Repository navigation
Adds preserve order flag to JointPositionToLimitsAction - #3716
kellyguo11 merged 7 commits into
Conversation
ooctipus
left a comment
There was a problem hiding this comment.
The changes looks good to me, though can you share what bug you went into without it?
Without the preserving order flag, the order of the joints in the action term are defined by the internal parsing of physx. |
Signed-off-by: Kelly Guo <[email protected]>
Signed-off-by: Kelly Guo <[email protected]>
There was a problem hiding this comment.
Greptile Overview
Greptile Summary
Adds preserve_order flag to JointPositionToLimitsActionCfg to control whether joint ordering follows the config specification or the articulation's internal ordering.
Key Changes:
- Added
preserve_order: bool = Falsefield toJointPositionToLimitsActionCfg - Updated
JointPositionToLimitsAction.__init__to passpreserve_ordertofind_joints()andresolve_matching_names_values()calls - Version bumped to 0.47.12
Issues Found:
EMAJointPositionToLimitsAction(subclass) doesn't passpreserve_orderto itsalphadict resolution, creating inconsistency- CHANGELOG date appears to be in the future (2025-10-15)
Confidence Score: 3/5
- Safe to merge with one logical inconsistency that should be fixed in the EMA subclass
- The implementation correctly adds preserve_order to the base class and applies it consistently in JointPositionToLimitsAction. However, EMAJointPositionToLimitsAction's alpha dict resolution doesn't use preserve_order, creating inconsistent behavior in the subclass. This won't cause runtime errors but could lead to unexpected joint ordering when using EMA actions with dict-based alpha values.
- source/isaaclab/isaaclab/envs/mdp/actions/joint_actions_to_limits.py needs the EMA subclass updated for consistency
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| source/isaaclab/config/extension.toml | 5/5 | Version bump from 0.47.11 to 0.47.12 - standard version increment |
| source/isaaclab/docs/CHANGELOG.rst | 3/5 | Added changelog entry for preserve_order flag - date shows 2025-10-15 which appears to be in the future |
| source/isaaclab/isaaclab/envs/mdp/actions/actions_cfg.py | 5/5 | Added preserve_order boolean flag with proper documentation and default value of False |
| source/isaaclab/isaaclab/envs/mdp/actions/joint_actions_to_limits.py | 4/5 | Applied preserve_order flag to find_joints and resolve_matching_names_values calls - missing from EMAJointPositionToLimitsAction.alpha initialization |
Sequence Diagram
sequenceDiagram
participant User
participant JointPositionToLimitsActionCfg
participant JointPositionToLimitsAction
participant Articulation
participant StringUtils
User->>JointPositionToLimitsActionCfg: Set preserve_order=True
User->>JointPositionToLimitsAction: Initialize with cfg
JointPositionToLimitsAction->>Articulation: find_joints(joint_names, preserve_order)
Articulation->>StringUtils: resolve_matching_names(keys, list, preserve_order)
StringUtils-->>Articulation: Return ordered joint_ids and names
Articulation-->>JointPositionToLimitsAction: joint_ids, joint_names
alt scale is dict
JointPositionToLimitsAction->>StringUtils: resolve_matching_names_values(scale, joint_names, preserve_order)
StringUtils-->>JointPositionToLimitsAction: Return ordered indices and values
end
alt clip is dict
JointPositionToLimitsAction->>StringUtils: resolve_matching_names_values(clip, joint_names, preserve_order)
StringUtils-->>JointPositionToLimitsAction: Return ordered indices and values
end
Note over JointPositionToLimitsAction: Actions now respect<br/>config order
Additional Comments (1)
-
source/isaaclab/isaaclab/envs/mdp/actions/joint_actions_to_limits.py, line 219-220 (link)logic: Missing
preserve_orderparameter inEMAJointPositionToLimitsAction.__init__. Thealphadict resolution should also respect thepreserve_orderflag for consistency with parent class.
1 file reviewed, 2 comments
| Changelog | ||
| --------- | ||
|
|
||
| 0.47.12 (2025-10-15) |
There was a problem hiding this comment.
style: Date shows 2025-10-15 which appears to be in the future (today is 2025-11-07). Verify this date is correct.
|
do we want to consider the |
Signed-off-by: Kelly Guo <[email protected]>
# Description Adds `preserve_order` flag to `JointPositionToLimitsActionCfg` ## Type of change - New feature (non-breaking change which adds functionality) ## Screenshots Please attach before and after screenshots of the change if applicable. <!-- Example: | Before | After | | ------ | ----- | | _gif/png before_ | _gif/png after_ | To upload images to a PR -- simply drag and drop an image while in edit mode and it should upload the image directly. You can then paste that source into the above before/after sections. --> ## 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 `./isaaclab.sh --format` - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] 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 --> --------- Signed-off-by: Kelly Guo <[email protected]> Co-authored-by: Kelly Guo <[email protected]>
# Description Adds `preserve_order` flag to `JointPositionToLimitsActionCfg` ## Type of change - New feature (non-breaking change which adds functionality) ## Screenshots Please attach before and after screenshots of the change if applicable. <!-- Example: | Before | After | | ------ | ----- | | _gif/png before_ | _gif/png after_ | To upload images to a PR -- simply drag and drop an image while in edit mode and it should upload the image directly. You can then paste that source into the above before/after sections. --> ## 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 `./isaaclab.sh --format` - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] 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 --> --------- Signed-off-by: Kelly Guo <[email protected]> Co-authored-by: Kelly Guo <[email protected]>
# Description Adds `preserve_order` flag to `JointPositionToLimitsActionCfg` ## Type of change - New feature (non-breaking change which adds functionality) ## Screenshots Please attach before and after screenshots of the change if applicable. <!-- Example: | Before | After | | ------ | ----- | | _gif/png before_ | _gif/png after_ | To upload images to a PR -- simply drag and drop an image while in edit mode and it should upload the image directly. You can then paste that source into the above before/after sections. --> ## 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 `./isaaclab.sh --format` - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] 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 --> --------- Signed-off-by: Kelly Guo <[email protected]> Co-authored-by: Kelly Guo <[email protected]>
Description
Adds
preserve_orderflag toJointPositionToLimitsActionCfgType of change
Screenshots
Please attach before and after screenshots of the change if applicable.
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there