Closed Giulero closed 1 year ago
@traversaro do you think that this case can be managed in this way?
If you check the URDF specification (http://wiki.ros.org/urdf/XML/link), it is stated:
(optional: defaults to a zero mass and zero inertia if not specified) The link’s mass, position of its center of mass, and its central inertia properties. (optional: defaults to identity if not specified)
So, I think the fix is indeed correct and conformant to URDF specification (it could even make sense to report it to the urdf_parser_py repo, as it could make sense that this substitution is done by urdf_parser_py itself.
Thanks a lot @traversaro!
Sometimes in the
.urdf
, a link can contain theinertial
field (in such a case, we call itlink
, opposite toframe
, which doesn't haveinertial
) without the origin, e.g.:In this case, an error arises when
StdLink.spatial_inertial()
orStdLink.homogeneus()
sincelink.inertial.origin
isNone
.This PR should fix this issue by assigning
link.inertial.origin.xyz = [0,0,0]
andlink.inertial.origin.rpy = [0,0,0]
.@traversaro do you think that this case can be managed in this way?