Skip to content

Conversation

@dmsj
Copy link
Member

@dmsj dmsj commented May 26, 2019

No description provided.

SeanCurtis-TRI and others added 30 commits June 18, 2018 21:49
…mplex (flexible-collision-library#296)

* Expose numerical errors in gjk_libccd-inl.h extractClosestPoints()

If the simplex is degenerate, it can lead to divide-by-zero errors. This
test is drawn from the real world and exposes such a problem - nearest
points are returned as NaN. See
flexible-collision-library#293
for the discussion

* Make extractClosestPoints more robust

For simplex of size n, if the simplex is degenerate, extracts from a
simplex of size n - 1 (to prevent returning NaN).

1. Refactor point extraction into independently callable methods.
2. At each level, add method for downgrading the simplex.
3. Add unit tests on the local methods.
4. Add integration test with motivating example.
5. Update documentation of this implementation.
This commit modifies the generateBVHModel() functions to use
an additional argument to chose whether to delay construction of
the BVH to permit more geometry to be added first.
Update EPA test tolerance, and adds a missing set of the EPA tolerance for signed distance query.
Literal values were defined in box-box primitve and being interpreted as
doubles. This caused errors when compiling with S = float. This fix
addresses that issue.
By default, the GJK solver was being used for performing distance queries
between box's and spheres. For small features, the answer was being
dominated by the iterative tolerance and producing wildly problematic
values. The logical thing to do is to perform sphere-box collisions using
knowledge of the primitives.

This commit adds the following:
  - A new test illustrating the error of GJK is used
    (see test_fcl_sphere_box.cpp)
  - Borrows the CompareMatrices functionality from Drake and adds it to FCL.
  - Adds the custom sphere-box collision (sphere_box.h and sphere_box-inl.h)
  - Adds *extensive* unit tests on the custom algorithm.
  - Ties the custom algorithm into the libccd and indep GJK solvers.
  - Remove a useless conflicting test from test_fcl_collision (it's only
    useless in retrospect). And its formulation can't help but become
    corrupt.
  - Update *other* tests that otherwise depend on box-sphere collision.
…ion-library#318)

This increases the memory footprint of the `Transform` class by 33% (ie.,
3x4 to 4x4). However, the X_AB.inverse() method will now implicitly use
the transpose of the linear() component rather than computing an inverse.
…collision-library#321)

* Add custom sphere-cylinder collision and distance tests

By default, the GJK solver was being used for performing distance queries
between cylinders and spheres. For small features, the answer was being
dominated by the iterative tolerance and producing wildly problematic
values. The logical thing to do is to perform sphere-cylinder collisions
using knowledge of the primitives.

This commit adds the following:
  - A new test illustrating the error of GJK is used
    (see test_fcl_sphere_cylinder.cpp)
  - Adds the custom sphere-cylinder collision/distance
    (sphere_cylinder.h and sphere_cylinder-inl.h)
  - Adds *extensive* unit tests on the custom algorithm.
  - Ties the custom algorithm into the libccd and indep GJK solvers.
…ible-collision-library#324)

This adds the `triangle_area_is_zero` test to `faceNormalPointingOutward`.
This is a prerequisite to the `isOutsidePolytopeFace` test. The test is
rendered meaningless if the reported normal is defined by numerical noise.
If a scenario is failing due to the `isOutsidePolytopFace` assertion
failing, this will detect if its due to face degeneracies.
…ible-collision-library#288)

* Distance queries return nearest points in the world frame

The DistanceResult struct documents the near points as being defined in the
*world* frame. This wasn't true in the code.

1. Correct both gjk solver implementations to put the pose in *world* frame.
2. Modify sphere-sphere and sphere-capsule custom implementations to do the
   same.
3. Fix some related typos in documentation.
4. Update tests to expect points in world frame.
…lexible-collision-library#325)

* Clean up Convex geometry (bug, documentation, API, and testing)

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.
* return the normal vector if we found a valid witness point that is definitely on one side of the hyperplane.

* Fix the problem that the projection to the origin is mistaken for the projection to the plane.

* add include array

* Address Sherm's comments.

* Address Sean's comments.

* Address Sean's comments.

* Address Sean's comment.

* linting.
Old convex constructor was very vague about the ownership and lifespan of the underlying vertices and faces. Now it takes a shared_ptr to the data.

Multiple correlated changes related to the underlying data change.
* Add build directories used by CI to gitignore

* Include CTest module so dashboards may be published

* Add CTestCustom and CTestConfig configuration files

* Ensure build type really does default to Release
…ke-fixes-1

Various CMake fixes and cleanup
…if the origin is on the facet of the simplex. (flexible-collision-library#365)

Use the actual distance instead of the squared distance to determine if the origin is on the facet of the simplex.
…e-collision-library#369)

This addresses a bug unique to versions of GCC prior to 6.3. It loses
methods that are `= default` defined.
…lexible-collision-library#371)

* Correct ill-formed test

The NearestPointFromDegenerateSimplex test was born of a specific
case, captured in the wild by a user. The test attempted to recreate
the circumstances of that failure. In its original formulation, the
test had two flaws:

  1. It relied on code paths for evaluating box-box distance via GJK.
     If a box-box distance primitive were introduced, the test would
     become meaningless.
  2. One of the box's poses is defined by an *unnormalized* quaternion.
     This issue was exposed when libccd updated its quaternion
     multiplication algorithm -- the final result was unduly impacted
     by the degree the quat wasn't normalized.

This commit addressed *both* of those issues.
1. Add a ton of documentation about this portion of the whole algorithm.
2. Rephrase the test with a greater understanding and simpler results.
3. Add unit tests
  - the old code failed in the following ways:
    - Didn't recognize when A *was* the origin.
    - Much larger tolerance for determining if A was co-linear with B.
4. Incidentally add some todos to doSimplex3() while examining
   relationships.
A literal in a type-deduced function call was declared as a double literal
(e.g., `1.`). When ccd_real_t is a double, this is fine. But when it is
a float, the type cannot be successfully deduced.

We correct this by explicitly calling it out as a ccd_real_t-typed value.
…-library#381)

This allows low-level, narrowphase algorithms to indicate to higher-level
callers that something went so wrong that it would be helpful to capture
the configuration that led to the error.

Add exception
  1. Add exception type.
  2. Instrument some know problem call sites with the new exception.
  3. Expand unit tests to cover the exceptions.
     i. Add FCL_EXPECT_THROWS_MESSAGE* functionality for tests.

Add exception catching
  1. Add exception processing at an appropriate call site.
     1. Requires printing out shapes and solver data; so streaming operator
        support has been added to all corresponding parties.
     2. Added *only* to signed distance functions of both solvers.

Note that `CollisionGeometry` can span mulitple types and this doesn't
necessarily support all types. However, unit tests pass and this can be
extended to encompass more geometry types as necessary.
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.