From e8ea18500a84fb599d01f864f6824d7c8b7582d8 Mon Sep 17 00:00:00 2001 From: Octi Zhang <127588710+zoctipus@users.noreply.github.com> Date: Thu, 2 Jan 2025 16:40:01 -0800 Subject: [PATCH] Fixes error in Articulation where default_joint_stiffness and default_joint_damping is not correctly set if actuator is instance of ImplicitActuator (#1580) # Description Before the fix, the field, default_joint_stiffness, and default_joint_damping in omni.isaac.lab.assets.Articulation will be the default value configured Joint Drive property in usd file, and defining a new value with actuator config will not have effect if the actuator is type ImplicitActuator after the fix, all actuator types will be able to override default_joint_stiffness and default_joint_damping Fixes #1552 ## Type of change - Bug fix (non-breaking change which fixes an issue) ## Checklist - [X] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [ ] 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 --------- Signed-off-by: Kelly Guo Co-authored-by: Kelly Guo Co-authored-by: James Tigue <166445701+jtigue-bdai@users.noreply.github.com> Co-authored-by: Kelly Guo --- source/extensions/omni.isaac.lab/config/extension.toml | 2 +- source/extensions/omni.isaac.lab/docs/CHANGELOG.rst | 9 +++++++++ .../omni/isaac/lab/assets/articulation/articulation.py | 6 +++--- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/source/extensions/omni.isaac.lab/config/extension.toml b/source/extensions/omni.isaac.lab/config/extension.toml index d0ce0dae38..d64f5d9f66 100644 --- a/source/extensions/omni.isaac.lab/config/extension.toml +++ b/source/extensions/omni.isaac.lab/config/extension.toml @@ -1,7 +1,7 @@ [package] # Note: Semantic Versioning is used: https://semver.org/ -version = "0.30.1" +version = "0.30.2" # Description title = "Isaac Lab framework for Robot Learning" diff --git a/source/extensions/omni.isaac.lab/docs/CHANGELOG.rst b/source/extensions/omni.isaac.lab/docs/CHANGELOG.rst index a96a1c2c04..c7ca16bdca 100644 --- a/source/extensions/omni.isaac.lab/docs/CHANGELOG.rst +++ b/source/extensions/omni.isaac.lab/docs/CHANGELOG.rst @@ -1,6 +1,15 @@ Changelog --------- +0.30.2 (2024-12-22) +~~~~~~~~~~~~~~~~~~~ + +Fixed +^^^^^ + +* Fixed populating default_joint_stiffness and default_joint_damping values for ImplicitActuator instances in :class:`omni.isaac.lab.assets.Articulation` + + 0.30.1 (2024-12-17) ~~~~~~~~~~~~~~~~~~~ diff --git a/source/extensions/omni.isaac.lab/omni/isaac/lab/assets/articulation/articulation.py b/source/extensions/omni.isaac.lab/omni/isaac/lab/assets/articulation/articulation.py index 16b313b96c..444a2ad4db 100644 --- a/source/extensions/omni.isaac.lab/omni/isaac/lab/assets/articulation/articulation.py +++ b/source/extensions/omni.isaac.lab/omni/isaac/lab/assets/articulation/articulation.py @@ -1348,9 +1348,9 @@ def _process_actuators_cfg(self): self.write_joint_velocity_limit_to_sim(actuator.velocity_limit, joint_ids=actuator.joint_indices) self.write_joint_armature_to_sim(actuator.armature, joint_ids=actuator.joint_indices) self.write_joint_friction_to_sim(actuator.friction, joint_ids=actuator.joint_indices) - # Store the actual default stiffness and damping values for explicit actuators (not written the sim) - self._data.default_joint_stiffness[:, actuator.joint_indices] = actuator.stiffness - self._data.default_joint_damping[:, actuator.joint_indices] = actuator.damping + # Store the actual default stiffness and damping values for explicit and implicit actuators (not written the sim) + self._data.default_joint_stiffness[:, actuator.joint_indices] = actuator.stiffness + self._data.default_joint_damping[:, actuator.joint_indices] = actuator.damping # perform some sanity checks to ensure actuators are prepared correctly total_act_joints = sum(actuator.num_joints for actuator in self.actuators.values())