Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VMWare rendering: Z Ordering Appears Random #1837

Closed
osrf-migration opened this issue Jan 19, 2016 · 64 comments
Closed

VMWare rendering: Z Ordering Appears Random #1837

osrf-migration opened this issue Jan 19, 2016 · 64 comments
Labels
2.0 bug Something isn't working major rendering

Comments

@osrf-migration
Copy link

Original report (archived issue) by Xander Dunn (Bitbucket: xanderdunn).


We have two simulations in Gazebo: A pendulum and an acrobot.

We have the simulations arranged such that the arms are facing the camera. However, at runtime it appears random what ordering the links are actually rendered at. Without making any changes, if the simulation is started many times, each run of the simulation will start with an unpredictable ordering.

From one run, here you can see a pendulum with an expected ordering:

img_1000.png

The black link of the pendulum is in front of the brown post.

Randomly, on different runs, we'll see the opposite configuration, where the black link is rendered behind the brown post:

img_1000.png

With an acrobot, that has more parts in the Z direction, there end up being more unpredictable outcomes. Here's one example:

screen_shot_2016-01-19_at_11.20.58_am_720.png

The dark blue link is the top link (drawn behind the post). The bottom link is light blue, drawn in front of the post. This configuration of parts is physically impossible.

@osrf-migration
Copy link
Author

Original comment by Xander Dunn (Bitbucket: xanderdunn).


  • Edited issue description

1 similar comment
@osrf-migration
Copy link
Author

Original comment by Xander Dunn (Bitbucket: xanderdunn).


  • Edited issue description

@osrf-migration
Copy link
Author

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


Can you share the world and model files that you are using?

@osrf-migration
Copy link
Author

Original comment by Xander Dunn (Bitbucket: xanderdunn).


Here is a simple scene where we reproduce the problem. It's a table, bookshelf, and soda can. In this screenshot of the Gazebo GUI, you can see the scene rendered properly:

screen_shot_2016-01-19_at_12.53.38_pm_720.png

The soda can is closest to the camera, the bookshelf is next, and finally a table is furthest away from the camera.

However, when this scene is captured as an image through the in-scene camera object, it's not rendered correctly:

default_camera_link_camera_1_-0330_360.jpg

The objects don't seem to be in the correct order. The table certainly shouldn't be seen going through the bookshelf.

Note that the examples I showed above of the pendulum and acrobot were also using the in-scene camera.

Thanks!

@osrf-migration
Copy link
Author

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


which version of gazebo are you using? I just tried opening that world with the latest version of gazebo built from source, and it doesn't have this error (actually I modified the camera position slightly so the camera visual wouldn't overlap the bookshelf)

I wonder if the OS / video card / video driver may have an effect as well

cam_z_order.png

--- cam-1.world	2016-01-19 13:37:02.747699128 -0800
+++ cam.world	2016-01-19 13:33:44.151699221 -0800
@@ -517,7 +517,7 @@
         <self_collide>0</self_collide>
         <kinematic>0</kinematic>
       </link>
-      <pose frame=''>0.667547 -3.42521 0 0 -0 0</pose>
+      <pose frame=''>0.667547 -3.6 0 0 -0 0</pose>
     </model>
     <state world_name='default'>
       <sim_time>449 441000000</sim_time>
@@ -555,10 +555,10 @@
         </link>
       </model>
       <model name='camera'>
-        <pose frame=''>0.667547 -3.42521 0.22092 -0.018695 -0.149607 1.51876</pose>
+        <pose frame=''>0.667547 -3.6 0.22092 -0.018695 -0.149607 1.51876</pose>
         <scale>1 1 1</scale>
         <link name='link'>
-          <pose frame=''>0.618881 -3.38049 0.276881 -0.018695 -0.149607 1.51876</pose>
+          <pose frame=''>0.618881 -3.55 0.276881 -0.018695 -0.149607 1.51876</pose>
           <velocity>0 0 0 0 -0 0</velocity>
           <acceleration>0 0 0 0 -0 0</acceleration>
           <wrench>0 0 0 0 -0 0</wrench>

@osrf-migration
Copy link
Author

Original comment by Xander Dunn (Bitbucket: xanderdunn).


Thanks for testing! We're using ROS Indigo, so we're using the compatible Gazebo 2.

The issue is identical across three different setups: Mac OSX 10.11 MacBook Pro, Ubuntu 14.04 MacBook Pro, and Ubuntu 14.04 AWS c4 instances.

It's strange that it always renders correctly in the Gazebo GUI but often not in scene camera output.

Considering the age of gazebo 2 and the fact that it doesn't reproduce on latest, perhaps it's since been fixed. We're hoping to figure out some solution for current stable ROS.

@osrf-migration
Copy link
Author

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


You can try using the ros-indigo-gazeboN-ros-pkgs debian binaries if you want to test a newer version of gazebo

I'll try testing with an older version of gazebo as well

@osrf-migration
Copy link
Author

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


It works properly for me with gazebo5 on trusty

@osrf-migration
Copy link
Author

Original comment by Daniele E. Domenichelli (Bitbucket: drdanz).


I cannot reproduce it all the times, but I can confirm this bug on gazebo 6.5.1 on ubuntu trusty from the repository (6.5.1-1~trusty).

Here's a couple of screenshots

Screenshot from 2016-01-21 07^%25^%01.png

gazebo_issue_1837.png

@osrf-migration
Copy link
Author

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


Your problem may be associated with vmware. We have never had great experiences using virtual machines and offscreen rendering.

@osrf-migration
Copy link
Author

Original comment by Ian Chen (Bitbucket: Ian Chen, GitHub: iche033).


I've also been testing this but couldn't reproduce the problem. z-ordering.png

It could be what @nkoenig said about problem with running gazebo in a VM. Otherwise, what graphics card and driver are you using? Gazebo has been tested most on nvidia cards.

@osrf-migration
Copy link
Author

Original comment by Xander Dunn (Bitbucket: xanderdunn).


Many thanks @iche033, @nkoenig, and @drdanz for your input.

Yes, we were able to reproduce the issue in Gazebo 6.5.1 on Trusty. We are indeed running Gazebo in a virtual machine. We've tried in both VMWare and VirtualBox. In Virtual Box we used a virtual frame buffer with software GL. In VMWare we used the driver provided by VMWare.

We can try running it on a physical Ubuntu machine, but ultimately this will be a problem for high performance computing since we deploy everything as Docker containers onto Amazon Web Services machines.

As @drdanz noticed, we don't see this all the time. We see it in approximately half of our runs, where a single run consists of starting up Gazebo a single time. Any given run will either always or never show the issue.

@osrf-migration
Copy link
Author

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


There are AWS instances with GPU's that we have used with gazebo, though they are more expensive. @hugomatic know the most on this subject.

@osrf-migration
Copy link
Author

Original comment by Xander Dunn (Bitbucket: xanderdunn).


Testing locally on a MacBook Pro with an nvidia card running Gazebo in VMWare with graphics acceleration still shows the issue, so the AWS instance type alone isn't likely to solve it.

@osrf-migration
Copy link
Author

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


I meant that you could run gazebo natively on the AWS Ubuntu instance.

You can also run gazebo natively on your Macbook. Have you tried these instructions:

@osrf-migration
Copy link
Author

Original comment by Xander Dunn (Bitbucket: xanderdunn).


Yes, we will test running it directly, outside of the virtual machine. The difficulty is scaling this across tens of thousands of Amazon runs. Everything inside virtual machines is the standard practice.

@osrf-migration
Copy link
Author

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


  • changed title from "Z Ordering Appears Random" to "VMWare rendering: Z Ordering Appears Random"

@osrf-migration
Copy link
Author

Original comment by Christian Rose (Bitbucket: toxcjr).


I would like to add, that I have this issue also with gazebo6 running native in ubuntu 14.04.

So from my side, the virtual machine is not the problem. The exact setup is working on my second laptop with out problems. Maybe there is so issue with the gpu used.

Here is a picture from gazebo:

gazebo6.png

And this is the display from rviz:

rviz.png

As you can see the blue barrel is missing and the floor looks strange.

@osrf-migration
Copy link
Author

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


@toxcjr can you describe your hardware setup that has this problem? You said it is running Ubuntu natively; what is the video card and driver? Also, perhaps the output of glxinfo?

@osrf-migration
Copy link
Author

Original comment by Christian Rose (Bitbucket: toxcjr).


Hi.

I'm running ubuntu 14.04 native on a toshiba laptop:

  • CPU: Intel® Core™ i5 CPU M 520
  • GPU: Intel® Ironlake Mobile
  • RAM: 8GB

This is the glxinfo output:

#!xml

