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

Provide default callbacks for broadphase collision manager #438

Conversation

SeanCurtis-TRI
Copy link
Contributor

@SeanCurtis-TRI SeanCurtis-TRI commented Feb 3, 2020

We had default callbacks defined in the test namespace. The main README.md was recommending using them. This moves them directly into fcl namespace so that user code doesn't have to pull in test code and modifies the README.md accordingly.

Closes #411


This change is Reviewable

Copy link
Contributor Author

@SeanCurtis-TRI SeanCurtis-TRI left a comment

Choose a reason for hiding this comment

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

@sherm1 for both reviews

For the record, the first revision is a bunch of whitespace changes on the README.md file so it is easy to read in a fixed-width context. The second revision then piles changes on top of the reformatted file. I'd recommend reviewing them as two separate revisisons.

Reviewable status: 0 of 10 files reviewed, all discussions resolved

Copy link
Member

@sherm1 sherm1 left a comment

Choose a reason for hiding this comment

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

Looks great, per f2f may need a note in the changelog or release notes noting the name changes in case someone was using the old names.

CI is not happy.

Checkpoint.

Reviewed 1 of 1 files at r1, 9 of 10 files at r2.
Reviewable status: 9 of 10 files reviewed, 2 unresolved discussions (waiting on @SeanCurtis-TRI)


README.md, line 194 at r2 (raw file):

// a) a callback to collision or distance; 
// b) an intermediate data to store the information generated during the
//    broadphase computation

nit: needs a period


README.md, line 197 at r2 (raw file):

// For convenience, FCL provides default callbacks to satisfy a) and a
// corresponding call back data to satisfy b) for both collision and distance
// queries. For collision use DefaultCollisionCallback and DefaultCollisoinData

nit: typo "Collisoin"

Copy link
Contributor

@jamiesnape jamiesnape left a comment

Choose a reason for hiding this comment

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

Reviewable status: 9 of 10 files reviewed, 2 unresolved discussions (waiting on @SeanCurtis-TRI)


include/fcl/broadphase/default_broadphase_callbacks.h, line 17 at r2 (raw file):

 *     disclaimer in the documentation and/or other materials provided
 *     with the distribution.
 *   * Neither the name of Open Source Robotics Foundation nor the names of its

BTW Open Source Robotics Foundation -> copyright holder (or Toyota Research Institute, but then someone else will copy and paste the wrong name in future.)

Copy link
Member

@sherm1 sherm1 left a comment

Choose a reason for hiding this comment

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

:lgtm: x 2 pending green CI

Just checking: looks like the defaultContinuousDistanceFunction is removed here without a replacement. It didn't appear to ever have a real implementation so that seems like an improvement. Maybe mention that in the changelog also?

Reviewed 1 of 10 files at r2.
Reviewable status: all files reviewed, 6 unresolved discussions (waiting on @SeanCurtis-TRI)


include/fcl/broadphase/default_broadphase_callbacks.h, line 85 at r2 (raw file):

/// @param o2   The second object in the culled pair.
/// @param data A non-null pointer to a DefaultCollisionData instance.
/// @return True if the broadphase evaluation should stop.

nit consider true (lower case) to be more C++-ish (and below)


include/fcl/broadphase/default_broadphase_callbacks.h, line 109 at r2 (raw file):

/// @brief Collision data for use with the DefaultContinuousCollisionFunction.
/// It stores the collision request and the result given by collision algorithm

nit: by the collision


include/fcl/broadphase/default_broadphase_callbacks.h, line 132 at r2 (raw file):

/// to true, this method will simply return without doing any computation.
///
/// For a given instance of DefaultCollisionData, if broadphase evaluation has

nit Default Continuous CollisionData ? (also on next lines)


include/fcl/broadphase/default_broadphase_callbacks.h, line 160 at r2 (raw file):

/// @brief Distance data for use with the DefaultDistanceFunction. It stores
/// the distance request and the result given by distace algorithm (and

nit typo distace

Copy link
Contributor Author

@SeanCurtis-TRI SeanCurtis-TRI left a comment

Choose a reason for hiding this comment

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

Comments addressed and, with any luck, CI addressed.

Reviewable status: 2 of 10 files reviewed, all discussions resolved (waiting on @sherm1)


include/fcl/broadphase/default_broadphase_callbacks.h, line 17 at r2 (raw file):

Previously, jamiesnape (Jamie Snape) wrote…

BTW Open Source Robotics Foundation -> copyright holder (or Toyota Research Institute, but then someone else will copy and paste the wrong name in future.)

Nice catch. :)

@SeanCurtis-TRI SeanCurtis-TRI force-pushed the PR_default_query_callbacks branch 2 times, most recently from 3c0bd1b to 651bb99 Compare February 4, 2020 22:55
Copy link
Contributor Author

@SeanCurtis-TRI SeanCurtis-TRI left a comment

Choose a reason for hiding this comment

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

@sherm - waiting on you.

Reviewable status: 2 of 10 files reviewed, all discussions resolved (waiting on @sherm1)

Copy link
Member

@sherm1 sherm1 left a comment

Choose a reason for hiding this comment

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

Needs a manual merge, apparently.

Reviewed 8 of 9 files at r3.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

Copy link
Contributor Author

@SeanCurtis-TRI SeanCurtis-TRI left a comment

Choose a reason for hiding this comment

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

I'm somewhat inclined to go ahead and rebase it and let it run all the way through CI. Just so the PR record shows it merged with all green lights. We have a lot of PRs with red x's. :-/

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

This simply wraps all of the text to be better compliant with the google
style guide. It (mostly) fits within 80 columns. Particularly the code
examples.
We had default callbacks defined in the test namespace. The main readme.md
was recommending using them. This moves them directly into fcl namespace
so that user code doesn't have to pull in test code.
Copy link
Member

@sherm1 sherm1 left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r4.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@SeanCurtis-TRI SeanCurtis-TRI merged commit 2401d04 into flexible-collision-library:master Feb 5, 2020
@SeanCurtis-TRI SeanCurtis-TRI deleted the PR_default_query_callbacks branch February 5, 2020 20:03
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.

README.md proposes using code in test/
3 participants