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

PointCloud2: Huge point size when window is maximized #1508

Closed
flynneva opened this issue May 26, 2020 · 83 comments · Fixed by #1559
Closed

PointCloud2: Huge point size when window is maximized #1508

flynneva opened this issue May 26, 2020 · 83 comments · Fixed by #1559

Comments

@flynneva
Copy link
Contributor

flynneva commented May 26, 2020

looks like in the noetic rviz release there seems to be a bug when you try to change the point size for pointcloud2 topics.

Here is a screenshot of the default pointcloud points that show up when I add in the viz, and yes I have tried to change the type/size of it:
pointcloud_points

Your environment

  • OS Version: e.g. Ubuntu 20.04
  • ROS Distro: Noetic
  • RViz, Qt, OGRE, OpenGl version as printed by rviz:
[ INFO] [1590534094.203451371]: rviz version 1.14.0
[ INFO] [1590534094.203502146]: compiled against Qt version 5.12.8
[ INFO] [1590534094.203514196]: compiled against OGRE version 1.9.0 (Ghadamon)
[ INFO] [1590534094.212776806]: Forcing OpenGl version 0.
[ INFO] [1590534094.416371615]: Stereo is NOT SUPPORTED
[ INFO] [1590534094.416444253]: OpenGl version: 4.6 (GLSL 4.6).
@rhaschke
Copy link
Contributor

Sorry, but I cannot reproduce your issue. Showing the test point cloud generated by rosrun rviz send_point_cloud_2, I get the expected results and point size can be changed:

image

@doisyg
Copy link
Contributor

doisyg commented May 27, 2020

A bit similar here, points from pcl or LaserScan appears very small, size cannot be changed and with no color, unless rviz is started with export LIBGL_ALWAYS_SOFTWARE=1
Ubuntu 20.04 and Intel x86 computer with no discrete GPU, maybe openGL or gpu driver related

@rhaschke
Copy link
Contributor

This is weird. I tested on two different laptops, no discrete GPU as well. No problems.

@flynneva
Copy link
Contributor Author

I thought it was weird that the console output printed "Forcing OpenGL version 0". is that normal output?

@doisyg
Copy link
Contributor

doisyg commented May 28, 2020

On my laptop with a discrete nvidia GPU, no issue but on another computer Intel only, same issue (all points are small and colorless)

@flynneva
Copy link
Contributor Author

my computer has an Intel as well.

@rhaschke
Copy link
Contributor

I'm running on an Intel "GPU" as well. However, the OpenGL version reported is different for me:

[ INFO] ros.rviz: rviz version 1.14.0
[ INFO] ros.rviz: compiled against Qt version 5.12.8
[ INFO] ros.rviz: compiled against OGRE version 1.9.0 (Ghadamon)
[ INFO] ros.rviz: Forcing OpenGl version 0.
[ INFO] ros.rviz: Stereo is NOT SUPPORTED
[ INFO] ros.rviz: OpenGl version: 3 (GLSL 1.3).

Could you please report your installed (software) OpenGL packages? Mine are:

$ dpkg -l | grep mesa
ii  libegl-mesa0:amd64                        20.0.4-2ubuntu1                     amd64        free implementation of the EGL API -- Mesa vendor library
ii  libgl1-mesa-dev:amd64                     20.0.4-2ubuntu1                     amd64        transitional dummy package
ii  libgl1-mesa-dri:amd64                     20.0.4-2ubuntu1                     amd64        free implementation of the OpenGL API -- DRI modules
ii  libglapi-mesa:amd64                       20.0.4-2ubuntu1                     amd64        free implementation of the GL API -- shared library
ii  libglu1-mesa:amd64                        9.0.1-1build1                       amd64        Mesa OpenGL utility library (GLU)
ii  libglu1-mesa-dev:amd64                    9.0.1-1build1                       amd64        Mesa OpenGL utility library -- development files
ii  libglx-mesa0:amd64                        20.0.4-2ubuntu1                     amd64        free implementation of the OpenGL API -- GLX vendor library
ii  mesa-utils                                8.4.0-1build1                       amd64        Miscellaneous Mesa GL utilities
ii  mesa-va-drivers:amd64                     20.0.4-2ubuntu1                     amd64        Mesa VA-API video acceleration drivers
ii  mesa-vdpau-drivers:amd64                  20.0.4-2ubuntu1                     amd64        Mesa VDPAU video acceleration drivers
ii  mesa-vulkan-drivers:amd64                 20.0.4-2ubuntu1                     amd64        Mesa Vulkan graphics drivers

@doisyg
Copy link
Contributor

doisyg commented May 29, 2020

On the Intel platform:

$ rviz
[ INFO] [${node}]: rviz version 1.14.0
[ INFO] [${node}]: compiled against Qt version 5.12.8
[ INFO] [${node}]: compiled against OGRE version 1.9.0 (Ghadamon)
[ INFO] [/rviz_1590744687884621354]: Forcing OpenGl version 0.
[ INFO] [/rviz_1590744687884621354]: Stereo is NOT SUPPORTED
[ INFO] [/rviz_1590744687884621354]: OpenGl version: 4.6 (GLSL 4.6).

and


$ dpkg -l | grep mesa
ii  libegl-mesa0:amd64                          20.0.4-2ubuntu1                       amd64        free implementation of the EGL API -- Mesa vendor library
ii  libegl1-mesa-dev:amd64                      20.0.4-2ubuntu1                       amd64        free implementation of the EGL API -- development files
ii  libgl1-mesa-dev:amd64                       20.0.4-2ubuntu1                       amd64        transitional dummy package
ii  libgl1-mesa-dri:amd64                       20.0.4-2ubuntu1                       amd64        free implementation of the OpenGL API -- DRI modules
ii  libglapi-mesa:amd64                         20.0.4-2ubuntu1                       amd64        free implementation of the GL API -- shared library
ii  libglu1-mesa:amd64                          9.0.1-1build1                         amd64        Mesa OpenGL utility library (GLU)
ii  libglu1-mesa-dev:amd64                      9.0.1-1build1                         amd64        Mesa OpenGL utility library -- development files
ii  libglx-mesa0:amd64                          20.0.4-2ubuntu1                       amd64        free implementation of the OpenGL API -- GLX vendor library
ii  mesa-va-drivers:amd64                       20.0.4-2ubuntu1                       amd64        Mesa VA-API video acceleration drivers
ii  mesa-vdpau-drivers:amd64                    20.0.4-2ubuntu1                       amd64        Mesa VDPAU video acceleration drivers
ii  mesa-vulkan-drivers:amd64                   20.0.4-2ubuntu1                       amd64        Mesa Vulkan graphics drivers

@doisyg
Copy link
Contributor

doisyg commented May 29, 2020

$ clinfo
Number of platforms                               1
  Platform Name                                   Intel(R) OpenCL HD Graphics
  Platform Vendor                                 Intel(R) Corporation
  Platform Version                                OpenCL 2.1 
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_byte_addressable_store cl_khr_fp16 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_icd cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_intel_subgroups cl_intel_required_subgroup_size cl_intel_subgroups_short cl_khr_spir cl_intel_accelerator cl_intel_driver_diagnostics cl_khr_priority_hints cl_khr_throttle_hints cl_khr_create_command_queue cl_intel_subgroups_char cl_intel_subgroups_long cl_khr_fp64 cl_khr_subgroups cl_khr_il_program cl_intel_spirv_device_side_avc_motion_estimation cl_intel_spirv_media_block_io cl_intel_spirv_subgroups cl_khr_spirv_no_integer_wrap_decoration cl_intel_unified_shared_memory_preview cl_khr_mipmap_image cl_khr_mipmap_image_writes cl_intel_planar_yuv cl_intel_packed_yuv cl_intel_motion_estimation cl_intel_device_side_avc_motion_estimation cl_intel_advanced_motion_estimation cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_image2d_from_buffer cl_khr_depth_images cl_intel_media_block_io cl_khr_3d_image_writes cl_intel_va_api_media_sharing 
  Platform Host timer resolution                  1ns
  Platform Extensions function suffix             INTEL

  Platform Name                                   Intel(R) OpenCL HD Graphics
Number of devices                                 1
  Device Name                                     Intel(R) Gen9 HD Graphics NEO
  Device Vendor                                   Intel(R) Corporation
  Device Vendor ID                                0x8086
  Device Version                                  OpenCL 2.1 NEO 
  Driver Version                                  20.20.16837
  Device OpenCL C Version                         OpenCL C 2.0 
  Device Type                                     GPU
  Device Profile                                  FULL_PROFILE
  Device Available                                Yes
  Compiler Available                              Yes
  Linker Available                                Yes
  Max compute units                               24
  Max clock frequency                             1150MHz
  Device Partition                                (core)
    Max number of sub-devices                     0
    Supported partition types                     None, None
    Supported affinity domains                    (n/a)
  Max work item dimensions                        3
  Max work item sizes                             256x256x256
  Max work group size                             256
  Preferred work group size multiple              32
  Max sub-groups per work group                   32
  Sub-group sizes (Intel)                         8, 16, 32
  Preferred / native vector sizes                 
    char                                                16 / 16      
    short                                                8 / 8       
    int                                                  4 / 4       
    long                                                 1 / 1       
    half                                                 8 / 8        (cl_khr_fp16)
    float                                                1 / 1       
    double                                               1 / 1        (cl_khr_fp64)
  Half-precision Floating-point support           (cl_khr_fp16)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Support is emulated in software               No
  Single-precision Floating-point support         (core)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Support is emulated in software               No
    Correctly-rounded divide and sqrt operations  Yes
  Double-precision Floating-point support         (cl_khr_fp64)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Support is emulated in software               No
  Address bits                                    64, Little-Endian
  Global memory size                              13191041024 (12.29GiB)
  Error Correction support                        No
  Max memory allocation                           4294959104 (4GiB)
  Unified memory for Host and Device              Yes
  Shared Virtual Memory (SVM) capabilities        (core)
    Coarse-grained buffer sharing                 Yes
    Fine-grained buffer sharing                   No
    Fine-grained system sharing                   No
    Atomics                                       No
  Minimum alignment for any data type             128 bytes
  Alignment of base address                       1024 bits (128 bytes)
  Preferred alignment for atomics                 
    SVM                                           64 bytes
    Global                                        64 bytes
    Local                                         64 bytes
  Max size for global variable                    65536 (64KiB)
  Preferred total size of global vars             4294959104 (4GiB)
  Global Memory cache type                        Read/Write
  Global Memory cache size                        524288 (512KiB)
  Global Memory cache line size                   64 bytes
  Image support                                   Yes
    Max number of samplers per kernel             16
    Max size for 1D images from buffer            268434944 pixels
    Max 1D or 2D image array size                 2048 images
    Base address alignment for 2D image buffers   4 bytes
    Pitch alignment for 2D image buffers          4 pixels
    Max 2D image size                             16384x16384 pixels
    Max planar YUV image size                     16384x16352 pixels
    Max 3D image size                             16384x16384x2048 pixels
    Max number of read image args                 128
    Max number of write image args                128
    Max number of read/write image args           128
  Max number of pipe args                         16
  Max active pipe reservations                    1
  Max pipe packet size                            1024
  Local memory type                               Local
  Local memory size                               65536 (64KiB)
  Max number of constant args                     8
  Max constant buffer size                        4294959104 (4GiB)
  Max size of kernel argument                     1024
  Queue properties (on host)                      
    Out-of-order execution                        Yes
    Profiling                                     Yes
  Queue properties (on device)                    
    Out-of-order execution                        Yes
    Profiling                                     Yes
    Preferred size                                131072 (128KiB)
    Max size                                      67108864 (64MiB)
  Max queues on device                            1
  Max events on device                            1024
  Prefer user sync for interop                    Yes
  Profiling timer resolution                      83ns
  Execution capabilities                          
    Run OpenCL kernels                            Yes
    Run native kernels                            No
    Sub-group independent forward progress        Yes
    IL version                                    SPIR-V_1.2 
    SPIR versions                                 1.2 
  printf() buffer size                            4194304 (4MiB)
  Built-in kernels                                block_motion_estimate_intel;block_advanced_motion_estimate_check_intel;block_advanced_motion_estimate_bidirectional_check_intel;
  Motion Estimation accelerator version (Intel)   2
    Device-side AVC Motion Estimation version     1
      Supports texture sampler use                Yes
      Supports preemption                         No
  Device Extensions                               cl_khr_byte_addressable_store cl_khr_fp16 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_icd cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_intel_subgroups cl_intel_required_subgroup_size cl_intel_subgroups_short cl_khr_spir cl_intel_accelerator cl_intel_driver_diagnostics cl_khr_priority_hints cl_khr_throttle_hints cl_khr_create_command_queue cl_intel_subgroups_char cl_intel_subgroups_long cl_khr_fp64 cl_khr_subgroups cl_khr_il_program cl_intel_spirv_device_side_avc_motion_estimation cl_intel_spirv_media_block_io cl_intel_spirv_subgroups cl_khr_spirv_no_integer_wrap_decoration cl_intel_unified_shared_memory_preview cl_khr_mipmap_image cl_khr_mipmap_image_writes cl_intel_planar_yuv cl_intel_packed_yuv cl_intel_motion_estimation cl_intel_device_side_avc_motion_estimation cl_intel_advanced_motion_estimation cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_image2d_from_buffer cl_khr_depth_images cl_intel_media_block_io cl_khr_3d_image_writes cl_intel_va_api_media_sharing 

NULL platform behavior
  clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  Intel(R) OpenCL HD Graphics
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   Success [INTEL]
  clCreateContext(NULL, ...) [default]            Success [INTEL]
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT)  Success (1)
    Platform Name                                 Intel(R) OpenCL HD Graphics
    Device Name                                   Intel(R) Gen9 HD Graphics NEO
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU)  Success (1)
    Platform Name                                 Intel(R) OpenCL HD Graphics
    Device Name                                   Intel(R) Gen9 HD Graphics NEO
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL)  Success (1)
    Platform Name                                 Intel(R) OpenCL HD Graphics
    Device Name                                   Intel(R) Gen9 HD Graphics NEO

ICD loader properties
  ICD loader Name                                 OpenCL ICD Loader
  ICD loader Vendor                               OCL Icd free software
  ICD loader Version                              2.2.11
  ICD loader Profile                              OpenCL 2.1

@doisyg
Copy link
Contributor

doisyg commented May 29, 2020

Interesting, when starting with with $ rviz --opengl 210 , it works !

