-
Notifications
You must be signed in to change notification settings - Fork 41
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
Check normal presence before trying to read asMesh normals #654
Conversation
…before reading Signed-off-by: Qingyou Zhao <[email protected]>
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.
LGTM!
I'm not sure if the rest of Gazebo handles the case where there are no normals properly. @iche033 do you know? |
gz-rendering should be able to handle meshes without normals However, I see that gz-physics' dartsim plugin requires normals to be present. To be safe I think we should add a check and auto generate normals if the assimp mesh does not contain normals, i.e. in the same function before if (subMesh.NormalCount() == 0u)
subMesh.RecalculateNormals(); |
@iche033 Added. |
Signed-off-by: Qingyou Zhao <[email protected]>
8a8048b
to
0a3d9e6
Compare
@Mergifyio backport gz-common5 gz-common6 |
✅ Backports have been created
|
* In AssimpLoader::Implementation::CreateSubMesh check normal presence before reading * RecalculateNormals if submesh has no normals --------- Signed-off-by: Qingyou Zhao <[email protected]> (cherry picked from commit a50d8d3)
* In AssimpLoader::Implementation::CreateSubMesh check normal presence before reading * RecalculateNormals if submesh has no normals --------- Signed-off-by: Qingyou Zhao <[email protected]> (cherry picked from commit a50d8d3)
* In AssimpLoader::Implementation::CreateSubMesh check normal presence before reading * RecalculateNormals if submesh has no normals --------- Signed-off-by: Qingyou Zhao <[email protected]> (cherry picked from commit a50d8d3)
* In AssimpLoader::Implementation::CreateSubMesh check normal presence before reading * RecalculateNormals if submesh has no normals --------- Signed-off-by: Qingyou Zhao <[email protected]> (cherry picked from commit a50d8d3)
🦟 Bug fix
Fixes there isn't a bug number
Summary
An assimp mesh could contain either
Existing code crashes when a mesh contains no normals
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