haosulab / SAPIEN

SAPIEN Embodied AI Platform
https://sapien.ucsd.edu/
MIT License
427 stars 41 forks source link

Object loaded from URDF does not move #133

Closed arthur801031 closed 1 year ago

arthur801031 commented 1 year ago

I am trying to create a new task where the robot has to open the bottle cap.

I loaded the bottle data from a URDF, obtained from the PartNet-Mobility Dataset:

loader = self._scene.create_urdf_loader()
loader.fix_root_link = True
loader.load_multiple_collisions_from_file = True
loader.scale = 0.08
self.bottle = loader.load(str('dataset/3596/mobility.urdf'))
self.bottle.set_pose(sapien.Pose(p=[-0.064, 0.052, 0.02], q=[1, 0, 0, 0]))

However, the bottle/cap is unmovable (e.g., when the panda's arm touches the bottle, the bottle does not move; when the panda grasps the cap and lifts it in the air, the cap does not detach/move).

How can I make the bottle/cap movable (non-static)?

I've tried setting the loader's fix_root_link to False, but the bottle would start flying when I moved the robot arm without even touching the bottle.

Screenshot 2023-08-29 at 5 17 20 PM
arthur801031 commented 1 year ago

I was able to make the bottle cap movable by adapting mani_skill2/envs/misc/turn_faucet.py from ManiSkill2.