Skip to content
Snippets Groups Projects
Commit 2b08f99d authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

Fix bug in GraphPathValidation. Add assert

parent cd722dc2
No related branches found
No related tags found
No related merge requests found
......@@ -94,7 +94,9 @@ namespace hpp {
while (!possibleEdges.empty ()) {
constraints = constraintGraph_->pathConstraint (possibleEdges.back());
constraints->offsetFromConfig(configAt (tmin));
if (constraints->isSatisfied (configAt (tmax))) {
assert (constraints->isSatisfied (configAt (tmin)));
if (constraints == path->constraints ()
&& constraints->isSatisfied (configAt (tmax))) {
validPart = path;
return true;
}
......
......@@ -38,6 +38,7 @@ namespace hpp {
while (!possibleEdges.empty()) {
constraints = graph_->pathConstraint (possibleEdges.back());
constraints->offsetFromConfig(q1);
assert (constraints->isSatisfied (q1));
if (constraints->isSatisfied (q2)) {
path->constraints (constraints);
break;
......
......@@ -117,7 +117,6 @@ namespace hpp {
addFailure (STEERING_METHOD, edges);
return false;
}
path->constraints (graph->pathConstraint (edges));
core::PathValidationPtr_t pathValidation (problem ().pathValidation ());
pathValidation->validate (path, false, validPath);
if (validPath->length () == 0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment