Skip to content

Commit

Permalink
Register default projection for OMPL constrained planner
Browse files Browse the repository at this point in the history
  • Loading branch information
henningkayser committed May 19, 2021
1 parent 3b6e0d1 commit d64fecd
Showing 1 changed file with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,23 @@ void ompl_interface::ModelBasedPlanningContext::configure(const rclcpp::Node::Sh

void ompl_interface::ModelBasedPlanningContext::setProjectionEvaluator(const std::string& peval)
{
if (!spec_.state_space_)
if (spec_.state_space_)
{
ob::ProjectionEvaluatorPtr projection_eval = getProjectionEvaluator(peval);
if (projection_eval)
spec_.state_space_->registerDefaultProjection(projection_eval);
}
else if (spec_.constrained_state_space_)
{
ob::ProjectionEvaluatorPtr projection_eval = getProjectionEvaluator(peval);
if (projection_eval)
spec_.constrained_state_space_->registerDefaultProjection(projection_eval);
}
else
{
RCLCPP_ERROR(LOGGER, "No state space is configured yet");
return;
}
ob::ProjectionEvaluatorPtr projection_eval = getProjectionEvaluator(peval);
if (projection_eval)
spec_.state_space_->registerDefaultProjection(projection_eval);
}

ompl::base::ProjectionEvaluatorPtr
Expand Down

0 comments on commit d64fecd

Please sign in to comment.