haosulab / SAPIEN

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

Is it possible to remove links/parts of the items in the PartNet-mobility Dataset? #117

Closed adrianxsalazar closed 1 year ago

adrianxsalazar commented 1 year ago

Hello again SAPIEN community,

I am using the PartNet-mobility Dataset alongside the SAPIEN simulator for my research. I was wondering whether is possible to remove parts of the objects of the PartNet-mobility Dataset. For example, removing a door.

I have been trying to use the scene.remove_articulation(articulation) function but it returns the following error:

TypeError: remove_articulation(): incompatible function arguments. The following argument types are supported:

  1. (self: sapien.core.pysapien.Scene, articulation: sapien.core.pysapien.Articulation) -> None

Any idea about how to do this?

Kind regards,

Adrian Salazar Gomez

fbxiang commented 1 year ago

It is not possible to remove a part of an articulation after it is loaded. The most straightforward solution is to remove that part (actually you need to move all its descendants as well) directly in the URDF file, which is after all just a plain xml. As suggested by the function signature, remove_articulation() removes the entire articulation.

adrianxsalazar commented 1 year ago

Thank you so much for your help. The problem is solved.

I manually removed the parts in the URDF file with a text editor and it works. I will try to write code to modify the XML and make the process a bit easier.

Thank you so much for your help.