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

filtered_cloud is incorrect #19

Open
nyxrobotics opened this issue May 14, 2024 · 3 comments
Open

filtered_cloud is incorrect #19

nyxrobotics opened this issue May 14, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@nyxrobotics
Copy link

Description

If you set debug to true in move_group.launch, you can see filtered_cloud in rviz
This filtered_cloud automatically removes the robot's own model and the model of the scene added with rviz
However, this model is not fully removed and there is a point cloud that is not removed as shown in the image

Screenshot from 2024-05-14 11-59-54

Your environment

  • ROS Distro: [Kinetic|Melodic|Noetic]
  • OS Version: e.g. Ubuntu 18.04
  • Source or Binary build?
  • If binary, which release version?
  • If source, which branch?

Steps to reproduce

Tell us how to reproduce this issue. Attempt to provide a working demo, perhaps using Docker.

Expected behaviour

Tell us what should happen

Actual behaviour

Tell us what happens instead

Backtrace or Console output

Use gist.github.com to copy-paste the console output or segfault backtrace using gdb.

@nyxrobotics nyxrobotics added the bug Something isn't working label May 14, 2024
@nyxrobotics
Copy link
Author

I think octomap is working correctly and only filtered_cloud seems to be wrong.

@nyxrobotics
Copy link
Author

I found the cause. These processes were using OpenGL, and instead of “erasing the inside of the BOX”, they were “rendering the mesh of the BOX and erasing the back side of the mesh to the shadow_threshold distance”. The first image shows that the point cloud at a distance greater than shadow_threshold from the mesh in view has not been removed.

" float dValue = float(texture2D(depth, gl_TexCoord[0].st));"
" float zValue = dValue * near / (far - dValue * f_n);"
" float diff = sValue - zValue;"
" if (diff < 0 && sValue < 1) {"
" gl_FragColor = vec4 (0, 0, 0, 0);"
" gl_FragDepth = float(texture2D(sensor, gl_TexCoord[0].st));"
" } else if (diff > threshold) {"
" gl_FragColor = vec4 (shadowLabel, 0, 0, 0);"
" gl_FragDepth = float(texture2D(sensor, gl_TexCoord[0].st));"
" } else if (sValue == 1) {"
" gl_FragColor = vec4 (farLabel, 0, 0, 0);"
" gl_FragDepth = float(texture2D(sensor, gl_TexCoord[0].st));"
" } else {"
" gl_FragColor = texture2D(label, gl_TexCoord[0].st);"
" gl_FragDepth = 0;"
" }"

@nyxrobotics
Copy link
Author

The problem seems to be solved by increasing shadow_threshold.
However, the following issues need to be fixed

  • There are some bugs
  • Source code is hard to read.
  • Debugging topics cannot be displayed in Rviz

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

No branches or pull requests

1 participant