Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]SAPIEN 2.2.2 cannot drive the dexterous hand properly. #196

Closed
revquiet opened this issue Jan 23, 2025 · 4 comments
Closed

[BUG]SAPIEN 2.2.2 cannot drive the dexterous hand properly. #196

revquiet opened this issue Jan 23, 2025 · 4 comments

Comments

@revquiet
Copy link

System:

  • OS version: [Ubuntu 22.04]
  • Python version [Python 3.10.15]
  • SAPIEN version (pip freeze | grep sapien): 2.2.2
  • Environment: [Desktop]

Describe the bug
When importing a humanoid robot URDF with dexterous hands, the intermediate_joint for both the left and right hands fails to correctly drive or display in SAPIEN 2.2.2. However, the same URDF works as expected in SAPIEN 3.0.0b1. Since SAPIEN 2.2.2 is required for ManiSkill2 compatibility, it is crucial to resolve this issue in the older version for me.

To Reproduce
Steps to reproduce the behavior (use pastebin for code):

  1. load the urdf file and the corresponding mesh files.
  2. runing the script.
    Expected behavior
    The intermediate_joint for both hands should be correctly driven and displayed, as observed in SAPIEN 3.0.0b1.

Screenshots
If applicable, add screenshots to help explain your problem.
SAPIEN2.2.2:
https://github.com/user-attachments/assets/c8c4e2c7-e305-4374-bc09-c4eaad7bcf9e

SAPIEN3.0.0:
https://github.com/user-attachments/assets/b245b704-9b21-4b33-83c5-d66b7b54da7f

Additional context
Add any other context about the problem here.

@fbxiang
Copy link
Collaborator

fbxiang commented Jan 23, 2025

My guess is that the issue is caused by cylinder collisions, which are not supported in SAPIEN 2 (which converts cylinders to capsules) but supported in SAPIEN 3 (by converting cylinders to meshes with a similar shape). You can verify this by removing all the cylinder collisions and try SAPIEN 2 and 3 again.
My suggestion is to use SAPIEN 3 and ManiSkill3, which include much more feature improvements and bug fixes so you will encounter similar issues a lot less. And we do not plan to support an outdated version.
However, if you have to use SAPIEN 2, you can modify the collision shapes manually to replace the cylinders with meshes, or disable the collisions completely.

@revquiet
Copy link
Author

I have already removed all collisions in the URDF, but the issue has not been resolved.

@fbxiang
Copy link
Collaborator

fbxiang commented Jan 23, 2025

The other thing to try is to increase the mass and inertia of all links, and make sure the mass and diagonal of the inertia are at least 1e-6. PhysX is known to skip solving links with small mass properties. SAPIEN 3 does this kind of checking for you but SAPIEN 2 does not.

@revquiet
Copy link
Author

revquiet commented Feb 7, 2025

Thanks! It makes sense when I increase the mass of the dexterous hands links.

@revquiet revquiet closed this as completed Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants