Ask Your Question
0

RViz Mesh Transparency Issue

asked 2011-12-19 10:52:30 -0600

Dave Coleman gravatar image

updated 2014-01-28 17:11:01 -0600

ngrennan gravatar image

I have just gotten our SolidWorks assembly of a custom robotic arm converted into URDF format and its joint states are successfully being updated in rviz. The issue I am currently having is an odd transparency issue where certain joint meshes are being displayed over other joint meshes when they shouldn't. Its difficult to see details of the 3d model because of this overlapping display issue. An example screenshot from rviz is below, where the left orange part should be half hidden by the grey linkage in front of it:

image description

I have the materials with opacity of 1 like so:

<material name="Black">
  <color rgba="0.0 0.0 0.0 1.0"/>
</material>

<material name="Grey">
  <color rgba="0.2 0.2 0.2 1.0"/>
</material>
etc...

And geometry defined as:

  <geometry>
    <mesh filename="../cad/arm_assemblies/stl/shoulder_pitch_link.STL" scale=".001 .001 .001" />
  </geometry>

The meshes are SolidWorks stl files. I know there have been many issues with stl file binary format being wrong, but I don't think that is the issue since as you see it mostly displays correctly. Perhaps the bug was fixed in the latest version of SolidWorks. I tried converting to .dae collada format using MeshLab on Windows but those files did not display correctly in rviz at all.

Any suggestions?

Update 1/16/11: I am still having issues with rviz displaying my robot model correctly on an Ubuntu PC. However, using the exact same code/urdf/configuration on an Ubuntu Virtual Machine (VirtualBox) running on a Mac, the model is being displayed correctly with correct transparencies. I just have to use "export OGRE_RTT_MODE=Copy" in the terminal. Using that on the PC does not work.

The main difference that I can see then is the glx vendor/driver. You can see this info by running "glxinfo".

In the working virutal machine I get this data:

name of display: :0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: Chromium
server glx version string: 1.3 Chromium
server glx extensions:
    GLX_ARB_multisample, GLX_EXT_texture_from_pixmap, GLX_SGIX_fbconfig, 
    GLX_ARB_get_proc_address
client glx vendor string: Chromium
client glx version string: 1.3 Chromium
client glx extensions:
    GLX_ARB_multisample, GLX_EXT_texture_from_pixmap, GLX_SGIX_fbconfig, 
    GLX_ARB_get_proc_address
GLX version: 1.3
GLX extensions:
    GLX_ARB_multisample, GLX_EXT_texture_from_pixmap, GLX_SGIX_fbconfig, 
    GLX_ARB_get_proc_address
OpenGL vendor string: Humper
OpenGL renderer string: Chromium
OpenGL version string: 2.1 Chromium 1.9
OpenGL shading language version string: 1.20
OpenGL extensions:

In the non-working Ubuntu PC:

name of display: :0.0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
    GLX_ARB_multisample, GLX_EXT_visual_info, GLX_EXT_visual_rating, 
    GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_OML_swap_method, 
    GLX_SGI_make_current_read, GLX_SGIS_multisample, GLX_SGIX_fbconfig, 
    GLX_SGIX_pbuffer, GLX_MESA_copy_sub_buffer, GLX_INTEL_swap_event
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
client glx extensions:
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context, 
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer, 
    GLX_MESA_swap_control, GLX_OML_swap_method, GLX_OML_sync_control, 
    GLX_SGI_make_current_read, GLX_SGI_swap_control, GLX_SGI_video_sync, 
    GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, 
    GLX_SGIX_visual_select_group, GLX_EXT_texture_from_pixmap, 
    GLX_INTEL_swap_event
GLX version: 1.4
GLX extensions:
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context, 
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_OML_swap_method, 
    GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, 
    GLX_INTEL_swap_event
OpenGL vendor string: Mesa Project
OpenGL renderer ...
(more)
edit retag flag offensive close merge delete

Comments

I notice that you're using the software renderer on your Ubuntu machine. What graphics hardware do you have? Have you tried installing the proprietary drivers?
ahendrix gravatar imageahendrix ( 2012-01-16 10:21:47 -0600 )edit
The Ubuntu PC is using an NVIDIA card. I have not tried installing proprietary drivers, I'll do so now.
Dave Coleman gravatar imageDave Coleman ( 2012-01-20 03:58:55 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2011-12-19 13:46:45 -0600

arebgun gravatar image

I had the same issue with my robot model and RViz. Although as far as I remember I only had this problem on certain computers and not others (e.g. on my laptop it would show wrong, but worked fine on the desktop). The way around it is to put the alpha value to 1.0 on the robot model (disables transparency for the robot model).

edit flag offensive delete link more

Comments

Where in the .urdf file does one set the alpha value to 1.0? In the <material> code, above, I have the 4th color value, the alpha value, set to 1.0. Is there somewhere else to set this?
Dave Coleman gravatar imageDave Coleman ( 2011-12-21 06:59:48 -0600 )edit
Oh, I was actually talking about rviz, set alpha of the robot model to 1 in rviz.
arebgun gravatar imagearebgun ( 2011-12-21 07:04:15 -0600 )edit
I already have this set at 1. And actually I find with my current issue its actually easier to see the model with the alpha set to .99
Dave Coleman gravatar imageDave Coleman ( 2012-01-16 07:21:02 -0600 )edit
0

answered 2011-12-19 13:11:18 -0600

dornhege gravatar image

I've had some weird issues with that, too. At the end, the only fix I found was simplifying/changing the geometry before exporting from solidworks.

Have you checked in Meshlab or similar that the single meshes at least display correctly there? Maybe it's just a simple normals.

edit flag offensive delete link more

Comments

The .stl mesh files opened and looked fine in Meshlab. I'm afraid I am not exactly sure what you mean by simple normals... is there a way to change the type of geometry or the direction the normals point?
Dave Coleman gravatar imageDave Coleman ( 2011-12-21 07:02:46 -0600 )edit
Yes, you could chose flip normals or similar in meshlab, but if that displays fine it should be fine in rviz. I was at the same point and the only solution I found was to just edit the mesh.
dornhege gravatar imagedornhege ( 2011-12-23 06:50:59 -0600 )edit
I would do that but I have found that everything displays correctly in rviz on my macbook pro using an ubuntu virtualbox vm. It just has issues on a Ubuntu PC.
Dave Coleman gravatar imageDave Coleman ( 2012-01-16 07:21:59 -0600 )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: 2011-12-19 10:52:30 -0600

Seen: 1,326 times

Last updated: Jan 16 '12