name of display: :0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_profile, 
    GLX_ARB_fbconfig_float, GLX_ARB_framebuffer_sRGB, GLX_ARB_multisample, 
    GLX_EXT_create_context_es2_profile, GLX_EXT_framebuffer_sRGB, 
    GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, 
    GLX_EXT_visual_rating, GLX_INTEL_swap_event, GLX_MESA_copy_sub_buffer, 
    GLX_OML_swap_method, GLX_SGIS_multisample, GLX_SGIX_fbconfig, 
    GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group, GLX_SGI_swap_control
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
client glx extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_profile, 
    GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float, 
    GLX_ARB_framebuffer_sRGB, GLX_ARB_get_proc_address, GLX_ARB_multisample, 
    GLX_EXT_buffer_age, GLX_EXT_create_context_es2_profile, 
    GLX_EXT_fbconfig_packed_float, GLX_EXT_framebuffer_sRGB, 
    GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, 
    GLX_EXT_visual_rating, GLX_INTEL_swap_event, GLX_MESA_copy_sub_buffer, 
    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer, 
    GLX_MESA_swap_control, GLX_OML_swap_method, GLX_OML_sync_control, 
    GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, 
    GLX_SGIX_visual_select_group, GLX_SGI_make_current_read, 
    GLX_SGI_swap_control, GLX_SGI_video_sync
GLX version: 1.4
GLX extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_profile, 
    GLX_ARB_fbconfig_float, GLX_ARB_framebuffer_sRGB, 
    GLX_ARB_get_proc_address, GLX_ARB_multisample, 
    GLX_EXT_create_context_es2_profile, GLX_EXT_framebuffer_sRGB, 
    GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, 
    GLX_EXT_visual_rating, GLX_INTEL_swap_event, GLX_MESA_copy_sub_buffer, 
    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer, 
    GLX_MESA_swap_control, GLX_OML_swap_method, GLX_OML_sync_control, 
    GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, 
    GLX_SGIX_visual_select_group, GLX_SGI_make_current_read, 
    GLX_SGI_swap_control, GLX_SGI_video_sync
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Ironlake Mobile 
OpenGL version string: 2.1 Mesa 10.3.2
OpenGL shading language version string: 1.20
OpenGL extensions:
    GL_3DFX_texture_compression_FXT1, GL_AMD_performance_monitor, 
    GL_AMD_seamless_cubemap_per_texture, GL_AMD_shader_trinary_minmax, 
    GL_ANGLE_texture_compression_dxt3, GL_ANGLE_texture_compression_dxt5, 
    GL_APPLE_object_purgeable, GL_APPLE_packed_pixels, 
    GL_APPLE_vertex_array_object, GL_ARB_ES2_compatibility, 
    GL_ARB_buffer_storage, GL_ARB_clear_buffer_object, GL_ARB_clear_texture, 
    GL_ARB_color_buffer_float, GL_ARB_compressed_texture_pixel_storage, 
    GL_ARB_copy_buffer, GL_ARB_copy_image, GL_ARB_debug_output, 
    GL_ARB_depth_buffer_float, GL_ARB_depth_clamp, GL_ARB_depth_texture, 
    GL_ARB_draw_buffers, GL_ARB_draw_elements_base_vertex, 
    GL_ARB_draw_instanced, GL_ARB_explicit_attrib_location, 
    GL_ARB_explicit_uniform_location, GL_ARB_fragment_coord_conventions, 
    GL_ARB_fragment_program, GL_ARB_fragment_program_shadow, 
    GL_ARB_fragment_shader, GL_ARB_framebuffer_object, 
    GL_ARB_framebuffer_sRGB, GL_ARB_get_program_binary, 
    GL_ARB_half_float_pixel, GL_ARB_half_float_vertex, 
    GL_ARB_instanced_arrays, GL_ARB_internalformat_query, 
    GL_ARB_invalidate_subdata, GL_ARB_map_buffer_alignment, 
    GL_ARB_map_buffer_range, GL_ARB_multi_bind, GL_ARB_multisample, 
    GL_ARB_multitexture, GL_ARB_occlusion_query, GL_ARB_occlusion_query2, 
    GL_ARB_pixel_buffer_object, GL_ARB_point_parameters, GL_ARB_point_sprite, 
    GL_ARB_provoking_vertex, GL_ARB_robustness, GL_ARB_sampler_objects, 
    GL_ARB_seamless_cube_map, GL_ARB_seamless_cubemap_per_texture, 
    GL_ARB_separate_shader_objects, GL_ARB_shader_bit_encoding, 
    GL_ARB_shader_objects, GL_ARB_shader_texture_lod, 
    GL_ARB_shading_language_100, GL_ARB_shadow, GL_ARB_sync, 
    GL_ARB_texture_border_clamp, GL_ARB_texture_compression, 
    GL_ARB_texture_compression_rgtc, GL_ARB_texture_cube_map, 
    GL_ARB_texture_env_add, GL_ARB_texture_env_combine, 
    GL_ARB_texture_env_crossbar, GL_ARB_texture_env_dot3, 
    GL_ARB_texture_float, GL_ARB_texture_mirror_clamp_to_edge, 
    GL_ARB_texture_mirrored_repeat, GL_ARB_texture_non_power_of_two, 
    GL_ARB_texture_query_lod, GL_ARB_texture_rectangle, GL_ARB_texture_rg, 
    GL_ARB_texture_rgb10_a2ui, GL_ARB_texture_storage, GL_ARB_texture_swizzle, 
    GL_ARB_transpose_matrix, GL_ARB_vertex_array_bgra, 
    GL_ARB_vertex_array_object, GL_ARB_vertex_attrib_binding, 
    GL_ARB_vertex_buffer_object, GL_ARB_vertex_program, GL_ARB_vertex_shader, 
    GL_ARB_vertex_type_10f_11f_11f_rev, GL_ARB_vertex_type_2_10_10_10_rev, 
    GL_ARB_window_pos, GL_ATI_blend_equation_separate, GL_ATI_draw_buffers, 
    GL_ATI_separate_stencil, GL_ATI_texture_env_combine3, 
    GL_ATI_texture_float, GL_EXT_abgr, GL_EXT_bgra, GL_EXT_blend_color, 
    GL_EXT_blend_equation_separate, GL_EXT_blend_func_separate, 
    GL_EXT_blend_minmax, GL_EXT_blend_subtract, GL_EXT_compiled_vertex_array, 
    GL_EXT_copy_texture, GL_EXT_draw_buffers2, GL_EXT_draw_instanced, 
    GL_EXT_draw_range_elements, GL_EXT_fog_coord, GL_EXT_framebuffer_blit, 
    GL_EXT_framebuffer_object, GL_EXT_framebuffer_sRGB, 
    GL_EXT_gpu_program_parameters, GL_EXT_multi_draw_arrays, 
    GL_EXT_packed_depth_stencil, GL_EXT_packed_float, GL_EXT_packed_pixels, 
    GL_EXT_pixel_buffer_object, GL_EXT_point_parameters, 
    GL_EXT_polygon_offset, GL_EXT_provoking_vertex, GL_EXT_rescale_normal, 
    GL_EXT_secondary_color, GL_EXT_separate_specular_color, 
    GL_EXT_shadow_funcs, GL_EXT_stencil_two_side, GL_EXT_stencil_wrap, 
    GL_EXT_subtexture, GL_EXT_texture, GL_EXT_texture3D, 
    GL_EXT_texture_array, GL_EXT_texture_compression_dxt1, 
    GL_EXT_texture_compression_rgtc, GL_EXT_texture_compression_s3tc, 
    GL_EXT_texture_cube_map, GL_EXT_texture_edge_clamp, 
    GL_EXT_texture_env_add, GL_EXT_texture_env_combine, 
    GL_EXT_texture_env_dot3, GL_EXT_texture_filter_anisotropic, 
    GL_EXT_texture_integer, GL_EXT_texture_lod_bias, GL_EXT_texture_object, 
    GL_EXT_texture_rectangle, GL_EXT_texture_sRGB, GL_EXT_texture_sRGB_decode, 
    GL_EXT_texture_shared_exponent, GL_EXT_texture_snorm, 
    GL_EXT_texture_swizzle, GL_EXT_timer_query, GL_EXT_vertex_array, 
    GL_EXT_vertex_array_bgra, GL_IBM_multimode_draw_arrays, 
    GL_IBM_rasterpos_clip, GL_IBM_texture_mirrored_repeat, 
    GL_INGR_blend_func_separate, GL_INTEL_performance_query, GL_KHR_debug, 
    GL_MESA_pack_invert, GL_MESA_texture_signed_rgba, GL_MESA_window_pos, 
    GL_NV_blend_square, GL_NV_conditional_render, GL_NV_depth_clamp, 
    GL_NV_light_max_exponent, GL_NV_packed_depth_stencil, 
    GL_NV_primitive_restart, GL_NV_texgen_reflection, 
    GL_NV_texture_env_combine4, GL_NV_texture_rectangle, GL_OES_EGL_image, 
    GL_OES_read_format, GL_S3_s3tc, GL_SGIS_generate_mipmap, 
    GL_SGIS_texture_border_clamp, GL_SGIS_texture_edge_clamp, 
    GL_SGIS_texture_lod, GL_SUN_multi_draw_arrays

