Skip to content

Commit b6bd524

Browse files
[Edge] When initializing, check the steering method of the problem
It should be of type manipulation::steeringMethod.
1 parent 21340a0 commit b6bd524

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/graph/edge.cc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,14 @@ ConstraintSetPtr_t Edge::buildPathConstraint() {
292292

293293
// Build steering method
294294
const ProblemPtr_t& problem(g->problem());
295+
SteeringMethodPtr_t manipSteeringMethod = problem->manipulationSteeringMethod();
296+
if (!manipSteeringMethod) {
297+
throw std::logic_error("Edge::buildPathConstraint: steering method of manipulation::Problem is"
298+
" not of type manipulation::SteeringMethod.\nYou probably changed the "
299+
"default one.");
300+
}
295301
steeringMethod_ =
296-
problem->manipulationSteeringMethod()->innerSteeringMethod()->copy();
302+
manipSteeringMethod->innerSteeringMethod()->copy();
297303
steeringMethod_->constraints(constraint);
298304
// Build path validation and relative motion matrix
299305
// TODO this path validation will not contain obstacles added after

0 commit comments

Comments
 (0)