Skip to content

Commit

Permalink
[Bugfix] set_qpos should always have full=True in SapienPlanningWorld
Browse files Browse the repository at this point in the history
  • Loading branch information
KolinGuo committed Aug 17, 2024
1 parent 7e20c43 commit 7986c16
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions mplib/sapien_utils/conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,10 @@ def __init__(
joint_names=[j.name for j in articulation.active_joints],
verbose=False,
)
articulated_model.set_qpos(articulation.qpos) # update qpos # type: ignore
articulated_model.set_qpos(
articulation.qpos, # type: ignore
full=True,
) # update qpos
self.add_articulation(articulated_model)

for articulation in planned_articulations:
Expand Down Expand Up @@ -128,7 +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)):
# set_qpos to update poses
art.set_qpos(articulation.qpos) # type: ignore
art.set_qpos(articulation.qpos, full=True) # type: ignore
else:
raise RuntimeError(
f"Articulation {articulation.name} not found in PlanningWorld! "
Expand Down

0 comments on commit 7986c16

Please sign in to comment.