flexible-collision-library / fcl

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

Capsule Capsule collision detection bug #567

Closed YoavFekete closed 2 years ago

YoavFekete commented 2 years ago

I have been testing capsule capsule collision detection. And found same cases where the fcl returns that their is no collision, when their is a actually a collision. here is an example:

capsule 1: radius = 4984.68, length = 1726.64 centre = 0 ,0, 863.32 quaternion = 0.707107, 0, 0, 0

capsule 2: radius = 3024.18, length = 8786.07 centre = 4970.03, 5942.67, 5449.52 quaternion = 0.51469, -0.466974, 0.12815, 0.523191

i found many more cases (i compared random generated capsules collision with 2 different algorithms that did found the collision)

p.s

the first capsule is the line between points Point3d(0, 0, 0), Point3d(0, 0, 1726.64) with radius 4984.68 and the second is the line between Point3d(2693.01, 9378.71, 6968.58), Point3d(7247.06, 2506.63, 3930.47) with radius 3024.18

florent-lamiraux commented 2 years ago

The first quaternion is not normalized. This may explain the issue.

YoavFekete commented 2 years ago

@florent-lamiraux ok you are right. it solved the issue.