Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for inertia in the root link #27

Open
traversaro opened this issue Aug 19, 2019 · 4 comments
Open

Add support for inertia in the root link #27

traversaro opened this issue Aug 19, 2019 · 4 comments

Comments

@traversaro
Copy link
Contributor

Original issue: ros/robot_model#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
Copy link
Contributor Author

Related KDL issue/comment: orocos/orocos_kinematics_dynamics#130 (comment) .

@jackie-wayland
Copy link

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

@traversaro
Copy link
Contributor Author

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

That could be a solution, but as KDL::Tree supports inertia in the root segment, kdl_parser could simply parse it and stop producing a warning.

@traversaro
Copy link
Contributor Author

but as KDL::Tree supports inertia in the root segment, kdl_parser could simply parse it and stop producing a warning.

Actually this is not completely correct. The existing KDL's API does not support setting the inertia of the RootSegment, rock-control/control-kdl_parser@d1d2507 does it, but kind of hacking around API limitations via the use of const_cast.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants