Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guilhem Saurel
hpp-fcl
Commits
21e7753f
Commit
21e7753f
authored
Mar 31, 2020
by
Joseph Mirabel
Browse files
Minor fix in GJKSolver::shapeIntersect
parent
3bedce12
Changes
1
Hide whitespace changes
Inline
Side-by-side
include/hpp/fcl/narrowphase/narrowphase.h
View file @
21e7753f
...
...
@@ -80,16 +80,18 @@ namespace fcl
}
else
{
details
::
EPA
epa
(
epa_max_face_num
,
epa_max_vertex_num
,
epa_max_iterations
,
epa_tolerance
);
details
::
EPA
::
Status
epa_status
=
epa
.
evaluate
(
gjk
,
-
guess
);
if
(
epa_status
&
details
::
EPA
::
Failed
)
if
(
epa_status
&
details
::
EPA
::
Valid
||
epa_status
==
details
::
EPA
::
OutOfFaces
// Warnings
||
epa_status
==
details
::
EPA
::
OutOfVertices
// Warnings
)
{
epa
.
getClosestPoints
(
shape
,
w0
,
w1
);
if
(
penetration_depth
)
*
penetration_depth
=
-
epa
.
depth
;
// TODO The normal computed by GJK in the s1 frame so this should be
// if(normal) *normal = tf1.getRotation() * epa.normal;
if
(
normal
)
*
normal
=
tf2
.
getRotation
()
*
epa
.
normal
;
if
(
normal
)
*
normal
=
tf1
.
getRotation
()
*
epa
.
normal
;
if
(
contact_points
)
*
contact_points
=
tf1
.
transform
(
w0
-
epa
.
normal
*
(
epa
.
depth
*
0.5
));
return
true
;
}
if
(
penetration_depth
)
*
penetration_depth
=
-
std
::
numeric_limits
<
FCL_REAL
>::
max
();
// EPA failed but we know there is a collision so we should
return
true
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment