ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

URDF models the kinematic structure as a tree.

By definition trees can only have one root, which simply means they have a single element which is their "starting point".

However, the moment I define the properties for a cylinder, it throws this error:

[ERROR] [1579466774.521440249]: Failed to find root link: Two root links found: [base] and [wheel]

If we take a close look at this error message (and keep in mind that you "define the properties for a cylinder", by which you most likely mean you add a cylinder), we see that the URDF you've created now contains two roots, and thus two trees: one starts with the link for the box (ie: base) and the other starts with the link for the cylinder you just added (ie: wheel).

As we know URDF only supports trees, this is illegal and thus you are presented with an error message.

In essence, your model description is incomplete: there is no information in your .urdf which tells the parser how base and wheel are to be connected to each other. If we add this information, we end up with either base or wheel becoming the root, and everything would be OK again.

The way to add this relationship between base and wheel would be do define a joint, which makes one of these two the parent and the other the child.

Adding a joint declares the relationship between the box and the cylinder and because one is the parent and the other the child, also provides the parser with the information on who is going to be the root (ie: the parent).