0
$\begingroup$

The following error can occur when doing constrained motion planning

More than 80% of the sampled goal states fail to satisfy the constraints imposed on the goal sampler. Is the constrained sampler working correctly?

$\endgroup$

1 Answer 1

0
$\begingroup$

One possible cause for this is if the goal tolerance is looser than the imposed constraint.

e.g. setting a goal tolerance of 0.01 while having a path constraint require the end effector to lie within a box/line of dimensions 0.001

    shape_msgs::msg::SolidPrimitive line;
    line.type = shape_msgs::msg::SolidPrimitive::BOX;
    line.dimensions = {5.0, 0.001, 0.001}; // must be twice the desired distance
    line_constraint.constraint_region.primitives.emplace_back(line);

    geometry_msgs::msg::Pose line_pose;
    ...
    line_constraint.constraint_region.primitive_poses.emplace_back(line_pose);
    line_constraint.weight = 1.0;
    moveit_msgs::msg::Constraints line_constraints;
    line_constraints.position_constraints.emplace_back(line_constraint);
    move_group_interface.setPathConstraints(line_constraints);
    ...
    move_group_interface.setGoalPositionTolerance(0.01);

The solution is to make sure the goal tolerance is less than or equal to the path constraint

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.