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

Add FCL external #3381

Merged
merged 4 commits into from
Dec 23, 2016
Merged

Add FCL external #3381

merged 4 commits into from
Dec 23, 2016

Conversation

jamiesnape
Copy link
Contributor

@jamiesnape jamiesnape commented Sep 7, 2016

  • Adds the Flexible Collision Library (FCL) as an external.
  • Adds a stubbed collision model that will use FCL and a basic integration test.

Obviously, much work to do implementing the model and adding more tests, but this is something to build upon.


This change is Reviewable

@sherm1
Copy link
Member

sherm1 commented Sep 23, 2016

/cc @SeanCurtis-TRI

@jamiesnape
Copy link
Contributor Author

Upstreaming danfis/libccd#24 and flexible-collision-library/fcl#181.

@jamiesnape
Copy link
Contributor Author

Upstreams have accepted necessary patches.

@sherm1
Copy link
Member

sherm1 commented Sep 27, 2016

Upstreams have accepted necessary patches.

Awesome! Thanks, Jamie.

@jamiesnape
Copy link
Contributor Author

@jamiesnape
Copy link
Contributor Author

FCL patch is in, waiting on the octomap patch.

@jamiesnape
Copy link
Contributor Author

+@SeanCurtis-TRI for feature review and +@sherm1 for platform review.

Copy link
Contributor

@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.

Looks good

@sherm1
Copy link
Member

sherm1 commented Oct 3, 2016

Thanks, @jamiesnape! A few comments -- PTAL.

+@amcastro-tri can you take a quick look at this please?


Reviewed 10 of 10 files at r1.
Review status: all files reviewed at latest revision, 3 unresolved discussions.


