Unclear how to define a PositionConstraint msg
ptriantd-ocado opened this issue · 1 comments
ptriantd-ocado commented
I am trying to define a Position Constraint msg in the following way:
moveit_msgs::PositionConstraint position_constraint;
position_constraint.header.frame_id = "world";
position_constraint.link_name = group_->getEndEffectorLink();
position_constraint.target_point_offset.x = 0.01;
position_constraint.target_point_offset.y = 0.01;
position_constraint.target_point_offset.z = 0.01;
shape_msgs::SolidPrimitive bounding_region;
bounding_region.type = bounding_region.SPHERE;
bounding_region.dimensions.resize(1);
bounding_region.dimensions[0] = 2000;
position_constraint.constraint_region.primitives.push_back(bounding_region);
position_constraint.constraint_region.primitive_poses.push_back(target_pose_);
position_constraint.weight = 1;
planning_constraints.position_constraints.push_back(position_constraint);
However, upon execution I get the following error:
Exception caught executing *final* adapter 'Fix Start State Path Constraints': Bounds for real vector space seem to be incorrect (lower bound must be stricly less than upper bound). Sampling will not be possible
Given that it is not possible for my end-effector to be outside of such a large bounding region, I was wondering whether I am doing something wrong in the constraint definition or there is a bug somewhere.
ptriantd-ocado commented
The issue was caused from incorrectly setting the workspace bounds.