-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Adds preserve order flag to JointPositionToLimitsAction #3716
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
base: main
Are you sure you want to change the base?
Adds preserve order flag to JointPositionToLimitsAction #3716
Conversation
ooctipus
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes looks good to me, though can you share what bug you went into without it?
Mayankm96
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Date shows 2025-10-15 which appears to be in the future (today is 2025-11-07). Verify this date is correct.
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