How can I get 4 joints IK from 6DOF arm? [closed]
Hi everyone,
Now I am doing 6dof arm path planning. I need to control the robot arm from one position to another position. I first have to get the IK and then plan a path. The getik programs are as follow. I just hope to get IK from 4 joints(other 2 joints are set to zero). I am wondering what should I do? And another question: what is the principle of kinematics_msgs::GetKinematicSolverInfo
?
kinematics_msgs::GetKinematicSolverInfo::Request l_request,r_request;
kinematics_msgs::GetKinematicSolverInfo::Response l_response,r_response;
kinematics_msgs::GetPositionIK::Request l_gpik_req;
kinematics_msgs::GetPositionIK::Response l_gpik_res;
quat = tf::createQuaternionFromRPY(phi*180/PI,theta*180/PI,psy*180/PI); l_gpik_req.ik_request.pose_stamped.pose.position.x = x;
l_gpik_req.ik_request.pose_stamped.pose.position.y = y;
l_gpik_req.ik_request.pose_stamped.pose.position.z = z;
l_gpik_req.ik_request.pose_stamped.pose.orientation.w =quat[3];
l_gpik_req.ik_request.pose_stamped.pose.orientation.x =quat[0]; l_gpik_req.ik_request.pose_stamped.pose.orientation.y=quat[1];
l_gpik_req.ik_request.pose_stamped.pose.orientation.z =quat[2];
if(l_ik_client.call(l_gpik_req, l_gpik_res)){
if(l_gpik_res.error_code.val == l_gpik_res.error_code.SUCCESS)
ROS_INFO("Solution for Left Arm Found );
else
ROS_DEBUG("Left Arm Inverse kinematics failed");
}
thanks advance
I've 'fixed' the formatting of your question (code block, etc). Please use the formatting tools in the question edit box next time, it makes the text (and embedded code) much easier to read.
Thanks for your help