Unverified Commit 01d4f8eb authored by Octi Zhang's avatar Octi Zhang Committed by GitHub

Fixes docstrings in Articulation Data that report wrong return dimension (#1652)

# Description

Fixes docstring in Articulation data, where rigid body properties should
be of dimension (num_instances, num_bodies, x) instead of
(num_instances, 1, x).

Fixes #1651

<!-- As a practice, it is recommended to open an issue to have
discussions on the proposed pull request.
This makes it easier for the community to keep track of what is being
developed or added, and if a given feature
is demanded by more than one party. -->

## Type of change

docstring fix.

- Bug fix (non-breaking change which fixes an issue)

**Before Change**

for the data
'''
body_link_pos_w
body_link_quat_w
body_link_vel_w
body_link_lin_vel_w
body_link_ang_vel_w
body_com_pos_w
body_com_quat_w
body_com_vel_w
body_com_lin_vel_w
body_com_ang_vel_w
'''

The actual dimension are (num_instances, num_bodies, x),

 but the docstring says (num_instances, 1, x)

**After Change**

docstring says (num_instances, num_bodies, x)


## Checklist

- [ ] 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
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

<!--
As you go through the checklist above, you can mark something as done by
putting an x character in it

For example,
- [x] I have done this task
- [ ] I have not done this task
-->

---------
Signed-off-by: 's avatarKelly Guo <kellyguo123@hotmail.com>
Co-authored-by: 's avatarKelly Guo <kellyguo123@hotmail.com>
Co-authored-by: 's avatarJames Tigue <166445701+jtigue-bdai@users.noreply.github.com>
Co-authored-by: 's avatarKelly Guo <kellyg@nvidia.com>
parent 9ab52d47
[package] [package]
# Note: Semantic Versioning is used: https://semver.org/ # Note: Semantic Versioning is used: https://semver.org/
version = "0.30.3" version = "0.30.4"
# Description # Description
title = "Isaac Lab framework for Robot Learning" title = "Isaac Lab framework for Robot Learning"
......
Changelog Changelog
--------- ---------
0.30.4 (2025-01-08)
~~~~~~~~~~~~~~~~~~~
Fixed
^^^^^
* fixed docstring in articulation data :class:`omni.isaac.lab.assets.ArticulationData`.
In body properties sections, the second dimension should be num_bodies but was documented as 1.
0.30.3 (2025-01-02) 0.30.3 (2025-01-02)
~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
......
...@@ -747,7 +747,7 @@ class ArticulationData: ...@@ -747,7 +747,7 @@ class ArticulationData:
@property @property
def body_link_pos_w(self) -> torch.Tensor: def body_link_pos_w(self) -> torch.Tensor:
"""Positions of all bodies in simulation world frame. Shape is (num_instances, 1, 3). """Positions of all bodies in simulation world frame. Shape is (num_instances, num_bodies, 3).
This quantity is the position of the rigid bodies' actor frame relative to the world. This quantity is the position of the rigid bodies' actor frame relative to the world.
""" """
...@@ -760,7 +760,7 @@ class ArticulationData: ...@@ -760,7 +760,7 @@ class ArticulationData:
@property @property
def body_link_quat_w(self) -> torch.Tensor: def body_link_quat_w(self) -> torch.Tensor:
"""Orientation (w, x, y, z) of all bodies in simulation world frame. Shape is (num_instances, 1, 4). """Orientation (w, x, y, z) of all bodies in simulation world frame. Shape is (num_instances, num_bodies, 4).
This quantity is the orientation of the rigid bodies' actor frame relative to the world. This quantity is the orientation of the rigid bodies' actor frame relative to the world.
""" """
...@@ -774,7 +774,7 @@ class ArticulationData: ...@@ -774,7 +774,7 @@ class ArticulationData:
@property @property
def body_link_vel_w(self) -> torch.Tensor: def body_link_vel_w(self) -> torch.Tensor:
"""Velocity of all bodies in simulation world frame. Shape is (num_instances, 1, 6). """Velocity of all bodies in simulation world frame. Shape is (num_instances, num_bodies, 6).
This quantity contains the linear and angular velocities of the rigid bodies' center of mass frame This quantity contains the linear and angular velocities of the rigid bodies' center of mass frame
relative to the world. relative to the world.
...@@ -783,7 +783,7 @@ class ArticulationData: ...@@ -783,7 +783,7 @@ class ArticulationData:
@property @property
def body_link_lin_vel_w(self) -> torch.Tensor: def body_link_lin_vel_w(self) -> torch.Tensor:
"""Linear velocity of all bodies in simulation world frame. Shape is (num_instances, 1, 3). """Linear velocity of all bodies in simulation world frame. Shape is (num_instances, num_bodies, 3).
This quantity is the linear velocity of the rigid bodies' center of mass frame relative to the world. This quantity is the linear velocity of the rigid bodies' center of mass frame relative to the world.
""" """
...@@ -791,7 +791,7 @@ class ArticulationData: ...@@ -791,7 +791,7 @@ class ArticulationData:
@property @property
def body_link_ang_vel_w(self) -> torch.Tensor: def body_link_ang_vel_w(self) -> torch.Tensor:
"""Angular velocity of all bodies in simulation world frame. Shape is (num_instances, 1, 3). """Angular velocity of all bodies in simulation world frame. Shape is (num_instances, num_bodies, 3).
This quantity is the angular velocity of the rigid bodies' center of mass frame relative to the world. This quantity is the angular velocity of the rigid bodies' center of mass frame relative to the world.
""" """
...@@ -803,7 +803,7 @@ class ArticulationData: ...@@ -803,7 +803,7 @@ class ArticulationData:
@property @property
def body_com_pos_w(self) -> torch.Tensor: def body_com_pos_w(self) -> torch.Tensor:
"""Positions of all bodies in simulation world frame. Shape is (num_instances, 1, 3). """Positions of all bodies in simulation world frame. Shape is (num_instances, num_bodies, 3).
This quantity is the position of the rigid bodies' actor frame. This quantity is the position of the rigid bodies' actor frame.
""" """
...@@ -813,13 +813,13 @@ class ArticulationData: ...@@ -813,13 +813,13 @@ class ArticulationData:
def body_com_quat_w(self) -> torch.Tensor: def body_com_quat_w(self) -> torch.Tensor:
"""Orientation (w, x, y, z) of the prinicple axies of inertia of all bodies in simulation world frame. """Orientation (w, x, y, z) of the prinicple axies of inertia of all bodies in simulation world frame.
Shape is (num_instances, 1, 4). This quantity is the orientation of the rigid bodies' actor frame. Shape is (num_instances, num_bodies, 4). This quantity is the orientation of the rigid bodies' actor frame.
""" """
return self.body_com_state_w[..., 3:7] return self.body_com_state_w[..., 3:7]
@property @property
def body_com_vel_w(self) -> torch.Tensor: def body_com_vel_w(self) -> torch.Tensor:
"""Velocity of all bodies in simulation world frame. Shape is (num_instances, 1, 6). """Velocity of all bodies in simulation world frame. Shape is (num_instances, num_bodies, 6).
This quantity contains the linear and angular velocities of the rigid bodies' center of mass frame. This quantity contains the linear and angular velocities of the rigid bodies' center of mass frame.
""" """
...@@ -832,7 +832,7 @@ class ArticulationData: ...@@ -832,7 +832,7 @@ class ArticulationData:
@property @property
def body_com_lin_vel_w(self) -> torch.Tensor: def body_com_lin_vel_w(self) -> torch.Tensor:
"""Linear velocity of all bodies in simulation world frame. Shape is (num_instances, 1, 3). """Linear velocity of all bodies in simulation world frame. Shape is (num_instances, num_bodies, 3).
This quantity is the linear velocity of the rigid bodies' center of mass frame. This quantity is the linear velocity of the rigid bodies' center of mass frame.
""" """
...@@ -845,7 +845,7 @@ class ArticulationData: ...@@ -845,7 +845,7 @@ class ArticulationData:
@property @property
def body_com_ang_vel_w(self) -> torch.Tensor: def body_com_ang_vel_w(self) -> torch.Tensor:
"""Angular velocity of all bodies in simulation world frame. Shape is (num_instances, 1, 3). """Angular velocity of all bodies in simulation world frame. Shape is (num_instances, num_bodies, 3).
This quantity is the angular velocity of the rigid bodies' center of mass frame. This quantity is the angular velocity of the rigid bodies' center of mass frame.
""" """
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment