-
Notifications
You must be signed in to change notification settings - Fork 421
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
Addressing custom box-box intersection #259
Addressing custom box-box intersection #259
Conversation
Wow - I'm amazed at how much code you were able to get rid of! Nice! Reviewed 1 of 3 files at r1. include/fcl/narrowphase/detail/primitive_shape_algorithm/box_box-inl.h, line 792 at r1 (raw file):
BTW compuations -> computations test/test_fcl_box_box.cpp, line 52 at r1 (raw file):
BTW consider referencing the Drake documentation that explains this notation: http://drake.mit.edu/doxygen_cxx/group__multibody__spatial__pose.html test/test_fcl_box_box.cpp, line 72 at r1 (raw file):
BTW Comments from Reviewable |
CI troubles (test_fcl_geometric_shapes). Review status: 1 of 3 files reviewed at latest revision, 3 unresolved discussions, some commit checks failed. Comments from Reviewable |
d1af469
to
7805c35
Compare
Thanks Sherm. Comments addressed and CI (ostensibly) corrected. Review status: 1 of 3 files reviewed at latest revision, 3 unresolved discussions, some commit checks failed. include/fcl/narrowphase/detail/primitive_shape_algorithm/box_box-inl.h, line 792 at r1 (raw file): Previously, sherm1 (Michael Sherman) wrote…
Done test/test_fcl_box_box.cpp, line 52 at r1 (raw file):
test/test_fcl_box_box.cpp, line 72 at r1 (raw file): Previously, sherm1 (Michael Sherman) wrote…
Done Comments from Reviewable |
b29b4fb
to
0c73212
Compare
-- awesome! A few BTWs below. CI is still failing one test on Mac (box-capsule test which shouldn't have been affected by this PR). Sean just triggered CI for master via no-op PR #261 to see whether the same test fails without the present PR. If so, I propose that we merge this PR and treat the Mac problem separately as discussed in issue #260. If it does not fail then it should be investigated further first. Reviewed 3 of 3 files at r2. test/test_fcl_box_box.cpp, line 4 at r2 (raw file):
BTW copyright should be Toyota Research Institute? test/test_fcl_box_box.cpp, line 249 at r2 (raw file):
BTW text says 3, diagram says 2. I was confused by that (especially since the first box has a side labeled 1 with length 1) but now I think the 1 and 2 mean body 1, body 2 rather than dimensions. Please clarify (maybe put "Box1" "Box2" in the figure instead of the naked-and-ambiguous integers?). test/test_fcl_geometric_shapes.cpp, line 687 at r2 (raw file):
FYI Wow! Thanks for adding this documentation. Hopefully it will serve as much-needed inspiration for other FCL contributors whose comments have tended to be ... um ... terse. Comments from Reviewable |
0c73212
to
3ac84ce
Compare
Comments addressed Review status: 3 of 4 files reviewed at latest revision, 2 unresolved discussions. test/test_fcl_box_box.cpp, line 4 at r2 (raw file): Previously, sherm1 (Michael Sherman) wrote…
Done test/test_fcl_box_box.cpp, line 249 at r2 (raw file): Previously, sherm1 (Michael Sherman) wrote…
Done Comments from Reviewable |
fdf3f6e
to
78bb30e
Compare
Reviewed 1 of 1 files at r3. test/test_fcl_box_box.cpp, line 4 at r2 (raw file): Previously, SeanCurtis-TRI (Sean Curtis) wrote…
Bad news dude -- it's 2018 already. Comments from Reviewable |
78bb30e
to
973f96e
Compare
Review status: 3 of 4 files reviewed at latest revision, all discussions resolved. test/test_fcl_box_box.cpp, line 4 at r2 (raw file): Previously, sherm1 (Michael Sherman) wrote…
When did that happen? Comments from Reviewable |
f942001
to
f169fc3
Compare
// We are performing the mathematical test: 0 > 0 (which should always be | ||
// false). However, zero can sometimes be 1e-16 or 1.5e-16. Thus, | ||
// mathematically we would interpret a scenario as 0 > 0 but end up with | ||
// 1e5e-16 > 1e-16. The former evaluates to false, the latter evaluates to |
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.
1e5e-16
-> 1.5e-16
// contacts.push_back(ContactPoint<S>(-normal, pointInWorld, -*depth)); | ||
contacts.emplace_back(normal, pb, -*depth); | ||
Vector3<S> pointInWorld((pa + pb) * 0.5); | ||
contacts.push_back(ContactPoint<S>(normal, pointInWorld, *depth)); |
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.
f169fc3
to
1acc54a
Compare
Final comments addressed. Review status: 2 of 4 files reviewed at latest revision, 2 unresolved discussions. include/fcl/narrowphase/detail/primitive_shape_algorithm/box_box-inl.h, line 380 at r4 (raw file): Previously, scpeters (Steven Peters) wrote…
Done include/fcl/narrowphase/detail/primitive_shape_algorithm/box_box-inl.h, line 614 at r4 (raw file): Previously, scpeters (Steven Peters) wrote…
Done Comments from Reviewable |
1acc54a
to
3a5f975
Compare
This does several things: 1. Modifies the "correctness" of box-box intersection: a. Addresses the interpretation of the contact position (as per issue flexible-collision-library#258); the contact position lies between the two surfaces. b. Correct the sign on the penetration depth so that colliding objects report positive penetration depth. 2. Refactors box-box intersection code: a. Removes redundant implementation to limit repeated bugs. This encompasses completely redundant function implementations as well as unnecessary duplicatio in branches. b. Add additional documentation/todos on the implementation. c. Replace the `fudge2` parameter with something more reasoned. 3. Adds unit tests confirming the behavior.
3a5f975
to
9463e5b
Compare
Reviewed 1 of 1 files at r4, 2 of 2 files at r5. Comments from Reviewable |
CI failure is just the known Mac problem -- will merge anyway. Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed. Comments from Reviewable |
This does several things:
a. Addresses the interpretation of the contact position (as per
issue Interpretation of contact "position" needs to be unified. #258); the contact position lies between the two surfaces.
b. Correct the sign on the penetration depth so that colliding
objects report positive penetration depth.
a. Removes redundant implementation to limit repeated bugs. This
encompasses completely redundant function implementations as well
as unnecessary duplication in branches.
b. Add additional documentation/todos on the implementation.
c. Replace the
fudge2
parameter with something more reasoned.Relates to #258
CI issues related to #260
NOTE: This changes the return values for collision queries between boxes. Code that currently relies on negative penetration depths and contact positions that lie on one box or the other will break.
This change is