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

Camera Sensor incorrectly renders PBR materials #166

Open
5 of 16 tasks
FirefoxMetzger opened this issue Oct 18, 2021 · 1 comment
Open
5 of 16 tasks

Camera Sensor incorrectly renders PBR materials #166

FirefoxMetzger opened this issue Oct 18, 2021 · 1 comment
Labels
bug Something isn't working 🏢 edifice Ignition Edifice help wanted Extra attention is needed

Comments

@FirefoxMetzger
Copy link

Environment

  • OS Version: Ubuntu 20.04
  • Source or binary build? binary build
  • If this is a GUI or sensor rendering bug, describe your GPU and rendering system.
    • Rendering plugin: ogre
      • Sensor rendering error.
    • Generally, mention all circumstances that might affect rendering capabilities:
      • running on a dual GPU machine (integrated GPU + discrete GPU)
      • running on a multi-GPU machine (it has multiple discrete GPUs)
      • running on real hardware
      • running in virtual machine
      • running in Docker/Singularity
      • running remotely (e.g. via SSH)
      • running in a cloud
      • using VirtualGL, XVFB, Xdummy, XVNC or other indirect rendering utilities
      • GPU is concurrently used for other tasks
        • desktop acceleration
        • video decoding (i.e. a playing Youtube video)
        • video encoding
        • CUDA/ROCm computations (Tensorflow, Torch, Caffe running)
        • multiple simulators running at the same time
      • other...
    • Rendering system info:
      • On Linux, provide the outputs of the following commands:
sebastian@sonny:~$ LANG=C lspci -nn | grep VGA  # might require installing pciutils
41:00.0 VGA compatible controller [0300]: NVIDIA Corporation GV100 [TITAN V] [10de:1d81] (rev a1)
sebastian@sonny:~$ echo "$DISPLAY"
:0
sebastian@sonny:~$ LANG=C glxinfo -B | grep -i '\(direct rendering\|opengl\|profile\)'  # might require installing mesa-utils package
direct rendering: Yes
    Preferred profile: core (0x1)
    Max core profile version: 4.3
    Max compat profile version: 4.3
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
OpenGL vendor string: nouveau
OpenGL renderer string: NV140
OpenGL core profile version string: 4.3 (Core Profile) Mesa 21.0.3
OpenGL core profile shading language version string: 4.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL version string: 4.3 (Compatibility Profile) Mesa 21.0.3
OpenGL shading language version string: 4.30
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 21.0.3
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
sebastian@sonny:~$ ps aux | grep Xorg
sebasti+    2735  1.3  0.3 632008 121856 tty2    Sl+  10:07   2:21 /usr/lib/xorg/Xorg vt2 -displayfd 3 -auth /run/user/1001/gdm/Xauthority -background none -noreset -keeptty -verbose 3
sebasti+  515687  0.0  0.0  11900  2600 pts/5    S+   13:04   0:00 grep --color=auto Xorg
sebastian@sonny:~$ sudo env LANG=C X -version  # if you don't have root access, try to tell the version of Xorg e.g. via package manager
[sudo] password for sebastian: 