@doisyg
Copy link
Contributor

doisyg commented May 29, 2020

Last bunch of info:

$ glxinfo|grep OpenGL
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) UHD Graphics (CML GT2)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 20.0.4
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6 (Compatibility Profile) Mesa 20.0.4
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 20.0.4
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

So it looks like a OpenCL version issue

@rhaschke
Copy link
Contributor

rhaschke commented May 29, 2020

I'm puzzled why I get OpenGL 3 on my machine, while you get OpenGL 4.6 on yours - having the same mesa libs installed!

$ glxinfo | grep OpenGL
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 3000 (SNB GT2)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 20.0.4
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 20.0.4
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 20.0.4
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
OpenGL ES profile extensions:

@doisyg
Copy link
Contributor

doisyg commented May 29, 2020

To add to the confusion, on my nvidia machine, rviz works fine and it seems that I have openGL 4.6:

glxinfo|grep OpenGL
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GTX 1070/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 440.64
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6.0 NVIDIA 440.64
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 440.64
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

About the different version between mine and your Intel machine, it may be because we have a different generation and also a different driver. I use the Intel NEO: https://github.com/intel/compute-runtime/releases

@rhaschke
Copy link
Contributor

That's not so surprising to me. I think we need to blame the 4.6 implementation of libmesa...
nvidia's OpenGL implementation might just work fine.

@rhaschke
Copy link
Contributor

@wjwwood, can you delegate this issue to an OpenGL expert? I neither have the experience nor the resources to handle this.

@wjwwood
Copy link
Member

wjwwood commented May 29, 2020

I can ask @iche033 if he's got any ideas, but I don't know any opengl experts other than him (I'm certainly not one, haha). The other avenue would be to produce an example that using Ogre only and ask them about it. I'll see if I can allocate some time to help with that, but it will be a few weeks most likely as we're in the midst of our second release in so many weeks, and there will be fallout to contend with after.

@wjwwood
Copy link
Member

wjwwood commented May 29, 2020

I do know that in my virtual machines I only have OpenGL 2.something, and that's not enough for Ogre any longer (it used to be) and so it throws when it cannot get a certain OpenGL function it needs. I don't think it's the same issue, but it is not the first time we've had issues with different opengl versions.

@wjwwood
Copy link
Member

wjwwood commented May 29, 2020

Also, it might be worth trying to build rviz from source using the newer ogre version, as it might already be fixed by their abstraction layer?

@rhaschke
Copy link
Contributor

Also, it might be worth trying to build rviz from source against the newer ogre version 1.12.

That's actually a good idea. @doisyg or @flynneva do you have resources to do so and report the result?

@doisyg
Copy link
Contributor

doisyg commented May 29, 2020

I have this issue when compiling on Focal from src and I believe it is ogre version 1.9 which is used:

-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for modules 'OGRE;OGRE-Overlay'
--   Found OGRE, version 1.9.0
--   Found OGRE-Overlay, version 1.9.0
-- OGRE_LIBRARIES=/usr/lib/x86_64-linux-gnu/libOgreOverlay.so;/usr/lib/x86_64-linux-gnu/libOgreMain.so;/usr/lib/x86_64-linux-gnu/libpthread.so
-- OGRE_INCLUDE_DIRS=/usr/include/OGRE/Overlay;/usr/include/OGRE
-- OGRE_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/OGRE-1.9.0
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so

@wjwwood
Copy link
Member

wjwwood commented May 29, 2020

Yeah, we decided to stick with 1.9 for our debs, but 1.12 is also available via libogre-dev-1.12 (I think) and rviz can be compiled against that too.

So you'd need to uninstall libogre-dev-1.9 and install libogre-dev-1.12 and then build rviz from scratch (delete existing build folder or ensure CMake is rerun).

@doisyg
Copy link
Contributor

doisyg commented May 29, 2020

After compilation with ogre 1.12:

$rosrun rviz rviz
[ INFO] [1590780380.302481058]: rviz version 1.14.0
[ INFO] [1590780380.302609856]: compiled against Qt version 5.12.8
[ INFO] [1590780380.302650942]: compiled against OGRE version 1.12.4 (Rhagorthua)
[ INFO] [1590780380.325357004]: Forcing OpenGl version 0.
[ INFO] [1590780380.626125246]: Stereo is NOT SUPPORTED
[ INFO] [1590780380.626204835]: OpenGl version: 4.6 (GLSL 4.6).
[ERROR] [1590780380.639836601]: Error: ScriptCompiler - unexpected token in liberation_sans.fontdef(1): 'Liberation'. If this is a legacy script you must prepend the type (e.g. font, overlay).

Rviz starts, then crash when trying to display a pointcloud:

[ERROR] [1590780429.109706877]: No techniques available for material [PointCloudMaterial0Sphere]
[ERROR] [1590780429.110194420]: No techniques available for material [PointCloudMaterial0FlatSquare]
[ERROR] [1590780429.619428720]: No techniques available for material [PointCloudMaterial1Sphere]
[ERROR] [1590780429.619645848]: No techniques available for material [PointCloudMaterial1FlatSquare]
[ERROR] [1590780430.098322011]: No techniques available for material [PointCloudMaterial2Sphere]
[ERROR] [1590780430.098555597]: No techniques available for material [PointCloudMaterial2FlatSquare]
[ERROR] [1590780430.608390163]: No techniques available for material [PointCloudMaterial3Sphere]
[ERROR] [1590780430.608440268]: No techniques available for material [PointCloudMaterial3FlatSquare]
[ERROR] [1590780431.089843225]: No techniques available for material [PointCloudMaterial4Sphere]
[ERROR] [1590780431.089972989]: No techniques available for material [PointCloudMaterial4FlatSquare]
[ERROR] [1590780431.601881442]: No techniques available for material [PointCloudMaterial5Sphere]
[ERROR] [1590780431.602124884]: No techniques available for material [PointCloudMaterial5FlatSquare]
[ERROR] [1590780432.113293590]: No techniques available for material [PointCloudMaterial6Sphere]
[ERROR] [1590780432.113444678]: No techniques available for material [PointCloudMaterial6FlatSquare]
[ERROR] [1590780432.593522391]: No techniques available for material [PointCloudMaterial7Sphere]
[ERROR] [1590780432.593660312]: No techniques available for material [PointCloudMaterial7FlatSquare]
[ERROR] [1590780433.106866094]: No techniques available for material [PointCloudMaterial8Sphere]
[ERROR] [1590780433.107107751]: No techniques available for material [PointCloudMaterial8FlatSquare]
[ERROR] [1590780433.599885477]: No techniques available for material [PointCloudMaterial9Sphere]
[ERROR] [1590780433.599973180]: No techniques available for material [PointCloudMaterial9FlatSquare]
[ERROR] [1590780434.097377403]: No techniques available for material [PointCloudMaterial10Sphere]
[ERROR] [1590780434.097551561]: No techniques available for material [PointCloudMaterial10FlatSquare]
Segmentation fault (core dumped)

@rhaschke
Copy link
Contributor

Disappointing. I won't have time to look into this next week.
@simonschmeisser, could you have a look? You are working with Ogre 1.12 more actively I guess.

@simonschmeisser
Copy link
Contributor

glxinfo | grep OpenGL
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 620 (Kaby Lake GT2) 
OpenGL core profile version string: 4.5 (Core Profile) Mesa 19.2.8
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 19.2.8
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 19.2.8
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

I don't have a ubuntu 20.04 installed yet but on 18.04 with ogre 1.12.4 and noetic-devel it works

Main difference between the glxinfo's you posted is that @rhaschke 's notebook from 2010 and my notebook from 2016 report OpenGL 3 compatibility profile while the one from @doisyg from 2018 talks only about OpenGL 4.6. So maybe someone found it clever to drop some compatibility mode (or maybe it needs to be requested differently/manually ...) Apple apparently does not support compatibility modes at all, I thought you're using that @wjwwood ?

Seeing that --opengl 210 works, maybe we should default to that if something newer is found?

ogre has a backend/RenderSystem for OpenGL newer than the old-school OpenGL3 backend which is called GL3Plus but using it requires some modifications to the shaders in the material folder. I failed doing those modifications ... but I can open a WIP PR that enables the backend and then maybe someone who knows anything about shaders at all can continue on that (maybe we could also ask on discourse ...)

There's also a high-level shader system that would allow using all of the backends (Metal, DX11, ...) but I haven't understood how that works yet and if it can actually handle geometry shaders (and I'm not sure to what extend that's available in 2013's ogre 1.9)

@rhaschke
Copy link
Contributor

Given the fact that NVIDIA's OpenGL 4.6 renders correctly, while Mesa's not, I'm still tending to blame Mesa. @doisyg, could you have a look for issue reports over there?

@flynneva
Copy link
Contributor Author

flynneva commented May 30, 2020

gave it a go with ogre 1.12....similar issues as before. cannot change size of points, but also rviz wasnt able to render any type other than Points

rosrun rviz rviz
[ INFO] [1590852307.372457308]: rviz version 1.14.0
[ INFO] [1590852307.372531006]: compiled against Qt version 5.12.8
[ INFO] [1590852307.372545986]: compiled against OGRE version 1.12.4 (Rhagorthua)
[ INFO] [1590852307.388516299]: Forcing OpenGl version 0.
[ INFO] [1590852307.595392886]: Stereo is NOT SUPPORTED
[ INFO] [1590852307.595582330]: OpenGl version: 4.6 (GLSL 4.6).
[ERROR] [1590852307.607582822]: Error: ScriptCompiler - unexpected token in liberation_sans.fontdef(1): 'Liberation'. If this is a legacy script you must prepend the type (e.g. font, overlay).
[ERROR] [1590852326.258043428]: No techniques available for material [PointCloudMaterial0Sphere]
[ERROR] [1590852326.258421743]: No techniques available for material [PointCloudMaterial0FlatSquare]
[ERROR] [1590852327.280323290]: No techniques available for material [PointCloudMaterial1Sphere]
[ERROR] [1590852327.280439542]: No techniques available for material [PointCloudMaterial1FlatSquare]
[ERROR] [1590852328.338720758]: No techniques available for material [PointCloudMaterial2Sphere]
[ERROR] [1590852328.338899048]: No techniques available for material [PointCloudMaterial2FlatSquare]
[ERROR] [1590852329.391346141]: No techniques available for material [PointCloudMaterial3Sphere]
[ERROR] [1590852329.391653767]: No techniques available for material [PointCloudMaterial3FlatSquare]

@flynneva
Copy link
Contributor Author

flynneva commented May 30, 2020

strange...just relaunched rviz and I can now resize the points?? still getting the weird "no techniques available for material" error

UPDATE: when I drag RVIZ to the right side of my screen to auto-size to half of the window the render of the points updates to their largest size and I am unable to resize them without restarting rviz

UPDATE2: can confirm rviz works as expected when the entire rviz window is NOT full screen or half screen - aka just in the middle of the screen & not auto-sized. so strange

@rhaschke
Copy link
Contributor

@flynneva, did you also get a segfault the first time you started rviz?
The material techniques might be an unrelated issue. Need to check this, when I will have some time...
The ScriptCompiler error is known. Consider it a warning only. This is due to a different syntax in the font specification between Ogre 1.9 and Ogre 1.12. To maintain compatibility, we kept both definitions and Ogre 1.12 is complaining about the older one...

@rhaschke
Copy link
Contributor

Does it work to manually resize the rviz window?

@flynneva
Copy link
Contributor Author

@rhaschke randomly there is a segfault and rviz crashes, but most of the time it runs ok other than the material error shown above. and yes, manually resizing works great, its just the auto-sizing when I drag it to the right or to full screen when I am unable to resize the points.

@rhaschke rhaschke reopened this Mar 4, 2021
@rhaschke
Copy link
Contributor

rhaschke commented Mar 4, 2021

I can confirm that the issue of large points also occurs with xfce window manager, when window is auto-sized to 25%, 50%, or 100%. It is related to Mesa 20. It doesn't appear with nvidia OpenGL. Suggested workaround: Use squares instead of points.

@rhaschke rhaschke changed the title noetic rviz cannot change point size for pointcloud2 topic PointCloud2: Huge point size when window is maximized Mar 4, 2021
@rhaschke rhaschke removed their assignment Mar 4, 2021
@Petrox
Copy link

Petrox commented Mar 17, 2021

Xubuntu 20.04, ros noetic, Intel cpu, nvidia gpu

caught in the act: https://www.youtube.com/watch?v=F3vnVlUaqfc

The size of the pixels seem to behave like "size=max(window width / 20,1)"
At full window size the pixels are huge, but reducing window size gets smaller pixels up to a point where size=1 is reached.
(please ignore the fact the the pixel size is set to 2 in the video, it does not matter at all)

Confirmed case: effect is reproducible 100% at different window sizes

  • without parameters
  • with --opengl 210
  • with --opengl 310

The interesting thing is that this was working about a week ago, so something triggered the event, maybe an apt-get upgrade yesterday.

To make sure there is no rviz config degradation, I've rolled back my repo (with the .rviz config) and I can confirm the same config that was working a week ago does not work now.

dpkg log confirms that my update yesterday brought these new packages (I had it sorted by package name to help analyzing).

desktop-file-utils:amd64 0.24-1ubuntu3
desktop-file-utils:amd64 0.24-1ubuntu3
gnome-menus:amd64 3.36.0-1ubuntu1
gnome-menus:amd64 3.36.0-1ubuntu1
google-chrome-stable:amd64 89.0.4389.90-1
google-cloud-sdk:all 332.0.0-0
libc-bin:amd64 2.31-0ubuntu9.2
libc-bin:amd64 2.31-0ubuntu9.2
libglib2.0-0:amd64 2.64.6-1~ubuntu20.04.3
libglib2.0-bin:amd64 2.64.6-1~ubuntu20.04.3
libglib2.0-data:all 2.64.6-1~ubuntu20.04.3
libglib2.0-dev:amd64 2.64.6-1~ubuntu20.04.3
libglib2.0-dev-bin:amd64 2.64.6-1~ubuntu20.04.3
libphidget22:i386 99:1.6.20210312-1ubuntu~16.04
libpython2.7:amd64 2.7.18-1~20.04.1
libpython2.7-dev:amd64 2.7.18-1~20.04.1
libpython2.7-minimal:amd64 2.7.18-1~20.04.1
libpython2.7-stdlib:amd64 2.7.18-1~20.04.1
linux-generic:amd64 5.4.0.67.70
linux-generic-hwe-20.04:amd64 5.8.0.45.51~20.04.31
linux-headers-5.4.0-67:all 5.4.0-67.75
linux-headers-5.4.0-67-generic:amd64 5.4.0-67.75
linux-headers-5.8.0-45-generic:amd64 5.8.0-45.51~20.04.1
linux-headers-generic:amd64 5.4.0.67.70
linux-headers-generic-hwe-20.04:amd64 5.8.0.45.51~20.04.31
linux-hwe-5.8-headers-5.8.0-45:all 5.8.0-45.51~20.04.1
linux-hwe-5.8-source-5.8.0:all 5.8.0-45.51~20.04.1
linux-image-5.4.0-67-generic:amd64 5.4.0-67.75
linux-image-5.4.0-67-generic:amd64 5.4.0-67.75
linux-image-5.8.0-45-generic:amd64 5.8.0-45.51~20.04.1+1
linux-image-5.8.0-45-generic:amd64 5.8.0-45.51~20.04.1+1
linux-image-generic:amd64 5.4.0.67.70
linux-image-generic-hwe-20.04:amd64 5.8.0.45.51~20.04.31
linux-libc-dev:amd64 5.4.0-67.75
linux-modules-5.4.0-67-generic:amd64 5.4.0-67.75
linux-modules-5.8.0-45-generic:amd64 5.8.0-45.51~20.04.1
linux-modules-extra-5.4.0-67-generic:amd64 5.4.0-67.75
linux-modules-extra-5.8.0-45-generic:amd64 5.8.0-45.51~20.04.1
linux-tools-5.4.0-67:amd64 5.4.0-67.75
linux-tools-5.4.0-67-generic:amd64 5.4.0-67.75
linux-tools-common:all 5.4.0-67.75
linux-tools-generic:amd64 5.4.0.67.70
man-db:amd64 2.9.1-1
man-db:amd64 2.9.1-1
mime-support:all 3.64ubuntu1
mime-support:all 3.64ubuntu1
openfoam8:amd64 20210316
python2.7:amd64 2.7.18-1~20.04.1
python2.7-dev:amd64 2.7.18-1~20.04.1
python2.7-minimal:amd64 2.7.18-1~20.04.1
python3-pil:amd64 7.0.0-4ubuntu0.3
ros-noetic-desktop:amd64 1.5.0-1focal.20210304.171440
ros-noetic-desktop-full:amd64 1.5.0-1focal.20210304.171548
ros-noetic-diff-drive-controller:amd64 0.18.1-1focal.20210302.134753
ros-noetic-librviz-tutorial:amd64 0.11.0-1focal.20210304.170346
ros-noetic-phidgets-msgs:amd64 1.0.2-1focal.20210309.142105
ros-noetic-robot:amd64 1.5.0-1focal.20210302.133914
ros-noetic-rqt-bag:amd64 0.5.1-1focal.20210223.065044
ros-noetic-rqt-bag-plugins:amd64 0.5.1-1focal.20210225.051538
ros-noetic-rqt-common-plugins:amd64 0.4.9-1focal.20210225.051603
ros-noetic-rqt-plot:amd64 0.4.13-1focal.20210225.051402
ros-noetic-rqt-robot-dashboard:amd64 0.5.8-1focal.20210223.070328
ros-noetic-rqt-robot-monitor:amd64 0.5.13-1focal.20210223.065446
ros-noetic-rqt-robot-plugins:amd64 0.5.8-1focal.20210304.171251
ros-noetic-rqt-rviz:amd64 0.6.1-1focal.20210304.170402
ros-noetic-rviz:amd64 1.14.5-1focal.20210304.160542
ros-noetic-rviz-imu-plugin:amd64 1.2.2-1focal.20210304.170438
ros-noetic-rviz-mesh-plugin:amd64 1.0.1-1focal.20210304.170458
ros-noetic-rviz-plugin-tutorials:amd64 0.11.0-1focal.20210304.170505
ros-noetic-rviz-python-tutorial:amd64 0.11.0-1focal.20210304.170512
ros-noetic-rviz-satellite:amd64 3.0.3-1focal.20210304.170515
ros-noetic-rviz-visual-tools:amd64 3.9.1-1focal.20210304.170538
ros-noetic-simulators:amd64 1.5.0-1focal.20210304.171432
ros-noetic-urdf-sim-tutorial:amd64 0.5.1-1focal.20210304.170255
ros-noetic-urdf-tutorial:amd64 0.5.0-1focal.20210304.170130
ros-noetic-visualization-tutorials:amd64 0.11.0-1focal.20210304.171246
ros-noetic-viz:amd64 1.5.0-1focal.20210304.171408
ros-noetic-xacro:amd64 1.14.6-2focal.20210302.133616

Boxes vs points:
Screenshot_2021-03-17_13-58-45
Screenshot_2021-03-17_13-58-56

rviz output at startup:

[ INFO] [1615985698.674598453]: rviz version 1.14.5
[ INFO] [1615985698.674631589]: compiled against Qt version 5.12.8
[ INFO] [1615985698.674652926]: compiled against OGRE version 1.9.0 (Ghadamon)
[ INFO] [1615985698.683695262]: Forcing OpenGl version 2.1.
[ INFO] [1615985698.982764784]: Stereo is NOT SUPPORTED
[ INFO] [1615985698.982864906]: OpenGl version: 2.1 (GLSL 1.2).

nvidia packages

$ dpkg --list |grep ii |grep nvidia
ii  libnvidia-cfg1-450-server:amd64             450.102.04-0ubuntu0.20.04.1               amd64        NVIDIA binary OpenGL/GLX configuration library
ii  libnvidia-common-450-server                 450.102.04-0ubuntu0.20.04.1               all          Shared files used by the NVIDIA libraries
ii  libnvidia-compute-450-server:amd64          450.102.04-0ubuntu0.20.04.1               amd64        NVIDIA libcompute package
ii  libnvidia-compute-450-server:i386           450.102.04-0ubuntu0.20.04.1               i386         NVIDIA libcompute package
ii  libnvidia-decode-450-server:amd64           450.102.04-0ubuntu0.20.04.1               amd64        NVIDIA Video Decoding runtime libraries
ii  libnvidia-decode-450-server:i386            450.102.04-0ubuntu0.20.04.1               i386         NVIDIA Video Decoding runtime libraries
ii  libnvidia-encode-450-server:amd64           450.102.04-0ubuntu0.20.04.1               amd64        NVENC Video Encoding runtime library
ii  libnvidia-encode-450-server:i386            450.102.04-0ubuntu0.20.04.1               i386         NVENC Video Encoding runtime library
ii  libnvidia-extra-450-server:amd64            450.102.04-0ubuntu0.20.04.1               amd64        Extra libraries for the NVIDIA Server Driver
ii  libnvidia-fbc1-450-server:amd64             450.102.04-0ubuntu0.20.04.1               amd64        NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-fbc1-450-server:i386              450.102.04-0ubuntu0.20.04.1               i386         NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-gl-450-server:amd64               450.102.04-0ubuntu0.20.04.1               amd64        NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  libnvidia-gl-450-server:i386                450.102.04-0ubuntu0.20.04.1               i386         NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  libnvidia-ifr1-450-server:amd64             450.102.04-0ubuntu0.20.04.1               amd64        NVIDIA OpenGL-based Inband Frame Readback runtime library
ii  libnvidia-ifr1-450-server:i386              450.102.04-0ubuntu0.20.04.1               i386         NVIDIA OpenGL-based Inband Frame Readback runtime library
ii  nvidia-compute-utils-450-server             450.102.04-0ubuntu0.20.04.1               amd64        NVIDIA compute utilities
ii  nvidia-dkms-450-server                      450.102.04-0ubuntu0.20.04.1               amd64        NVIDIA DKMS package
ii  nvidia-driver-450-server                    450.102.04-0ubuntu0.20.04.1               amd64        NVIDIA Server Driver metapackage
ii  nvidia-kernel-common-450-server             450.102.04-0ubuntu0.20.04.1               amd64        Shared files used with the kernel module
ii  nvidia-kernel-source-450-server             450.102.04-0ubuntu0.20.04.1               amd64        NVIDIA kernel source package
ii  nvidia-prime                                0.8.16~0.20.04.1                          all          Tools to enable NVIDIA's Prime
ii  nvidia-settings                             460.32.03-0ubuntu1                        amd64        Tool for configuring the NVIDIA graphics driver
ii  nvidia-utils-450-server                     450.102.04-0ubuntu0.20.04.1               amd64        NVIDIA Server Driver support binaries
ii  screen-resolution-extra                     0.18build1                                all          Extension for the nvidia-settings control panel
ii  xserver-xorg-video-nvidia-450-server        450.102.04-0ubuntu0.20.04.1               amd64        NVIDIA binary Xorg driver

mesa packages

$ dpkg -l |grep mesa
ii  libegl-mesa0:amd64                          20.2.6-0ubuntu0.20.04.1                   amd64        free implementation of the EGL API -- Mesa vendor library
ii  libegl1-mesa:amd64                          20.2.6-0ubuntu0.20.04.1                   amd64        transitional dummy package
ii  libegl1-mesa-dev:amd64                      20.2.6-0ubuntu0.20.04.1                   amd64        free implementation of the EGL API -- development files
ii  libgl1-mesa-dev:amd64                       20.2.6-0ubuntu0.20.04.1                   amd64        transitional dummy package
ii  libgl1-mesa-dri:amd64                       20.2.6-0ubuntu0.20.04.1                   amd64        free implementation of the OpenGL API -- DRI modules
ii  libgl1-mesa-dri:i386                        20.2.6-0ubuntu0.20.04.1                   i386         free implementation of the OpenGL API -- DRI modules
ii  libgl1-mesa-glx:amd64                       20.2.6-0ubuntu0.20.04.1                   amd64        transitional dummy package
ii  libglapi-mesa:amd64                         20.2.6-0ubuntu0.20.04.1                   amd64        free implementation of the GL API -- shared library
ii  libglapi-mesa:i386                          20.2.6-0ubuntu0.20.04.1                   i386         free implementation of the GL API -- shared library
ii  libgles2-mesa-dev:amd64                     20.2.6-0ubuntu0.20.04.1                   amd64        transitional dummy package
ii  libglu1-mesa:amd64                          9.0.1-1build1                             amd64        Mesa OpenGL utility library (GLU)
ii  libglu1-mesa-dev:amd64                      9.0.1-1build1                             amd64        Mesa OpenGL utility library -- development files
ii  libglx-mesa0:amd64                          20.2.6-0ubuntu0.20.04.1                   amd64        free implementation of the OpenGL API -- GLX vendor library
ii  libglx-mesa0:i386                           20.2.6-0ubuntu0.20.04.1                   i386         free implementation of the OpenGL API -- GLX vendor library
ii  libwayland-egl1-mesa:amd64                  20.2.6-0ubuntu0.20.04.1                   amd64        transitional dummy package
ii  mesa-utils                                  8.4.0-1build1                             amd64        Miscellaneous Mesa GL utilities
ii  mesa-va-drivers:amd64                       20.2.6-0ubuntu0.20.04.1                   amd64        Mesa VA-API video acceleration drivers
ii  mesa-vdpau-drivers:amd64                    20.2.6-0ubuntu0.20.04.1                   amd64        Mesa VDPAU video acceleration drivers
ii  mesa-vulkan-drivers:amd64                   20.2.6-0ubuntu0.20.04.1                   amd64        Mesa Vulkan graphics drivers
ii  mesa-vulkan-drivers:i386                    20.2.6-0ubuntu0.20.04.1                   i386         Mesa Vulkan graphics drivers
$ clinfo
Number of platforms                               1
  Platform Name                                   NVIDIA CUDA
  Platform Vendor                                 NVIDIA Corporation
  Platform Version                                OpenCL 1.2 CUDA 11.0.228
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_fp64 cl_khr_byte_addressable_store cl_khr_icd cl_khr_gl_sharing cl_nv_compiler_options cl_nv_device_attribute_query cl_nv_pragma_unroll cl_nv_copy_opts cl_nv_create_buffer cl_khr_int64_base_atomics cl_khr_int64_extended_atomics
  Platform Extensions function suffix             NV

  Platform Name                                   NVIDIA CUDA
Number of devices                                 1
  Device Name                                     GeForce GTX 1050 Ti
  Device Vendor                                   NVIDIA Corporation
  Device Vendor ID                                0x10de
  Device Version                                  OpenCL 1.2 CUDA
  Driver Version                                  450.102.04
  Device OpenCL C Version                         OpenCL C 1.2 
  Device Type                                     GPU
  Device Topology (NV)                            PCI-E, 01:00.0
  Device Profile                                  FULL_PROFILE
  Device Available                                Yes
  Compiler Available                              Yes
  Linker Available                                Yes
  Max compute units                               6
  Max clock frequency                             1620MHz
  Compute Capability (NV)                         6.1
  Device Partition                                (core)
    Max number of sub-devices                     1
    Supported partition types                     None
    Supported affinity domains                    (n/a)
  Max work item dimensions                        3
  Max work item sizes                             1024x1024x64
  Max work group size                             1024
  Preferred work group size multiple              32
  Warp size (NV)                                  32
  Preferred / native vector sizes                 
    char                                                 1 / 1       
    short                                                1 / 1       
    int                                                  1 / 1       
    long                                                 1 / 1       
    half                                                 0 / 0        (n/a)
    float                                                1 / 1       
    double                                               1 / 1        (cl_khr_fp64)
  Half-precision Floating-point support           (n/a)
  Single-precision Floating-point support         (core)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Support is emulated in software               No
    Correctly-rounded divide and sqrt operations  Yes
  Double-precision Floating-point support         (cl_khr_fp64)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Support is emulated in software               No
  Address bits                                    64, Little-Endian
  Global memory size                              4238737408 (3.948GiB)
  Error Correction support                        No
  Max memory allocation                           1059684352 (1011MiB)
  Unified memory for Host and Device              No
  Integrated memory (NV)                          No
  Minimum alignment for any data type             128 bytes
  Alignment of base address                       4096 bits (512 bytes)
  Global Memory cache type                        Read/Write
  Global Memory cache size                        294912 (288KiB)
  Global Memory cache line size                   128 bytes
  Image support                                   Yes
    Max number of samplers per kernel             32
    Max size for 1D images from buffer            268435456 pixels
    Max 1D or 2D image array size                 2048 images
    Max 2D image size                             16384x32768 pixels
    Max 3D image size                             16384x16384x16384 pixels
    Max number of read image args                 256
    Max number of write image args                16
  Local memory type                               Local
  Local memory size                               49152 (48KiB)
  Registers per block (NV)                        65536
  Max number of constant args                     9
  Max constant buffer size                        65536 (64KiB)
  Max size of kernel argument                     4352 (4.25KiB)
  Queue properties                                
    Out-of-order execution                        Yes
    Profiling                                     Yes
  Prefer user sync for interop                    No
  Profiling timer resolution                      1000ns
  Execution capabilities                          
    Run OpenCL kernels                            Yes
    Run native kernels                            No
    Kernel execution timeout (NV)                 No
  Concurrent copy and kernel execution (NV)       Yes
    Number of async copy engines                  2
  printf() buffer size                            1048576 (1024KiB)
  Built-in kernels                                (n/a)
  Device Extensions                               cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_fp64 cl_khr_byte_addressable_store cl_khr_icd cl_khr_gl_sharing cl_nv_compiler_options cl_nv_device_attribute_query cl_nv_pragma_unroll cl_nv_copy_opts cl_nv_create_buffer cl_khr_int64_base_atomics cl_khr_int64_extended_atomics

NULL platform behavior
  clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  No platform
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   No platform
  clCreateContext(NULL, ...) [default]            No platform
  clCreateContext(NULL, ...) [other]              Success [NV]
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT)  No platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU)  No platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM)  Invalid device type for platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL)  No platform

@rhaschke
Copy link
Contributor

Thanks for the video. Actually, I observed a point size that varies non-linearly (in a sine-shaped fashion) with the window size (actually window height only). This definitely is an libMesa issue. Fixating the point size in the vertex script yields exactly the same (wrong) behavior.

gl_PointSize = size.x;

I confirm again that the nvidia driver is not affected. I comes at a surprise, that your (@Petrox) package update list doesn't show libmesa. I filed an issue upstream: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4506

@Petrox
Copy link

Petrox commented Mar 26, 2021

@rhaschke My computer has been installed as 16.04, then upgraded to 18.04,and 20.04 so this is far from optimal in terms of package dependencies.

Nevertheless here are my mesa related items from my /var/log/dpkg*gz files:

dpkg.log.2.gz:2021-01-16 libegl1-mesa:amd64 20.2.6-0ubuntu0.20.04.1
dpkg.log.2.gz:2021-01-16 libegl1-mesa-dev:amd64 20.2.6-0ubuntu0.20.04.1
dpkg.log.2.gz:2021-01-16 libegl-mesa0:amd64 20.2.6-0ubuntu0.20.04.1
dpkg.log.2.gz:2021-01-16 libgl1-mesa-dev:amd64 20.2.6-0ubuntu0.20.04.1
dpkg.log.2.gz:2021-01-16 libgl1-mesa-dri:amd64 20.2.6-0ubuntu0.20.04.1
dpkg.log.2.gz:2021-01-16 libgl1-mesa-glx:amd64 20.2.6-0ubuntu0.20.04.1
dpkg.log.2.gz:2021-01-16 libglapi-mesa:amd64 20.2.6-0ubuntu0.20.04.1
dpkg.log.2.gz:2021-01-16 libgles2-mesa-dev:amd64 20.2.6-0ubuntu0.20.04.1
dpkg.log.2.gz:2021-01-16 libglx-mesa0:amd64 20.2.6-0ubuntu0.20.04.1
dpkg.log.2.gz:2021-01-16 libwayland-egl1-mesa:amd64 20.2.6-0ubuntu0.20.04.1
dpkg.log.2.gz:2021-01-16 mesa-va-drivers:amd64 20.2.6-0ubuntu0.20.04.1
dpkg.log.2.gz:2021-01-16 mesa-vdpau-drivers:amd64 20.2.6-0ubuntu0.20.04.1
dpkg.log.2.gz:2021-01-16 mesa-vulkan-drivers:amd64 20.2.6-0ubuntu0.20.04.1
dpkg.log.2.gz:2021-01-21 libgl1-mesa-dri:i386 20.2.6-0ubuntu0.20.04.1
dpkg.log.2.gz:2021-01-21 libglapi-mesa:i386 20.2.6-0ubuntu0.20.04.1
dpkg.log.2.gz:2021-01-21 libglx-mesa0:i386 20.2.6-0ubuntu0.20.04.1
dpkg.log.2.gz:2021-01-21 mesa-vulkan-drivers:i386 20.2.6-0ubuntu0.20.04.1
dpkg.log.3.gz:2020-12-13 libegl1-mesa:amd64 20.0.8-0ubuntu1~18.04.1
dpkg.log.3.gz:2020-12-13 libegl1-mesa:amd64 20.0.8-0ubuntu1~20.04.1
dpkg.log.3.gz:2020-12-13 libegl1-mesa-dev:amd64 20.0.8-0ubuntu1~18.04.1
dpkg.log.3.gz:2020-12-13 libegl1-mesa-dev:amd64 20.0.8-0ubuntu1~20.04.1
dpkg.log.3.gz:2020-12-13 libegl-mesa0:amd64 20.0.8-0ubuntu1~18.04.1
dpkg.log.3.gz:2020-12-13 libegl-mesa0:amd64 20.0.8-0ubuntu1~20.04.1
dpkg.log.3.gz:2020-12-13 libgl1-mesa-dev:amd64 20.0.8-0ubuntu1~18.04.1
dpkg.log.3.gz:2020-12-13 libgl1-mesa-dev:amd64 20.0.8-0ubuntu1~20.04.1
dpkg.log.3.gz:2020-12-13 libgl1-mesa-dri:amd64 20.0.8-0ubuntu1~18.04.1
dpkg.log.3.gz:2020-12-13 libgl1-mesa-dri:amd64 20.0.8-0ubuntu1~20.04.1
dpkg.log.3.gz:2020-12-13 libgl1-mesa-glx:amd64 20.0.8-0ubuntu1~18.04.1
dpkg.log.3.gz:2020-12-13 libgl1-mesa-glx:amd64 20.0.8-0ubuntu1~20.04.1
dpkg.log.3.gz:2020-12-13 libglapi-mesa:amd64 20.0.8-0ubuntu1~18.04.1
dpkg.log.3.gz:2020-12-13 libglapi-mesa:amd64 20.0.8-0ubuntu1~20.04.1
dpkg.log.3.gz:2020-12-13 libgles2-mesa:amd64 20.0.8-0ubuntu1~18.04.1
dpkg.log.3.gz:2020-12-13 libgles2-mesa:amd64 20.0.8-0ubuntu1~20.04.1
dpkg.log.3.gz:2020-12-13 libgles2-mesa:amd64 20.0.8-0ubuntu1~20.04.1
dpkg.log.3.gz:2020-12-13 libgles2-mesa-dev:amd64 20.0.8-0ubuntu1~18.04.1
dpkg.log.3.gz:2020-12-13 libgles2-mesa-dev:amd64 20.0.8-0ubuntu1~20.04.1
dpkg.log.3.gz:2020-12-13 libglu1-mesa:amd64 9.0.0-2.1build1
dpkg.log.3.gz:2020-12-13 libglu1-mesa:amd64 9.0.1-1build1
dpkg.log.3.gz:2020-12-13 libglu1-mesa-dev:amd64 9.0.0-2.1build1
dpkg.log.3.gz:2020-12-13 libglu1-mesa-dev:amd64 9.0.1-1build1
dpkg.log.3.gz:2020-12-13 libglx-mesa0:amd64 20.0.8-0ubuntu1~18.04.1
dpkg.log.3.gz:2020-12-13 libglx-mesa0:amd64 20.0.8-0ubuntu1~20.04.1
dpkg.log.3.gz:2020-12-13 libwayland-egl1-mesa:amd64 20.0.8-0ubuntu1~18.04.1
dpkg.log.3.gz:2020-12-13 libwayland-egl1-mesa:amd64 20.0.8-0ubuntu1~20.04.1
dpkg.log.3.gz:2020-12-13 mesa-common-dev:amd64 20.0.8-0ubuntu1~18.04.1
dpkg.log.3.gz:2020-12-13 mesa-common-dev:amd64 20.0.8-0ubuntu1~20.04.1
dpkg.log.3.gz:2020-12-13 mesa-common-dev:amd64 20.0.8-0ubuntu1~20.04.1
dpkg.log.3.gz:2020-12-13 mesa-utils:amd64 8.4.0-1
dpkg.log.3.gz:2020-12-13 mesa-utils:amd64 8.4.0-1build1
dpkg.log.3.gz:2020-12-13 mesa-va-drivers:amd64 20.0.8-0ubuntu1~18.04.1
dpkg.log.3.gz:2020-12-13 mesa-va-drivers:amd64 20.0.8-0ubuntu1~20.04.1
dpkg.log.3.gz:2020-12-13 mesa-vdpau-drivers:amd64 20.0.8-0ubuntu1~18.04.1
dpkg.log.3.gz:2020-12-13 mesa-vdpau-drivers:amd64 20.0.8-0ubuntu1~20.04.1
dpkg.log.3.gz:2020-12-13 mesa-vulkan-drivers:amd64 20.0.8-0ubuntu1~20.04.1

dmitrig pushed a commit to ouster-lidar/ouster-sdk that referenced this issue Jun 8, 2021
A mesa update has triggered a bug in rviz on intel systems[0]. Doesn't
seem like it'll get fixed soon, so this changes the default point
display type to "flat squares." It doesn't look great close-up, but
works reasonably well for visualizing sample data and room-sized scenes.

* Also rearrange the rviz window config a bit to be more useful
* Update published images to have 16-bit dpeth
* Use the usual method ot fit range values into 16 bits
* Rename intensity/ambient topics and variables in the img_node
* Add reflectivity image output to the img_node

[0] ros-visualization/rviz#1508

Approved-by: Chris Bayruns
Approved-by: Pavlo Bashmakov
@flynneva
Copy link
Contributor Author

@rhaschke just an update here - i dug into this bug some more and realized it only happened when adjusting the height of the render window (3D viz). this happens when either closing out the bottom time panel or when adjusting the entire RVIZ window height. adjusting the width does not cause this bug (at least on my machine).

not sure if this is helpful in tracking down the problem but I would guess that somewhere in the code where we calculate the pixel ratio based in height is where the bug is.

also, just a note that this bug also affects rviz2 right now. im debugging there now with galactic since the example pointcloud publisher package was released for galactic

@flynneva
Copy link
Contributor Author

also one interesting note is that this bug does not appear to affect rviz2 on windows (renders pointclouds as expected) but does affect rviz2 on ubuntu.

@rhaschke
Copy link
Contributor

@flynneva: thanks for this update. See #1508 (comment).

@Petrox
Copy link

Petrox commented Jun 18, 2021 via email

@rhaschke
Copy link
Contributor

@flynneva: thanks for reinforcing the mesa opengl issue.

@flynneva
Copy link
Contributor Author

@rhaschke made some good progress over on the mesa opengl issue. it looks like somewhere in the call stack the height of the viewport is being used to set the size of the point.

that should explain the symptoms i think, now its just a question of figuring out where this is happening.

@flynneva
Copy link
Contributor Author

flynneva commented Aug 22, 2021

@rhaschke so im not sure when i installed my last lib mesa update but this bug seems to be fixed now. I can adjust the height and the points now do not explode in size.

can anyone else confirm that its fixed on their machines as well?

EDIT: my version of mesa is: OpenGL version string: 4.6 (Compatibility Profile) Mesa 21.0.3 after running glxinfo | grep "OpenGL version"

EDIT2: and printout for rviz is:

[ INFO] [1629660975.414083605]: rviz version 1.14.8
[ INFO] [1629660975.414141764]: compiled against Qt version 5.12.8
[ INFO] [1629660975.414157098]: compiled against OGRE version 1.9.0 (Ghadamon)
[ INFO] [1629660975.423841386]: Forcing OpenGl version 0.
[ INFO] [1629660975.623670611]: Stereo is NOT SUPPORTED
[ INFO] [1629660975.623728307]: OpenGL device: Mesa Intel(R) Xe Graphics (TGL GT2)
[ INFO] [1629660975.623744879]: OpenGl version: 4.6 (GLSL 4.6) limited to GLSL 1.4 on Mesa system.

