Closed Mathosmls closed 1 year ago
the sim crashes if I include both models into the sim, but works fine if I only include one of them.
are you able to run the wide angle camera by itself?
I can reproduce the issue. I think the problem is that the waves model uses shaders that only work in ogre2 and the wide angle camera is currently only available in ogre1. For me I can run wide angle camera in ogre1 fine but not together with models that use shaders (e.g. waves, deformable sphere).
In fact, this example world crashes with ogre
gz sim -v 4 shader_param.sdf --render-engine ogre
The underlying problem here is that shaders are not working in ogre1. Those models use glsl version 330. Maybe we just need to convert them to versions compatible with ogre1, e.g. 150
Yes I was able to run only the wide angle camera but I was also able to run only the waves with ogre1. It's when I put them together that the sim crashes. And I don't think that my robot model or my map have shaders, they are just collada files directly exported from blender. Also I added in the details of my issue that my sim crashes when I use a normal camera sensor with ogre1, does ogre1 not support it ?
but I was also able to run only the waves with ogre1.
Want to double check on this. The gui could still be using ogre2 (and only the camera sensor on the server backend is using ogre1). Can you try running with --render-engine ogre
arg? This ensures that both the gui and server are using ogre1.
Also I added in the details of my issue that my sim crashes when I use a normal camera sensor with ogre1, does ogre1 not support it ?
hmm weird, ogre1 should support camera sensors. Try launching the camera_sensor.sdf demo world and see if it also crashes? gz sim -v 4 camera_sensor.sdf --render-engine ogre
When I run gz sim -v 4 camera_sensor.sdf --render-engine ogre
, gazebo opens but my laptop freeze and after few seconds gazebo crashes. The last outputs in my shell :
Stack trace (most recent call last) in thread 3345288:
#30 Object "[0xffffffffffffffff]", at 0xffffffffffffffff, in
#29 Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f80333269ff, in
#28 Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f8033294b42, in
#27 Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f802caccca0, in
#26 Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f802cacbaf1, in QThread::exec()
#25 Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f802ccb875a, in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)
#24 Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f802cd130b7, in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
#23 Object "/lib/x86_64-linux-gnu/libglib-2.0.so.0", at 0x7f802d3193e2, in g_main_context_iteration
#22 Object "/lib/x86_64-linux-gnu/libglib-2.0.so.0", at 0x7f802d3706c7, in
#21 Object "/lib/x86_64-linux-gnu/libglib-2.0.so.0", at 0x7f802d31bd3a, in g_main_context_dispatch
#20 Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f802cd13a66, in
#19 Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f802ccbcf26, in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)
#18 Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f802ccb9e39, in QCoreApplication::notifyInternal2(QObject*, QEvent*)
#17 Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7f802c36c712, in QApplicationPrivate::notify_helper(QObject*, QEvent*)
#16 Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f802cce741d, in QObject::event(QEvent*)
#15 Object "/usr/lib/x86_64-linux-gnu/gz-gui-7/plugins/libMinimalScene.so", at 0x7f7ff801fef8, in gz::gui::plugins::RenderThread::RenderNext(gz::gui::plugins::RenderSync*)
#14 Object "/lib/x86_64-linux-gnu/libQt5Gui.so.5", at 0x7f802af8495e, in QOpenGLContext::doneCurrent()
#13 Object "/usr/lib/x86_64-linux-gnu/qt5/plugins/xcbglintegrations/libqxcb-glx-integration.so", at 0x7f7ffa46bdfc, in
#12 Object "/lib/x86_64-linux-gnu/libGLX.so.0", at 0x7f802a0bc125, in
#11 Object "/lib/x86_64-linux-gnu/libGLX.so.0", at 0x7f802a0b7640, in
#10 Object "/lib/x86_64-linux-gnu/libGLX_mesa.so.0", at 0x7f7ffa3dc2c5, in
#9 Object "/usr/lib/x86_64-linux-gnu/dri/iris_dri.so", at 0x7f7ff88b6168, in
#8 Object "/usr/lib/x86_64-linux-gnu/dri/iris_dri.so", at 0x7f7ff88b24dd, in
#7 Object "/usr/lib/x86_64-linux-gnu/dri/iris_dri.so", at 0x7f7ff8988aea, in
#6 Object "/usr/lib/x86_64-linux-gnu/dri/iris_dri.so", at 0x7f7ff8a167ff, in
#5 Object "/usr/lib/x86_64-linux-gnu/dri/iris_dri.so", at 0x7f7ff89727a6, in
#4 Object "/usr/lib/x86_64-linux-gnu/dri/iris_dri.so", at 0x7f7ff955de5e, in
#3 Object "/usr/lib/x86_64-linux-gnu/dri/iris_dri.so", at 0x7f7ff889c8b6, in
#2 Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f80332287f2, in abort
#1 Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f8033242475, in raise
#0 Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f8033296a7c, in pthread_kill
Aborted (Signal sent by tkill() 3345216 1000)
[Dbg] [SignalHandler.cc:141] Received signal[2].
[Dbg] [ServerPrivate.cc:115] Server received signal[2]
[Dbg] [Sensors.cc:428] SensorsPrivate::Stop
[Dbg] [Sensors.cc:414] SensorsPrivate::RenderThread stopped
It does more or less the same thing when I try to run the example world wideanglecamera :/
Want to double check on this. The gui could still be using ogre2 (and only the camera sensor on the server backend is using ogre1). Can you try running with --render-engine ogre arg? This ensures that both the gui and server are using ogre1.
But you were right for that, thanks ! I thought that <render_engine>ogre</render_engine>
was enough, sorry.
ok it looks like ogre render engine does not work on your system but ogre2 does. Unfortunately wide angle camera is not yet available in ogre2. The ogre log may have some info on what went wrong, you can find it in ~/.gz/rendering/ogre.log
. Can you post the log?
Here it the log :
09:56:17: Creating resource group General
09:56:17: Creating resource group Internal
09:56:17: Creating resource group Autodetect
09:56:17: SceneManagerFactory for type 'DefaultSceneManager' registered.
09:56:17: Registering ResourceManager for type Material
09:56:17: Registering ResourceManager for type Mesh
09:56:17: Registering ResourceManager for type Skeleton
09:56:17: MovableObjectFactory for type 'ParticleSystem' registered.
09:56:17: ArchiveFactory for archive type FileSystem registered.
09:56:17: ArchiveFactory for archive type Zip registered.
09:56:17: ArchiveFactory for archive type EmbeddedZip registered.
09:56:17: DDS codec registering
09:56:17: FreeImage version: 3.18.0
09:56:17: This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
09:56:17: 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
09:56:17: PVRTC codec registering
09:56:17: ETC codec registering
09:56:17: Registering ResourceManager for type HighLevelGpuProgram
09:56:17: Registering ResourceManager for type Compositor
09:56:17: MovableObjectFactory for type 'Entity' registered.
09:56:17: MovableObjectFactory for type 'Light' registered.
09:56:17: MovableObjectFactory for type 'BillboardSet' registered.
09:56:17: MovableObjectFactory for type 'ManualObject' registered.
09:56:17: MovableObjectFactory for type 'BillboardChain' registered.
09:56:17: MovableObjectFactory for type 'RibbonTrail' registered.
09:56:17: *-*-* OGRE Initialising
09:56:17: *-*-* Version 1.9.0 (Ghadamon)
09:56:17: OverlayElementFactory for type Panel registered.
09:56:17: OverlayElementFactory for type BorderPanel registered.
09:56:17: OverlayElementFactory for type TextArea registered.
09:56:17: Registering ResourceManager for type Font
09:56:17: Loading library /usr/lib/x86_64-linux-gnu/OGRE-1.9.0/RenderSystem_GL.so
09:56:17: Installing plugin: GL RenderSystem
09:56:17: OpenGL Rendering Subsystem created.
09:56:17: Plugin successfully installed
09:56:17: Loading library /usr/lib/x86_64-linux-gnu/OGRE-1.9.0/Plugin_ParticleFX.so
09:56:17: Installing plugin: ParticleFX
09:56:17: Particle Emitter Type 'Point' registered
09:56:17: Particle Emitter Type 'Box' registered
09:56:17: Particle Emitter Type 'Ellipsoid' registered
09:56:17: Particle Emitter Type 'Cylinder' registered
09:56:17: Particle Emitter Type 'Ring' registered
09:56:17: Particle Emitter Type 'HollowEllipsoid' registered
09:56:17: Particle Affector Type 'LinearForce' registered
09:56:17: Particle Affector Type 'ColourFader' registered
09:56:17: Particle Affector Type 'ColourFader2' registered
09:56:17: Particle Affector Type 'ColourImage' registered
09:56:17: Particle Affector Type 'ColourInterpolator' registered
09:56:17: Particle Affector Type 'Scaler' registered
09:56:17: Particle Affector Type 'Rotator' registered
09:56:17: Particle Affector Type 'DirectionRandomiser' registered
09:56:17: Particle Affector Type 'DeflectorPlane' registered
09:56:17: Plugin successfully installed
09:56:17: Loading library /usr/lib/x86_64-linux-gnu/OGRE-1.9.0/Plugin_BSPSceneManager.so
09:56:17: Installing plugin: BSP Scene Manager
09:56:17: Plugin successfully installed
09:56:17: Loading library /usr/lib/x86_64-linux-gnu/OGRE-1.9.0/Plugin_OctreeSceneManager.so
09:56:17: Installing plugin: Octree Scene Manager
09:56:17: Plugin successfully installed
09:56:17: CPU Identifier & Features
09:56:17: -------------------------
09:56:17: * CPU ID: GenuineIntel: 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
09:56:17: * SSE: yes
09:56:17: * SSE2: yes
09:56:17: * SSE3: yes
09:56:17: * MMX: yes
09:56:17: * MMXEXT: yes
09:56:17: * 3DNOW: no
09:56:17: * 3DNOWEXT: no
09:56:17: * CMOV: yes
09:56:17: * TSC: yes
09:56:17: * FPU: yes
09:56:17: * PRO: yes
09:56:17: * HT: no
09:56:17: -------------------------
09:56:17: ******************************
*** Starting GLX Subsystem ***
******************************
09:56:17: Registering ResourceManager for type Texture
09:56:17: Added resource location '/usr/share/gz/gz-rendering7/ogre/media' of type 'FileSystem' to resource group 'General'
09:56:17: Added resource location '/usr/share/gz/gz-rendering7/ogre/media/materials/programs' of type 'FileSystem' to resource group 'General'
09:56:17: Added resource location '/usr/share/gz/gz-rendering7/ogre/media/materials/scripts' of type 'FileSystem' to resource group 'General'
09:56:17: Added resource location '/usr/share/gz/gz-rendering7/ogre/media/materials/textures' of type 'FileSystem' to resource group 'General'
09:56:17: Creating resource group Fonts
09:56:17: Added resource location '/usr/share/gz/gz-rendering7/ogre/media/fonts' of type 'FileSystem' to resource group 'Fonts'
09:56:17: GLRenderSystem::_createRenderWindow "OgreWindow(0)_41943041", 1x1 windowed miscParams: FSAA=0 border=none contentScalingFactor=1.000000 macAPI=cocoa macAPICocoaUseNSView=true parentWindowHandle=41943041 stereoMode=Frame Sequential
09:56:17: GLXWindow::create used FBConfigID = 482
09:56:17: GL_VERSION = 4.6 (Compatibility Profile) Mesa 22.2.5
09:56:17: GL_VENDOR = Intel
09:56:17: GL_RENDERER = Mesa Intel(R) Xe Graphics (TGL GT2)
09:56:17: 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_3DFX_texture_compression_FXT1 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_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_EXT_packed_float GL_EXT_pixel_buffer_object GL_EXT_texture_compression_dxt1 GL_EXT_texture_compression_rgtc 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_EXT_draw_buffers2 GL_EXT_draw_instanced GL_EXT_gpu_program_parameters GL_EXT_gpu_shader4 GL_EXT_texture_array GL_EXT_texture_integer GL_EXT_texture_sRGB_decode GL_EXT_timer_query GL_OES_EGL_image GL_AMD_performance_monitor 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_depth_clamp_separate GL_AMD_draw_buffers_blend GL_AMD_seamless_cubemap_per_texture GL_AMD_shader_stencil_export 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_stencil_export 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_vertex_attrib_64bit 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_AMD_pinned_memory 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_framebuffer_fetch GL_EXT_shader_integer_mix GL_INTEL_performance_query 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_blend_equation_advanced_coherent GL_KHR_context_flush_control GL_KHR_robust_buffer_access_behavior GL_ARB_ES3_2_compatibility GL_ARB_fragment_shader_interlock GL_ARB_gpu_shader_int64 GL_ARB_parallel_shader_compile GL_ARB_post_depth_coverage GL_ARB_shader_atomic_counter_ops GL_ARB_shader_ballot GL_ARB_shader_clock GL_ARB_shader_viewport_layer_array GL_EXT_shader_samples_identical GL_EXT_texture_sRGB_R8 GL_KHR_no_error GL_KHR_texture_compression_astc_sliced_3d GL_NV_fragment_shader_interlock GL_ARB_gl_spirv GL_ARB_spirv_extensions GL_MESA_shader_integer_functions GL_ARB_polygon_offset_clamp GL_ARB_texture_filter_anisotropic GL_EXT_memory_object GL_EXT_memory_object_fd GL_EXT_semaphore GL_EXT_semaphore_fd GL_KHR_parallel_shader_compile GL_EXT_EGL_image_storage GL_EXT_shader_framebuffer_fetch_non_coherent GL_EXT_texture_shadow_lod GL_INTEL_blackhole_render GL_INTEL_shader_atomic_float_minmax GL_INTEL_shader_integer_functions2 GL_MESA_framebuffer_flip_y GL_NV_compute_shader_derivatives GL_EXT_EGL_sync GL_EXT_demote_to_helper_invocation
09:56:17: Supported GLX extensions: GLX_ARB_context_flush_control 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_no_config_context GLX_EXT_swap_control GLX_EXT_swap_control_tear GLX_EXT_texture_from_pixmap GLX_EXT_visual_info GLX_EXT_visual_rating 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_video_sync
09:56:17: ***************************
09:56:17: *** GL Renderer Started ***
09:56:17: ***************************
09:56:17: Registering ResourceManager for type GpuProgram
09:56:17: GLSL support detected
09:56:17: GL: Using GL_EXT_framebuffer_object for rendering to textures (best)
09:56:17: FBO PF_UNKNOWN depth/stencil support: D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8
09:56:17: FBO PF_L8 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8
09:56:17: FBO PF_L16 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8
09:56:17: FBO PF_A8 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8
09:56:17: FBO PF_R5G6B5 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8
09:56:17: FBO PF_B5G6R5 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8
09:56:17: FBO PF_A4R4G4B4 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8
09:56:17: FBO PF_A1R5G5B5 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8
09:56:17: FBO PF_R8G8B8 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8
09:56:17: FBO PF_B8G8R8 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8
09:56:17: FBO PF_A8R8G8B8 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8
09:56:17: FBO PF_B8G8R8A8 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8
09:56:17: FBO PF_A2R10G10B10 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8
09:56:17: FBO PF_A2B10G10R10 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8
09:56:17: FBO PF_FLOAT16_RGB depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8
09:56:17: FBO PF_FLOAT16_RGBA depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8
09:56:17: FBO PF_FLOAT32_RGB depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8
09:56:17: FBO PF_FLOAT32_RGBA depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8
09:56:17: FBO PF_X8R8G8B8 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8
09:56:17: FBO PF_X8B8G8R8 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8
09:56:17: FBO PF_SHORT_RGBA depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8
09:56:17: FBO PF_R3G3B2 depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8
09:56:17: FBO PF_FLOAT16_R depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8
09:56:17: FBO PF_FLOAT32_R depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8
09:56:17: FBO PF_FLOAT16_GR depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8
09:56:17: FBO PF_FLOAT32_GR depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8
09:56:17: FBO PF_SHORT_RGB depth/stencil support: D0S0 D0S1 D0S4 D0S8 D0S16 D16S0 D24S0 D32S0 Packed-D24S8
09:56:17: [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 PF_FLOAT16_GR PF_FLOAT32_GR PF_SHORT_RGB
09:56:17: RenderSystem capabilities
09:56:17: -------------------------
09:56:17: RenderSystem Name: OpenGL Rendering Subsystem
09:56:17: GPU Vendor: intel
09:56:17: Device Name: Mesa Intel(R) Xe Graphics (TGL GT2)
09:56:17: Driver Version: 4.6.0.0
09:56:17: * Fixed function pipeline: yes
09:56:17: * Hardware generation of mipmaps: no
09:56:17: * Texture blending: yes
09:56:17: * Anisotropic texture filtering: yes
09:56:17: * Dot product texture operation: yes
09:56:17: * Cube mapping: yes
09:56:17: * Hardware stencil buffer: yes
09:56:17: - Stencil depth: 8
09:56:17: - Two sided stencil support: yes
09:56:17: - Wrap stencil values: yes
09:56:17: * Hardware vertex / index buffers: yes
09:56:17: * Vertex programs: yes
09:56:17: * Number of floating-point constants for vertex programs: 2048
09:56:17: * Number of integer constants for vertex programs: 0
09:56:17: * Number of boolean constants for vertex programs: 0
09:56:17: * Fragment programs: yes
09:56:17: * Number of floating-point constants for fragment programs: 2048
09:56:17: * Number of integer constants for fragment programs: 0
09:56:17: * Number of boolean constants for fragment programs: 0
09:56:17: * Geometry programs: no
09:56:17: * Number of floating-point constants for geometry programs: 0
09:56:17: * Number of integer constants for geometry programs: 48
09:56:17: * Number of boolean constants for geometry programs: 0
09:56:17: * Tesselation Hull programs: no
09:56:17: * Number of floating-point constants for tesselation hull programs: 1
09:56:17: * Number of integer constants for tesselation hull programs: 0
09:56:17: * Number of boolean constants for tesselation hull programs: 0
09:56:17: * Tesselation Domain programs: no
09:56:17: * Number of floating-point constants for tesselation domain programs: 0
09:56:17: * Number of integer constants for tesselation domain programs: 48
09:56:17: * Number of boolean constants for tesselation domain programs: 0
09:56:17: * Compute programs: no
09:56:17: * Number of floating-point constants for compute programs: 0
09:56:17: * Number of integer constants for compute programs: 0
09:56:17: * Number of boolean constants for compute programs: 0
09:56:17: * Supported Shader Profiles: arbfp1 arbvp1 glsl ps_1_1 ps_1_2 ps_1_3 ps_1_4
09:56:17: * Texture Compression: yes
09:56:17: - DXT: yes
09:56:17: - VTC: no
09:56:17: - PVRTC: no
09:56:17: - ATC: no
09:56:17: - ETC1: no
09:56:17: - ETC2: no
09:56:17: - BC4/BC5: no
09:56:17: - BC6H/BC7: no
09:56:17: * Scissor Rectangle: yes
09:56:17: * Hardware Occlusion Query: yes
09:56:17: * User clip planes: yes
09:56:17: * VET_UBYTE4 vertex element type: yes
09:56:17: * Infinite far plane projection: yes
09:56:17: * Hardware render-to-texture: yes
09:56:17: * Floating point textures: yes
09:56:17: * Non-power-of-two textures: yes
09:56:17: * 1d textures: yes
09:56:17: * Volume textures: yes
09:56:17: * Multiple Render Targets: 8
09:56:17: - With different bit depths: yes
09:56:17: * Point Sprites: yes
09:56:17: * Extended point parameters: yes
09:56:17: * Max Point Size: 255
09:56:17: * Vertex texture fetch: yes
09:56:17: * Number of world matrices: 0
09:56:17: * Number of texture units: 16
09:56:17: * Stencil buffer depth: 8
09:56:17: * Number of vertex blend matrices: 0
09:56:17: - Max vertex textures: 32
09:56:17: - Vertex textures shared: yes
09:56:17: * Render to Vertex Buffer : no
09:56:17: * Hardware Atomic Counters: no
09:56:17: * GL 1.5 without VBO workaround: no
09:56:17: * Frame Buffer objects: yes
09:56:17: * Frame Buffer objects (ARB extension): no
09:56:17: * Frame Buffer objects (ATI extension): no
09:56:17: * PBuffer support: yes
09:56:17: * GL 1.5 without HW-occlusion workaround: no
09:56:17: * Vertex Array Objects: no
09:56:17: * Separate shader objects: no
09:56:17: DefaultWorkQueue('Root') initialising on thread 7f2e1e3ff640.
09:56:17: DefaultWorkQueue('Root')::WorkerFunc - thread 7f2dff7fe640 starting.
09:56:17: DefaultWorkQueue('Root')::WorkerFunc - thread 7f2dfdffb640 starting.
09:56:17: DefaultWorkQueue('Root')::WorkerFunc - thread 7f2dfeffd640 starting.
09:56:17: DefaultWorkQueue('Root')::WorkerFunc - thread 7f2dfe7fc640 starting.
09:56:17: DefaultWorkQueue('Root')::WorkerFunc - thread 7f2dfffff640 starting.
09:56:17: DefaultWorkQueue('Root')::WorkerFunc - thread 7f2dfd7fa640 starting.
09:56:17: DefaultWorkQueue('Root')::WorkerFunc - thread 7f2dfcff9640 starting.
09:56:17: DefaultWorkQueue('Root')::WorkerFunc - thread 7f2df7fff640 starting.
09:56:17: Particle Renderer Type 'billboard' registered
09:56:17: SceneManagerFactory for type 'BspSceneManager' registered.
09:56:17: Registering ResourceManager for type BspLevel
09:56:17: SceneManagerFactory for type 'OctreeSceneManager' registered.
09:56:17: Parsing scripts for resource group Autodetect
09:56:17: Finished parsing scripts for resource group Autodetect
09:56:17: Creating resources for group Autodetect
09:56:17: All done
09:56:17: Parsing scripts for resource group Fonts
09:56:17: Parsing script gz-rendering.fontdef
09:56:17: Finished parsing scripts for resource group Fonts
09:56:17: Creating resources for group Fonts
09:56:17: All done
09:56:17: Parsing scripts for resource group General
09:56:17: Parsing script distortion.material
09:56:17: Parsing script wide_angle_camera.material
09:56:17: Parsing script picker.material
09:56:17: Parsing script point_cloud_point.material
09:56:17: Parsing script pssm.material
09:56:17: Parsing script gaussian_noise.material
09:56:17: Parsing script thermal.material
09:56:17: Parsing script gpu_rays.material
09:56:17: Parsing script distortion.compositor
09:56:17: Parsing script thermal_camera.compositor
09:56:17: Parsing script gaussian_noise.compositor
09:56:17: Parsing script wide_camera_lens_map.compositor
09:56:17: Finished parsing scripts for resource group General
09:56:17: Creating resources for group General
09:56:17: All done
09:56:17: Parsing scripts for resource group Internal
09:56:17: Finished parsing scripts for resource group Internal
09:56:17: Creating resources for group Internal
09:56:17: All done
09:56:17: Added resource location '/usr/share/gz/gz-rendering7/ogre/media/rtshaderlib150' of type 'FileSystem' to resource group 'General'
09:56:17: Creating resource group ShaderGeneratorResourceGroup
09:56:17: Added resource location '/home/mathis/.gz/rendering/ogre-rtshader/mathis-rtshaderlibcache/' of type 'FileSystem' to resource group 'ShaderGeneratorResourceGroup'
09:56:17: Added resource location '/usr/share/gz/gz-rendering7/media/materials/textures/com.png' of type 'FileSystem' to resource group 'General'
09:56:17: Added resource location '/home/mathis/.gz/fuel/fuel.gazebosim.org/openrobotics/models/construction cone/2/meshes' of type 'FileSystem' to resource group 'General' with recursi09:56:17: Added resource location '/home/mathis/.gz/fuel/fuel.gazebosim.org/openrobotics/models/construction cone/2/meshes' of type 'FileSystem' to resource group 'General' with recursive option
09:56:17: Initialising resource group General
09:56:17: Added resource location '/home/mathis/.gz/fuel/fuel.gazebosim.org/openrobotics/models/construction cone/2/materials/textures/Construction_Cone_Diffuse.png' of type 'FileSystem' to resource group 'General'
09:56:17: Texture: /home/mathis/.gz/fuel/fuel.gazebosim.org/openrobotics/models/construction cone/2/materials/textures/Construction_Cone_Diffuse.png: Loading 1 faces(PF_A8R8G8B8,1024x1024x1) with 5 generated mipmaps from Image. Internal format 09:57:06: Unregistering ResourceManager for type Font
09:57:06: DefaultWorkQueue('Root') shutting down on thread 7f2e1e3ff640.
09:57:06: DefaultWorkQueue('Root')::WorkerFunc - thread 7f2dfe7fc640 stopped.
09:57:06: DefaultWorkQueue('Root')::WorkerFunc - thread 7f2dfeffd640 stopped.
09:57:06: DefaultWorkQueue('Root')::WorkerFunc - thread 7f2dfd7fa640 stopped.
09:57:06: DefaultWorkQueue('Root')::WorkerFunc - thread 7f2dfcff9640 stopped.
09:57:06: DefaultWorkQueue('Root')::WorkerFunc - thread 7f2df7fff640 stopped.
09:57:06: DefaultWorkQueue('Root')::WorkerFunc - thread 7f2dfffff640 stopped.
09:57:06: DefaultWorkQueue('Root')::WorkerFunc - thread 7f2dfdffb640 stopped.
09:57:06: DefaultWorkQueue('Root')::WorkerFunc - thread 7f2dff7fe640 stopped.
09:57:06: Unregistering ResourceManager for type BspLevel
09:57:06: *-*-* OGRE Shutdown
09:57:06: Unregistering ResourceManager for type Compositor
09:57:06: Unregistering ResourceManager for type Skeleton
09:57:06: Unregistering ResourceManager for type Mesh
09:57:06: Unregistering ResourceManager for type HighLevelGpuProgram
09:57:06: Uninstalling plugin: Octree Scene Manager
09:57:06: Plugin successfully uninstalled
09:57:06: Unloading library /usr/lib/x86_64-linux-gnu/OGRE-1.9.0/Plugin_OctreeSceneManager.so
09:57:06: Uninstalling plugin: BSP Scene Manager
09:57:06: Plugin successfully uninstalled
09:57:06: Unloading library /usr/lib/x86_64-linux-gnu/OGRE-1.9.0/Plugin_BSPSceneManager.so
09:57:06: Uninstalling plugin: ParticleFX
09:57:06: Plugin successfully uninstalled
09:57:06: Unloading library /usr/lib/x86_64-linux-gnu/OGRE-1.9.0/Plugin_ParticleFX.so
09:57:06: Uninstalling plugin: GL RenderSystem
09:57:06: Unregistering ResourceManager for type GpuProgram
09:57:06: ******************************
*** Stopping GLX Subsystem ***
******************************
09:57:06: Unregistering ResourceManager for type Texture
09:57:06: Plugin successfully uninstalled
09:57:06: Unloading library /usr/lib/x86_64-linux-gnu/OGRE-1.9.0/RenderSystem_GL.so
09:57:06: Unregistering ResourceManager for type Material
The ogre log does not reveal any errors. I thought it would then be Qt issue but it seems like Qt + ogre2 works fine for you. It's not ideal but you may have to go with ogre2 and use a normal camera + large horizontal FOV.
Yeah that's what I did, at least users understand that is supposed to be a wide angle camera. Anyway, Thank you very much for your help and your time ! Do I close this issue as not planned or do I let it open ?
ok I'll close this issue. By the way, wide angle camera support for ogre2 will be available in the next version of Gazebo (Harmonic) which will be released in Sept. Related PR: https://github.com/gazebosim/gz-rendering/pull/733
I can reproduce the issue. I think the problem is that the waves model uses shaders that only work in ogre2 and the wide angle camera is currently only available in ogre1. For me I can run wide angle camera in ogre1 fine but not together with models that use shaders (e.g. waves, deformable sphere).
In fact, this example world crashes with ogre
gz sim -v 4 shader_param.sdf --render-engine ogre
The underlying problem here is that shaders are not working in ogre1. Those models use glsl version 330. Maybe we just need to convert them to versions compatible with ogre1, e.g. 150
I am running into this exact issue. It is a shaders issue and running the waves plugin or the command you suggested give the same void Ogre::GpuProgramParameters::_writeRawConstants(size_t, const int*, size_t): Assertion `physicalIndex + count <= mIntConstants.size()' failed
error but anything without those shaders works (ie wide angle camera). I can't switch to Ogre2 since that introduces a lot of other issues (I am running in a VM with 3d acceleration on ARM64 and with Ogre2 its just a blank or flickering screen)
Looking at the syntax changes between 330 and 150 I can't find incompatibility in the waves shader files. The ones I am using are here: https://github.com/srmainwaring/wave_sim_vrx
In another forum someone wrote that the error message means that "It says that Ogre is trying to write more constants that the shader has" https://forums.ogre3d.org/viewtopic.php?t=24961&start=425
Any ideas?
The waves model uses the shader param system. In the model.sdf file, you'll see blocks like
<param>
<shader>vertex</shader>
<name>Nwaves</name>
<type>int</type>
<value>3</value>
</param>
<param>
<shader>vertex</shader>
<name>rescale</name>
<type>float</type>
<value>0.5</value>
</param>
<param>
<shader>vertex</shader>
<name>bumpScale</name>
<type>float_array</type>
<value>25 25</value>
</param>
These are for setting variables defined in the shader script. So in the above example, we expect variables like Nwaves
, rescale
, bumpScale
, etc to exist in the vertex shader. Same goes for the fragrment shader.
I'm assuming you took the shaders from here. Looking at the shaders there, you can probably just remove <param>
blocks for variables that are not used in the glsl 150 version e.g. Nwaves
, worldviewproj_matrix
. You can find a list of variables needed by the 150 version in the material script file
One special case is time
. We'll need to keep this <param>
block:
<param>
<shader>vertex</shader>
<name>t</name>
<value>TIME</value>
</param>
and change the variable in vertex shader from time
to t
.
Hi @iche033, thanks for the quick response.
I am fairly new to all this so thanks for the detailed explanation. The project I am trying to run is the one found here: https://github.com/osrf/vrx
This is the model.sdf file for the waves in the project (can be found under vrx_gz/models/coast_waves/model.sdf):
<?xml version="1.0"?>
<sdf version="1.6">
<model name="waves">
<static>true</static>
<link name="link">
<visual name= "wave_visual">
<geometry>
<mesh>
<uri>meshes/waterlow.dae</uri>
</mesh>
</geometry>
<plugin filename="libWaveVisual.so" name="vrx::WaveVisual">
<shader>
<vertex>materials/programs/GerstnerWaves_vs_330.glsl</vertex>
<fragment>materials/programs/GerstnerWaves_fs_330.glsl</fragment>
<parameters>
<rescale>0.125</rescale>
<bumpScale>75 75</bumpScale>
<bumpSpeed>0.01 0.0</bumpSpeed>
<hdrMultiplier>0.4</hdrMultiplier>
<fresnelPower>5.0</fresnelPower>
<shallowColor>0 0.1 0.2 1.0</shallowColor>
<deepColor>0 0.05 0.2 1.0</deepColor>
</parameters>
</shader>
<wavefield>
<topic>/vrx/wavefield/parameters</topic>
</wavefield>
</plugin>
<visibility_flags>8</visibility_flags>
</visual>
</link>
</model>
</sdf>
you can probably just remove blocks for variables that are not used in the glsl 150 version e.g. Nwaves, worldviewproj_matrix.
How do I know which ones are not used in the glsl 150 version? I tried commenting them all out but the error still occurred.
You can find a list of variables needed by the 150 version in the material script file
In the same coast_waves directory of the project I cannot find a script file for the waves, am I looking in the wrong place?
EDIT: Just opened the model.config file, didn't realize I'm talking to the author :)
<author>
<name>Ian Chen</name>
</author>
ok I see. VRX is using a different system to render the waves so my previous instructions are less relevant.
I did some tests. To have waves working in ogre 1.x, you'll need these changes from https://github.com/gazebosim/gz-rendering/pull/908. In that pull request, I ported the vertex and fragment shaders to glsl version 150 so I think you should be able to use those and replace the ones in VRX.
This will only get the the waves working with VRX though. There could be other things in VRX that don't work properly in ogre 1.x.
Unfortunately, replacing the respective fragment and vertex files from the ones in the pull request did not seem to fix the issue. It still has the exact same error.
I can verify it is only the waves causing the issues since removing the shaders lines from the coast waves sdf file allows the rest of the environment to load in without issues (just of course there are no waves anymore).
I did see the changes in the ogre src code and was wondering if I need to make those as well maybe? But I am not sure how.
Environment
Gazebo Garden, binary
Rendering plugin: ogre
Generally, mention all circumstances that might affect rendering capabilities:
Rendering system info:
On Linux, provide the outputs of the following commands:
Description
Steps to reproduce
Output