Closed hesic73 closed 2 months ago
DexPoint likely uses a older version of SAPIEN that does not check for this. The URDF most likely has a invalid defined value for inertia. Unfortunately this error does not print which link has this issue. I am quite sure IsaacGym simply ignores this issue and attempts to simulate it anyway. Since past work had no issue with a faulty moment of inertia, it is probably fine if you delete this tag from the urdf.
For a easy fix you can edit /home/sichengh/anaconda3/envs/dex/lib/python3.9/site-packages/sapien/wrapper/urdf_loader.py and add right before the assert
print(link.name)
then once you figure out which link has the issue, either fix the inertia value or just disable it for now by deleting the tag.
I attempted the method mentioned in the issue on dynamic handover:
I am currently migrating the Allegro hand model mounted on an xArm6 from one simulator to another. During this transition, I encountered a critical error that prevents the simulation from running, due to an issue with the moment of inertia values specified in the URDF file.
The URDF section for link_2.0 is defined as follows:
<inertia ixx="7.04217e-05" iyy="3.95744e-05" izz="6.61125e-05" ixy="-9.64342e-05" ixz="5.8796e-05" iyz="-3.62996e-05"/>
Upon calculating the eigenvalues of the inertia tensor derived from these values:
import numpy as np I = np.array([[7.04217e-05, -9.64342e-05, 5.87960e-05], [-9.64342e-05, 3.95744e-05, -3.62996e-05], [5.87960e-05, -3.62996e-05, 6.61125e-05]]) eigenvalues, eigenvectors = np.linalg.eig(I) print("Eigenvalues of I:", eigenvalues)
The computed eigenvalues are:
Eigenvalues of I: [ 1.90343185e-04 -4.39462409e-05 2.97116560e-05]
This includes a negative value, which is physically implausible for a moment of inertia tensor.
Could someone verify whether there might be a typo or error in these values?
There are several joints with negative inertia eigenvalues. I recall resolving this by copying the content of an Allegro hand URDF file to replace the old one. My file looks like this:
By the way, I noticed your recent work also uses a similar hand+arm robot in SAPIEN. Is it possible to share the model? Thank you!
I just tried loading the xarm6 you sent, looks like it works?
Yes, this is the updated version. If I use the URDF file provided in DexPoint/dynamic_handover, the error occurs. xarm6_description.zip
I don't quite follow what the issue is? The old dynamic handover project uses a older version of sapien that is likely not checking for the inertia problem whereas the newer version is. You can just use the new xarm6, it looks and behaves correctly.
Although the current URDF appears to work, I'm unsure if there might be potential issues. If possible, I would like to use the exact same definition as prior works. Since Isaac Sim and older versions of sapien support the "invalid" inertia, I was previously uncertain if this was a URDF definition problem or related to ManiSkill. Now you have confirmed that it is due to the former. Thank you for your help!
Last month, I attempted to use a xarm6+allegro hand robot with the following code:
Initially, I borrowed the URDF file from dynamic handover, but encountered an error while parsing it. Details of this issue can be found here. Isaac Sim could load this file, and I assumed this was normal since dynamic handover used IsaacGym. However, I recently discovered that DexPoint uses essentially the same URDF definition, which is SAPIEN-based. I would like to understand why I cannot load this definition correctly.
The error message is as follows:
I am using the latest ManiSkill3 version: