Skip to content

Commit

Permalink
[Bugfix] call set_base_pose in SapienPlanningWorld during init and up…
Browse files Browse the repository at this point in the history
…date
  • Loading branch information
KolinGuo committed Aug 17, 2024
1 parent 7986c16 commit 86376ca
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mplib/sapien_utils/conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ def __init__(
joint_names=[j.name for j in articulation.active_joints],
verbose=False,
)
articulated_model.set_base_pose(articulation.root_pose) # type: ignore
articulated_model.set_qpos(
articulation.qpos, # type: ignore
full=True,
Expand Down Expand Up @@ -130,6 +131,7 @@ def update_from_simulation(self, *, update_attached_object: bool = True) -> None
"""
for articulation in self._sim_scene.get_all_articulations():
if art := self.get_articulation(convert_object_name(articulation)):
art.set_base_pose(articulation.root_pose) # type: ignore
# set_qpos to update poses
art.set_qpos(articulation.qpos, full=True) # type: ignore
else:
Expand Down

0 comments on commit 86376ca

Please sign in to comment.