flexible-collision-library / fcl

Flexible Collision Library
https://flexible-collision-library.github.io/
Other
1.35k stars 414 forks source link

"origin is outside of the polytope" error #529

Open ggould-tri opened 3 years ago

ggould-tri commented 3 years ago

Identified during unit testing of code for Drake. The configuration is from an intermediate step in an optimizer, so I don't know exactly what it looks like, but it is two cylinders, probably lying parallel but offset, in contact along their edges.

C++ exception with description "Error with configuration
  Original error message: external/fcl/include/fcl/narrowphase/detail/convexity_based_algorithm/gjk_libccd-inl.h:(1721): validateNearestFeatureOfPolytopeBeingEdge(): The origin is outside of the polytope. This should already have been identified as separating.
  Shape 1: Cylinder(r: 0.010000000000000000208, lz: 1)
  X_FS1
 0.070736898150081176095                        0  -0.99749500812791291882   0.24874750406395645941
                       0                        1                        0                        0
  0.99749500812791291882                        0  0.070736898150081176095 -0.035368449075040588048
                       0                        0                        0                        1
  Shape 2: Cylinder(r: 0.010000000000000000208, lz: 1)
  X_FS2
 0.070736898153116234411                        0   0.99749500812769764657  -0.24874750406384882329
                       0                        1                        0                        0
 -0.99749500812769764657                        0  0.070736898153116234411 -0.035368449076558117206
                       0                        0                        0                        1
  Solver: GjkSolver_libccd
    collision_tolerance:      2.0097183471152322134e-14
    max collision iterations: 500
    distance tolerance:       9.9999999999999995475e-07
    max distance iterations:  1000" thrown in the test body.
zzy5510 commented 1 year ago

Have you tried to install libccd with double precision? You can do it by cmake add -DENABLE_DOUBLE_PRECISION option.