Skip to content

Commit f01c6f9

Browse files
KyleM73kellyguo11
andauthored
Fixes error in apply_actions method in NonHolonomicAction action term. (#1513)
# Description After indexing the size of `quad_w` in the `apply_actions` method is (N,B,4) where B will always equal 1, since it is enforced in the `__init__` that only one body name is passed to the action term config. However, the `euler_xyz_from_quat` method requires inputs to be size (N,4), and so an error is thrown for input size (N,1,4). This PR just creates a (N,4) view of quat_w to be passed to `euler_xyz_from_quat`. This simple change does not introduce any new warnings and works with a simple non holonomic robot, like the Clearpath Husky. ## 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` - [X] 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 - [ ] I have added my name to the `CONTRIBUTORS.md` or my name already exists there --------- Signed-off-by: Kyle Morgenstein <34984693+KyleM73@users.noreply.github.com> Signed-off-by: Kelly Guo <kellyg@nvidia.com> Signed-off-by: Kelly Guo <kellyguo123@hotmail.com> Co-authored-by: Kelly Guo <kellyg@nvidia.com> Co-authored-by: Kelly Guo <kellyguo123@hotmail.com>
1 parent fd1a9d5 commit f01c6f9

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

source/extensions/omni.isaac.lab/config/extension.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22

33
# Note: Semantic Versioning is used: https://semver.org/
4-
version = "0.27.26"
4+
version = "0.27.27"
55

66
# Description
77
title = "Isaac Lab framework for Robot Learning"

source/extensions/omni.isaac.lab/docs/CHANGELOG.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
Changelog
22
---------
33

4+
0.27.27 (2024-12-13)
5+
~~~~~~~~~~~~~~~~~~~~
6+
7+
Fixed
8+
^^^^^
9+
10+
* Fixed the shape of ``quat_w`` in the ``apply_actions`` method of :attr:`~omni.isaac.lab.env.mdp.NonHolonomicAction` (previously (N,B,4), now (N,4) since the number of root bodies B is required to be 1). Previously ``apply_actions`` errored because ``euler_xyz_from_quat`` requires inputs of shape (N,4).
11+
12+
413
0.27.26 (2024-12-11)
514
~~~~~~~~~~~~~~~~~~~~
615

source/extensions/omni.isaac.lab/omni/isaac/lab/envs/mdp/actions/non_holonomic_actions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def process_actions(self, actions):
132132

133133
def apply_actions(self):
134134
# obtain current heading
135-
quat_w = self._asset.data.body_quat_w[:, self._body_idx]
135+
quat_w = self._asset.data.body_quat_w[:, self._body_idx].view(self.num_envs, 4)
136136
yaw_w = euler_xyz_from_quat(quat_w)[2]
137137
# compute joint velocities targets
138138
self._joint_vel_command[:, 0] = torch.cos(yaw_w) * self.processed_actions[:, 0] # x

0 commit comments

Comments
 (0)