I'm trying to use the KDL::ChainIkSolverVel_pinv_mimic in the kdl_kinamtics_plugin library in the moveit_ros_planning package for applying IK on a 12-DoF chain which has 1 mimic joint. (Link to the reference aforementioned class:
http://docs.ros.org/jade/api/moveit_ros_planning/html/classKDL_1_1ChainIkSolverVel__pinv__mimic.html)
The problem is, I can't figure out what the difference between a "mimic joint" and a "redundant joint" is. Initially, I just set the number of redundant joints to zero and the number of mimic joints to 1, but that doesn't work. The reason is because of line 101 in the cpp file (
http://docs.ros.org/jade/api/moveit_ros_planning/html/chainiksolver__vel__pinv__mimic_8cpp_source.html):
Now, according to the explanation in the class reference, if I have a 7-DoF arm (j0 - j7) and j2 mimics j0, then the int vector I should pass to the "setRedundantJointsMapIndex" should look like this: [0, 1, 3, 4, 5, 6]. But the above validity condition is clearly violated by this vector argument since "chain.getNrOfJoints()-num_mimic_joints" = 7 - 1 = 6 (or at least I think so), and 6 also occurs in the vector argument (hence rendering the argument invalid).
I'm guessing either there's probably something wrong with my implementation. What I'd to know is:
1) What's the difference between a mimic joint and a redundant joint?
2) What's the role of the two different functions, one of which locks the redundant joints and the other doesn't. I can see that locking the redundant joints reduces the jacobian matrix further, but not sure why.
Thanks in advance.