@rhaschke
Copy link
Contributor

I confirm that the issue is gone with Mesa 21.0.3 released into Bionic! 🎉

@muratkoc503
Copy link

muratkoc503 commented Jan 11, 2022

@rhaschke @flynneva
hi,
I dont understand solution.
OpenGL version string: 4.6 (Compatibility Profile) Mesa 21.0.3

If i run OccupancyMap in Rviz, i see core dumped in terminal:

[ INFO] [1641910862.873227166]: rviz version 1.14.11
[ INFO] [1641910862.873280842]: compiled against Qt version 5.12.8
[ INFO] [1641910862.873299302]: compiled against OGRE version 1.9.0 (Ghadamon)
[ INFO] [1641910862.890359425]: Forcing OpenGl version 0.
[ INFO] [1641910863.129654766]: Stereo is NOT SUPPORTED
[ INFO] [1641910863.129754139]: OpenGL device: Mesa Intel(R) UHD Graphics 620 (WHL GT2)
[ INFO] [1641910863.129775931]: OpenGl version: 4,6 (GLSL 4,6) limited to GLSL 1.4 on Mesa system.
corrupted size vs. prev_size in fastbins
Aborted (core dumped)

@rhaschke
Copy link
Contributor

@muratkoc503, I think this is a new. Please create a new issue and exactly describe your setting, i.e.

  • environment
  • active plugins

@muratkoc503
Copy link

@rhaschke, thanks and sorry. this is relating to octomap. i solved this problem.

kairenw pushed a commit to ouster-lidar/ouster-sdk that referenced this issue Aug 23, 2022
A mesa update has triggered a bug in rviz on intel systems[0]. Doesn't
seem like it'll get fixed soon, so this changes the default point
display type to "flat squares." It doesn't look great close-up, but
works reasonably well for visualizing sample data and room-sized scenes.

* Also rearrange the rviz window config a bit to be more useful
* Update published images to have 16-bit dpeth
* Use the usual method ot fit range values into 16 bits
* Rename intensity/ambient topics and variables in the img_node
* Add reflectivity image output to the img_node

[0] ros-visualization/rviz#1508

Approved-by: Chris Bayruns
Approved-by: Pavlo Bashmakov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.