From 86376ca87d2c055b792d8cea4d15a38e861d866f Mon Sep 17 00:00:00 2001 From: Kolin Guo Date: Sat, 17 Aug 2024 15:06:46 -0700 Subject: [PATCH] [Bugfix] call set_base_pose in SapienPlanningWorld during init and update --- mplib/sapien_utils/conversion.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mplib/sapien_utils/conversion.py b/mplib/sapien_utils/conversion.py index 77e0079..dab841f 100644 --- a/mplib/sapien_utils/conversion.py +++ b/mplib/sapien_utils/conversion.py @@ -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, @@ -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: