Skip to content
Snippets Groups Projects
Commit c3a7ef4b authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Florent Lamiraux florent@laas.fr
Browse files

Fix GraphOptimizer: it was modify the constraint of an edge steering method.

parent 1abba505
No related branches found
No related tags found
No related merge requests found
...@@ -36,13 +36,6 @@ namespace hpp { ...@@ -36,13 +36,6 @@ namespace hpp {
toConcat; toConcat;
GraphPathValidationPtr_t gpv = HPP_DYNAMIC_PTR_CAST (GraphPathValidation, GraphPathValidationPtr_t gpv = HPP_DYNAMIC_PTR_CAST (GraphPathValidation,
this->problem().pathValidation ()); this->problem().pathValidation ());
core::Problem p (problem().robot());
p.distance(problem().distance());
// It should be ok to use the path validation of each edge because it
// corresponds to the global path validation minus the collision pairs
// disabled using the edge constraint.
// p.pathValidation(gpv->innerValidation());
p.pathProjector(problem().pathProjector());
path->flatten (expanded); path->flatten (expanded);
ConstraintSetPtr_t c; ConstraintSetPtr_t c;
...@@ -72,9 +65,16 @@ namespace hpp { ...@@ -72,9 +65,16 @@ namespace hpp {
if (isShort) if (isShort)
toConcat = toOpt; toConcat = toOpt;
else { else {
p.constraints(edge->steeringMethod()->constraints()); core::Problem p (problem().robot());
p.distance(problem().distance());
// It should be ok to use the path validation of each edge because it
// corresponds to the global path validation minus the collision pairs
// disabled using the edge constraint.
// p.pathValidation(gpv->innerValidation());
p.pathProjector(problem().pathProjector());
p.steeringMethod(edge->steeringMethod()->copy());
p.constraints(p.steeringMethod()->constraints());
p.constraints()->configProjector()->rightHandSideFromConfig(toOpt->initial()); p.constraints()->configProjector()->rightHandSideFromConfig(toOpt->initial());
p.steeringMethod(edge->steeringMethod());
p.pathValidation(edge->pathValidation()); p.pathValidation(edge->pathValidation());
pathOptimizer_ = factory_ (p); pathOptimizer_ = factory_ (p);
toConcat = pathOptimizer_->optimize (toOpt); toConcat = pathOptimizer_->optimize (toOpt);
......
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