Solving inverse kinematics for special configuration (IKFast)
I'm trying to solve the inverse kinematics problem for a custom made robot arm. The robot arm has a special design with the following 5 DoF in serial configuration:
- x-axis prismatic joint
- y-axis prismatic joint
- revolute joint about z-axis
- revolute joint about x-axis
- z-axis prismatic joint
Therefore, I can not reach every configuration in space, namely I'm limited in one of the end-effector angles. For better understanding of the model, I added the URDF at the end.
I was trying to use IKFast to generate an inverse kinematics .cpp file. But when using IK Type "Transform6D" I get an error:
CannotSolveError: need 6 joints
I must admit that it's not totally clear for me what this IK Types mean. I know how to calculate kinematics and inverse kinematics by hand and I can not imagine why this IK Type should matter.
Even trying "TranslationDirection5D" did results in:
CannotSolveError: raghavan roth equations too complex
So I'm wondering if IKFast can solve my problem or how I can do it. I just need the inverse kinematics calculations as "stand alone" (for simplicity) which I will then use in my ROS node. I was following this tutorial:
http://wiki.ros.org/Industrial/Tutori...
URDF file (Link 7 is just a tool frame with fixed Joint 6):
<robot name="or_robot">
<link name="link1" />
<link name="link2" />
<link name="link3" />
<link name="link4" />
<link name="link5" />
<link name="link6" />
<link name="link7" />
<joint name="joint1" type="prismatic">
<parent link="link1"/>
<child link="link2"/>
<origin xyz="0 0 0.2" rpy="0 0 0" />
<axis xyz="0 1 0" />
<limit effort="1000.0" lower="0.0" upper="0.05" velocity="0.5"/>
</joint>
<joint name="joint2" type="prismatic">
<parent link="link2"/>
<child link="link3"/>
<origin xyz="0 0 0" rpy="0 0 0" />
<axis xyz="1 0 0" />
<limit effort="1000.0" lower="0.0" upper="0.05" velocity="0.5"/>
</joint>
<joint name="joint3" type="revolute">
<parent link="link3"/>
<child link="link4"/>
<origin xyz="0 0 0" rpy="0 0 0" />
<axis xyz="0 0 1" />
<limit effort="1000.0" lower="-0.4" upper="1.57" velocity="0.5"/>
</joint>
<joint name="joint4" type="revolute">
<parent link="link4"/>
<child link="link5"/>
<origin xyz="0.1 0 0" rpy="0 0.2618 0" />
<axis xyz="0 1 0" />
<limit effort="1000.0" lower="0.0" upper="0.785" velocity="0.5"/>
</joint>
<joint name="joint5" type="prismatic">
<parent link="link5"/>
<child link="link6"/>
<origin xyz="0 0 -0.05" rpy="0 0 0" />
<axis xyz="0 0 -1" />
<limit effort="1000.0" lower="0.0" upper="0.048" velocity="0.5"/>
</joint>
<joint name="joint6" type="fixed">
<parent link="link6"/>
<child link="link7"/>
<origin xyz="0 0 -0.02" rpy="0 0 0" />
</joint>
</robot>
Edit: changed units
Just a note: you have a robot spanning a volume of 50 by 50 by 48 metres? And the links are 20, 50, 100 and 200 metres apart?
So can you tell me then how to solve for an arbitrary 6D pose with a 5dof robot?
Be careful with these types of 'just' sentences. They are typically not as simple as they may seem.
Ups, I was looking for units and couldn't find anything. So I was expecting mm. But this shouldn't be the problem. Will change it.
I was not expecting it to work for arbitrary 6D poses. But you are right. It can not work with a closed form solution which is generated by IKFast.
Everything in ROS is SI units (REP-103). That includes URDF.
if you mean: ikfast can't work for your robot in general, then I would not necessarily agree with that. I've generated IKFast plugins for 5dof robots in the past.
I mean it can't work with the "transform6D" mode because of closed form. I also tried to add an additional revolute link for the 6D solution. But I always get "too complex" errors.
Then can you tell me which parameters to alter or how to do it? I can just choose the IK Type.