dexsuite / dex-urdf

MIT License
115 stars 8 forks source link

No Collision in Sapien #21

Closed Janebek closed 3 months ago

Janebek commented 3 months ago

Hi! Great work of yours!

I'm trying to use Sapien as my simulator. However, when I ran the examples, I noticed there is no physical collision in the hand, as shown below. Is this a bug, or is it a common occurrence in Sapien? Screenshot from 2024-08-06 12-31-19_2

yzqin commented 3 months ago

Which script you are running, you may need to call scene.step to make sapien a physical simulator. If you just set the robot qpos or link pose, SAPIEN can also be regarded as a visualizer

Janebek commented 3 months ago

I am running render_urdf_sapien.py and have verified that scene.step is included, with all settings set to default. Do you have any idea what might be causing this issue? The render_urdf_issacgym.py runs perfectly with collision.

yzqin commented 3 months ago

Hi @Janebek

Thanks for the information and sorry for the issue. I find that this is a bug in the render_urdf_sapien.py code which enable disable_self_collision by default so that the self collision is ignored by SAPIEN simulator.

This issue is fixed in 3c9a8e87f9bc36dc27e523a9fa70ecf1f0bb5629

Janebek commented 3 months ago

Hi! I'm glad you found it.

However, I encountered another issue which might be related to the version of SAPIEN. The error message is shown below. Do you think I should switch to a specific version of SAPIEN?

Screenshot from 2024-08-06 17-28-50_2

yzqin commented 3 months ago

Previously I am using the pre-release version of SAPIEN. Since this is not a code repo so I do not update the py file frequently. To better support the newer sapien version, I have just updated the code to 3.0.0b1. You can try: pip3 install sapien=3.0.0b1

Janebek commented 3 months ago

Thank you! The hand now has collisions in SAPIEN.