Hi everyone!
I just started to test MoveIt's path constraint feature, but the resulting performance is very low, i.e. very few successful motion planning attempts.
I'm trying to keep the end effector parallel to the ground. To implement this I chose to add a orientation constraint. For my robot only one axis needs to be constrained, since the other two are already constrained by the goal position and the robot's kinematics.
Setting my path constraint looks like this:
motion_plan_request.goal_constraints.append(goal_constraint)
wrist_path_constraint = moveit_msgs.Constraints()
wrist_orientation_constraint = moveit_msgs.OrientationConstraint()
wrist_orientation_constraint.header = userdata.goal_pose.header
wrist_orientation_constraint.link_name = "palm_link"
wrist_orientation_constraint.orientation = orientation_constraint.orientation # setting goal orientation
wrist_orientation_constraint.absolute_x_axis_tolerance = 3.14 # ignore errors in the x-axis
wrist_orientation_constraint.absolute_y_axis_tolerance = 3.14 # ignore errors in the y-axis
wrist_orientation_constraint.absolute_z_axis_tolerance = 0.08 # enforce z-axis orientation
wrist_orientation_constraint.weight = 1.0
wrist_path_constraint.orientation_constraints.append(wrist_orientation_constraint)
motion_plan_request.path_constraints = wrist_path_constraint
Although I increased the allowed planning time significantly (2.0 secs -> 120 secs), my success rate is very low, i.e. 1 out of 4 attempts. I also tried the two planners BKPIECEkConfigDefault and SBLkConfigDefault without any better results. Furthermore, if a valid motion plan is returned it contains a lot of useless motions (e.g. moving forward and backward a couple of times). I'm using the default KDL solver.
Am I missing any parameters or other settings to improve this performance?
Best,
Marcus