OpenGL ES profile version string: OpenGL ES 2.0 Mesa 10.3.2
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16
OpenGL ES profile extensions:
    GL_ANGLE_texture_compression_dxt3, GL_ANGLE_texture_compression_dxt5, 
    GL_APPLE_texture_max_level, GL_EXT_blend_minmax, 
    GL_EXT_discard_framebuffer, GL_EXT_map_buffer_range, 
    GL_EXT_multi_draw_arrays, GL_EXT_read_format_bgra, 
    GL_EXT_separate_shader_objects, GL_EXT_texture_compression_dxt1, 
    GL_EXT_texture_filter_anisotropic, GL_EXT_texture_format_BGRA8888, 
    GL_EXT_texture_rg, GL_EXT_texture_type_2_10_10_10_REV, 
    GL_EXT_unpack_subimage, GL_INTEL_performance_query, GL_NV_draw_buffers, 
    GL_NV_fbo_color_attachments, GL_NV_read_buffer, GL_OES_EGL_image, 
    GL_OES_EGL_image_external, GL_OES_compressed_ETC1_RGB8_texture, 
    GL_OES_depth24, GL_OES_depth_texture, GL_OES_element_index_uint, 
    GL_OES_fbo_render_mipmap, GL_OES_get_program_binary, GL_OES_mapbuffer, 
    GL_OES_packed_depth_stencil, GL_OES_rgb8_rgba8, 
    GL_OES_standard_derivatives, GL_OES_stencil8, GL_OES_surfaceless_context, 
    GL_OES_texture_3D, GL_OES_texture_npot, GL_OES_vertex_array_object

12 GLX Visuals
    visual  x   bf lv rg d st  colorbuffer  sr ax dp st accumbuffer  ms  cav
  id dep cl sp  sz l  ci b ro  r  g  b  a F gb bf th cl  r  g  b  a ns b eat
----------------------------------------------------------------------------
0x020 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x021 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x078 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 None
0x079 24 tc  0  32  0 r  . .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 None
0x07a 24 tc  0  32  0 r  . .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x07b 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8 16 16 16 16  0 0 Slow
0x07c 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 None
0x07d 24 dc  0  32  0 r  . .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 None
0x07e 24 dc  0  32  0 r  . .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x07f 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x080 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8 16 16 16 16  0 0 Slow
0x05f 32 tc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None

24 GLXFBConfigs:
    visual  x   bf lv rg d st  colorbuffer  sr ax dp st accumbuffer  ms  cav
  id dep cl sp  sz l  ci b ro  r  g  b  a F gb bf th cl  r  g  b  a ns b eat
----------------------------------------------------------------------------
0x060  0 tc  0  16  0 r  y .   5  6  5  0 .  .  0  0  0  0  0  0  0  0 0 None
0x061  0 tc  0  16  0 r  . .   5  6  5  0 .  .  0  0  0  0  0  0  0  0 0 None
0x062  0 tc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
0x063  0 tc  0  16  0 r  . .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
0x064 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 None
0x065 24 tc  0  32  0 r  . .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 None
0x066 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x067 24 tc  0  32  0 r  . .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x068  0 tc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
0x069  0 tc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0 16 16 16  0  0 0 Slow
0x06a 32 tc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x06b 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8 16 16 16 16  0 0 Slow
0x06c  0 dc  0  16  0 r  y .   5  6  5  0 .  .  0  0  0  0  0  0  0  0 0 None
0x06d  0 dc  0  16  0 r  . .   5  6  5  0 .  .  0  0  0  0  0  0  0  0 0 None
0x06e  0 dc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
0x06f  0 dc  0  16  0 r  . .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
0x070 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 None
0x071 24 dc  0  32  0 r  . .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 None
0x072 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x073 24 dc  0  32  0 r  . .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x074  0 dc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
0x075  0 dc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0 16 16 16  0  0 0 Slow
0x076 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x077 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8 16 16 16 16  0 0 Slow


lshw -c video | grep 'configuration' gives:

#!xml

configuration: driver=i915 latency=0

So i would say the system uses the intel i915 driver.

Let me know what you need more.

@osrf-migration
Copy link
Author

Original comment by Christian Rose (Bitbucket: toxcjr).


Hi,

is there anything I can do to get further help with this issue? Please let me know.

Best regards

Christian

@osrf-migration
Copy link
Author

Original comment by Ian Chen (Bitbucket: Ian Chen, GitHub: iche033).


