-
Notifications
You must be signed in to change notification settings - Fork 92
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
Pad using weighted vertex normals #238
Pad using weighted vertex normals #238
Conversation
Wow, it's been a long time since I was interested in this issue. In #127, I found:
Could you sketch up a "proof" of some relationship? Or, alternatively, wouldn't it be easier to create a function with a new name ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this contribution.
Given that the old mesh padding was not working as expected, I don't see the need to introduce the new behavior with a new name. I even suggest replacing the old method computeVertexNormals()
with the new one.
At least robot_body_filter users actively use padding with its current behavior. Any big changes could break their workflows. But as long as the result is similar for the commonly found meshes (e.g. UR-5), it should be okay. I think the example mesh used in this PR is kind of extreme and very far from what people normally use, so the big difference in the example is okay. |
@kbrameld Do I get it correctly that the unexpected case of enlarging a square would still be present with this PR? #127 (comment) . |
You're correct, the changes in this PR won't change the behavior of enlarging the square in that issue. |
Once this is merged, I will create a PR against the |
Pinging this thread for attention to be reviewed |
Merging this, w/o a second review as nobody seems to do it... |
Thanks for reviewing @rhaschke! |
I've tested robot_body_filter (which uses geometric_shapes) with a few models from https://github.com/ctu-vras/rosdevday_cloud_filtering and the models seem to be affected only a little by this PR. So it seems this change should be safe for most users! Thanks. |
Now that this is merged, could you create a PR for ROS 2? |
* Improve padding of meshes using weighted vertex normals (#238) * Use eigen to compute angle between vertex normals to avoid nans --------- Co-authored-by: Mike Lanighan <[email protected]>
Resolves: #76
As discussed in the linked issue, padding behavior for complex meshes are not good. These changes improve upon the padding functionality, and obtain a closer functionality to blender's fatten method. Two main changes:
As discussed in the linked issue, although this is a general improvement, this change may potentially affect behavior in downstream packages if they relied on the bad padding.