ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A answers.ros.org
Ask Your Question
0

OGRE EXCEPTION (FileNotFoundException) when loading URDF in RViz

asked 2016-12-01 03:04:19 -0500

zakizadeh gravatar image

updated 2016-12-01 03:42:49 -0500

gvdhoorn gravatar image

hi . i cant load my robot urdf in RViz. i run launch file : roslaunch wrist display.launch

my display.launch is :

 <launch>
 <param name="robot_description" textfile="$(find wrist)/urdf/wrist.urdf" /> 
</launch>

then i run :

rosrun rviz rviz

when i add robotstate in RViz i have this error : how can i fix that ??? please help me .

  [ERROR] [1480582359.533241630]: Could not load model 'file:///home/zakizadeh/catkin_ws3/src/wrist/meshes/m2_1.stl' for link 'm2_1': OGRE EXCEPTION(6:FileNotFoundException): Cannot locate resource file:///home/zakizadeh/catkin_ws3/src/wrist/meshes/m2_1.stl in resource group Autodetect or any other group. in ResourceGroupManager::openResource at /build/buildd/ogre-1.8-1.8.1+dfsg/OgreMain/src/OgreResourceGroupManager.cpp (line 756)
[ WARN] [1480582359.533368375]: OGRE EXCEPTION(6:FileNotFoundException): Cannot locate resource file:///home/zakizadeh/catkin_ws3/src/wrist/meshes/m2_1.stl in resource group Autodetect or any other group. in ResourceGroupManager::openResource at /build/buildd/ogre-1.8-1.8.1+dfsg/OgreMain/src/OgreResourceGroupManager.cpp

it is my urdf file :

    <?xml version="1.0"?>
<robot name="wrist">
  <link name="base_link">
    <inertial>
      <origin xyz="-0.0155222222222222 0.0506514619883041 -0.0711837607475986" rpy="0 0 0" />
      <mass value="0.161357633901786" />
      <inertia ixx="0" ixy="0" ixz="0" iyy="0"  iyz="0" izz="0" />
    </inertial>
    <visual>
      <origin xyz="0 0 0" rpy="0 0 0" />
      <geometry>
        <mesh filename="file:///home/zakizadeh/catkin_ws3/src/wrist/meshes/base_link.stl" />
      </geometry>
      <material  name="">
        <color  rgba="0.941176470588235 0.674509803921569 0.117647058823529 1" />
      </material>
    </visual>
    <collision>
      <origin xyz="0 0 0" rpy="0 0 0" />
      <geometry>

        <mesh filename="file:///home/zakizadeh/catkin_ws3/src/wrist/meshes/base_link.stl" />
      </geometry>
    </collision>
  </link>
  <link name="m2_1">
    <inertial>
      <origin xyz="1.73472347597681E-18 3.46944695195361E-18 -0.0748894348894349" rpy="0 0 0" />
      <mass value="0.0767176926006627" />
      <inertia  ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0" />
    </inertial>
    <visual>
      <origin xyz="0 0 0" rpy="0 0 0" />
      <geometry>
        <mesh  filename="file:///home/zakizadeh/catkin_ws3/src/wrist/meshes/m2_1.stl" />
      </geometry>
      <material  name="">
        <color rgba="0.941176470588235 0.674509803921569 0.117647058823529 1" />
      </material>
    </visual>
    <collision>
      <origin  xyz="0 0 0" rpy="0 0 0" />
      <geometry>
        <mesh filename="file:///home/zakizadeh/catkin_ws3/src/wrist/meshes/m2_1.stl" />
      </geometry>
    </collision>
  </link>
  <joint name="m2_1"  type="continuous">
    <origin xyz="-0.0155222222222222 0.0225000000000004 0.0416514619883041" rpy="3.14159265358979 0 0" />
    <parent link="base_link" />
    <child link="m2_1" />
    <axis xyz="0 0 -1" />
  </joint>
</robot>
edit retag flag offensive close merge delete

Comments

I've changed the title of your question to better reflect what the actual problem is.

gvdhoorn gravatar imagegvdhoorn ( 2016-12-01 03:43:21 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-12-01 03:10:49 -0500

gvdhoorn gravatar image

updated 2016-12-01 03:14:25 -0500

The error simply tells you that there is no file m2_1.stl in /home/zakizadeh/catkin_ws3/src/wrist/meshes, so RViz cannot find it.

Check that you got the filename correct and that it's in the directory that you specified. What is the output of:

ls -al /home/zakizadeh/catkin_ws3/src/wrist/meshes/m2_1.stl

Note: most people run Linux with a case-sensitive file system. This means that m2_1.stl != m2_1.STL.


Edit: I'd recommend not using absolute paths, but instead using package:// for paths in urdfs. In your case: <mesh filename="package://wrist/meshes/.." />.

edit flag offensive delete link more

Comments

thanks a lot ! i can load urdf in rviz while have same error !!!

zakizadeh gravatar imagezakizadeh ( 2016-12-01 05:53:11 -0500 )edit

So did you resolve the issue? Or are you still having the same error?

gvdhoorn gravatar imagegvdhoorn ( 2016-12-01 06:11:58 -0500 )edit

i still have same error but this time urdf loading correctly !!

zakizadeh gravatar imagezakizadeh ( 2016-12-01 08:36:08 -0500 )edit

well, what is the output of ls -al /home/zakizadeh/catkin_ws3/src/wrist/meshes/m2_1.stl? Does the file actually exist?

gvdhoorn gravatar imagegvdhoorn ( 2016-12-01 08:54:11 -0500 )edit

problem is solved . thanks a lot .

zakizadeh gravatar imagezakizadeh ( 2016-12-01 11:14:02 -0500 )edit

Please tell us what you did to solve the problem. That way future readers might be able to avoid the same / similar problems.

gvdhoorn gravatar imagegvdhoorn ( 2016-12-02 04:32:03 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-12-01 03:04:19 -0500

Seen: 1,429 times

Last updated: Dec 01 '16