Skip to content

Commit 7e88eec

Browse files
[Edge] Compute forward kinematics before filtering collision pair.
In method hpp::core::ObstacleUser::filterCollisionPairs, a collision test is performed in block "case RelativeMotion::Constrained:". This test requires prior computation of the forward kinematics.
1 parent a6efa7a commit 7e88eec

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/graph/edge.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,10 @@ ConstraintSetPtr_t Edge::buildPathConstraint() {
302302
shared_ptr<core::ObstacleUserInterface> oui =
303303
HPP_DYNAMIC_PTR_CAST(core::ObstacleUserInterface, pathValidation_);
304304
if (oui) {
305+
// Compute forward kinematics and geometry placement to avoid assertions on non
306+
// initialized data
307+
g->robot()->computeForwardKinematics(pinocchio::COMPUTE_ALL);
308+
g->robot()->updateGeometryPlacements();
305309
relMotion_ = RelativeMotion::matrix(g->robot());
306310
RelativeMotion::fromConstraint(relMotion_, g->robot(), constraint);
307311
oui->filterCollisionPairs(relMotion_);

0 commit comments

Comments
 (0)