How can I get 4 joints IK from 6DOF arm? [closed]

asked 2014-12-04 21:04:10 -0500

karen0603 gravatar image

updated 2014-12-08 10:42:49 -0500

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

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2017-12-20 20:32:40.023685

Comments

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.

gvdhoorn gravatar image gvdhoorn  ( 2014-12-05 01:26:55 -0500 )edit

Thanks for your help

karen0603 gravatar image karen0603  ( 2014-12-05 10:31:58 -0500 )edit