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

Adds flag to preserve joint order inside JointActionCfg action term #787

Merged
merged 8 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Guidelines for modifications:
* Rosario Scalise
* Shafeef Omar
* Vladimir Fokow
* Xavier Nal
* Zhengyu Zhang
* Ziqi Fan

Expand Down
2 changes: 1 addition & 1 deletion source/extensions/omni.isaac.lab/config/extension.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]

# Note: Semantic Versioning is used: https://semver.org/
version = "0.21.0"
version = "0.21.1"

# Description
title = "Isaac Lab framework for Robot Learning"
Expand Down
6 changes: 6 additions & 0 deletions source/extensions/omni.isaac.lab/docs/CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Changelog
---------

0.21.1 (2024-08-06)
~~~~~~~~~~~~~~~~~~~

* Added a flag to preserve joint ordering inside the :class:`omni.isaac.lab.envs.mdp.JointAction` action term.


0.21.0 (2024-08-05)
~~~~~~~~~~~~~~~~~~~

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ class JointActionCfg(ActionTermCfg):
"""Scale factor for the action (float or dict of regex expressions). Defaults to 1.0."""
offset: float | dict[str, float] = 0.0
"""Offset factor for the action (float or dict of regex expressions). Defaults to 0.0."""
preserve_order: bool = False
"""Whether to preserve the order of the joint names in the action output. Defaults to False."""


@configclass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ def __init__(self, cfg: actions_cfg.JointActionCfg, env: ManagerBasedEnv) -> Non
super().__init__(cfg, env)

# resolve the joints over which the action term is applied
self._joint_ids, self._joint_names = self._asset.find_joints(self.cfg.joint_names)
self._joint_ids, self._joint_names = self._asset.find_joints(
self.cfg.joint_names, preserve_order=self.cfg.preserve_order
)
self._num_joints = len(self._joint_ids)
# log the resolved joint names for debugging
carb.log_info(
Expand Down
Loading