Skip to content

Commit

Permalink
[Bug Fix] some versions of sapien do not have auto_inertial as an att…
Browse files Browse the repository at this point in the history
…ribute.
  • Loading branch information
StoneT2000 committed Oct 9, 2024
1 parent 7b84f94 commit 318d511
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions mani_skill/utils/building/actor_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,11 @@ def build_physx_component(self, link_parent=None):
shape.set_min_patch_radius(r.min_patch_radius)
component.attach(shape)

if not self._auto_inertial and self.physx_body_type != "kinematic":
component.mass = self._mass
component.cmass_local_pose = self._cmass_local_pose
component.inertia = self._inertia
if hasattr(self, "_auto_inertial"):
if not self._auto_inertial and self.physx_body_type != "kinematic":
component.mass = self._mass
component.cmass_local_pose = self._cmass_local_pose
component.inertia = self._inertia

return component

Expand Down

0 comments on commit 318d511

Please sign in to comment.