Ask Your Question
0

Meshes Not Displaying in RViz or Gazebo

asked 2019-10-25 07:18:46 -0600

fozzy-b gravatar image

updated 2019-10-25 08:07:22 -0600

I have a xacro file that I'm using in a launch file containing the links and joints for a car; roslaunch racecar-gazebo racecar_gazebo.launch runs successfully, as I get this: [spawn_car-3] process has finished cleanly, with no errors from gzserver, but the model meshes do not appear in gazebo or rviz. RViz does give me the OGRE EXCEPTION(6:FileNotFoundException): Cannot locate resource error when trying to load the robot model.

For all links except for spherical hinges I have between the chassis & wheels, I have meshes for displaying their visual (the spherical hinges are the only links that display in either program). Each link also contains a collision element. These meshes are pointed to in the xacro file like this: <mesh filename="$(find racecar_description)/meshes/left_front_wheel.dae" />. I'm not using <uri> or other tags as shown in the tutorials, as it appears any <mesh> tag requires a filename attribute now.

The usual things to check for: 1.) output of ls -la .../racecar_description/meshes:

-rw-r--r-- 1 bfoster domain users 1085739 Oct 18 19:39 chassis.dae
-rw-r--r-- 1 bfoster domain users   87855 Oct  9 17:41 hokuyo.dae
-rw-r--r-- 1 bfoster domain users  151374 Oct  9 17:41 left_front_wheel.dae
-rw-r--r-- 1 bfoster domain users  151654 Oct  9 17:41 left_rear_wheel.dae
-rw-r--r-- 1 bfoster domain users  154883 Oct  9 17:41 right_front_wheel.dae
-rw-r--r-- 1 bfoster domain users  154752 Oct  9 17:41 right_rear_wheel.dae

All files in my xacro code are all declared with lower-case

2.) output of rospack find racecar_description: ... src/racecar_description

3.) I even ran ls --absolute path-- | grep right_rear_wheel.dae by copying and pasting from the error message, so there's not a typo in the code.

4.) the whole xacro tag enclosing each mesh tag reads like this:

<xacro:macro name="right_rear_wheel_geometry">
  <origin xyz="0 0 0" rpy="0 0 0" />
  <geometry>
      <mesh filename="$(find racecar_description)/meshes/right_rear_wheel.dae" />
  </geometry>
</xacro:macro>

Edit:

I changed the filename from $(find racecar_decription) to package://racecar_description... and that did the trick for rviz. Gazebo still isn't reading it.

edit retag flag offensive close merge delete

Comments

So your model is visble in rviz but not in gazebo! Do you still recieve any errors after the change?

pmuthu2s gravatar imagepmuthu2s ( 2019-10-25 15:39:58 -0600 )edit

That is correct. For clarification, I am aiming to have this display in gzweb, since I'm connecting to the host machine through ssh. But can run the desktop application through ssh (three cheers for upgrading to melodic & not having to use gazebo 7!), and the meshes still do not load. I can load the collision geometries, which I've just minimized to boxes, cylinders, and the non-mesh shapes.

fozzy-b gravatar imagefozzy-b ( 2019-10-25 15:57:59 -0600 )edit

Maybe your problem lies within the DAE files. Can you check and tell me whether transparent opaque tag is set to "RGB-Zero" in your .dae file?

pmuthu2s gravatar imagepmuthu2s ( 2019-10-25 16:03:55 -0600 )edit

it looks like that tag isn't set at all. I do see it set in a model I downloaded from the db; these were custom ones created in blender & exported.

fozzy-b gravatar imagefozzy-b ( 2019-10-28 11:54:36 -0600 )edit

Do you have the model in github or something? Can you share the link if that's the case?

pmuthu2s gravatar imagepmuthu2s ( 2019-10-28 11:57:35 -0600 )edit

No, it's on an internal gitlab repo. After hours of comparing my dae file to others that will display, I remembered the browser developer tools (trying in gzweb, since gazebo over ssh still crashes immediately). Lots of 404s. So gzserver finds the meshes, but the web application expects to find the models in its model db at http/client/assets, & the files aren't there. It looks like I need to manually copy the meshes there, since there's no feature in gzweb like there is in desktop gazebo that allows the user to extend the model db.

fozzy-b gravatar imagefozzy-b ( 2019-10-29 11:32:07 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-10-30 09:10:56 -0600

fozzy-b gravatar image

This isn't a complete solution, as any future meshes included in packages around this workspace (and others) will require manually adding a simlink in the appropriate folder

So this all comes down to gzweb, which means this should have been posted on the gazebosim website. I placed a simlink in the gzweb/http/client/assets folder with the same name as my ROS package folder, so that both gazebo server and the gzweb server would point to the same place to find the meshes. Problem "solved." For now.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

2 followers

Stats

Asked: 2019-10-25 07:18:46 -0600

Seen: 45 times

Last updated: Oct 30