looking at your screenshot, is the blue barrel completely gone (even when viewed from the other side of the wall) or is it the z-ordering problem?

@osrf-migration
Copy link
Author

Original comment by Christian Rose (Bitbucket: toxcjr).


It is a z-ordering problem.

I placed the robot on the other side and checked the blue barrel. The result is this:

rviz.png

With the robot facing the lower barrel in this setup:

gazebo.png

As you can see the blue barrel is not visible in the image shown in rviz.

As next step I removed the wall in front of the robot. This is the view in gazebo:

gazebo2.png

The output in rviz shows this:

rviz2.png

So the blue barrel is not gone, the ordering of the objects is wrong.

Hope this helps.

@osrf-migration
Copy link
Author

Original comment by Xander Dunn (Bitbucket: xanderdunn).


One of our engineers discovered that setting fsaa to 0 in Camera::CreateRenderTexture (gazebo/rendering/Camera.cc) solves the Z ordering problem for us using software driver in a virtual machine for both Gazebo 6.5.1 and 7.0.0.

Before:

screen_shot_2016-04-08_at_6.09.37_pm_1024.png

After setting fsaa to 0:

screen_shot_2016-04-08_at_6.12.56_pm_1024.png

@osrf-migration
Copy link
Author

Original comment by Ian Chen (Bitbucket: Ian Chen, GitHub: iche033).


That's a good find, thanks for letting us know! Sorry haven't been able to spend much time digging into this issue.

I'll look into exposing the fsaa setting via a public function like SetFSAA. Later on maybe we'll think about letting user configure various graphics properties in sdf.

@osrf-migration
Copy link
Author

Original comment by Shridhar Shah (Bitbucket: skshah).


I was also facing the same issue. This is the link to my post.

Thanks for providing a solution. I tried to build Gazebo 2.2.6 (as it ships with ROS Indigo, which I am trying to fix) with the above change but it did not resolve the issue. Is it possible that his resolution only works in newer versions of gazebo?

@osrf-migration
Copy link
Author

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


@iche033 is it alright if we assign this issue to you?

@osrf-migration
Copy link
Author

Original comment by Ian Chen (Bitbucket: Ian Chen, GitHub: iche033).


@scpeters ok

@sk1234 Not sure. You can give it a try on gazebo versions 5 or above. If that works for you, I'll implement the workaround.

@osrf-migration
Copy link
Author

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


  • set assignee_account_id to "557058:10b01d41-a2e9-4a41-a907-e6e2f03b6cd5"
  • set assignee to "iche033 (Bitbucket: iche033, GitHub: iche033)"

thanks Ian!

@osrf-migration
Copy link
Author

Original comment by Ryan McNulty (Bitbucket: rmmcnulty9).


@iche033, do you have any updates on this? I am seeing the same problem as @sk1234 on Gazebo 7.0.0 from the PPA.

For my application, I don't think I would be able to compile from source. It would be nice to be able to set fsaa from the urdf/sdf file.

Thanks!

@osrf-migration
Copy link
Author

Original comment by Jariullah Safi (Bitbucket: safijari).


