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]] INFO: [[cos(j3), -sin(j3), 0, 0],[sin(j3), cos(j3), 0, 0],[0, 0, 1, 0]] INFO: [[1, 0, 0, -1/500],[0, 0, 1, 0],[0, -1, 0, 0]] INFO: [[cos(j4), -sin(j4), 0, 0],[sin(j4), cos(j4), 0, 0],[0, 0, 1, 0]] INFO: [[1, 0, 0, 1/250],[0, 1, 0, -1/125],[0, 0, 1, 22/125]] Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 6121, in chaintree = solver.generateIkSolver(options.baselink,options.eelink,options.freeindices,solvefn=solvefn) File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 1639, in generateIkSolver chaintree = solvefn(self, LinksRaw, jointvars, isolvejointvars) File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 2104, in solveFullIK_6D raise self.CannotSolveError('need 6 joints') main.CannotSolveError: 'need 6 joints'
It seems like I've given it the 6 joints it's asked for. I've tried combinations like (2, 10), (2, 9), (2, 8), (1, 8), etc., but I can't seem to get any sort of helpful feedback. How am I supposed to specify the links given this link and joint info readout? How am I supposed to interpret it?
FWIW, I believe that the kuka youbot is 6dof with one redundant joint, but I don't think that matters for the purposes of this error, does it?
EDIT: after playing around with some print statements, I've discovered that there is only j0 through j4. Why are only four joints being found, when on a --list joints I find 7?
UPDATE: Thanks for the help. I ran this now instead using --iktype=translationdirection5d and it generated a .cpp file. As I move to the "create plugin" step though, it spits out "Error: Can't find robot youbot_moveit_config." It seems I need to make some sort of moveit_config package...but this is nowhere in the instructions. How am I supposed to create this? Does anyone know?
I also don't know if just throwing in the flag translationdirection5d was acceptable. Is there a reason why I would have to go through all that business from that google groups link?
Originally posted by aespielberg on ROS Answers with karma: 113 on 2013-06-25
Post score: 2
Original comments
Comment by Martin Günther on 2013-06-25:
I can't really answer your question, but the Kuka youbot only has 5 DoF.
Comment by aespielberg on 2013-06-26:
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.
Comment by Martin Günther on 2013-07-03:
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
Comment by aespielberg on 2013-07-03:
Okay, I think I've got it working now, thanks a lot for your help!
Comment by awied on 2020-10-26:
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.