Skip to content

Commit 684bccd

Browse files
[OMPL] also check constraints in StateValidityCallback (#3586) (#3611)
(cherry picked from commit ca2bb1b) Co-authored-by: Matthijs van der Burgh <MatthijsBurgh@outlook.com>
1 parent e489b04 commit 684bccd

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

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)