Sounds good, I can write a quick post for compiling from source too (instructions here don't work for 14.04).

@vkpetkov what is your environment? (linux version, ROS or no ROS, version of ROS, etc).

@osrf-migration
Copy link
Author

Original comment by Ian Chen (Bitbucket: Ian Chen, GitHub: iche033).


@safijari if you like, you can submit a pull request to gazebo_tutorials to fix the instructions

This is the file to edit

@osrf-migration
Copy link
Author

Original comment by Jariullah Safi (Bitbucket: safijari).


@sk1234 I just tested the fix for Gazebo 2.2 from an Indigo install and it works for me. Do you still need a fix for this?

@osrf-migration
Copy link
Author

Original comment by Jariullah Safi (Bitbucket: safijari).


Instructions for compiling from source (and potentially useful easier fix) here for those using Ubuntu 14.04 with ROS Indigo and the stock Gazebo 2.

@osrf-migration
Copy link
Author

Original comment by vkpetkov (Bitbucket: vkpetkov).


For me Gazebo 2 was not running with 3D Acceleration in VMWare at all whereas 7 was OK. But I fixed it by following the advice of Hugo Rodde:

"I had the same issue trying to use Gazebo along with ROS."

My solution was to downgrade OpenGL from 3.3 to 2.1 as written here: http://www.mesa3d.org/vmware-guest.html

Info:

  • Ubuntu 14.04
  • VMware Fusion 8

[quote]
OpenGL 3.3 support can be disabled by setting the environment variable SVGA_VGPU10=0. You will then have OpenGL 2.1 support. This may be useful to work around application bugs (such as incorrect use of the OpenGL 3.x core profile).
[/quote]

So do the following:
$ echo "export SVGA_VGPU10=0" >> ~/.bashrc

I will have to check whether this helps with the z-rendering error in gazebo 2.

@osrf-migration
Copy link
Author

Original comment by Jariullah Safi (Bitbucket: safijari).


That unfortunately does not fix the problem for Gazebo 2 (Ubuntu 14.04) on my end unfortunately. I also tried it with Gazebo 7 (Ubuntu 16.04, alongside Kinetic) and I get the following error

[gazebo-1] process has died [pid 11484, exit code 255, cmd /opt/ros/kinetic/lib/gazebo_ros/gzserver -e ode /opt/ros/kinetic/share/turtlebot_gazebo/worlds/playground.world __name:=gazebo __log:=/home/user/.ros/log/1a03a512-7c1c-11e6-89e0-000c29240c4b/gazebo-1.log].
log file: /home/user/.ros/log/1a03a512-7c1c-11e6-89e0-000c29240c4b/gazebo-1*.log

Unfortunately the mentioned log file doesn't seem to exist :\

@osrf-migration
Copy link
Author

Original comment by Hans Dermot Doran (Bitbucket: HDoran).


Does anyone have a compiled version with this fix available for download? Would it not be possible to make a source code branch for VM users?

@osrf-migration
Copy link
Author

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


The fix is in the gazebo 7.4.0 debian. Can you try that?

@osrf-migration
Copy link
Author

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


  • changed state from "new" to "resolved"

Resolved in pull request #2449.

@osrf-migration
Copy link
Author

Original comment by Baris Ustun (Bitbucket: bustun).


Hi, I am new to ubuntu. I've installed gazebo using 'sudo apt-get install ros-kinetic-desktop-full'. it installed version 7.0.
Now I want to install 7.4.0 debian. as you suggested.
Can you show me a way ?
because when I try to install by "sudo apt-get install gazebo7" it says nothing new to install.

@osrf-migration
Copy link
Author

Original comment by Sharvashish Das (Bitbucket: SRV_kgp).


@bustun by default the gazebo version 7.0.0 is installed when installed via ROS-kinetic. Follow this link: http://gazebosim.org/tutorials?tut=install_ubuntu to install latest gazebo binary.

@osrf-migration
Copy link
Author

Original comment by Baris Ustun (Bitbucket: bustun).


ok. I installed it. thanks

@osrf-migration
Copy link
Author

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


Let us know if it works, or does not work.

@osrf-migration
Copy link
Author

Original comment by Baris Ustun (Bitbucket: bustun).


I managed to install. and the camera view appeared in Rviz.
thx

@osrf-migration
Copy link
Author

Original comment by Jordan Liviero (Bitbucket: jliviero).


Worked for us @nkoenig.

Prior to fix:
sim-94-depth.png

Post-fix:
sim-94-depth-with-gz7-4.png

Note the floating objects behind the dumpster, which are visible prior but not visible post. Also, the textures on those floating objects are now rendered, when they were not previously. Good work!

@osrf-migration
Copy link
Author

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


  • changed state from "resolved" to "closed"

Confirmed by reporters.

@osrf-migration
Copy link
Author

Original comment by Jordan Liviero (Bitbucket: jliviero).


@nkoenig be advised that I'm not one of the original reporters, just an interested party.

@osrf-migration
Copy link
Author

Original comment by Gonzalo Bulnes Guilpain (Bitbucket: gonzalo-bulnes).


Hi everyone,

TL;DR: I can confirm that installing Gazebo 7.4.0 solves the issue.

Details:

I was running Gazebo 7.0.0 and ROS Kinetic in an Ubuntu 16.04 virtual machine (VirtualBox 5.0.28, on a OS X 10.11.3 host). And Gazebo was crashing when I tried to echo any camera-related topic:

# Terminal 1
roslaunch turtlebot_gazebo turtlebot_world.launch # requires the ros-kinetic-turtlebot-gazebo Ubuntu package

# Terminal 2
rostopic echo /cmd_vel_mux/input/teleop # outputs the motion commands as expected
---
linear: 
  x: 0.5
  y: 0.0
  z: 0.0
angular: 
  x: 0.0
  y: 0.0
  z: 0.0
---
linear: 
  x: 0.0
  y: 0.0
  z: 0.0
angular: 
  x: 0.0
  y: 0.0
  z: 0.0

rostopic echo /clock   # outputs the simulated clock ticks as expected
---
clock: 
  secs: 1009
  nsecs: 200000000
---
clock: 
  secs: 1009
  nsecs: 210000000
---
clock: 
  secs: 1009
  nsecs: 220000000

rostopic list | grep depth/
/camera/depth/camera_info
/camera/depth/image_raw
/camera/depth/points

# But trying to echo any camera-related topic outputs:
rostopic echo /camera/rgb/camera_info 
WARNING: no messages received and simulated time is active.
Is /clock being published?

# and also crashes Gazebo in Terminal 1 with the following error message:
gzserver: /build/ogre-1.9-mqY1wq/ogre-1.9-1.9.0+dfsg1/OgreMain/src/OgreRenderSystem.cpp:546: virtual void Ogre::RenderSystem::setDepthBufferFor(Ogre::RenderTarget*): Assertion `bAttached && "A new DepthBuffer for a RenderTarget was created, but after creation" "it says it's incompatible with that RT"' failed.
Aborted (core dumped)
[gazebo-2] process has died [pid 21993, exit code 134, cmd /opt/ros/kinetic/lib/gazebo_ros/gzserver -e ode /opt/ros/kinetic/share/turtlebot_gazebo/worlds/playground.world __name:=gazebo __log:=/home/gonzalo/.ros/log/ab0fead6-9d94-11e6-9ddc-0800273ffca9/gazebo-2.log].
log file: /home/gonzalo/.ros/log/ab0fead6-9d94-11e6-9ddc-0800273ffca9/gazebo-2*.log

I arrived here following from [the same issue as @SRV_kgp][orig] (see [comment above][similar]) and I can confirm that installing Gazebo 7.4.0 (using Ubuntu packages, no manual compilation needed) solves the issue.

Many thanks to everyone involved!

[similar]: https://osrf-migration.github.io/gazebo-gh-pages/#!/osrf/gazebo/issues/1837/vmware-rendering-z-ordering-appears-random (#1837)#comment-29498034
[orig]: http://answers.gazebosim.org/question/9395/gazebo-crashes-when-inserting-camera-in-virtual-machine-with-ubuntu-vivid-ros-jade/

@osrf-migration
Copy link
Author

Original comment by Arnold Asllani (Bitbucket: asllani94).


gzserver: /build/ogre-1.9-mqY1wq/ogre-1.9-1.9.0+dfsg1/OgreMain/src/OgreRenderSystem.cpp:546: virtual void Ogre::RenderSystem::setDepthBufferFor(Ogre::RenderTarget*): Assertion `bAttached && "A new DepthBuffer for a RenderTarget was created, but after creation" "it says it's incompatible with that RT"' failed.
Aborted (core dumped)
[gazebo-1] process has died [pid 16706, exit code 134, cmd /opt/ros/kinetic/lib/gazebo_ros/gzserver -e ode /home/arnold/catkin_ws/src/a1_456_referee/worlds/willow_garage_with_map_publ.world __name:=gazebo __log:=/home/arnold/.ros/log/955631ac-ac33-11e6-8ef5-4c0f6e2b5b73/gazebo-1.log].
log file: /home/arnold/.ros/log/955631ac-ac33-11e6-8ef5-4c0f6e2b5b73/gazebo-1*.log


I am having this bug. I am using Ubuntu 16.04 on a dual boot not in virtual machine. How can I solve this without running. I am using Gazebo with ROS Kinetic and recompiling would be tough solution.

@osrf-migration
Copy link
Author

Original comment by Sharvashish Das (Bitbucket: SRV_kgp).


Which Gazebo version are you running? Try installing Gazebo 7.4.0 as mentioned in the above comment here.

@osrf-migration
Copy link
Author

Original comment by Freek Hoekstra (Bitbucket: hoekstrafg).


@asllani94 how did you install Gazebo 7.4.0 using Debian packages?
My apt-get says Gazebo 7.0.0 is the most recent version

@osrf-migration
Copy link
Author

Original comment by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).


@hoekstrafg , see the instructions on installing from OSRF packages here: http://gazebosim.org/tutorials?cat=install&tut=install_ubuntu&ver=7.0#Alternativeinstallation:step-by-step

@osrf-migration
Copy link
Author

Original comment by Freek Hoekstra (Bitbucket: hoekstrafg).


Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.0 bug Something isn't working major rendering
Projects
None yet
Development

No branches or pull requests

1 participant