-
Notifications
You must be signed in to change notification settings - Fork 285
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
Distance API #744
Distance API #744
Conversation
…p (use Collision[Option/Result].hpp instead)
This looks good. I posted a few comments on Reviewable. The only two major ones are:
Reviewed 23 of 23 files at r1. dart/collision/CMakeLists.txt, line 20 [r1] (raw file):
Why remove the headers from dart/collision/CollisionDetector.cpp, line 64 [r1] (raw file):
It bothers me that these functions have dummy implementations, but I would prefer that both functions be left as pure dart/collision/CollisionDetector.hpp, line 114 [r1] (raw file):
This comment is inaccurate.. It would be good to specify explicitly that (1) this is signed distance and (2) result reflects the minimum distance between any two Please reply if either of my assumptions are incorrect here. It's not entirely obvious what the single-argument dart/collision/CollisionGroup.hpp, line 185 [r1] (raw file):
It would be good to clarify the docstrings in this file, too. dart/collision/DistanceOption.hpp, line 45 [r1] (raw file):
Comment? dart/collision/DistanceOption.hpp, line 48 [r1] (raw file):
Comment? Also, what does it mean if this is dart/collision/fcl/FCLCollisionDetector.cpp, line 1175 [r1] (raw file):
Does this change the dart/collision/fcl/FCLCollisionDetector.cpp, line 1189 [r1] (raw file):
We definitely care about the penetration distance. I suggest allowing the user to specify a "minimum distance" that they care about. The user pass unittests/testDistance.cpp, line 288 [r1] (raw file):
Doesn't only FCL implement this functionality? How do the Bullet and DART tests pass? Comments from Reviewable |
It appears that this pull request should be merged after #749. |
Review status: 10 of 29 files reviewed at latest revision, 9 unresolved discussions. dart/collision/CMakeLists.txt, line 20 [r1] (raw file):
|
Reviewed 1 of 5 files at r2, 19 of 19 files at r3. CHANGELOG.md, line 3 [r3] (raw file):
Missing a CHANGELOG.md, line 7 [r3] (raw file):
Typo: dart/collision/DistanceResult.hpp, line 63 [r3] (raw file):
Are the coordinates expressed w.r.t. dart/collision/fcl/FCLCollisionDetector.cpp, line 1189 [r1] (raw file):
|
Review status: 27 of 29 files reviewed at latest revision, 4 unresolved discussions. CHANGELOG.md, line 3 [r3] (raw file):
|
Reviewed 2 of 2 files at r4. dart/collision/fcl/FCLCollisionDetector.cpp, line 1189 [r1] (raw file):
|
Review status: all files reviewed at latest revision, 1 unresolved discussion. dart/collision/fcl/FCLCollisionDetector.cpp, line 1189 [r1] (raw file):
|
Review status: all files reviewed at latest revision, 1 unresolved discussion. dart/collision/fcl/FCLCollisionDetector.cpp, line 1189 [r1] (raw file):
|
Review status: all files reviewed at latest revision, 1 unresolved discussion. dart/collision/fcl/FCLCollisionDetector.cpp, line 1189 [r1] (raw file):
|
Review status: all files reviewed at latest revision, 1 unresolved discussion. dart/collision/fcl/FCLCollisionDetector.cpp, line 1189 [r1] (raw file):
|
# Conflicts: # CHANGELOG.md
Review status: 24 of 25 files reviewed at latest revision, 1 unresolved discussion. dart/collision/fcl/FCLCollisionDetector.cpp, line 1189 [r1] (raw file):
|
Review status: 24 of 25 files reviewed at latest revision, 1 unresolved discussion. dart/collision/fcl/FCLCollisionDetector.cpp, line 1189 [r1] (raw file):
|
Review status: 24 of 25 files reviewed at latest revision, 1 unresolved discussion. dart/collision/fcl/FCLCollisionDetector.cpp, line 1189 [r1] (raw file):
|
dart/collision/fcl/FCLCollisionDetector.cpp, line 1189 [r1] (raw file):
|
Review status: 24 of 25 files reviewed at latest revision, 1 unresolved discussion. dart/collision/fcl/FCLCollisionDetector.cpp, line 1189 [r1] (raw file):
|
Review status: 24 of 25 files reviewed at latest revision, 1 unresolved discussion. dart/collision/fcl/FCLCollisionDetector.cpp, line 1189 [r1] (raw file):
|
dart/collision/fcl/FCLCollisionDetector.cpp, line 1189 [r1] (raw file):
This seems good. Comments from Reviewable |
dart/collision/fcl/FCLCollisionDetector.cpp, line 1192 [r1] (raw file):
|
dart/collision/fcl/FCLCollisionDetector.cpp, line 1189 [r1] (raw file):
|
dart/collision/fcl/FCLCollisionDetector.cpp, line 1192 [r1] (raw file):
|
Review status: 24 of 25 files reviewed at latest revision, 2 unresolved discussions. dart/collision/fcl/FCLCollisionDetector.cpp, line 1192 [r1] (raw file):
Ah, gotcha. My mistake! Comments from Reviewable |
Review status: 24 of 25 files reviewed at latest revision, 2 unresolved discussions. dart/collision/fcl/FCLCollisionDetector.cpp, line 1189 [r1] (raw file):
|
dart/collision/fcl/FCLCollisionDetector.cpp, line 1189 [r1] (raw file):
|
Review status: 24 of 25 files reviewed at latest revision, 2 unresolved discussions. dart/collision/fcl/FCLCollisionDetector.cpp, line 1189 [r1] (raw file):
|
Review status: 24 of 25 files reviewed at latest revision, 2 unresolved discussions. dart/collision/fcl/FCLCollisionDetector.cpp, line 1189 [r1] (raw file):
|
Review status: 24 of 25 files reviewed at latest revision, 2 unresolved discussions. dart/collision/fcl/FCLCollisionDetector.cpp, line 1189 [r1] (raw file):
|
Reviewed 1 of 1 files at r6. dart/collision/fcl/FCLCollisionDetector.cpp, line 1189 [r1] (raw file):
|
Review status: all files reviewed at latest revision, 2 unresolved discussions. dart/collision/fcl/FCLCollisionDetector.cpp, line 1189 [r1] (raw file):
|
dart/collision/fcl/FCLCollisionDetector.cpp, line 1189 [r1] (raw file):
|
Review status: all files reviewed at latest revision, 2 unresolved discussions. dart/collision/fcl/FCLCollisionDetector.cpp, line 1189 [r1] (raw file):
|
# Conflicts: # CHANGELOG.md
# Conflicts: # CHANGELOG.md
Sorry for the delayed update. I basically agree with the consensus but have one concern on it. From my perspective, the basic goal of distance query is to find minimum distance across all the objects in the collision group, and optionally the nearest points that forms a line segment with the distance. The lower bound option is for perfomance boosting in case the caller doesn't care about distance below a certain value. In that sense, I would prefer having at least one set of API that returns consistent distance, object pair, and nearest points. This could be done by having following fields: Maybe I have a different view on the distance query so probably I'm not completely convinced to that clamped distance is the default distance. Also, I might have something missed from the above long discussion. Please let me know if there is. |
@jslee02 Good point -- those additional return values (colliding objects and nearest points) are only valid (and really should only be populated) when the return value is not clamped. (That is, in the case that |
I like @cdellin's suggestion of adding a flag to the Like @cdellin said, this condition is always satisfied when |
Conflicts: dart/dynamics/Shape.hpp
I updated the distance API according to the discussion in the last commit. I also like to have an indicator for whether the distance was clamped. For that Thanks for the comments @mkoval , @cdellin , and @psigen . Please take a look at the changes and let me know if it looks good to merge. |
Sounds (and looks) good to me, thanks @jslee02! |
LGTM. 👍 |
This change is