Problem loading mesh files in rviz (.stl)

asked 2018-12-24 15:53:38 -0500

Toby gravatar image

I am using ubuntu 16.04 and kinetic. I am trying to construct a urdf file, and I draw 3D models in Fusion360, and export it as stl file.

But I get error when launching urdf:

[ERROR] [1545688277.584461755]: Error retrieving file [file:///opt/ros/kinetic/share/urdf_tutorial/meshes/LD/Body.stl]: Couldn't open file /opt/ros/kinetic/share/urdf_tutorial/meshes/LD/Body.stl
[ERROR] [1545688277.584659771]: Could not load model 'package://urdf_tutorial/meshes/LD/Body.stl' for link 'body': OGRE EXCEPTION(6:FileNotFoundException): Cannot locate resource package://urdf_tutorial/meshes/LD/Body.stl in resource group Autodetect or any other group. in ResourceGroupManager::openResource at /build/ogre-1.9-mqY1wq/ogre-1.9-1.9.0+dfsg1/OgreMain/src/OgreResourceGroupManager.cpp (line 756)
[ERROR] [1545688277.584755628]: Could not load model 'package://urdf_tutorial/meshes/LD/Body.stl' for link 'body': OGRE EXCEPTION(6:FileNotFoundException): Cannot locate resource package://urdf_tutorial/meshes/LD/Body.stl in resource group Autodetect or any other group. in ResourceGroupManager::openResource at /build/ogre-1.9-mqY1wq/ogre-1.9-1.9.0+dfsg1/OgreMain/src/OgreResourceGroupManager.cpp (line 756)

urdf:

<link name="body">
<visual>
    <origin rpy="0 0 0" xyz="0 0 0.025"/>
    <geometry>
        <!-- <box size="0.18 0.18 0.05"/> -->
        <!-- <mesh filename="package://urdf_tutorial/meshes/HD/Body.stl"/> -->
        <mesh filename="package://urdf_tutorial/meshes/LD/Body.stl"/>
    </geometry>
    <material name="gray">
        <color rgba="0.3 0.3 0.3 1.0"/>
    </material>
</visual>

</link>

I uploaded the stl file to google drive: https://drive.google.com/file/d/1kYP2...

I check the path and the file name, and I also tried the dae file that provided by the urdf tutorial. and it works fine though. and I tried convert the stl file to dae file, but fail again with the same issue.

please help me with that.

edit retag flag offensive close merge delete

Comments

The error shows is typically caused by the path to the file being incorrect and/or the filename and/or the extension no having the correct case.

What is the output of:

ls -al `rospack find urdf_tutorial`/meshes/LD/Body.stl
gvdhoorn gravatar image gvdhoorn  ( 2018-12-26 07:21:11 -0500 )edit