drake/systems/plants/collision/fcl_model.h, line 21 at r1 (raw file):

  bool closestPointsAllToAll(const std::vector<ElementId>& ids_to_check,
                             const bool use_margins,

const is meaningless here (in declaration), should be just bool use_margins. (and below) You can still use the const in the .cc implementation if you want; C++ considers that the same signature.


drake/systems/plants/collision/test/fcl_model_test.cc, line 12 at r1 (raw file):

GTEST_TEST(FCLModelTest, Test) {
  using namespace fcl;

Not allowed per styleguide -- just individual using fcl::blahs.


drake/systems/plants/collision/test/fcl_model_test.cc, line 19 at r1 (raw file):

  EXPECT_TRUE(v1.cross(v2).isApprox(v3));
  EXPECT_DOUBLE_EQ(26.0, v1.dot(v2));

This looks like it's testing Eigen rather than FCL?


Comments from Reviewable

@jamiesnape
Copy link
Contributor Author

Review status: all files reviewed at latest revision, 3 unresolved discussions.


drake/systems/plants/collision/fcl_model.h, line 21 at r1 (raw file):

Previously, sherm1 (Michael Sherman) wrote…

const is meaningless here (in declaration), should be just bool use_margins. (and below) You can still use the const in the .cc implementation if you want; C++ considers that the same signature.

True. I was idly copying the superclass... I will fix both.

drake/systems/plants/collision/test/fcl_model_test.cc, line 19 at r1 (raw file):

Previously, sherm1 (Michael Sherman) wrote…

This looks like it's testing Eigen rather than FCL?

Testing the wrapped versions really. I do not expect this test to persist once the model is implemented.

Comments from Reviewable

@jamiesnape
Copy link
Contributor Author

Review status: 8 of 16 files reviewed at latest revision, 3 unresolved discussions.


drake/systems/plants/collision/test/fcl_model_test.cc, line 19 at r1 (raw file):

Previously, jamiesnape (Jamie Snape) wrote…

Testing the wrapped versions really. I do not expect this test to persist once the model is implemented.

I will add something more meaningful.

Comments from Reviewable

@amcastro-tri
Copy link
Contributor

It looks great to get started. Just a few comments.


Reviewed 8 of 8 files at r2.
Review status: all files reviewed at latest revision, 4 unresolved discussions.


drake/systems/plants/collision/fcl_model.h, line 19 at r2 (raw file):

  FCLModel() {}
  virtual ~FCLModel() {}

BTW, Here missing override for addElement(). And I wonder if you could provide super basic functionality to add say a sphere so that we check it links correctly with FCL (and we can have a more FLC-like unit test in fcl_model_test.cc)


Comments from Reviewable

@SeanCurtis-TRI
Copy link
Contributor

:lgtm:


Review status: all files reviewed at latest revision, 4 unresolved discussions.


drake/systems/plants/collision/fcl_model.h, line 19 at r2 (raw file):

Previously, amcastro-tri (Alejandro Castro) wrote…

BTW, Here missing override for addElement(). And I wonder if you could provide super basic functionality to add say a sphere so that we check it links correctly with FCL (and we can have a more FLC-like unit test in fcl_model_test.cc)

BTW, I'm comfortable with leaving that as an exercise for tying FCL into drake. I believe the scope of this was getting FCL into the build.

Comments from Reviewable

@jamiesnape
Copy link
Contributor Author

Review status: 8 of 16 files reviewed at latest revision, 3 unresolved discussions.


drake/systems/plants/collision/fcl_model.h, line 21 at r1 (raw file):

Previously, jamiesnape (Jamie Snape) wrote…

True. I was idly copying the superclass... I will fix both.

Done.

drake/systems/plants/collision/test/fcl_model_test.cc, line 12 at r1 (raw file):

Previously, sherm1 (Michael Sherman) wrote…

Not allowed per styleguide -- just individual using fcl::blahs.

Done.

drake/systems/plants/collision/test/fcl_model_test.cc, line 19 at r1 (raw file):

Previously, jamiesnape (Jamie Snape) wrote…

I will add something more meaningful.

Done.

Comments from Reviewable

@sherm1
Copy link
Member

sherm1 commented Oct 5, 2016

-@amcastro-tri due to vacation (already reviewed)


Review status: 8 of 16 files reviewed at latest revision, 3 unresolved discussions, some commit checks failed.


Comments from Reviewable

@sherm1
Copy link
Member

sherm1 commented Oct 5, 2016

:lgtm: -- one comment, PTAL.


Reviewed 3 of 8 files at r2, 8 of 8 files at r3.
Review status: all files reviewed at latest revision, 1 unresolved discussion, some commit checks failed.


drake/systems/plants/collision/bullet_model.h, line 153 at r3 (raw file):

   */
  virtual PointPair findClosestPointsBetweenElements(
      const ElementId idA, const ElementId idB, bool use_margins);

BTW oops, the ElementIds also have a spurious const.


Comments from Reviewable

@jamiesnape
Copy link
Contributor Author

Review status: 10 of 16 files reviewed at latest revision, 1 unresolved discussion.


drake/systems/plants/collision/bullet_model.h, line 153 at r3 (raw file):

Previously, sherm1 (Michael Sherman) wrote…

BTW oops, the ElementIds also have a spurious const.

Removed.

Comments from Reviewable

@jamiesnape
Copy link
Contributor Author

@drake-jenkins-bot linux-gcc-ninja-experimental please
@drake-jenkins-bot mac-clang-experimental please
@drake-jenkins-bot mac-clang-ninja-experimental please

@jamiesnape
Copy link
Contributor Author

SEGFAULT.

@sherm1
Copy link
Member

sherm1 commented Oct 5, 2016

Reviewed 6 of 6 files at r4.
Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed.


Comments from Reviewable

@jamiesnape
Copy link
Contributor Author

@drake-jenkins-bot linux-gcc-ninja-experimental please
@drake-jenkins-bot mac-clang-experimental please
@drake-jenkins-bot mac-clang-ninja-experimental please

@jamiesnape jamiesnape mentioned this pull request Oct 11, 2016
@jamiesnape
Copy link
Contributor Author

@drake-jenkins-bot linux-gcc-ninja-experimental please
@drake-jenkins-bot mac-clang-experimental please
@drake-jenkins-bot mac-clang-ninja-experimental please

@amcastro-tri
Copy link
Contributor

back from vacation. What's the status of this?. It'd be nice to get it merged!

@jamiesnape
Copy link
Contributor Author

I need to sort out some Eigen alignment issues that are causing the test to SEGFAULT.

@jamiesnape
Copy link
Contributor Author

Resolved merge conflicts.

@jamiesnape
Copy link
Contributor Author

And more merge conflicts.

@amcastro-tri
Copy link
Contributor

There still is a CI problem. Once solved this :lgtm: . Thanks!


Reviewed 2 of 12 files at r5.
Review status: 7 of 15 files reviewed at latest revision, 1 unresolved discussion, some commit checks failed.


drake/systems/plants/collision/fcl_model.h, line 19 at r2 (raw file):

Previously, SeanCurtis-TRI (Sean Curtis) wrote…

BTW, I'm comfortable with leaving that as an exercise for tying FCL into drake. I believe the scope of this was getting FCL into the build.

I agree, I will mark myself satisfied.

Comments from Reviewable

@jamiesnape
Copy link
Contributor Author

@drake-jenkins-bot retest this please
@drake-jenkins-bot linux-clang-experimental please
@drake-jenkins-bot linux-clang-experimental-minimal please
@drake-jenkins-bot linux-clang-ninja-experimental-open-source please
@drake-jenkins-bot linux-cpplint-experimental please
@drake-jenkins-bot linux-gcc-experimental-matlab please
@drake-jenkins-bot linux-gcc-experimental-open-source please
@drake-jenkins-bot linux-gcc-experimental-ros please
@drake-jenkins-bot linux-gcc-ninja-experimental please

@jamiesnape
Copy link
Contributor Author

Problem seems to be upstream. Investigating further.

@jwnimmer-tri
Copy link
Collaborator

jwnimmer-tri commented Nov 28, 2016

@jamiesnape Is this PR still on deck (though maybe down on the stack)? I don't want to close it because it has review in-progress, but it's also quite stale.

@jamiesnape
Copy link
Contributor Author

It is still on-deck.

@jamiesnape
Copy link
Contributor Author

jamiesnape commented Dec 23, 2016

@drake-jenkins-bot linux-clang-experimental-minimal please
@drake-jenkins-bot linux-clang-experimental-open-source please
@drake-jenkins-bot linux-clang-ninja-experimental please
@drake-jenkins-bot linux-gcc-bazel-experimental please
@drake-jenkins-bot linux-gcc-experimental please
@drake-jenkins-bot linux-gcc-experimental-minimal please
@drake-jenkins-bot linux-gcc-ninja-experimental-minimal please
@drake-jenkins-bot linux-gcc-ninja-experimental-open-source please
@drake-jenkins-bot linux-xenial-clang-experimental please
@drake-jenkins-bot linux-xenial-gcc-bazel-experimental please
@drake-jenkins-bot linux-xenial-gcc-experimental please
@drake-jenkins-bot linux-xenial-unprovisioned-clang-experimental please
@drake-jenkins-bot linux-xenial-unprovisioned-gcc-experimental please
@drake-jenkins-bot mac-clang-experimental please
@drake-jenkins-bot mac-clang-experimental-minimal please
@drake-jenkins-bot mac-clang-experimental-open-source please
@drake-jenkins-bot mac-clang-ninja-experimental please
@drake-jenkins-bot mac-clang-ninja-experimental-minimal please
@drake-jenkins-bot mac-clang-ninja-experimental-open-source please

@jamiesnape
Copy link
Contributor Author

Finally.

@jamiesnape jamiesnape merged commit ff9294f into RobotLocomotion:master Dec 23, 2016
@jamiesnape jamiesnape deleted the fcl branch December 23, 2016 19:55
@sherm1
Copy link
Member

sherm1 commented Dec 23, 2016

Yay! Thanks, @jamiesnape.

@SeanCurtis-TRI, Jamie got FCL linked in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants