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

Fix handling of submeshes #1336

Merged
merged 2 commits into from
May 26, 2019
Merged

Conversation

azeey
Copy link
Contributor

@azeey azeey commented May 25, 2019

Meshes with multiple submeshes are not handled properly when using ODE as the collision detector. This is because the indices for each submesh start from 0 in Assimp, but the input to ODE requires the vertices and indices of all submeshes to be merged.

The issue can manifest itself in various ways, but the simplest example I came up with is to create a plane and a box in one mesh and have a sphere fall onto the plane.

Before
dart_before_fix

After
dart_after_fix

I have attached the mesh for reference
plane_with_box.zip

Copy link
Member

@jslee02 jslee02 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good catch! I wonder why the vertex count should be divided by 3 though.

dart/collision/ode/detail/OdeMesh.cpp Show resolved Hide resolved
@jslee02 jslee02 added this to the DART 6.8.5 milestone May 25, 2019
@jslee02 jslee02 merged commit 3b9af2c into dartsim:release-6.8 May 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants