kdl_parser icon indicating copy to clipboard operation
kdl_parser copied to clipboard

Add support for inertia in the root link

Open traversaro opened this issue 6 years ago • 4 comments

Original issue: https://github.com/ros/robot_model/issues/6 .

Both the C++ and the Python of the parser throw a warning when a URDF with an non-empty inertial element in its root link is parsed.

For example, the simple one link model:

<robot name="oneLink">
    <link name="link1">
        <inertial>
            <mass value="1" />
            <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01" />
        </inertial>
    </link>
</robot>

creates a warning when parsed, and this is the reason why most URDFs files existing actually use a "fake" massless root link, for example:

<robot name="oneLink">
    <link name="base_link" />
    <joint name="base_fixed_joint" type="fixed">
        <parent link="base_link" />
        <child link="link1" />
    </joint>
    <link name="link1">
        <inertial>
            <mass value="1" />
            <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01" />
        </inertial>
    </link>
</robot>

traversaro avatar Aug 19 '19 10:08 traversaro

Related KDL issue/comment: https://github.com/orocos/orocos_kinematics_dynamics/issues/130#issuecomment-366614268 .

traversaro avatar Aug 19 '19 10:08 traversaro

what about adding the fake link in the code and not modifying the origin URDF file/parameter?

jackie-wayland avatar May 31 '22 14:05 jackie-wayland