Skip to content

Commit

Permalink
Clean up Convex geometry (bug, documentation, API, and testing)
Browse files Browse the repository at this point in the history
The Convex class had a bug -- bad computation of local AABB. That was the
springboard that led to numerous changes. They include:

1. Correction of AABB calculation (with supporting unit tests).
2. Overhaul of Convex API
    - removed unused members (plane_normals, plane_dis, and edges)
    - renamed remaining members to be more consistent with mesh description.
    - modification of references to those members.
3. Added extensive doxygen documentation consistent with the new API.
4. Initial unit tests for Convex geometric properties (volume,
   center-of-mass, and inertia tensor).
5. Note issues in the code with TODOs and link to github issues.
6. Update Changelog.md to reflect the change in this PR.
  • Loading branch information
SeanCurtis-TRI committed Aug 13, 2018
1 parent 91d9d4d commit 6bb2cd5
Show file tree
Hide file tree
Showing 13 changed files with 763 additions and 237 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
* Switched to Eigen for math operations: [#96](https://github.com/flexible-collision-library/fcl/issues/96), [#150](https://github.com/flexible-collision-library/fcl/pull/150)
* fcl::Transform defined to be an Isometry to facilitate inverses [#318](https://github.com/flexible-collision-library/fcl/pull/318)

* Geometry

* Simplified Convex class, deprecating old constructor in favor of simpler, documented constructor: [#325](https://github.com/flexible-collision-library/fcl/pull/325)

* Broadphase

* Fixed redundant pair checking of SpatialHashingCollisionManager: [#156](https://github.com/flexible-collision-library/fcl/pull/156)
Expand Down
7 changes: 7 additions & 0 deletions include/fcl/geometry/collision_geometry-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,13 @@ S CollisionGeometry<S>::computeVolume() const
template <typename S>
Matrix3<S> CollisionGeometry<S>::computeMomentofInertiaRelatedToCOM() const
{
// TODO(SeanCurtis-TRI): This is *horribly* inefficient. In complex cases,
// this will require computing volume integrals three times. The
// CollisionGeometry class should have a single virtual function that will
// return all three quantities in one call so that particular sub-classes can
// override this to process this answer more efficiently. The default
// implementation can be exactly these three calls.
// See: https://github.com/flexible-collision-library/fcl/issues/327.
Matrix3<S> C = computeMomentofInertia();
Vector3<S> com = computeCOM();
S V = computeVolume();
Expand Down
Loading

0 comments on commit 6bb2cd5

Please sign in to comment.