Error displaying URDF in webpage

asked 2020-06-16 04:29:44 -0500

saintdere gravatar image

updated 2022-01-22 16:10:36 -0500

Evgeny gravatar image

I am following this tutorial on visualizing a URDF in a webpage. All of the commands are running fine in terminal however, when opening the webpage I am seeing this : image description

I am able to rotate and move the camera around like it is supposed to. However, the URDF model is just not loading properly. I receive this warning when running rosrun robot_state_republisher robot_state_republisher : The root link base_footprint has an inertia specified in the URDF, but KDL does not support a root link with an inertia. As a workaround, you can add an extra dummy link to your URDF but I am unsure if this has anything to do with the error. [Running ROS Melodic on Ubuntu 18.04]

edit retag flag offensive close merge delete

Comments

but I am unsure if this has anything to do with the error

Have you tried or is it just an assumption ?

Delb gravatar image Delb  ( 2020-06-16 04:32:37 -0500 )edit

Sorry, tried what exactly?

saintdere gravatar image saintdere  ( 2020-06-16 04:34:49 -0500 )edit
1

The error tells you that the root link has an inertia but it's not supported. The workaround is to add a link with nothing and connecting it to base_footprint (i.e. a dummy link) :

<link name="dummy_link" />    
<joint name="dummy_link_to_footprint" type="fixed">
    <parent link="dummy_link"/>
    <child link="base_footprint"/>
</joint>

<link name="base_footprint">
......
Delb gravatar image Delb  ( 2020-06-16 04:40:34 -0500 )edit

I haven't tried it yet because I'm not using a model / I don't know where to find the model that the tutorial is using

saintdere gravatar image saintdere  ( 2020-06-16 05:01:20 -0500 )edit
1

If you have propperly followed your tutorial then it should be in tha package pr2_description. To change the model you should clone this repo to your workspace.

Delb gravatar image Delb  ( 2020-06-16 07:07:11 -0500 )edit

I have cloned the package pr2_description, but I do not know which file specifically to add the dummy link into - there are many xacro files inside the package.

saintdere gravatar image saintdere  ( 2020-06-17 03:42:41 -0500 )edit
1

To the best of my knowledge, the warning should have nothing to do with the visualization. It is meant for those who need to use KDL libraries, especially dynamics solvers. I am pretty confident that you can safely ignore it in this application!

ffusco gravatar image ffusco  ( 2020-06-17 04:50:48 -0500 )edit

Thank you.. but the problem in my original question is still the same. The URDF model is not loading where it is supposed to

saintdere gravatar image saintdere  ( 2020-06-17 05:06:26 -0500 )edit