Roboticists generally baulk at the name of an Inverse Kinematics Solver. And I have never understood that.
Inverse kinematics is the transformation from the coordinate space to the joint space. Let us break that down.
You want your arm to reach a particular point in space at a certain angle or orientation. This is Coordinate Space. So you need to know what all angles should all your joints be at such that your end-effector is at the desired point and orientation. This is Joint Space. This mapping between coordinate points and joint angles constitutes Inverse Kinematics.
ROS provides some different IK solvers for setting up with your arm. But as with ros_control, not much info is provided on this front. Orocos-KDL is the default solver used when setting up your arm with MoveIt! But be warned: it does not work if your arm has <6 DOFs.
In fact I wasn’t aware of this until I had set up my entire hardware interface, configured my controllers and was about to start upon motion planning.
The other alternatives that ROS provides for <6 DOF arms is IKFast and Trac-IK. Documentation and support for Trac-IK was too sparse for me to have made an attempt to use it. Though there were a couple of good IKFast tutorials available on ROS-Wiki, I couldn’t get it to work. IKFast was more of a black box where you had to follow the steps to generate the solver configuration for your arm rather than understand it. I had no clue what went behind the scenes. And as has my experience with CFD and FEA taught me, black boxes do not work with me.
An interesting point to note here is that Orocos-KDL and Trak-IK are numerical solvers while IKFast is an analytical one. What it means that former ones iterate and arrive at a solution while the latter has a clearly defined set of equations which give the solution. Naturally analytical solvers are much faster than numerical ones.
So it fell upon to me write my own IK Solver. And as with all things, ROS provides the flexibility to do that. This is how you do it:
Trust me, writing your custom IK solver is much easier than what people tell you to be.
If you’re stuck somewhere shoot me a mail at firstname.lastname@example.org