Skip to content

Commit b69bc50

Browse files
MatthijsBurghmergify[bot]
authored andcommitted
[OMPL] also check constraints in StateValidityCallback (#3586)
(cherry picked from commit ca2bb1b)
1 parent e489b04 commit b69bc50

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

moveit_planners/ompl/ompl_interface/src/detail/constrained_goal_sampler.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ bool ConstrainedGoalSampler::stateValidityCallback(ob::State* new_goal, const mo
8989
moveit::core::RobotState solution_state(*state);
9090
solution_state.setJointGroupPositions(jmg, jpos);
9191
solution_state.update();
92-
return checkStateValidity(new_goal, solution_state, verbose);
92+
return checkStateValidity(new_goal, solution_state, verbose) &&
93+
kinematic_constraint_set_->decide(solution_state, verbose).satisfied;
9394
}
9495

9596
bool ConstrainedGoalSampler::sampleUsingConstraintSampler(const ob::GoalLazySamples* gls, ob::State* new_goal)

0 commit comments

Comments
 (0)