jrl-umi3218 / RBDyn

RBDyn provides a set of classes and functions to model the dynamics of rigid body systems.
BSD 2-Clause "Simplified" License
157 stars 47 forks source link

[parsers] URDF and YAML generation from ParserResult #73

Closed BenjaminNavarro closed 4 years ago

BenjaminNavarro commented 4 years ago

Unless I'm missing something, the generated URDF/YAML models must be later read with transformInertia = false because there is no way to recover the original rotation from the available data. I don't know if it is a big issue or if we can find a workaround for this

BenjaminNavarro commented 4 years ago
1. Factor the testing code for comparing `ParserResult` instances and generating the examples since they are basically the same between each tests

Ok no problem

2. I don't like that you need to have `transformInertia = false` with the generated files, you can get an inertia that will transform correctly by calling `sva::inertiaToOrigin(inertia, -mass, com, Eigen::Matrix3d::Identity())`. The only information that is definitely lost is the inertial frame orientation that could be in the original URDF.

I don't like it either so I'll try what you suggest and see if it works properly

BenjaminNavarro commented 4 years ago

Ok, so the parser tests refactoring is done and transformInertia=false is no longer necessary! Let's see if the CI is happy

gergondet commented 4 years ago

Thanks for your contribution @BenjaminNavarro