ros / urdfdom

URDF parser
http://ros.org/wiki/urdf
Other
96 stars 132 forks source link

check_urdf: no loop detection #154

Open simonschmeisser opened 3 years ago

simonschmeisser commented 3 years ago

If the URDF file contains a loop, printTree https://github.com/ros/urdfdom/blob/99c6f58120a5dfd1f9fc36419cd9f9aa0246efde/urdf_parser/src/check_urdf.cpp#L100 loops infinitely

Example:

<robot name="loopy">
    <link name="world" />

    <link name="gripper_frame" />

    <joint name="world_to_gripper" type="fixed">
        <parent link="world"/>
        <child link="gripper_frame"/>
        <origin xyz="0.0 0.1 0.17" rpy="0 0 0"/>
    </joint>

    <link name="calibration_plate" />

    <joint name="gripper_to_calibration_plate" type="fixed">
        <parent link="gripper_frame"/>
        <child link="calibration_plate"/>
        <origin xyz="0.0 0.1 0.17" rpy="0 0 0"/>
    </joint>

    <joint name="gripper_to_calibration_plate2" type="fixed">
        <parent link="gripper_frame"/>
        <child link="gripper_frame"/>
        <origin xyz="0.0 0.1 0.17" rpy="0 0 0"/>
    </joint>
</robot>

Are there consumers of URDF that accept loops (then this could be handled with a warning), otherwise it should give an error