Fix various issues with body inertial parsing and compiling.

- Add errors in body compiler for incorrect mixing of specifiers.
- Correctly process inertia orientation specifiers.

PiperOrigin-RevId: 676843326
Change-Id: I7e7eb22e25a6769754794f98fad5e0dcc0e5946f
This commit is contained in:
Yuval Tassa
2024-09-20 07:52:31 -07:00
committed by Copybara-Service
parent 78832db53f
commit 50f43b8745
5 changed files with 89 additions and 11 deletions
+2 -2
View File
@@ -274,9 +274,9 @@ void mjXURDF::Body(XMLElement* body_elem) {
// lquat = rotation from specified to default (joint/body) inertial frame
double lquat[4] = {1, 0, 0, 0};
double tmpquat[4] = {1, 0, 0, 0};
const char* altres = mjuu_fullInertia(lquat, pbody->inertia, pbody->fullinertia);
const char* altres = mjuu_fullInertia(lquat, nullptr, pbody->fullinertia);
// inertia are sometimes 0 in URDF files: ignore error in altres, fix later
// inertias are sometimes 0 in URDF files: ignore error in altres, fix later
(void) altres;
// correct for alignment of full inertia matrix