Skip to content

Commit b08178b

Browse files
authored
Fixes rigid object's root com velocities timestamp check (#1674)
# Description The rigid body data properties root_com_vel_w, root_com_pos_w, and root_com_ang_vel_w currently check the private state field's timestamp before updating their state. However, the issue lies in the fact that these COM state properties are incorrectly checking the link state field's timestamp instead of the COM's own state. Fixes # (issue) Replacing root link state with root com state at these properties. ## 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 - [ ] 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
1 parent 3869025 commit b08178b

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

CONTRIBUTORS.md

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ Guidelines for modifications:
6969
* Muhong Guo
7070
* Nicola Loi
7171
* Nuralem Abizov
72+
* Ori Gadot
7273
* Oyindamola Omotuyi
7374
* Özhan Özen
7475
* Peter Du

source/extensions/omni.isaac.lab/omni/isaac/lab/assets/articulation/articulation_data.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ def root_link_pos_w(self) -> torch.Tensor:
547547
548548
This quantity is the position of the actor frame of the root rigid body relative to the world.
549549
"""
550-
if self._body_com_state_w.timestamp < self._sim_timestamp:
550+
if self._root_link_state_w.timestamp < self._sim_timestamp:
551551
# read data from simulation (pose is of link)
552552
pose = self._root_physx_view.get_root_transforms()
553553
return pose[:, :3]
@@ -559,7 +559,7 @@ def root_link_quat_w(self) -> torch.Tensor:
559559
560560
This quantity is the orientation of the actor frame of the root rigid body.
561561
"""
562-
if self._body_com_state_w.timestamp < self._sim_timestamp:
562+
if self._root_link_state_w.timestamp < self._sim_timestamp:
563563
# read data from simulation (pose is of link)
564564
pose = self._root_physx_view.get_root_transforms().clone()
565565
pose[:, 3:7] = math_utils.convert_quat(pose[:, 3:7], to="wxyz")

source/extensions/omni.isaac.lab/omni/isaac/lab/assets/rigid_object/rigid_object_data.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ def root_com_vel_w(self) -> torch.Tensor:
399399
400400
This quantity contains the linear and angular velocities of the root rigid body's center of mass frame relative to the world.
401401
"""
402-
if self._root_link_state_w.timestamp < self._sim_timestamp:
402+
if self._root_com_state_w.timestamp < self._sim_timestamp:
403403
# read data from simulation
404404
velocity = self._root_physx_view.get_velocities()
405405
return velocity
@@ -411,7 +411,7 @@ def root_com_lin_vel_w(self) -> torch.Tensor:
411411
412412
This quantity is the linear velocity of the root rigid body's center of mass frame relative to the world.
413413
"""
414-
if self._root_link_state_w.timestamp < self._sim_timestamp:
414+
if self._root_com_state_w.timestamp < self._sim_timestamp:
415415
# read data from simulation
416416
velocity = self._root_physx_view.get_velocities()
417417
return velocity[:, 0:3]
@@ -423,7 +423,7 @@ def root_com_ang_vel_w(self) -> torch.Tensor:
423423
424424
This quantity is the angular velocity of the root rigid body's center of mass frame relative to the world.
425425
"""
426-
if self._root_link_state_w.timestamp < self._sim_timestamp:
426+
if self._root_com_state_w.timestamp < self._sim_timestamp:
427427
# read data from simulation
428428
velocity = self._root_physx_view.get_velocities()
429429
return velocity[:, 3:6]

0 commit comments

Comments
 (0)