# RViz doesn't load .dae mesh. Cannot locate it.

I am trying to load an underwater robot mesh in RViz. Because I could not do this with a .osg file, I converted it to .dae with Blender. Even though I have done that, RViz is still not able to load it (it doesn't even locate it although, of course, the file is there).

The file is called newestexport.dae.

The error is the following:

[ERROR] [1518623879.761036843]: Could not load resource [robot/nessie/newestexport.dae]: Unable to open file "robot/nessie/newestexport.dae". [ERROR] [1518623879.761668482]: Could not load model 'robot/nessie/newestexport.dae' for link 'nessie_base_link': OGRE EXCEPTION(6:FileNotFoundException): Cannot locate resource robot/nessie/newestexport.dae 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)

Also, Meshlab and Blender are able to open the mesh without any problem.

The name of the file is correct. So that is discarded.

Any thoughts?

EDIT: I show the .URDF file that calls the mesh:

    <?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="nessie" >

<xacro:property name="pi" value="3.141592654" />

<origin rpy="3.141592654 0 3.141592654" xyz="0 0 0"/>

</joint>

<inertial>
<mass value="95" />
<inertia ixx="100"  ixy="0"  ixz="0" iyy="100" iyz="0" izz="100" />
</inertial>
<visual>
<origin rpy="-${pi/2} 0${pi}" xyz="-0.2 0 0.75"/>
<geometry>
</geometry>
</visual>

</robot>


Thank you.

UPDATE: If you change the path "robot/nessie/newestexport.dae" for ithe absolute path "/home/daniel/.uwsim/data/robot/nessie/newestexport.dae" it doesn't work, the error still appears. Nor if you put it in the /home/daniel folder.

edit retag close merge delete

Are you sure the URDF matches with the error message?

I ask because the error message mentions robot/nessie/newestexport.dae, while the URDF has /home/daniel/.uwsim/data/robot/nessie/newestexport.dae. That is a different path.

( 2018-02-14 09:39:05 -0600 )edit

@gvdhoorn Sorry. I posted the wrong file. I update it now.

( 2018-02-14 09:50:45 -0600 )edit

Sort by » oldest newest most voted
<mesh filename="robot/nessie/newestexport.dae"/>


This is not an absolute path, so I believe rviz would try to load that mesh relative to its working directory, which is probably $HOME/.ros (ie: $ROS_HOME, see roslaunch/XML/node). Concatenating those would give: $HOME/.ros/robot/nessie/newestexport.dae. Can you try specifying either: • an absolute path to the file • or place it in a ROS pkg and use $(find PKG_NAME)/path/to/file/in/package

Edit:

I tried to put the file in /home/daniel/ but it is not working either. Could not load resource [/home/daniel/newestexport.dae]: Unable to open file "/home/daniel/newestexport.dae".. Same error

as @Javier Perez mentions, RViz uses resource_retriever to load meshes.

That package accepts any URL, so an absolute path on the local filesystem should be prefixed with file://. In your case it would be file:///home/daniel/newestexport.dae (the three forward slashes are required).

But note that this will probably make UWSim unhappy.

more

@gvdhoorn I did put the absolute path, and the error still appears. I guess the path is not a problem as one folder is an autogenerated folder of UWSim. Like a direct dependency.

( 2018-02-14 10:01:00 -0600 )edit

I guess the misunderstanding comes from the fact that UWSim uses URDF files assuming the meshes are inside its autogenerated folder. However this makes this files not loadable by rviz. SO it is a matter of choosing the right path.

( 2018-02-14 10:12:54 -0600 )edit

I did put the absolute path, and the error still appears

with an absolute path RViz can still not load the file? That seems strange.

( 2018-02-14 10:15:13 -0600 )edit

@Javier Perez: if this is UWSim specific behaviour, then perhaps you should post your comment as an answer?

( 2018-02-14 10:21:34 -0600 )edit

@Javier Perez what do you mean with "not loadable"? .uwsim is a hidden folder, a part from that if the absolute path is given the file should be found.

( 2018-02-14 10:22:01 -0600 )edit

UWSim expects to find a relative path from ~/.uwsim, while rviz expects a "package://XXX" or "file://XXX" prefix so the same .urdf will not load on both systems if I'm not wrong, It has been some months without working on this.

( 2018-02-14 10:31:41 -0600 )edit

It's not too nice, but perhaps a symlink linking the mesh in a package to a subdir in the .uwsim dir could work.

( 2018-02-14 10:33:02 -0600 )edit

Sorry for double posting, but I think rviz uses a resource retriever: http://wiki.ros.org/resource_retriever have a look at the syntax and everything should be fine :)

( 2018-02-14 10:35:10 -0600 )edit