X.Org X Server 1.20.11
X Protocol Version 11, Revision 0
Build Operating System: linux Ubuntu
Current Operating System: Linux sonny 5.4.0-88-generic #99-Ubuntu SMP Thu Sep 23 17:29:00 UTC 2021 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.4.0-88-generic root=UUID=3c982dc3-16d0-4fbf-958c-c7e494135c28 ro quiet splash usbcore.usbfs_memory_mb=1000 vt.handoff=7
Build Date: 06 July 2021  10:17:51AM
xorg-server 2:1.20.11-1ubuntu1~20.04.2 (For technical support please see http://www.ubuntu.com/support) 
Current version of pixman: 0.38.4
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
- [x] Please, attach the ogre.log or ogre2.log file from  `~/.ignition/rendering` <!-- Choose the relevant version based on what you checked in the "Rendering plugin" question. -->
13:14:25: Creating resource group General
13:14:25: Creating resource group Internal
13:14:25: Creating resource group Autodetect
13:14:25: SceneManagerFactory for type 'DefaultSceneManager' registered.
13:14:25: Registering ResourceManager for type Material
13:14:25: Registering ResourceManager for type Mesh
13:14:25: Registering ResourceManager for type Skeleton
13:14:25: MovableObjectFactory for type 'ParticleSystem' registered.
13:14:25: ArchiveFactory for archive type FileSystem registered.
13:14:25: ArchiveFactory for archive type Zip registered.
13:14:25: ArchiveFactory for archive type EmbeddedZip registered.
13:14:25: DDS codec registering
13:14:25: FreeImage version: 3.18.0
13:14:25: This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
13:14:25: Supported formats: bmp,ico,jpg,jif,jpeg,jpe,jng,koa,iff,lbm,mng,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,psb,cut,xbm,xpm,gif,hdr,g3,sgi,rgb,rgba,bw,exr,j2k,j2c,jp2,pfm,pct,pict,pic,3fr,arw,bay,bmq,cap,cine,cr2,crw,cs1,dc2,dcr,drf,dsc,dng,erf,fff,ia,iiq,k25,kc2,kdc,mdc,mef,mos,mrw,nef,nrw,orf,pef,ptx,pxn,qtk,raf,raw,rdc,rw2,rwl,rwz,sr2,srf,srw,sti,x3f,webp,jxr,wdp,hdp
13:14:25: PVRTC codec registering
13:14:25: ETC codec registering
13:14:25: Registering ResourceManager for type HighLevelGpuProgram
13:14:25: Registering ResourceManager for type Compositor
13:14:25: MovableObjectFactory for type 'Entity' registered.
13:14:25: MovableObjectFactory for type 'Light' registered.
13:14:25: MovableObjectFactory for type 'BillboardSet' registered.
13:14:25: MovableObjectFactory for type 'ManualObject' registered.
13:14:25: MovableObjectFactory for type 'BillboardChain' registered.
13:14:25: MovableObjectFactory for type 'RibbonTrail' registered.
13:14:25: *-*-* OGRE Initialising
13:14:25: *-*-* Version 1.9.0 (Ghadamon)
13:14:25: OverlayElementFactory for type Panel registered.
13:14:25: OverlayElementFactory for type BorderPanel registered.
13:14:25: OverlayElementFactory for type TextArea registered.
13:14:25: Registering ResourceManager for type Font
13:14:25: Loading library /usr/lib/x86_64-linux-gnu/OGRE-1.9.0/RenderSystem_GL.so
13:14:25: Installing plugin: GL RenderSystem
13:14:25: OpenGL Rendering Subsystem created.
13:14:25: Plugin successfully installed
13:14:25: Loading library /usr/lib/x86_64-linux-gnu/OGRE-1.9.0/Plugin_ParticleFX.so
13:14:25: Installing plugin: ParticleFX
13:14:25: Particle Emitter Type 'Point' registered
13:14:25: Particle Emitter Type 'Box' registered
13:14:25: Particle Emitter Type 'Ellipsoid' registered
13:14:25: Particle Emitter Type 'Cylinder' registered
13:14:25: Particle Emitter Type 'Ring' registered
13:14:25: Particle Emitter Type 'HollowEllipsoid' registered
13:14:25: Particle Affector Type 'LinearForce' registered
13:14:25: Particle Affector Type 'ColourFader' registered
13:14:25: Particle Affector Type 'ColourFader2' registered
13:14:25: Particle Affector Type 'ColourImage' registered
13:14:25: Particle Affector Type 'ColourInterpolator' registered
13:14:25: Particle Affector Type 'Scaler' registered
13:14:25: Particle Affector Type 'Rotator' registered
13:14:25: Particle Affector Type 'DirectionRandomiser' registered
13:14:25: Particle Affector Type 'DeflectorPlane' registered
13:14:25: Plugin successfully installed
13:14:25: Loading library /usr/lib/x86_64-linux-gnu/OGRE-1.9.0/Plugin_BSPSceneManager.so
13:14:25: Installing plugin: BSP Scene Manager
13:14:25: Plugin successfully installed
13:14:25: Loading library /usr/lib/x86_64-linux-gnu/OGRE-1.9.0/Plugin_OctreeSceneManager.so
13:14:25: Installing plugin: Octree Scene Manager
13:14:25: Plugin successfully installed
13:14:25: CPU Identifier & Features
13:14:25: -------------------------
13:14:25:  *   CPU ID: AuthenticAMD: AMD Ryzen Threadripper 1950X 16-Core Processor
13:14:25:  *      SSE: yes
13:14:25:  *     SSE2: yes
13:14:25:  *     SSE3: yes
13:14:25:  *      MMX: yes
13:14:25:  *   MMXEXT: yes
13:14:25:  *    3DNOW: no
13:14:25:  * 3DNOWEXT: no
13:14:25:  *     CMOV: yes
13:14:25:  *      TSC: yes
13:14:25:  *      FPU: yes
13:14:25:  *      PRO: yes
13:14:25:  *       HT: no
13:14:25: -------------------------
13:14:25: ******************************
*** Starting GLX Subsystem ***
******************************
13:14:25: Registering ResourceManager for type Texture
13:14:25: Added resource location '/usr/share/ignition/ignition-rendering5/ogre/media' of type 'FileSystem' to resource group 'General'
13:14:25: Added resource location '/usr/share/ignition/ignition-rendering5/ogre/media/materials/programs' of type 'FileSystem' to resource group 'General'
13:14:25: Added resource location '/usr/share/ignition/ignition-rendering5/ogre/media/materials/scripts' of type 'FileSystem' to resource group 'General'
13:14:25: Creating resource group Fonts
13:14:25: Added resource location '/usr/share/ignition/ignition-rendering5/ogre/media/fonts' of type 'FileSystem' to resource group 'Fonts'
13:14:25: GLRenderSystem::_createRenderWindow "OgreWindow(0)_73400321", 1x1 windowed  miscParams: FSAA=0 border=none contentScalingFactor=1.000000 macAPI=cocoa macAPICocoaUseNSView=true parentWindowHandle=73400321 stereoMode=Frame Sequential 
13:14:25: GLXWindow::create used FBConfigID = 453
13:14:25: GL_VERSION = 4.3 (Compatibility Profile) Mesa 21.0.3
13:14:25: GL_VENDOR = nouveau
13:14:25: GL_RENDERER = NV140
13:14:25: GL_EXTENSIONS = GL_ARB_multisample GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_copy_texture GL_EXT_subtexture GL_EXT_texture_object GL_EXT_vertex_array GL_EXT_compiled_vertex_array GL_EXT_texture GL_EXT_texture3D GL_IBM_rasterpos_clip GL_ARB_point_parameters GL_EXT_draw_range_elements GL_EXT_packed_pixels GL_EXT_point_parameters GL_EXT_rescale_normal GL_EXT_separate_specular_color GL_EXT_texture_edge_clamp GL_SGIS_generate_mipmap GL_SGIS_texture_border_clamp GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod GL_ARB_framebuffer_sRGB GL_ARB_multitexture GL_EXT_framebuffer_sRGB GL_IBM_multimode_draw_arrays GL_IBM_texture_mirrored_repeat GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_transpose_matrix GL_EXT_blend_func_separate GL_EXT_fog_coord GL_EXT_multi_draw_arrays GL_EXT_secondary_color GL_EXT_texture_env_add GL_EXT_texture_filter_anisotropic GL_EXT_texture_lod_bias GL_INGR_blend_func_separate GL_NV_blend_square GL_NV_light_max_exponent GL_NV_texgen_reflection GL_NV_texture_env_combine4 GL_S3_s3tc GL_SUN_multi_draw_arrays GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_EXT_framebuffer_object GL_EXT_texture_compression_s3tc GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_MESA_window_pos GL_NV_packed_depth_stencil GL_NV_texture_rectangle GL_ARB_depth_texture GL_ARB_occlusion_query GL_ARB_shadow GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_texture_mirrored_repeat GL_ARB_window_pos GL_ATI_fragment_shader GL_EXT_stencil_two_side GL_EXT_texture_cube_map GL_NV_copy_depth_to_color GL_NV_depth_clamp GL_NV_fog_distance GL_NV_half_float GL_APPLE_packed_pixels GL_ARB_draw_buffers GL_ARB_fragment_program GL_ARB_fragment_shader GL_ARB_shader_objects GL_ARB_vertex_program GL_ARB_vertex_shader GL_ATI_draw_buffers GL_ATI_texture_env_combine3 GL_ATI_texture_float GL_EXT_depth_bounds_test GL_EXT_shadow_funcs GL_EXT_stencil_wrap GL_MESA_pack_invert GL_NV_primitive_restart GL_ARB_depth_clamp GL_ARB_fragment_program_shadow GL_ARB_half_float_pixel GL_ARB_occlusion_query2 GL_ARB_point_sprite GL_ARB_shading_language_100 GL_ARB_sync GL_ARB_texture_non_power_of_two GL_ARB_vertex_buffer_object GL_ATI_blend_equation_separate GL_EXT_blend_equation_separate GL_OES_read_format GL_ARB_color_buffer_float GL_ARB_pixel_buffer_object GL_ARB_texture_compression_rgtc GL_ARB_texture_float GL_ARB_texture_rectangle GL_ATI_texture_compression_3dc GL_EXT_packed_float GL_EXT_pixel_buffer_object GL_EXT_texture_compression_dxt1 GL_EXT_texture_compression_rgtc GL_EXT_texture_mirror_clamp GL_EXT_texture_rectangle GL_EXT_texture_sRGB GL_EXT_texture_shared_exponent GL_ARB_framebuffer_object GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_EXT_packed_depth_stencil GL_ARB_vertex_array_object GL_ATI_separate_stencil GL_ATI_texture_mirror_once GL_EXT_draw_buffers2 GL_EXT_draw_instanced GL_EXT_gpu_program_parameters GL_EXT_gpu_shader4 GL_EXT_texture_array GL_EXT_texture_compression_latc GL_EXT_texture_integer GL_EXT_texture_sRGB_decode GL_EXT_timer_query GL_OES_EGL_image GL_EXT_texture_buffer_object GL_AMD_texture_texture4 GL_ARB_copy_buffer GL_ARB_depth_buffer_float GL_ARB_draw_instanced GL_ARB_half_float_vertex GL_ARB_instanced_arrays GL_ARB_map_buffer_range GL_ARB_texture_buffer_object GL_ARB_texture_rg GL_ARB_texture_swizzle GL_ARB_vertex_array_bgra GL_EXT_texture_swizzle GL_EXT_vertex_array_bgra GL_NV_conditional_render GL_AMD_conservative_depth GL_AMD_draw_buffers_blend GL_AMD_seamless_cubemap_per_texture GL_ARB_ES2_compatibility GL_ARB_blend_func_extended GL_ARB_compatibility GL_ARB_debug_output GL_ARB_draw_buffers_blend GL_ARB_draw_elements_base_vertex GL_ARB_explicit_attrib_location GL_ARB_fragment_coord_conventions GL_ARB_provoking_vertex GL_ARB_sample_shading GL_ARB_sampler_objects GL_ARB_seamless_cube_map GL_ARB_shader_texture_lod GL_ARB_tessellation_shader GL_ARB_texture_buffer_object_rgb32 GL_ARB_texture_cube_map_array GL_ARB_texture_gather GL_ARB_texture_multisample GL_ARB_texture_query_lod GL_ARB_texture_rgb10_a2ui GL_ARB_uniform_buffer_object GL_ARB_vertex_type_2_10_10_10_rev GL_EXT_provoking_vertex GL_EXT_texture_snorm GL_MESA_texture_signed_rgba GL_NV_copy_image GL_NV_texture_barrier GL_ARB_draw_indirect GL_ARB_get_program_binary GL_ARB_gpu_shader5 GL_ARB_gpu_shader_fp64 GL_ARB_robustness GL_ARB_separate_shader_objects GL_ARB_shader_bit_encoding GL_ARB_shader_precision GL_ARB_shader_subroutine GL_ARB_texture_compression_bptc GL_ARB_timer_query GL_ARB_transform_feedback2 GL_ARB_transform_feedback3 GL_ARB_vertex_attrib_64bit GL_ARB_viewport_array GL_EXT_direct_state_access GL_EXT_shader_image_load_store GL_EXT_vertex_attrib_64bit GL_NV_vdpau_interop GL_AMD_multi_draw_indirect GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_ARB_base_instance GL_ARB_compressed_texture_pixel_storage GL_ARB_conservative_depth GL_ARB_internalformat_query GL_ARB_map_buffer_alignment GL_ARB_shader_atomic_counters GL_ARB_shader_image_load_store GL_ARB_shading_language_420pack GL_ARB_shading_language_packing GL_ARB_texture_storage GL_ARB_transform_feedback_instanced GL_EXT_framebuffer_multisample_blit_scaled GL_EXT_transform_feedback GL_AMD_query_buffer_object GL_AMD_shader_trinary_minmax GL_AMD_vertex_shader_layer GL_AMD_vertex_shader_viewport_index GL_ARB_ES3_compatibility GL_ARB_arrays_of_arrays GL_ARB_clear_buffer_object GL_ARB_compute_shader GL_ARB_copy_image GL_ARB_explicit_uniform_location GL_ARB_fragment_layer_viewport GL_ARB_framebuffer_no_attachments GL_ARB_invalidate_subdata GL_ARB_multi_draw_indirect GL_ARB_program_interface_query GL_ARB_robust_buffer_access_behavior GL_ARB_shader_image_size GL_ARB_shader_storage_buffer_object GL_ARB_stencil_texturing GL_ARB_texture_buffer_range GL_ARB_texture_query_levels GL_ARB_texture_storage_multisample GL_ARB_texture_view GL_ARB_vertex_attrib_binding GL_KHR_debug GL_KHR_robustness GL_KHR_texture_compression_astc_ldr GL_ARB_bindless_texture GL_ARB_buffer_storage GL_ARB_clear_texture GL_ARB_compute_variable_group_size GL_ARB_enhanced_layouts GL_ARB_indirect_parameters GL_ARB_internalformat_query2 GL_ARB_multi_bind GL_ARB_query_buffer_object GL_ARB_seamless_cubemap_per_texture GL_ARB_shader_draw_parameters GL_ARB_shader_group_vote GL_ARB_shading_language_include GL_ARB_texture_mirror_clamp_to_edge GL_ARB_texture_stencil8 GL_ARB_vertex_type_10f_11f_11f_rev GL_EXT_shader_integer_mix GL_ARB_ES3_1_compatibility GL_ARB_clip_control GL_ARB_conditional_render_inverted GL_ARB_cull_distance GL_ARB_derivative_control GL_ARB_direct_state_access GL_ARB_get_texture_sub_image GL_ARB_pipeline_statistics_query GL_ARB_shader_texture_image_samples GL_ARB_texture_barrier GL_ARB_transform_feedback_overflow_query GL_EXT_polygon_offset_clamp GL_KHR_blend_equation_advanced GL_KHR_context_flush_control GL_KHR_robust_buffer_access_behavior GL_ARB_gpu_shader_int64 GL_ARB_parallel_shader_compile GL_ARB_post_depth_coverage GL_ARB_sample_locations GL_ARB_shader_atomic_counter_ops GL_ARB_shader_ballot GL_ARB_shader_clock GL_ARB_shader_viewport_layer_array GL_KHR_no_error GL_KHR_texture_compression_astc_sliced_3d GL_NV_conservative_raster GL_NV_conservative_raster_dilate GL_NV_conservative_raster_pre_snap_triangles GL_NV_fill_rectangle GL_NV_sample_locations GL_NV_viewport_array2 GL_NV_viewport_swizzle GL_ARB_gl_spirv GL_ARB_spirv_extensions GL_EXT_window_rectangles GL_MESA_shader_integer_functions GL_ARB_polygon_offset_clamp GL_ARB_texture_filter_anisotropic GL_KHR_parallel_shader_compile GL_EXT_EGL_image_storage GL_EXT_texture_shadow_lod GL_MESA_framebuffer_flip_y GL_EXT_EGL_sync GL_EXT_demote_to_helper_invocation 
13:14:25: Supported GLX extensions: GLX_ARB_create_context GLX_ARB_create_context_no_error 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_create_context_es_profile GLX_EXT_fbconfig_packed_float GLX_EXT_framebuffer_sRGB GLX_EXT_import_context GLX_EXT_swap_control GLX_EXT_swap_control_tear GLX_EXT_texture_from_pixmap GLX_EXT_visual_info GLX_EXT_visual_rating GLX_INTEL_swap_event GLX_MESA_copy_sub_buffer 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 
13:14:25: ***************************
13:14:25: *** GL Renderer Started ***
13:14:25: ***************************
13:14:25: Registering ResourceManager for type GpuProgram
13:14:25: GLSL support detected
13:14:25: GL: Using GL_EXT_framebuffer_object for rendering to textures (best)
13:14:25: FBO PF_UNKNOWN depth/stencil support: D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8 
13:14:25: FBO PF_L8 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8 
13:14:25: FBO PF_L16 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8 
13:14:25: FBO PF_A8 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8 
13:14:25: FBO PF_R5G6B5 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8 
13:14:25: FBO PF_B5G6R5 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8 
13:14:25: FBO PF_A4R4G4B4 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8 
13:14:25: FBO PF_A1R5G5B5 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8 
13:14:25: FBO PF_R8G8B8 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8 
13:14:25: FBO PF_B8G8R8 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8 
13:14:25: FBO PF_A8R8G8B8 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8 
13:14:25: FBO PF_B8G8R8A8 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8 
13:14:25: FBO PF_A2R10G10B10 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8 
13:14:25: FBO PF_A2B10G10R10 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8 
13:14:25: FBO PF_FLOAT16_RGB depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8 
13:14:25: FBO PF_FLOAT16_RGBA depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8 
13:14:25: FBO PF_FLOAT32_RGB depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8 
13:14:25: FBO PF_FLOAT32_RGBA depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8 
13:14:25: FBO PF_X8R8G8B8 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8 
13:14:25: FBO PF_X8B8G8R8 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8 
13:14:25: FBO PF_SHORT_RGBA depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8 
13:14:25: FBO PF_R3G3B2 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8 
13:14:25: FBO PF_FLOAT16_R depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8 
13:14:25: FBO PF_FLOAT32_R depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8 
13:14:25: [GL] : Valid FBO targets PF_UNKNOWN PF_L8 PF_L16 PF_A8 PF_R5G6B5 PF_B5G6R5 PF_A4R4G4B4 PF_A1R5G5B5 PF_R8G8B8 PF_B8G8R8 PF_A8R8G8B8 PF_B8G8R8A8 PF_A2R10G10B10 PF_A2B10G10R10 PF_FLOAT16_RGB PF_FLOAT16_RGBA PF_FLOAT32_RGB PF_FLOAT32_RGBA PF_X8R8G8B8 PF_X8B8G8R8 PF_SHORT_RGBA PF_R3G3B2 PF_FLOAT16_R PF_FLOAT32_R 
13:14:25: RenderSystem capabilities
13:14:25: -------------------------
13:14:25: RenderSystem Name: OpenGL Rendering Subsystem
13:14:25: GPU Vendor: unknown
13:14:25: Device Name: NV140
13:14:25: Driver Version: 4.3.0.0
13:14:25:  * Fixed function pipeline: yes
13:14:25:  * Hardware generation of mipmaps: yes
13:14:25:  * Texture blending: yes
13:14:25:  * Anisotropic texture filtering: yes
13:14:25:  * Dot product texture operation: yes
13:14:25:  * Cube mapping: yes
13:14:25:  * Hardware stencil buffer: yes
13:14:25:    - Stencil depth: 8
13:14:25:    - Two sided stencil support: yes
13:14:25:    - Wrap stencil values: yes
13:14:25:  * Hardware vertex / index buffers: yes
13:14:25:  * Vertex programs: yes
13:14:25:  * Number of floating-point constants for vertex programs: 2048
13:14:25:  * Number of integer constants for vertex programs: 0
13:14:25:  * Number of boolean constants for vertex programs: 0
13:14:25:  * Fragment programs: yes
13:14:25:  * Number of floating-point constants for fragment programs: 2048
13:14:25:  * Number of integer constants for fragment programs: 0
13:14:25:  * Number of boolean constants for fragment programs: 0
13:14:25:  * Geometry programs: no
13:14:25:  * Number of floating-point constants for geometry programs: 0
13:14:25:  * Number of integer constants for geometry programs: 56
13:14:25:  * Number of boolean constants for geometry programs: 0
13:14:25:  * Tesselation Hull programs: no
13:14:25:  * Number of floating-point constants for tesselation hull programs: 1
13:14:25:  * Number of integer constants for tesselation hull programs: 0
13:14:25:  * Number of boolean constants for tesselation hull programs: 0
13:14:25:  * Tesselation Domain programs: no
13:14:25:  * Number of floating-point constants for tesselation domain programs: 0
13:14:25:  * Number of integer constants for tesselation domain programs: 56
13:14:25:  * Number of boolean constants for tesselation domain programs: 0
13:14:25:  * Compute programs: no
13:14:25:  * Number of floating-point constants for compute programs: 0
13:14:25:  * Number of integer constants for compute programs: 0
13:14:25:  * Number of boolean constants for compute programs: 0
13:14:25:  * Supported Shader Profiles: arbfp1 arbvp1 glsl ps_1_1 ps_1_2 ps_1_3 ps_1_4
13:14:25:  * Texture Compression: yes
13:14:25:    - DXT: yes
13:14:25:    - VTC: no
13:14:25:    - PVRTC: no
13:14:25:    - ATC: no
13:14:25:    - ETC1: no
13:14:25:    - ETC2: no
13:14:25:    - BC4/BC5: no
13:14:25:    - BC6H/BC7: no
13:14:25:  * Scissor Rectangle: yes
13:14:25:  * Hardware Occlusion Query: yes
13:14:25:  * User clip planes: yes
13:14:25:  * VET_UBYTE4 vertex element type: yes
13:14:25:  * Infinite far plane projection: yes
13:14:25:  * Hardware render-to-texture: yes
13:14:25:  * Floating point textures: yes
13:14:25:  * Non-power-of-two textures: yes
13:14:25:  * 1d textures: yes
13:14:25:  * Volume textures: yes
13:14:25:  * Multiple Render Targets: 8
13:14:25:    - With different bit depths: yes
13:14:25:  * Point Sprites: yes
13:14:25:  * Extended point parameters: yes
13:14:25:  * Max Point Size: 63.375
13:14:25:  * Vertex texture fetch: yes
13:14:25:  * Number of world matrices: 0
13:14:25:  * Number of texture units: 16
13:14:25:  * Stencil buffer depth: 8
13:14:25:  * Number of vertex blend matrices: 0
13:14:25:    - Max vertex textures: 32
13:14:25:    - Vertex textures shared: yes
13:14:25:  * Render to Vertex Buffer : no
13:14:25:  * Hardware Atomic Counters: no
13:14:25:  * GL 1.5 without VBO workaround: no
13:14:25:  * Frame Buffer objects: yes
13:14:25:  * Frame Buffer objects (ARB extension): no
13:14:25:  * Frame Buffer objects (ATI extension): no
13:14:25:  * PBuffer support: yes
13:14:25:  * GL 1.5 without HW-occlusion workaround: no
13:14:25:  * Vertex Array Objects: no
13:14:25:  * Separate shader objects: no
13:14:25: DefaultWorkQueue('Root') initialising on thread 7fb00a0c1700.
13:14:25: DefaultWorkQueue('Root')::WorkerFunc - thread 7faff1175700 starting.
13:14:25: DefaultWorkQueue('Root')::WorkerFunc - thread 7faff0974700 starting.
13:14:25: DefaultWorkQueue('Root')::WorkerFunc - thread 7fafeb7fe700 starting.
13:14:25: DefaultWorkQueue('Root')::WorkerFunc - thread 7fafe925d700 starting.
13:14:25: DefaultWorkQueue('Root')::WorkerFunc - thread 7fafebfff700 starting.
13:14:25: DefaultWorkQueue('Root')::WorkerFunc - thread 7fafe3fff700 starting.
13:14:25: DefaultWorkQueue('Root')::WorkerFunc - thread 7fafe37fe700 starting.
13:14:25: DefaultWorkQueue('Root')::WorkerFunc - thread 7fafeaffd700 starting.
13:14:25: DefaultWorkQueue('Root')::WorkerFunc - thread 7fafe8a5c700 starting.
13:14:25: DefaultWorkQueue('Root')::WorkerFunc - thread 7fafe9a5e700 starting.
13:14:25: DefaultWorkQueue('Root')::WorkerFunc - thread 7fafe27fc700 starting.
13:14:25: DefaultWorkQueue('Root')::WorkerFunc - thread 7fafe2ffd700 starting.
13:14:25: DefaultWorkQueue('Root')::WorkerFunc - thread 7fafe1ffb700 starting.
13:14:25: DefaultWorkQueue('Root')::WorkerFunc - thread 7fafe0ff9700 starting.
13:14:25: DefaultWorkQueue('Root')::WorkerFunc - thread 7fafcbfff700 starting.
13:14:25: DefaultWorkQueue('Root')::WorkerFunc - thread 7fafe17fa700 starting.
13:14:25: DefaultWorkQueue('Root')::WorkerFunc - thread 7fafcb7fe700 starting.
13:14:25: DefaultWorkQueue('Root')::WorkerFunc - thread 7fafcaffd700 starting.
13:14:25: DefaultWorkQueue('Root')::WorkerFunc - thread 7fafca7fc700 starting.
13:14:25: DefaultWorkQueue('Root')::WorkerFunc - thread 7fafc9ffb700 starting.
13:14:25: DefaultWorkQueue('Root')::WorkerFunc - thread 7fafc97fa700 starting.
13:14:25: DefaultWorkQueue('Root')::WorkerFunc - thread 7fafc8ff9700 starting.
13:14:25: DefaultWorkQueue('Root')::WorkerFunc - thread 7fafbbfff700 starting.
13:14:25: DefaultWorkQueue('Root')::WorkerFunc - thread 7fafbb7fe700 starting.
13:14:25: DefaultWorkQueue('Root')::WorkerFunc - thread 7fafba7fc700 starting.
13:14:25: DefaultWorkQueue('Root')::WorkerFunc - thread 7fafbaffd700 starting.
13:14:25: DefaultWorkQueue('Root')::WorkerFunc - thread 7fafb9ffb700 starting.
13:14:25: DefaultWorkQueue('Root')::WorkerFunc - thread 7fafb97fa700 starting.
13:14:25: DefaultWorkQueue('Root')::WorkerFunc - thread 7fafb8ff9700 starting.
13:14:25: DefaultWorkQueue('Root')::WorkerFunc - thread 7fafb37fe700 starting.
13:14:25: DefaultWorkQueue('Root')::WorkerFunc - thread 7fafb3fff700 starting.
13:14:25: Particle Renderer Type 'billboard' registered
13:14:25: DefaultWorkQueue('Root')::WorkerFunc - thread 7fafb2ffd700 starting.
13:14:25: SceneManagerFactory for type 'BspSceneManager' registered.
13:14:25: Registering ResourceManager for type BspLevel
13:14:25: SceneManagerFactory for type 'OctreeSceneManager' registered.
13:14:25: Parsing scripts for resource group Autodetect
13:14:25: Finished parsing scripts for resource group Autodetect
13:14:25: Creating resources for group Autodetect
13:14:25: All done
13:14:25: Parsing scripts for resource group Fonts
13:14:25: Parsing script ignition-rendering.fontdef
13:14:25: Finished parsing scripts for resource group Fonts
13:14:25: Creating resources for group Fonts
13:14:25: All done
13:14:25: Parsing scripts for resource group General
13:14:25: Parsing script point_cloud_point.material
13:14:25: Parsing script gpu_rays.material
13:14:25: Parsing script picker.material
13:14:25: Parsing script gaussian_noise.material
13:14:25: Parsing script pssm.material
13:14:25: Parsing script thermal.material
13:14:25: Parsing script thermal_camera.compositor
13:14:25: Parsing script gaussian_noise.compositor
13:14:25: Finished parsing scripts for resource group General
13:14:25: Creating resources for group General
13:14:25: All done
13:14:25: Parsing scripts for resource group Internal
13:14:25: Finished parsing scripts for resource group Internal
13:14:25: Creating resources for group Internal
13:14:25: All done
13:14:25: Added resource location '/usr/share/ignition/ignition-rendering5/ogre/media/rtshaderlib150' of type 'FileSystem' to resource group 'General'
13:14:25: Creating resource group ShaderGeneratorResourceGroup
13:14:25: Added resource location '/home/sebastian/.ignition/rendering/ogre-rtshader/sebastian-rtshaderlibcache/' of type 'FileSystem' to resource group 'ShaderGeneratorResourceGroup'
13:14:25: Added resource location '/home/sebastian/.ignition/fuel/fuel.ignitionrobotics.org/openrobotics/models/table/3/Table_Diffuse.jpg' of type 'FileSystem' to resource group 'General'
13:14:25: Texture: /home/sebastian/.ignition/fuel/fuel.ignitionrobotics.org/openrobotics/models/table/3/Table_Diffuse.jpg: Loading 1 faces(PF_R8G8B8,1024x1024x1) with 5 hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,1024x1024x1.
13:14:29: Texture: spot_shadow_fade.png: Loading 1 faces(PF_R8G8B8,128x128x1) with 5 hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.

Description

  • Expected behavior: The table in the image is rendered with a wooden texture and shaded in the chosen ambient color.
  • Actual behavior: The table is shaded using other windows that happen to exist in the background of the display.

Note that this only happens for the camera sensor. the GUI camera is unaffected.

Steps to reproduce

  1. Install Ignition (Edifice)
  2. pip install matplotlib numpy gym-ignition scikit-bot
  3. run the script below
mwe.py
import tempfile
import matplotlib.pyplot as plt
import numpy as np
import skbot.ignition as ign
from scenario import gazebo as scenario_gazebo

# The SDF in question (3 cameras in a quater circle)
sdf_string = """<sdf version='1.8'>
  <world name='panda_world'>
    <physics name="1ms" type="ignored">
      <max_step_size>0.001</max_step_size>
      <real_time_factor>1.0</real_time_factor>
    </physics>
    <plugin
      filename="ignition-gazebo-physics-system"
      name="ignition::gazebo::systems::Physics">
    </plugin>
    <plugin
      filename="ignition-gazebo-sensors-system"
      name="ignition::gazebo::systems::Sensors">
      <render_engine>ogre</render_engine>
    </plugin>
    <plugin
      filename="ignition-gazebo-user-commands-system"
      name="ignition::gazebo::systems::UserCommands">
    </plugin>
    <plugin
      filename="ignition-gazebo-scene-broadcaster-system"
      name="ignition::gazebo::systems::SceneBroadcaster">
    </plugin>
    <light name='sun' type='directional'>
      <cast_shadows>1</cast_shadows>
      <pose>0 0 10 0 -0 0</pose>
      <diffuse>0.8 0.8 0.8 1</diffuse>
      <specular>0.2 0.2 0.2 1</specular>
      <attenuation>
        <range>1000</range>
        <constant>0.9</constant>
        <linear>0.01</linear>
        <quadratic>0.001</quadratic>
      </attenuation>
      <direction>-0.5 0.1 -0.9</direction>
      <spot>
        <inner_angle>0</inner_angle>
        <outer_angle>0</outer_angle>
        <falloff>0</falloff>
      </spot>
    </light>
    <scene>
      <ambient>0.4 0.4 0.4 1</ambient>
      <background>0.7 0.7 0.7 1</background>
      <shadows>1</shadows>
    </scene>
    <model name='ground_plane'>
      <static>1</static>
      <link name='link'>
        <collision name='collision'>
          <geometry>
            <plane>
              <normal>0 0 1</normal>
              <size>1000 1000</size>
            </plane>
          </geometry>
          <surface>
            <friction>
              <ode/>
            </friction>
            <contact/>
          </surface>
        </collision>
        <visual name='visual'>
          <geometry>
            <plane>
              <normal>0 0 1</normal>
              <size>100 100</size>
            </plane>
          </geometry>
          <material>
            <ambient>0.8 0.8 0.8 1</ambient>
            <diffuse>0.8 0.8 0.8 1</diffuse>
            <specular>0.8 0.8 0.8 1</specular>
          </material>
          <plugin name='__default__' filename='__default__'/>
        </visual>
      </link>
      <plugin name='__default__' filename='__default__'/>
      <pose>0 0 0 0 -0 0</pose>
    </model>
    <include>
      <uri>https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Table</uri>
      <name>table1</name>
      <pose>0 0 0 0 -0 1.5708</pose>
    </include>
    <include>
      <uri>https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Table</uri>
      <name>table2</name>
      <pose>0.794 0 0 0 -0 1.5708</pose>
    </include>
    <frame name="tabletop_1">
      <pose relative_to="table1">0 0 1.015 0 0 0</pose>
    </frame>
    <frame name="tabletop_2">
      <pose relative_to="table2">0 0 1.015 0 0 0</pose>
    </frame>
    <frame name="main_rotation"><pose>0 0 0 0 0 0</pose></frame>
    <frame name="angle_rotation"><pose>0 0 0 0 0 0.78539816339</pose></frame>
    <frame name="side_rotation"><pose>0 0 0 0 0 1.57079632679</pose></frame>
    <model name='main_camera'>
        <static>1</static>
        <pose relative_to="main_rotation">2 0 1.75 -0 0.282863 3.14</pose>
        <link name='link'>
            <pose>0.05 0.05 0.05 0 -0 0</pose>
            <visual name='visual'>
                <geometry>
                    <box>
                        <size>0.1 0.1 0.1</size>
                    </box>
                </geometry>
            </visual>
            <sensor name='camera' type='camera'>
                <camera>
                    <horizontal_fov>1.13446</horizontal_fov>
                    <image>
                        <width>1920</width>
                        <height>1080</height>
                    </image>
                    <clip>
                        <near>0.01</near>
                        <far>100</far>
                    </clip>
                </camera>
                <always_on>1</always_on>
                <update_rate>30</update_rate>
                <visualize>1</visualize>
                <topic>main_camera</topic>
            </sensor>
        </link>
        <joint name="connector" type="fixed">
          <parent>world</parent>
          <child>link</child>
        </joint>
    </model>
    <model name='angle_camera'>
        <static>1</static>
        <pose relative_to="angle_rotation">2 0 1.75 -0 0.282863 3.14</pose>
        <link name='link'>
            <pose>0.05 0.05 0.05 0 -0 0</pose>
            <visual name='visual'>
                <geometry>
                    <box>
                        <size>0.1 0.1 0.1</size>
                    </box>
                </geometry>
            </visual>
            <sensor name='camera' type='camera'>
                <camera>
                    <horizontal_fov>1.13446</horizontal_fov>
                    <image>
                        <width>1920</width>
                        <height>1080</height>
                    </image>
                    <clip>
                        <near>0.01</near>
                        <far>100</far>
                    </clip>
                </camera>
                <always_on>1</always_on>
                <update_rate>30</update_rate>
                <visualize>1</visualize>
                <topic>angle_camera</topic>
            </sensor>
        </link>
        <joint name="connector" type="fixed">
          <parent>world</parent>
          <child>link</child>
        </joint>
    </model>
    <model name='side_camera'>
        <static>1</static>
        <pose relative_to="side_rotation">2 0 1.75 -0 0.282863 3.14</pose>
        <link name='link'>
            <pose>0.05 0.05 0.05 0 -0 0</pose>
            <visual name='visual'>
                <geometry>
                    <box>
                        <size>0.1 0.1 0.1</size>
                    </box>
                </geometry>
            </visual>
            <sensor name='camera' type='camera'>
                <camera>
                    <horizontal_fov>1.13446</horizontal_fov>
                    <image>
                        <width>1920</width>
                        <height>1080</height>
                    </image>
                    <clip>
                        <near>0.01</near>
                        <far>100</far>
                    </clip>
                </camera>
                <always_on>1</always_on>
                <update_rate>30</update_rate>
                <visualize>1</visualize>
                <topic>side_camera</topic>
            </sensor>
        </link>
        <joint name="connector" type="fixed">
          <parent>world</parent>
          <child>link</child>
        </joint>
    </model>
  </world>
</sdf>
"""

# Orchestrate simulation with gym-ignition
simulator = scenario_gazebo.GazeboSimulator(
    step_size=0.001, steps_per_run=round((1 / 0.001) / 30)
)

with tempfile.NamedTemporaryFile(mode="r+") as f:
    f.write(sdf_string)
    f.seek(0)
    assert simulator.insert_world_from_sdf(f.name)

assert simulator.initialize()
simulator.run(paused=True)

with ign.Subscriber("/main_camera") as camera_topic, ign.Subscriber(
    "/side_camera"
) as side_camera_topic, ign.Subscriber("/angle_camera") as angle_camera_topic:
    simulator.run(paused=True)
    completed_keypoints = 0

    # iterate some frames
    for _ in range(5):
        simulator.run()

        front_msg = camera_topic.recv()
        side_img_msg = side_camera_topic.recv()
        angle_camera_msg = angle_camera_topic.recv()


# Visualize the problem.
shape = (front_msg.height, front_msg.width, 3)

front_image = np.frombuffer(front_msg.data, dtype=np.uint8).reshape(shape)
side_image = np.frombuffer(side_img_msg.data, dtype=np.uint8).reshape(shape)
angle_image = np.frombuffer(angle_camera_msg.data, dtype=np.uint8).reshape(shape)

fig, ax = plt.subplots(2, 2)
ax[0,0].set_title("Front Image")
ax[0,0].imshow(front_image)
ax[0,0].set_axis_off()

ax[1,0].set_title("Side Image")
ax[1,0].imshow(side_image)
ax[1,0].set_axis_off()

ax[0,1].set_title("Angle Image")
ax[0,1].imshow(angle_image)
ax[0,1].set_axis_off()

plt.show()

If you just want to look at the (highlighted) SDF, here it is:

SDF
<sdf version='1.8'>
  <world name='panda_world'>
    <physics name="1ms" type="ignored">
      <max_step_size>0.001</max_step_size>
      <real_time_factor>1.0</real_time_factor>
    </physics>
    <plugin
      filename="ignition-gazebo-physics-system"
      name="ignition::gazebo::systems::Physics">
    </plugin>
    <plugin
      filename="ignition-gazebo-sensors-system"
      name="ignition::gazebo::systems::Sensors">
      <render_engine>ogre</render_engine>
    </plugin>
    <plugin
      filename="ignition-gazebo-user-commands-system"
      name="ignition::gazebo::systems::UserCommands">
    </plugin>
    <plugin
      filename="ignition-gazebo-scene-broadcaster-system"
      name="ignition::gazebo::systems::SceneBroadcaster">
    </plugin>
    <light name='sun' type='directional'>
      <cast_shadows>1</cast_shadows>
      <pose>0 0 10 0 -0 0</pose>
      <diffuse>0.8 0.8 0.8 1</diffuse>
      <specular>0.2 0.2 0.2 1</specular>
      <attenuation>
        <range>1000</range>
        <constant>0.9</constant>
        <linear>0.01</linear>
        <quadratic>0.001</quadratic>
      </attenuation>
      <direction>-0.5 0.1 -0.9</direction>
      <spot>
        <inner_angle>0</inner_angle>
        <outer_angle>0</outer_angle>
        <falloff>0</falloff>
      </spot>
    </light>
    <scene>
      <ambient>0.4 0.4 0.4 1</ambient>
      <background>0.7 0.7 0.7 1</background>
      <shadows>1</shadows>
    </scene>
    <model name='ground_plane'>
      <static>1</static>
      <link name='link'>
        <collision name='collision'>
          <geometry>
            <plane>
              <normal>0 0 1</normal>
              <size>1000 1000</size>
            </plane>
          </geometry>
          <surface>
            <friction>
              <ode/>
            </friction>
            <contact/>
          </surface>
        </collision>
        <visual name='visual'>
          <geometry>
            <plane>
              <normal>0 0 1</normal>
              <size>100 100</size>
            </plane>
          </geometry>
          <material>
            <ambient>0.8 0.8 0.8 1</ambient>
            <diffuse>0.8 0.8 0.8 1</diffuse>
            <specular>0.8 0.8 0.8 1</specular>
          </material>
          <plugin name='__default__' filename='__default__'/>
        </visual>
      </link>
      <plugin name='__default__' filename='__default__'/>
      <pose>0 0 0 0 -0 0</pose>
    </model>
    <include>
      <uri>https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Table</uri>
      <name>table1</name>
      <pose>0 0 0 0 -0 1.5708</pose>
    </include>
    <include>
      <uri>https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Table</uri>
      <name>table2</name>
      <pose>0.794 0 0 0 -0 1.5708</pose>
    </include>
    <frame name="tabletop_1">
      <pose relative_to="table1">0 0 1.015 0 0 0</pose>
    </frame>
    <frame name="tabletop_2">
      <pose relative_to="table2">0 0 1.015 0 0 0</pose>
    </frame>
    <frame name="main_rotation"><pose>0 0 0 0 0 0</pose></frame>
    <frame name="angle_rotation"><pose>0 0 0 0 0 0.78539816339</pose></frame>
    <frame name="side_rotation"><pose>0 0 0 0 0 1.57079632679</pose></frame>
    <model name='main_camera'>
        <static>1</static>
        <pose relative_to="main_rotation">2 0 1.75 -0 0.282863 3.14</pose>
        <link name='link'>
            <pose>0.05 0.05 0.05 0 -0 0</pose>
            <visual name='visual'>
                <geometry>
                    <box>
                        <size>0.1 0.1 0.1</size>
                    </box>
                </geometry>
            </visual>
            <sensor name='camera' type='camera'>
                <camera>
                    <horizontal_fov>1.13446</horizontal_fov>
                    <image>
                        <width>1920</width>
                        <height>1080</height>
                    </image>
                    <clip>
                        <near>0.01</near>
                        <far>100</far>
                    </clip>
                </camera>
                <always_on>1</always_on>
                <update_rate>30</update_rate>
                <visualize>1</visualize>
                <topic>main_camera</topic>
            </sensor>
        </link>
        <joint name="connector" type="fixed">
          <parent>world</parent>
          <child>link</child>
        </joint>
    </model>
    <model name='angle_camera'>
        <static>1</static>
        <pose relative_to="angle_rotation">2 0 1.75 -0 0.282863 3.14</pose>
        <link name='link'>
            <pose>0.05 0.05 0.05 0 -0 0</pose>
            <visual name='visual'>
                <geometry>
                    <box>
                        <size>0.1 0.1 0.1</size>
                    </box>
                </geometry>
            </visual>
            <sensor name='camera' type='camera'>
                <camera>
                    <horizontal_fov>1.13446</horizontal_fov>
                    <image>
                        <width>1920</width>
                        <height>1080</height>
                    </image>
                    <clip>
                        <near>0.01</near>
                        <far>100</far>
                    </clip>
                </camera>
                <always_on>1</always_on>
                <update_rate>30</update_rate>
                <visualize>1</visualize>
                <topic>angle_camera</topic>
            </sensor>
        </link>
        <joint name="connector" type="fixed">
          <parent>world</parent>
          <child>link</child>
        </joint>
    </model>
    <model name='side_camera'>
        <static>1</static>
        <pose relative_to="side_rotation">2 0 1.75 -0 0.282863 3.14</pose>
        <link name='link'>
            <pose>0.05 0.05 0.05 0 -0 0</pose>
            <visual name='visual'>
                <geometry>
                    <box>
                        <size>0.1 0.1 0.1</size>
                    </box>
                </geometry>
            </visual>
            <sensor name='camera' type='camera'>
                <camera>
                    <horizontal_fov>1.13446</horizontal_fov>
                    <image>
                        <width>1920</width>
                        <height>1080</height>
                    </image>
                    <clip>
                        <near>0.01</near>
                        <far>100</far>
                    </clip>
                </camera>
                <always_on>1</always_on>
                <update_rate>30</update_rate>
                <visualize>1</visualize>
                <topic>side_camera</topic>
            </sensor>
        </link>
        <joint name="connector" type="fixed">
          <parent>world</parent>
          <child>link</child>
        </joint>
    </model>
  </world>
</sdf>

Output

The script produces an image like the following:

rendering_bug

In my actual application, I am creating videos from each sensor input. Notice here how the table is rendered incorrectly, however, the cubes and the robot on top of it are unaffected. Similarly, the ground plane is - in both cases - unaffected. The primary difference between the models is (1) the cubes define the material via ambient/diffuse/specular color tags, (2) the table defines the material via the pbr tag, and (3) the robots textures can not be found (currently investigating why).

side_view_bug.mp4
@FirefoxMetzger FirefoxMetzger added the bug Something isn't working label Oct 18, 2021
@chapulina chapulina added the 🏢 edifice Ignition Edifice label Nov 12, 2021
@chapulina chapulina added the help wanted Extra attention is needed label Nov 12, 2021
@chapulina
Copy link
Contributor

I couldn't reproduce this with a simpler setup on Ubuntu Focal:

  1. ign gazebo --force-version 5 sensors_demo.sdf
  2. Drag the table in: https://app.ignitionrobotics.org/OpenRobotics/fuel/models/Table

image

Is the problem present for you with that simple setup?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 🏢 edifice Ignition Edifice help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants