-
Notifications
You must be signed in to change notification settings - Fork 276
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
Use collision bitmask flag for meshes #160
Conversation
Codecov Report
@@ Coverage Diff @@
## master #160 +/- ##
==========================================
+ Coverage 65.68% 65.77% +0.09%
==========================================
Files 128 128
Lines 6297 6305 +8
==========================================
+ Hits 4136 4147 +11
+ Misses 2161 2158 -3
Continue to review full report at Codecov.
|
4add457
to
5772da8
Compare
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.
looks good to me, just one minor codecheck error. Can you update changelog?
the homebrew build failure looks be unrelated. I think we may need to release a new ign-gui bottle for it to pass |
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 removing it from the minimum feature list, but I think this still breaks backwards compatibility.
TPE for example will lose collision support because it doesn't have the bitmask feature. Do you mind creating a new feature list just for this? I know it's more work, but this feature feels niche enough to be an option in itself.
Signed-off-by: Luca Della Vedova <luca@openrobotics.org>
Signed-off-by: Luca Della Vedova <luca@openrobotics.org>
Signed-off-by: Luca Della Vedova <luca@openrobotics.org>
Signed-off-by: Luca Della Vedova <luca@openrobotics.org>
24f5c12
to
c2de871
Compare
Done here, I used a different strategy compared to the parts above for printing the error (not printing any). The reason is that even if the user doesn't specify a collide_bitmask in SDF there will still be a value assigned to it (default of 0xFF), so the warning for the missing feature would be always printed. There will still be warnings printed in the entityCast function though if the bitmask filter is not implemented, but I'm not sure how to handle them.
Ideas? |
That's a good point. We could just make that function silent and let the caller responsible for printing messages.
I'd be ok punting on this for now, maybe ticketing an issue. |
Signed-off-by: Luca Della Vedova <luca@openrobotics.org>
Something like this? |
Yup, thanks, that looks good to me! |
Signed-off-by: Louise Poubel <louise@openrobotics.org>
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 iterating! I bumped the required physics version in ff69acb.
the latest changes look good to me, thanks! |
Preliminary support for collision bitmask was introduce in ign-physics with this PR.
That introduces filling the bitmask and introducing the filtering in the ConstructSdfCollision function. The issue is that the function is called in an else statement only if the object is not a mesh.
This means that before this PR meshes didn't implement the collide_bitmask flag, now they do. This effectively makes the change in the ConstructSdfCollision obsolete and it can be removed.
While this is just a few lines and it fixes the problem, it introduces an additional feature to the MinimumFeatureList which is probably not desirable. Also, I guess there should be a discussion about whether more features from the ConstructSdfCollision functions should be ported to make them work with meshes as well, from what I can see in the code there is a whole chunk of SDF parameters related to friction that will be applied to primitives but not to meshes, which doesn't sound correct.
Open to ideas on whether this fix is acceptable (and whether we should find a way to port the above) or if I should look at alternative fixes.