-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Bug about mesh loading in simulation #2028
Comments
Good catch! But the fix is wrong and works by accident ;) Observe that I think the problem might be that your mesh contains colors in the "rgba" field. Can you try to test if this field exists? |
Well, you are right, the filed is "rgba". So how can I load the color? |
Just change the line to if (plg->cloud.fields[i].name.compare ("rgb") == 0 || plg->cloud.fields[i].name.compare ("rgba") == 0) |
Ok, I add corresponding code and everything is OK. |
Your Environment
Expected Behavior
Input a mesh with color, hoping to display it with color.
Current Behavior
The displayed mesh is always in red color.
Possible Solution
In pcl/simulation/src/model.cpp.
change line 119
from
if (plg->cloud.fields[i].name.compare ("rgb") == 0)
to
if (plg->cloud.fields[i].name.compare ("rgb") == 1)
Context
I use simulation module to display a mesh with color.
But the mesh color is always in red.
I find that when loading mesh, the condition to judge the color existing may be wrong.
I change the condition and the result goes as expected
The text was updated successfully, but these errors were encountered: