Hi all,
I would like my UR5's end-effector to have an orientation constraint. Here is the code I used to try to achieve that:
//Adding Path Constraints
planning_interface::MotionPlanRequest req;
std::vector tolerance_pose(3, 0.01);
std::vector tolerance_angle(3, 0.01);
geometry_msgs::PoseStamped pose;
moveit_msgs::Constraints target_pose =
kinematic_constraints::constructGoalConstraints("wrist_3_joint", pose, tolerance_pose, tolerance_angle);
geometry_msgs::QuaternionStamped quaternion;
quaternion.header.frame_id = "ee_link"; //"wrist_3_link";
quaternion.quaternion.x = 0;
quaternion.quaternion.y = 0;
quaternion.quaternion.z = 0;
quaternion.quaternion.w = 1;
req.path_constraints = kinematic_constraints::constructGoalConstraints("wrist_3_joint", quaternion);
I am pretty sure there is something wrong in this code, because the end effector sometimes changes his orientation during the execution of the plan.
Any help?
ROS kinetic, ubuntu 16.04
↧