Difficulty using ikfast generator, "need 6 joints error" with Kuka Youbot
Hi,
I'm new to ikfast and I'm trying to understand it. I've been following the documentation here: http://moveit.ros.org/wiki/Kinematics/IKFast
I'm using a Kuka youbot urdf file which I converted to a .dae file.
When I do an --info links on my robot, I get the following:
name index parents
base_footprint 0
base_link 1 base_footprint
arm_link_0 2 base_link
arm_link_1 3 arm_link_0
arm_link_2 4 arm_link_1
arm_link_3 5 arm_link_2
arm_link_4 6 arm_link_3
arm_link_5 7 arm_link_4
gripper_palm_link 8 arm_link_5
gripper_finger_link_l 9 gripper_palm_link
gripper_finger_link_r 10 gripper_palm_link
base_laser_front_link 11 base_link
caster_link_bl 12 base_link
wheel_link_bl 13 caster_link_bl
caster_link_br 14 base_link
wheel_link_br 15 caster_link_br
caster_link_fl 16 base_link
wheel_link_fl 17 caster_link_fl
caster_link_fr 18 base_link
wheel_link_fr 19 caster_link_fr
plate_link 20 base_link
And when I look up the joints, I get:
name index parents
andy@andy-VirtualBox:~/catkin_ws/collada_files2$ openrave0.8-robot.py youbot.dae --info joints
name joint_index dof_index parent_link child_link mimic
arm_joint_1 0 0 arm_link_0 arm_link_1
arm_joint_2 1 1 arm_link_1 arm_link_2
arm_joint_3 2 2 arm_link_2 arm_link_3
arm_joint_4 3 3 arm_link_3 arm_link_4
arm_joint_5 4 4 arm_link_4 arm_link_5
gripper_finger_joint_l 5 5 gripper_palm_link gripper_finger_link_l
gripper_finger_joint_r 6 6 gripper_palm_link gripper_finger_link_r
base_footprint_joint -1 -1 base_footprint base_link
arm_joint_0 -1 -1 base_link arm_link_0
gripper_palm_joint -1 -1 arm_link_5 gripper_palm_link
base_laser_front_hokuyo_urg04_laser_joint -1 -1 base_link base_laser_front_link
caster_joint_bl -1 -1 base_link caster_link_bl
wheel_joint_bl -1 -1 caster_link_bl wheel_link_bl
caster_joint_br -1 -1 base_link caster_link_br
wheel_joint_br -1 -1 caster_link_br wheel_link_br
caster_joint_fl -1 -1 base_link caster_link_fl
wheel_joint_fl -1 -1 caster_link_fl wheel_link_fl
caster_joint_fr -1 -1 base_link caster_link_fr
wheel_joint_fr -1 -1 caster_link_fr wheel_link_fr
plate_joint -1 -1 base_link
Now, I apologize for my newness to the ikfast package, so I'm trying to understand exactly what this means. I assume a -1 means no dof is provided by the joint (so, it's fixed or something), and that each number 0 through 6 provides the cumulative dof at that joint.
Therefore, my understanding is that the correct 6DOF command to generate the IKSolver would be:
python /usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py --robot=youbot.dae --iktype=transform6d --baselink=3 --eelink=10 --savefile=output_ikfast61.cpp
But I get the following error:
/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py:1122: RuntimeWarning: invalid value encountered in divide axisangle /= angle INFO: moved translation [0, 0, 13/100] to right end INFO: moved translation [0, 0, 19/1000] to left end INFO: moved translation on intersecting axis [0, 0, 0] to left INFO: [[1, 0, 0, 3/125],[0, 1, 0, 0],[0, 0, 1, 23/200]] INFO: [[cos(j0), -sin(j0), 0, 0],[sin(j0), cos(j0), 0, 0],[0, 0, 1, 0]] INFO: [[1, 0, 0, 33/1000],[0, 0, -1, 0],[0, 1, 0, 0]] INFO: [[cos(j1), -sin(j1), 0, 0],[sin(j1), cos(j1), 0, 0],[0, 0, 1, 0]] INFO: [[1, 0, 0, 0],[0, -1, 0, 31/200],[0, 0, -1, 0]] INFO: [[cos(j2), -sin(j2), 0, 0],[sin(j2), cos(j2), 0, 0],[0, 0, 1, 0]] INFO: [[1, 0, 0, 0],[0, -1, 0, -27/200],[0, 0, -1, 0 ...
I can't really answer your question, but the Kuka youbot only has 5 DoF.
It has 5 effective DoF, but 6 joints, right? So this would be a 6DoF arm with one redundant joint? I know there's a way to specify redundant joints, but I don't really understand the documentation there.
Re: Update - Are you planning on using arm_navigation or MoveIt? For MoveIt, there's a tutorial here: http://moveit.ros.org/wiki/PR2/Setup_Assistant/Quick_Start ; for arm_navigation, here: http://ros.org/wiki/arm_navigation/Tutorials/tools/Planning%20Description%20Configuration%20Wizard
Okay, I think I've got it working now, thanks a lot for your help!
Hey I have the problem now that I cannot create the cpp file. I also use the Kuka Youbot and it doesn't work for youbot with or without base. Could you please provide that cpp file you generatedor tell me how you solved your problem? Was the iktype the only parameter you changed?I am using ros kinetic on Ubuntu 16.04. I always get the error message that my equations are too complex.