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

GPU lidar sensor misses heightmap visuals #712

Closed
3 of 16 tasks
hidmic opened this issue Aug 29, 2022 · 6 comments · Fixed by #760
Closed
3 of 16 tasks

GPU lidar sensor misses heightmap visuals #712

hidmic opened this issue Aug 29, 2022 · 6 comments · Fixed by #760
Labels
bug Something isn't working 🌱 garden Ignition Garden

Comments

@hidmic
Copy link
Contributor

hidmic commented Aug 29, 2022

Environment

  • OS Version: Ubuntu 20.04
  • Source build, current gz-garden
  • If this is a GUI or sensor rendering bug, describe your GPU and rendering system. Otherwise delete this section.
    • Rendering plugin: ogre2.
      • No relevant logs
    • Generally, mention all circumstances that might affect rendering capabilities:
      • running on a dual GPU machine (integrated GPU + discrete GPU)
      • running on a multi-GPU machine (it has multiple discrete GPUs)
      • running on real hardware
      • running in virtual machine
      • running in Docker/Singularity
      • running remotely (e.g. via SSH)
      • running in a cloud
      • using VirtualGL, XVFB, Xdummy, XVNC or other indirect rendering utilities
      • GPU is concurrently used for other tasks
        • desktop acceleration
        • video decoding (i.e. a playing Youtube video)
        • video encoding
        • CUDA/ROCm computations (Tensorflow, Torch, Caffe running)
        • multiple simulators running at the same time
      • other...
    • Rendering system info:
      • On Linux, provide the outputs of the following commands:
        $ LANG=C lspci -nn | grep VGA  # might require installing pciutils
        00:02.0 VGA compatible controller [0300]: Intel Corporation UHD Graphics 630 (Mobile) [8086:3e9b]
        01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP107M [GeForce GTX 1050 Ti Mobile] [10de:1c8c] (rev a1)          
        $ echo "$DISPLAY"
        :1
        $ LANG=C glxinfo -B | grep -i '\(direct rendering\|opengl\|profile\)'  # might require installing mesa-utils package
        direct rendering: Yes
        OpenGL vendor string: NVIDIA Corporation
        OpenGL renderer string: NVIDIA GeForce GTX 1050 Ti with Max-Q Design/PCIe/SSE2
        OpenGL core profile version string: 4.6.0 NVIDIA 470.141.03
        OpenGL core profile shading language version string: 4.60 NVIDIA
        OpenGL core profile context flags: (none)
        OpenGL core profile profile mask: core profile
        OpenGL version string: 4.6.0 NVIDIA 470.141.03
        OpenGL shading language version string: 4.60 NVIDIA
        OpenGL context flags: (none)
        OpenGL profile mask: (none)
        OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 470.141.03
        OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
        $ ps aux | grep Xorg  # outside container
        root        1279  0.0  0.3 25609504 119844 tty1  Sl+  08:28   0:03 /usr/lib/xorg/Xorg vt1 -displayfd 3 -auth /run/user/121/gdm/Xauthority -background none -noreset -keeptty -verbose 3
        root        2275  2.9  0.5 25670656 178144 tty2  Sl+  08:30   3:41 /usr/lib/xorg/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -background none -noreset -keeptty -verbose 3
        $ sudo env LANG=C X -version  # if you don't have root access, try to tell the version of Xorg e.g. via package manager
        X.Org X Server 1.20.13
        X Protocol Version 11, Revision 0
        Build Operating System: linux Ubuntu
        Current Operating System: Linux gcrino 5.4.0-125-generic #141-Ubuntu SMP Wed Aug 10 13:42:03 UTC 2022 x86_64
        Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.4.0-125-generic root=UUID=e04e4125-9aed-4288-a2f3-27faab769cad ro quiet splash vt.handoff=7
        Build Date: 06 July 2022  01:53:24PM
        xorg-server 2:1.20.13-1ubuntu1~20.04.3 (For technical support please see http://www.ubuntu.com/support) 
        Current version of pixman: 0.38.4
        Before reporting problems, check http://wiki.x.org
            to make sure that you have the latest version.
    • Please, attach the ogre.log or ogre2.log
      file from ~/.gz/rendering

Description

  • Expected behavior: GPU lidar sensor can see heightmap textures
  • Actual behavior: GPU lidar sensor cannot see heightmap textures

Steps to reproduce

  1. Run gz sim repro.sdf

  2. Use PointCloud GUI plugin to display scan points.

Output

Lidar can see the box but no the terrain (note the pointcloud position is off because of assumptions in the GUI plugin).

lidar_no_dem

@hidmic hidmic added bug Something isn't working 🌱 garden Ignition Garden labels Aug 29, 2022
@hidmic
Copy link
Contributor Author

hidmic commented Aug 29, 2022

This used to be working not that long ago. I cannot confirm it but I suspect #553 may have had something to do with this.

@iche033
Copy link
Contributor

iche033 commented Aug 31, 2022

I think visibility mask broke this. Before this PR #625, the value is set to IGN_VISIBILITY_ALL which is 0x0FFFFFFF. Now it grabs the default value from sdf which is 0xFFFFFFFF.

Somehow this only affects heightmaps.

One workaround is to add a <visibility_mask> to the <lidar> tag and set it to a different value then the lidar should start detecting the heightmap again.

@hidmic
Copy link
Contributor Author

hidmic commented Aug 31, 2022

@iche033 ahh, good catch! That was it. Is this documented somewhere?

@iche033
Copy link
Contributor

iche033 commented Aug 31, 2022

you mean what the visibility masks / flag ares? We added it to the sdf spec but looks like the sdformat website hasn't been updated to pick up the news changes

@azeey
Copy link
Contributor

azeey commented Oct 17, 2022

Other than the update to the sdformat docs (which I'll try to do today), anything else left to do on this issue?

@iche033
Copy link
Contributor

iche033 commented Nov 7, 2022

yeah we still need to fix this issue in gz-rendering. I think one potential workaround is to change this line from

this->VisibilityMask()

to

(this->VisibilityMask() & IGN_VISIBILITY_ALL)

and that should fix heightmap detection without explicitly setting the visibility mask. Oh and also add an integration test.

@iche033 iche033 closed this as completed Nov 15, 2022
KristjanDeepX added a commit to DeepX-inc/gz-rendering that referenced this issue Feb 3, 2023
This is a backport of gazebosim#760
which is a fix to gazebosim#712
KristjanDeepX added a commit to DeepX-inc/gz-rendering that referenced this issue Feb 3, 2023
This is a backport of gazebosim#760
which is a fix to gazebosim#712
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 🌱 garden Ignition Garden
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants