I wrote a standalone Python script to import a robot from URDDF. In general, it works well. However, on closer inspection, I realized if I query robot link inertia properties from the ArticulationView, it only partially matches the ones in the URDF file. There are two sources of differences.
(1) when accessing the body CoMs through ArticulationView::get_body_coms(), the CoM frame rotations are different from URDF.
(2) when accessing the body CoMs through ArticulationView::get_body_inertias(), the Inertia matrices are different.
I realized that the frame orientation defines the principle access. Meaning R^T I R, results in a diagonal matrix.
However, what still needs to be clarified is why the inertia matrices do not match the ones from URDF. Below are the values I generated for the Farbka robot based on the URDF in IsaacSim (panda_arm_hand.urdf):
To enable loading the inertia tensor, I should have set ImportConfig.import_inertia_tensor to True.
However, it is not still fully working. The loaded URDF still ignores the sub-element origin rpy in the inertial element. Also, the off-diagonal element of the inertia tensor is set to zero, although they are not. Check below:
Any updates on this issue? I tried to use URDF and MJCF to import inertia matrix into USD, but the inertia matrix read using ArticulationView::get_body_inertias() is still incorrect.
I also tried to manually decomposite the inertia matrix into principal axis and diagonal matrix, and modified the values in Isaac Sim UI, but the output of ArticulationView::get_body_inertias() still does not match the one with it in URDF.