From 0036fedab3d668c61d7a6ffef409b5f96ce02684 Mon Sep 17 00:00:00 2001 From: James Tigue Date: Tue, 1 Apr 2025 13:33:02 -0400 Subject: [PATCH 1/2] add joint effort --- .../isaaclab/isaaclab/envs/mdp/observations.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/source/isaaclab/isaaclab/envs/mdp/observations.py b/source/isaaclab/isaaclab/envs/mdp/observations.py index 12e93b69d28..fdf1ba283ce 100644 --- a/source/isaaclab/isaaclab/envs/mdp/observations.py +++ b/source/isaaclab/isaaclab/envs/mdp/observations.py @@ -157,6 +157,23 @@ def joint_vel_rel(env: ManagerBasedEnv, asset_cfg: SceneEntityCfg = SceneEntityC return asset.data.joint_vel[:, asset_cfg.joint_ids] - asset.data.default_joint_vel[:, asset_cfg.joint_ids] +def joint_effort(env: ManagerBasedEnv, asset_cfg: SceneEntityCfg = SceneEntityCfg("robot")) -> torch.Tensor: + """The joint applied effort of the robot. + + NOTE: Only the joints configured in :attr:`asset_cfg.joint_ids` will have their effort returned. + + Args: + env: The environment. + asset_cfg: The SceneEntity associated with this observation. + + Returns: + The joint effort (N or N-m) for joint_names in asset_cfg, shape is [num_env,num_joints]. + """ + # extract the used quantities (to enable type-hinting) + asset: Articulation = env.scene[asset_cfg.name] + return asset.data.applied_torque[:, asset_cfg.joint_ids] + + """ Sensors. """ From efe359582c4f4639fe91125e204842360bb5dbb0 Mon Sep 17 00:00:00 2001 From: James Tigue Date: Tue, 1 Apr 2025 13:38:54 -0400 Subject: [PATCH 2/2] changelog --- source/isaaclab/config/extension.toml | 2 +- source/isaaclab/docs/CHANGELOG.rst | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/source/isaaclab/config/extension.toml b/source/isaaclab/config/extension.toml index b47bd022ef4..b4711d2624d 100644 --- a/source/isaaclab/config/extension.toml +++ b/source/isaaclab/config/extension.toml @@ -1,7 +1,7 @@ [package] # Note: Semantic Versioning is used: https://semver.org/ -version = "0.36.3" +version = "0.37.0" # Description title = "Isaac Lab framework for Robot Learning" diff --git a/source/isaaclab/docs/CHANGELOG.rst b/source/isaaclab/docs/CHANGELOG.rst index 7ab5e86c40f..f7825e11072 100644 --- a/source/isaaclab/docs/CHANGELOG.rst +++ b/source/isaaclab/docs/CHANGELOG.rst @@ -1,6 +1,15 @@ Changelog --------- +0.37.0 (2025-04-01) +~~~~~~~~~~~~~~~~~~ + +Added +~~~~~ + +* Added the :meth:`~isaaclab.env.mdp.observations.joint_effort` + + 0.36.4 (2025-03-24) ~~~~~~~~~~~~~~~~~~~