Ask Your Question
0

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

asked 2018-02-14 09:29:54 -0500

thepirate16 gravatar image

updated 2018-02-14 11:14:56 -0500

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" />

<link name="base_link">
      <origin rpy="3.141592654 0 3.141592654" xyz="0 0 0"/>
 </link>

<joint name="base_link_to_nessie_base_link" type="fixed">
    <parent link="base_link"/>
    <child link="nessie_base_link"/>
</joint>

  <link name="nessie_base_link">
    <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>
        <mesh filename="robot/nessie/newestexport.dae"/>
      </geometry>
    </visual>
  </link>


</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 flag offensive close merge delete

Comments

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.

gvdhoorn gravatar imagegvdhoorn ( 2018-02-14 09:39:05 -0500 )edit

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

thepirate16 gravatar imagethepirate16 ( 2018-02-14 09:50:45 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-02-14 09:55:32 -0500

gvdhoorn gravatar image

updated 2018-02-14 13:38:49 -0500

<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.

edit flag offensive delete link more

Comments

@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.

thepirate16 gravatar imagethepirate16 ( 2018-02-14 10:01:00 -0500 )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.

Javier Perez gravatar imageJavier Perez ( 2018-02-14 10:12:54 -0500 )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.

gvdhoorn gravatar imagegvdhoorn ( 2018-02-14 10:15:13 -0500 )edit

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

gvdhoorn gravatar imagegvdhoorn ( 2018-02-14 10:21:34 -0500 )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.

thepirate16 gravatar imagethepirate16 ( 2018-02-14 10:22:01 -0500 )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.

Javier Perez gravatar imageJavier Perez ( 2018-02-14 10:31:41 -0500 )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.

gvdhoorn gravatar imagegvdhoorn ( 2018-02-14 10:33:02 -0500 )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 :)

Javier Perez gravatar imageJavier Perez ( 2018-02-14 10:35:10 -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: 2018-02-14 09:29:54 -0500

Seen: 1,702 times

Last updated: Feb 14 '18