Universal Robots UR5 & Inverse Kinematics Database Generator

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Universal Robots UR5 & Inverse Kinematics Database Generator

Matt
I'm trying to use trajopt (which uses OpenRAVE) to control a UR5 arm. I downloaded a UR5 zae file, and I've been able to use trajopt to plan a trajectory given the goal joint angles for the robot. This is done in Python, which required an openravepy.Environment(). When I give a goal coordinate instead, the inverse kinematics database is supposed to be generated.

Here's the Python code I'm using to load or generate the database:

env.Load('/home/ur5/openrave/src/robots/ur5.env.xml') # load a scene
robot = env.GetRobots()[0] # get the first robot
print "Robot found"
robot.SetActiveManipulator('arm') # set the manipulator to arm
ikmodel = databases.inversekinematics.InverseKinematicsModel(robot,iktype=IkParameterization.Type.Transform6D)
if not ikmodel.load():
        print "Generating ikmodel"
        ikmodel.autogenerate()
print "ik complete"

The "Generating ikmodel" line prints, but the "ik complete" line does not.

I also tried to generate the model through the command line with the command:

openrave.py --database inversekinematics --robot=/home/ur5/openrave/src/robots/universalrobots-ur6-85-5-a.zae --manipname=arm --freeinc=0.01

I don't think I need a --freejoint, since it's a 6 DOF arm. I'll paste the output of this command below. I left it running overnight, as another user said it took them 8-10 hours, but I didn't have any success when running the Python script again. I also tried to generate a .cpp ikfast file to see if that worked, and the output was similar to the output from the openrave.py command: python ~/openrave/python/ikfast.py --robot=/home/ur5/openrave/src/robots/universalrobots-ur6-85-5-a.zae --iktype=transform6d --baselink=0 --eelink=6  --savefile=ur5_ikfast_solver.cpp

Any advice would be appreciated. Thank you!

Output:

openravepy.databases.inversekinematics: generate, Generating inverse kinematics for manip arm: Transform6D [0, 1, 2, 3, 4, 5], precision=8, maxcasedepth=3 (this might take up to 10 min)
openravepy.databases.inversekinematics: generate, creating ik file /home/ur5/.openrave/kinematics.c8f3877daab9ad5979dfad442c2c28f5/ikfast0x10000049.Transform6D.0_1_2_3_4_5.cpp
openravepy.ikfast: forwardKinematicsChain, moved translation Matrix([[0, 0, 19/400]]) to right end
openravepy.ikfast: forwardKinematicsChain, moved translation Matrix([[0, 0, -19/50000000]]) to left end
openravepy.ikfast: forwardKinematicsChain, moved translation on intersecting axis Matrix([[0, 0, 0]]) to left
openravepy.ikfast: generateIkSolver, [[0, 0, 1, -4310019/50000000],[0, 1, 0, 0],[-1, 0, 0, 0]]
openravepy.ikfast: generateIkSolver, [[cos(j0), -sin(j0), 0, 0],[sin(j0), cos(j0), 0, 0],[0, 0, 1, 0]]
openravepy.ikfast: generateIkSolver, [[0, -70710*sqrt(9999949621)/9999949621, -70711*sqrt(9999949621)/9999949621, 4797739/50000000],[0, 70711*sqrt(9999949621)/9999949621, -70710*sqrt(9999949621)/9999949621, 47977/500000],[1, 0, 0, 0]]
openravepy.ikfast: generateIkSolver, [[cos(j1), -sin(j1), 0, 0],[sin(j1), cos(j1), 0, 0],[0, 0, 1, 0]]
openravepy.ikfast: generateIkSolver, [[-1, 0, 0, 0],[0, -1, 0, 17/40],[0, 0, 1, 1197/10000]]
openravepy.ikfast: generateIkSolver, [[cos(j2), -sin(j2), 0, 0],[sin(j2), cos(j2), 0, 0],[0, 0, 1, 0]]
openravepy.ikfast: generateIkSolver, [[0, -1, 0, 0],[1, 0, 0, -39243/100000],[0, 0, 1, -93/1000]]
openravepy.ikfast: generateIkSolver, [[cos(j3), -sin(j3), 0, 0],[sin(j3), cos(j3), 0, 0],[0, 0, 1, 0]]
openravepy.ikfast: generateIkSolver, [[0, -1, 0, 0],[0, 0, -1, 93/1000],[1, 0, 0, 0]]
openravepy.ikfast: generateIkSolver, [[cos(j4), -sin(j4), 0, 0],[sin(j4), cos(j4), 0, 0],[0, 0, 1, 0]]
openravepy.ikfast: generateIkSolver, [[0, 0, -1, 0],[0, 1, 0, 0],[1, 0, 0, 0]]
openravepy.ikfast: generateIkSolver, [[cos(j5), -sin(j5), 0, 0],[sin(j5), cos(j5), 0, 0],[0, 0, 1, 0]]
openravepy.ikfast: generateIkSolver, [[0, -1, 0, 0],[0, 0, -1, 0],[1, 0, 0, 19/400]]
openravepy.ikfast: solveFullIK_6D, ikfast 6d: [j0, j1, j2, j3, j4, j5]
openravepy.ikfast: iterateThreeNonIntersectingAxes, found 3 consecutive non-intersecting axes links[0:5], vars=[j0, j1, j2]
openravepy.ikfast: iterateThreeNonIntersectingAxes, found 3 consecutive non-intersecting axes links[2:7], vars=[j1, j2, j3]
openravepy.ikfast: iterateThreeNonIntersectingAxes, found 3 consecutive non-intersecting axes links[4:9], vars=[j2, j3, j4]
openravepy.ikfast: iterateThreeNonIntersectingAxes, found 3 consecutive non-intersecting axes links[6:11], vars=[j3, j4, j5]
openravepy.ikfast: solveFullIK_6D, try first group 0/4
openravepy.ikfast: buildRaghavanRothEquations, computed in 2.084518s
openravepy.ikfast: buildRaghavanRothEquations, computed in 1.252049s
openravepy.ikfast: solveLiWoernleHiller, attempting li/woernle/hiller general ik method
openravepy.ikfast: solveLiWoernleHiller, allowed indices: [0]
openravepy.ikfast: solveLiWoernleHiller, assuming equation htj0 is non-zero
openravepy.ikfast: solveLiWoernleHiller, factors 1 reduced not unique: -cj4*r22 - cj5*r21*sj4 - r20*sj4*sj5
openravepy.ikfast: solveLiWoernleHiller, assuming equation htj0 is non-zero
openravepy.ikfast: solveLiWoernleHiller, not unique: (Poly(-39243/100000*cj1*sj2 - 39243/100000*sj1*cj2 - 17/40*sj1, cj1, sj1, cj2, sj2, htj0, domain='QQ'), Poly(93*r20/1000*cj5 - 93*r21/1000*sj5 + pz, cj4, sj4, cj5, sj5, htj0, domain='QQ[r20,r21,pz]'))
openravepy.ikfast: solveLiWoernleHiller, factors 1 reduced not unique: -cj4*r22 - cj5*r21*sj4 - r20*sj4*sj5
openravepy.ikfast: solveLiWoernleHiller, assuming equation htj0 is non-zero
openravepy.ikfast: solveLiWoernleHiller, factors 1 reduced not unique: -cj4*r22 - cj5*r21*sj4 - r20*sj4*sj5
openravepy.ikfast: solveLiWoernleHiller, not unique: [Poly(-39243/100000*cj1*sj2 - 39243/100000*sj1*cj2 - 17/40*sj1, cj1, sj1, cj2, sj2, htj0, domain='QQ'), Poly(93*r20/1000*cj5 - 93*r21/1000*sj5 + pz, cj4, sj4, cj5, sj5, htj0, domain='QQ[r20,r21,pz]')]
openravepy.ikfast: solveLiWoernleHiller, assuming equation htj0 is non-zero
openravepy.ikfast: solveLiWoernleHiller, not unique: (Poly(-39243/100000*cj1*sj2 - 39243/100000*sj1*cj2 - 17/40*sj1, cj1, sj1, cj2, sj2, htj0, domain='QQ'), Poly(93*r20/1000*cj5 - 93*r21/1000*sj5 + pz, cj4, sj4, cj5, sj5, htj0, domain='QQ[r20,r21,pz]'))
openravepy.ikfast: solveLiWoernleHiller, assuming equation htj0 is non-zero
openravepy.ikfast: solveLiWoernleHiller, not unique: (Poly(-39243/100000*cj1*cj2 - 17/40*cj1 + 39243/100000*sj1*sj2, cj1, sj1, cj2, sj2, htj0, domain='QQ'), Poly(-93*r21/1000*cj4*cj5 - 93*r20/1000*cj4*sj5 - rxp2_2*cj4 - rxp1_2*sj4*cj5 - rxp0_2*sj4*sj5 + 93*r22/1000*sj4 + 204001*sqrt(9999949621)/49999748105000000, cj4, sj4, cj5, sj5, htj0, domain='EX'))
openravepy.ikfast: solveLiWoernleHiller, assuming equation htj0 is non-zero
openravepy.ikfast: solveLiWoernleHiller, not unique: (Poly(8005611243*sqrt(9999949621)/2499987405250000000000*cj1*cj2 + 3468017*sqrt(9999949621)/999994962100000000*cj1 - 8005611243*sqrt(9999949621)/2499987405250000000000*sj1*sj2 + 667131/2000000*cj2, cj1, sj1, cj2, sj2, htj0, domain='EX'), Poly(93*npx/500*cj5 - 93*npy/500*sj5 + pp - 862761712052121/2500000000000000 + 181159043277543*sqrt(9999949621)/2499987405250000000000, cj4, sj4, cj5, sj5, htj0, domain='EX'))
openravepy.ikfast: solveLiWoernleHiller, assuming equation htj0 is non-zero
openravepy.ikfast: solveLiWoernleHiller, factors 1 reduced not unique: -cj4*npz - cj5*npy*sj4 - npx*sj4*sj5 - 267/10000 + 678498289429*sqrt(9999949621)/499997481050000000
openravepy.ikfast: solveLiWoernleHiller, assuming equation htj0 is non-zero
openravepy.ikfast: solveLiWoernleHiller, not unique: (Poly((-26626308372062247*sqrt(9999949621)/24999874052500000000000 + 10477881/500000000)*cj1*sj2 + (-26626308372062247*sqrt(9999949621)/24999874052500000000000 + 10477881/500000000)*sj1*cj2 + (-11534470920293*sqrt(9999949621)/9999949621000000000 + 4539/200000)*sj1, cj1, sj1, cj2, sj2, htj0, domain='EX'), Poly(93*rxp1_2/500*cj4*cj5 + 93*rxp0_2/500*cj4*sj5 + (2*npz*pz - pp*r22 - 8649*r22/1000000)*cj4 + (2*npy*pz - pp*r21 - 8649*r21/1000000)*sj4*cj5 + (2*npx*pz - pp*r20 - 8649*r20/1000000)*sj4*sj5 - 93*rxp2_2/500*sj4, cj4, sj4, cj5, sj5, htj0, domain='QQ[r20,r21,r22,npx,npy,npz,pp,pz,rxp0_2,rxp1_2,rxp2_2]'))
openravepy.ikfast: solveLiWoernleHiller, special structure in equations detected, try to solve through elimination
openravepy.ikfast: SolveAllEquations, depth=0 c=1, [] [j4]: cases=None
openravepy.ikfast: solveLiWoernleHiller, CannotSolveError: SolveAllEquations failed to find a variable to solve
openravepy.ikfast: SolveAllEquations, depth=0 c=2, [] [j5]: cases=None
openravepy.ikfast: solveLiWoernleHiller, CannotSolveError: SolveAllEquations failed to find a variable to solve
openravepy.ikfast: solveLiWoernleHiller, try to solve first two variables pairwise
openravepy.ikfast: solveDialytically, not all eigenvalues are > 0. min is 0.000000e+00
openravepy.ikfast: solveDialytically, not all eigenvalues are > 0. min is 0.000000e+00
openravepy.ikfast: solveDialytically, not all eigenvalues are > 0. min is 0.000000e+00
openravepy.ikfast: solveDialytically, not all eigenvalues are > 0. min is 0.000000e+00
openravepy.ikfast: solveDialytically, found 2 repeating roots in solveDialytically matrix: [array(-1.499999999999999), array(-1.5000000000000002), array(0.6666666666666664), array(0.6666666666666666)]
openravepy.ikfast: solveDialytically, not all eigenvalues are > 0. min is 0.000000e+00
openravepy.ikfast: solveDialytically, not all eigenvalues are > 0. min is 0.000000e+00
openravepy.ikfast: solveDialytically, not all eigenvalues are > 0. min is 0.000000e+00
openravepy.ikfast: solveLiWoernleHiller, reducing 6 equations
openravepy.ikfast: solveLiWoernleHiller, failed with leftvar htj4: CannotSolveError: solveDialytically: more unknowns than equations 12>8
openravepy.ikfast: solveLiWoernleHiller, failed with leftvar htj4: CannotSolveError: solveDialytically: more unknowns than equations 16>8
openravepy.ikfast: solveDialytically, not all eigenvalues are > 0. min is 0.000000e+00
openravepy.ikfast: solveDialytically, not all eigenvalues are > 0. min is 0.000000e+00
openravepy.ikfast: solveDialytically, not all eigenvalues are > 0. min is 0.000000e+00
openravepy.ikfast: solveDialytically, not all eigenvalues are > 0. min is 0.000000e+00
openravepy.ikfast: solveLiWoernleHiller, failed with leftvar htj4: CannotSolveError: equations are not linearly independent
openravepy.ikfast: solveLiWoernleHiller, failed with leftvar htj4: CannotSolveError: solveDialytically: more unknowns than equations 16>8
openravepy.ikfast: solveLiWoernleHiller, failed with leftvar htj4: CannotSolveError: solveDialytically: more unknowns than equations 12>8
openravepy.ikfast: solveLiWoernleHiller, failed with leftvar htj4: CannotSolveError: solveDialytically: more unknowns than equations 16>8
openravepy.ikfast: solveLiWoernleHiller, failed with leftvar htj4: CannotSolveError: solveDialytically: more unknowns than equations 16>8
openravepy.ikfast: solveLiWoernleHiller, failed with leftvar htj4: CannotSolveError: solveDialytically: more unknowns than equations 12>8
openravepy.ikfast: solveLiWoernleHiller, failed with leftvar htj4: CannotSolveError: solveDialytically: more unknowns than equations 16>8
openravepy.ikfast: solveLiWoernleHiller, failed with leftvar htj4: CannotSolveError: solveDialytically: more unknowns than equations 16>8
openravepy.ikfast: solveLiWoernleHiller, failed with leftvar htj4: CannotSolveError: solveDialytically: more unknowns than equations 16>8
openravepy.ikfast: solveLiWoernleHiller, failed with leftvar htj4: CannotSolveError: solveDialytically: more unknowns than equations 12>8
openravepy.ikfast: solveLiWoernleHiller, failed with leftvar htj4: CannotSolveError: solveDialytically: more unknowns than equations 16>8
openravepy.ikfast: solveLiWoernleHiller, failed with leftvar htj4: CannotSolveError: solveDialytically: more unknowns than equations 16>8
openravepy.ikfast: solveLiWoernleHiller, failed with leftvar htj4: CannotSolveError: solveDialytically: more unknowns than equations 16>8
openravepy.ikfast: solveLiWoernleHiller, failed with leftvar htj4: CannotSolveError: solveDialytically: more unknowns than equations 16>12
openravepy.ikfast: solveDialytically, not all eigenvalues are > 0. min is 0.000000e+00
openravepy.ikfast: solveDialytically, not all eigenvalues are > 0. min is 0.000000e+00
openravepy.ikfast: solveDialytically, not all eigenvalues are > 0. min is 0.000000e+00
openravepy.ikfast: solveDialytically, not all eigenvalues are > 0. min is 0.000000e+00
openravepy.ikfast: solveDialytically, not all eigenvalues are > 0. min is 0.000000e+00
openravepy.ikfast: solveDialytically, not all eigenvalues are > 0. min is 0.000000e+00
openravepy.ikfast: solveDialytically, not all eigenvalues are > 0. min is 0.000000e+00
openravepy.ikfast: solveDialytically, not all eigenvalues are > 0. min is 0.000000e+00
openravepy.ikfast: solveFullIK_6DGeneral, solving (cj0, sj0, cj1, sj1, cj2, sj2): CannotSolveError: failed to solve dialytically
openravepy.ikfast: solveLiWoernleHiller, attempting li/woernle/hiller general ik method
openravepy.ikfast: solveLiWoernleHiller, allowed indices: [0]
openravepy.ikfast: solveLiWoernleHiller, assuming equation htj3 is non-zero
openravepy.ikfast: solveLiWoernleHiller, not unique: (Poly(r22*cj4 + r21*sj4*cj5 + r20*sj4*sj5, cj4, sj4, cj5, sj5, htj3, domain='ZZ[r20,r21,r22]'), Poly(0, cj1, sj1, cj2, sj2, htj3, domain='ZZ'))
openravepy.ikfast: solveLiWoernleHiller, assuming equation htj3 is non-zero
openravepy.ikfast: solveLiWoernleHiller, not unique: (Poly(-93*r20/1000*cj5 + 93*r21/1000*sj5, cj4, sj4, cj5, sj5, htj3, domain='QQ[r20,r21]'), Poly(39243/100000*cj1*sj2 + 39243/100000*sj1*cj2 + 17/40*sj1 + pz, cj1, sj1, cj2, sj2, htj3, domain='QQ[pz]'))
openravepy.ikfast: solveLiWoernleHiller, assuming equation htj3 is non-zero
openravepy.ikfast: solveLiWoernleHiller, not unique: (Poly(-r21*cj4*cj5*htj3**2 + r21*cj4*cj5 - r20*cj4*sj5*htj3**2 + r20*cj4*sj5 + r22*sj4*htj3**2 - r22*sj4 - 2*r20*cj5*htj3 + 2*r21*sj5*htj3, cj4, sj4, cj5, sj5, htj3, domain='ZZ[r20,r21,r22]'), Poly(-cj1*sj2*htj3**2 - cj1*sj2 - sj1*cj2*htj3**2 - sj1*cj2, cj1, sj1, cj2, sj2, htj3, domain='ZZ'))
openravepy.ikfast: solveLiWoernleHiller, assuming equation htj3 is non-zero
openravepy.ikfast: solveLiWoernleHiller, not unique: (Poly(2*r21*cj4*cj5*htj3 + 2*r20*cj4*sj5*htj3 - 2*r22*sj4*htj3 - r20*cj5*htj3**2 + r20*cj5 + r21*sj5*htj3**2 - r21*sj5, cj4, sj4, cj5, sj5, htj3, domain='ZZ[r20,r21,r22]'), Poly(-cj1*cj2*htj3**2 - cj1*cj2 + sj1*sj2*htj3**2 + sj1*sj2, cj1, sj1, cj2, sj2, htj3, domain='ZZ'))
openravepy.ikfast: solveLiWoernleHiller, not unique: [Poly(-r22*cj4 - r21*sj4*cj5 - r20*sj4*sj5, cj4, sj4, cj5, sj5, htj3, domain='ZZ[r20,r21,r22]'), Poly(0, cj1, sj1, cj2, sj2, htj3, domain='ZZ')]
openravepy.ikfast: solveLiWoernleHiller, assuming equation htj3 is non-zero
openravepy.ikfast: solveLiWoernleHiller, not unique: (Poly(-r22*cj4 - r21*sj4*cj5 - r20*sj4*sj5, cj4, sj4, cj5, sj5, htj3, domain='ZZ[r20,r21,r22]'), Poly(0, cj1, sj1, cj2, sj2, htj3, domain='ZZ'))
openravepy.ikfast: solveLiWoernleHiller, assuming equation htj3 is non-zero
openravepy.ikfast: solveLiWoernleHiller, not unique: (Poly(npz*cj4 + npy*sj4*cj5 + npx*sj4*sj5, cj4, sj4, cj5, sj5, htj3, domain='ZZ[npx,npy,npz]'), Poly(-267/10000 + 678498289429*sqrt(9999949621)/499997481050000000, cj1, sj1, cj2, sj2, htj3, domain='EX'))
openravepy.ikfast: solveLiWoernleHiller, assuming equation htj3 is non-zero
openravepy.ikfast: solveLiWoernleHiller, not unique: (Poly(-93*r21/1000*cj4*cj5 - 93*r20/1000*cj4*sj5 - rxp2_2*cj4 - rxp1_2*sj4*cj5 - rxp0_2*sj4*sj5 + 93*r22/1000*sj4, cj4, sj4, cj5, sj5, htj3, domain='QQ[r20,r21,r22,rxp0_2,rxp1_2,rxp2_2]'), Poly(-39243/100000*cj1*cj2 - 17/40*cj1 + 39243/100000*sj1*sj2 - 204001*sqrt(9999949621)/49999748105000000, cj1, sj1, cj2, sj2, htj3, domain='EX'))
openravepy.ikfast: solveLiWoernleHiller, assuming equation htj3 is non-zero
openravepy.ikfast: solveLiWoernleHiller, not unique: (Poly(93*npx/500*cj5 - 93*npy/500*sj5, cj4, sj4, cj5, sj5, htj3, domain='QQ[npx,npy]'), Poly(8005611243*sqrt(9999949621)/2499987405250000000000*cj1*cj2 + 3468017*sqrt(9999949621)/999994962100000000*cj1 - 8005611243*sqrt(9999949621)/2499987405250000000000*sj1*sj2 + 667131/2000000*cj2 - pp - 181159043277543*sqrt(9999949621)/2499987405250000000000 + 862761712052121/2500000000000000, cj1, sj1, cj2, sj2, htj3, domain='EX'))
openravepy.ikfast: solveLiWoernleHiller, not unique: [Poly(-93*r20/1000*cj5 + 93*r21/1000*sj5, cj4, sj4, cj5, sj5, htj3, domain='QQ[r20,r21,pz]'), Poly(39243/100000*cj1*sj2 + 39243/100000*sj1*cj2 + 17/40*sj1 + pz, cj1, sj1, cj2, sj2, htj3, domain='QQ[pz]')]
openravepy.ikfast: solveLiWoernleHiller, assuming equation htj3 is non-zero
openravepy.ikfast: solveLiWoernleHiller, not unique: (Poly(-93*r20/1000*cj5 + 93*r21/1000*sj5, cj4, sj4, cj5, sj5, htj3, domain='QQ[r20,r21]'), Poly(39243/100000*cj1*sj2 + 39243/100000*sj1*cj2 + 17/40*sj1 + pz, cj1, sj1, cj2, sj2, htj3, domain='QQ[pz]'))
openravepy.ikfast: solveLiWoernleHiller, assuming equation htj3 is non-zero
openravepy.ikfast: solveLiWoernleHiller, not unique: (Poly(93*rxp1_2/500*cj4*cj5 + 93*rxp0_2/500*cj4*sj5 + (2*npz*pz - pp*r22 - 8649*r22/1000000)*cj4 + (2*npy*pz - pp*r21 - 8649*r21/1000000)*sj4*cj5 + (2*npx*pz - pp*r20 - 8649*r20/1000000)*sj4*sj5 - 93*rxp2_2/500*sj4, cj4, sj4, cj5, sj5, htj3, domain='QQ[r20,r21,r22,npx,npy,npz,pp,pz,rxp0_2,rxp1_2,rxp2_2]'), Poly((-26626308372062247*sqrt(9999949621)/24999874052500000000000 + 10477881/500000000)*cj1*sj2 + (-26626308372062247*sqrt(9999949621)/24999874052500000000000 + 10477881/500000000)*sj1*cj2 + (-11534470920293*sqrt(9999949621)/9999949621000000000 + 4539/200000)*sj1, cj1, sj1, cj2, sj2, htj3, domain='EX'))
openravepy.ikfast: solveLiWoernleHiller, matrix has 68 symbols
Reply | Threaded
Open this post in threaded view
|

Re: Universal Robots UR5 & Inverse Kinematics Database Generator

Matt
I removed the last two parameters from the openrave.py command, and I was able to run the Python script.

openrave.py --database inversekinematics --robot=/home/ur5/openrave/src/robots/universalrobots-ur6-85-5-a.zae
Reply | Threaded
Open this post in threaded view
|

Re: Universal Robots UR5 & Inverse Kinematics Database Generator

Matt
I'm now trying to generate a new .dae from the .URDF models included in the universal_robot package. I've converted the ur5, ur5_robot, and ur5_joint_limited_robot .urdf.xacros to .urdfs with rosrun xacro xacro.py _.urdf.xacro > _.urdf. I've created ur5_joint_limited_robot.dae and ur5_robot.dae with rosrun collada_urdf urdf_to_collada _.urdf _.dae.

ur5_robot.dae pastebin (The ellipses indicate omitted values)

There are issues when I try to generate the ik database with openrave.py --database inversekinematics --robot=ur5_robot.dae. The manipulator isn't set in the .dae, so I get this error:

File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 237, in __init__
for link in robot.GetChain(manip.GetBase().GetIndex(),manip.GetEndEffector().GetIndex(),returnjoints=False)[1:]:
AttributeError: 'NoneType' object has no attribute 'GetBase'


I tried modifying the ur5_robot.dae by including manipulator information in the same style as the old universalrobots-ur6-85-5-a.zae that I had found online.

Diff between the ur5_robot.dae I generated before and after modification:

807,814d806
< <extra type="interface_type">
< <technique profile="OpenRAVE">
< <interface>GenericRobot</interface>
< </technique>
< </extra>
< <extra type="collision">
< <technique profile="OpenRAVE"/>
< </extra>
940,981d931
< <extra type="interface_type">
< <technique profile="OpenRAVE">
< <interface>GenericRobot</interface>
< </technique>
< </extra>
< <extra name="motor0" type="attach_actuator">
< <technique profile="OpenRAVE">
< <bind_actuator joint="kmodel0/shoulder_pan_joint"/>
< </technique>
< </extra>
< <extra name="motor1" type="attach_actuator">
< <technique profile="OpenRAVE">
< <bind_actuator joint="kmodel0/shoulder_lift_joint"/>
< </technique>
< </extra>
< <extra name="motor2" type="attach_actuator">
< <technique profile="OpenRAVE">
< <bind_actuator joint="kmodel0/elbow_joint"/>
< </technique>
< </extra>
< <extra name="motor3" type="attach_actuator">
< <technique profile="OpenRAVE">
< <bind_actuator joint="kmodel0/wrist_1_joint"/>
< </technique>
< </extra>
< <extra name="motor4" type="attach_actuator">
< <technique profile="OpenRAVE">
< <bind_actuator joint="kmodel0/wrist_2_joint"/>
< </technique>
< </extra>
< <extra name="motor5" type="attach_actuator">
< <technique profile="OpenRAVE">
< <bind_actuator joint="kmodel0/wrist_3_joint"/>
< </technique>
< </extra>
< <extra name="arm" type="manipulator">
< <technique profile="OpenRAVE">
< <frame_origin link="kmodel0/base_link"/>
< <frame_tip link="kmodel0/ee_link">
< </frame_tip>
< </technique>
< </extra>

Now when I try to generate the ik database, I get the following error:
File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 5253, in solveLiWoernleHiller
    if localnumrepeating is not None and (numrepeating is None or numrepeating > localnumrepeating):
UnboundLocalError: local variable 'numrepeating' referenced before assignment


The arm looks fine when I open the .dae in OpenRAVE, the issue just seems to be with the kinematics. The error is probably caused by something I added to the .dae file, or something I'm missing. Any advice?

Reply | Threaded
Open this post in threaded view
|

Re: Universal Robots UR5 & Inverse Kinematics Database Generator

Humpelstilzchen
Unfortunately the pastebin is broken, e.g line 172.

You do not need to modify the dae, you can also create a basic xml and include your dae there, like in [1].

greetings,
Erik


[1] http://openrave.programmingvision.com/wiki/index.php/Format:XML#Joining_A_Robot_Arm_and_Hand


Am 14.01.2016 um 23:15 schrieb Matt:

> I'm now trying to generate a new .dae from the .URDF models included in the
> universal_robot package
> <https://github.com/ros-industrial/universal_robot/tree/indigo-devel/ur_description/urdf>
> . I've converted the ur5, ur5_robot, and ur5_joint_limited_robot
> .urdf.xacros to .urdfs with rosrun xacro xacro.py _.urdf.xacro > _.urdf.
> I've created ur5_joint_limited_robot.dae and ur5_robot.dae with rosrun
> collada_urdf urdf_to_collada _.urdf _.dae.
>
> ur5_robot.dae pastebin <http://pastebin.com/j631pbrn>   (The ellipses
> indicate omitted values)
>
> There are issues when I try to generate the ik database with openrave.py
> --database inversekinematics --robot=ur5_robot.dae. The manipulator isn't
> set in the .dae, so I get this error:
>
> File
> "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py",
> line 237, in __init__
> for link in
> robot.GetChain(manip.GetBase().GetIndex(),manip.GetEndEffector().GetIndex(),returnjoints=False)[1:]:
> AttributeError: 'NoneType' object has no attribute 'GetBase'
> <http://paste.ubuntu.com/14499133/>  
>
> I tried modifying the ur5_robot.dae by including manipulator information in
> the same style as the  old universalrobots-ur6-85-5-a.zae that I had found
> online
> <https://github.com/rdiankov/collada_robots/blob/master/universalrobots-ur6-85-5-a.zae>
> .
>
> Diff between the ur5_robot.dae I generated before and after modification:
> <http://paste.ubuntu.com/14499234/>  
>
> 807,814d806
> < <extra type="interface_type">
> < <technique profile="OpenRAVE">
> < <interface>GenericRobot</interface>
> < </technique>
> < </extra>
> < <extra type="collision">
> < <technique profile="OpenRAVE"/>
> < </extra>
> 940,981d931
> < <extra type="interface_type">
> < <technique profile="OpenRAVE">
> < <interface>GenericRobot</interface>
> < </technique>
> < </extra>
> < <extra name="motor0" type="attach_actuator">
> < <technique profile="OpenRAVE">
> < <bind_actuator joint="kmodel0/shoulder_pan_joint"/>
> < </technique>
> < </extra>
> < <extra name="motor1" type="attach_actuator">
> < <technique profile="OpenRAVE">
> < <bind_actuator joint="kmodel0/shoulder_lift_joint"/>
> < </technique>
> < </extra>
> < <extra name="motor2" type="attach_actuator">
> < <technique profile="OpenRAVE">
> < <bind_actuator joint="kmodel0/elbow_joint"/>
> < </technique>
> < </extra>
> < <extra name="motor3" type="attach_actuator">
> < <technique profile="OpenRAVE">
> < <bind_actuator joint="kmodel0/wrist_1_joint"/>
> < </technique>
> < </extra>
> < <extra name="motor4" type="attach_actuator">
> < <technique profile="OpenRAVE">
> < <bind_actuator joint="kmodel0/wrist_2_joint"/>
> < </technique>
> < </extra>
> < <extra name="motor5" type="attach_actuator">
> < <technique profile="OpenRAVE">
> < <bind_actuator joint="kmodel0/wrist_3_joint"/>
> < </technique>
> < </extra>
> < <extra name="arm" type="manipulator">
> < <technique profile="OpenRAVE">
> < <frame_origin link="kmodel0/base_link"/>
> < <frame_tip link="kmodel0/ee_link">
> < </frame_tip>
> < </technique>
> < </extra>
>
> Now when I try to generate the ik database, I get the following error:
> File
> "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py",
> line 5253, in solveLiWoernleHiller
>     if localnumrepeating is not None and (numrepeating is None or
> numrepeating > localnumrepeating):
> UnboundLocalError: local variable 'numrepeating' referenced before
> assignment <http://paste.ubuntu.com/14499196/>  
>
> The arm looks fine when I open the .dae in OpenRAVE, the issue just seems to
> be with the kinematics. The error is probably caused by something I added to
> the .dae file, or something I'm missing. Any advice?
>
>
>
>
>
> --
> View this message in context: http://openrave-users-list.185357.n3.nabble.com/Universal-Robots-UR5-Inverse-Kinematics-Database-Generator-tp4027722p4027724.html
> Sent from the OpenRAVE Users List mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
> _______________________________________________
> Openrave-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openrave-users
>


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Universal Robots UR5 & Inverse Kinematics Database Generator

Matt
Thank, Erik. The .dae was too big to fit in pastebin, so I left some parts out. Here's the complete ur5_robot.dae.

I removed my modifications and created a  ur5_dummyhand.xml instead. The arm doesn't have a hand yet, but I'll update this file and regenerate the kinematics once one has been chosen. When I try to generate the ik with openrave.py --database inversekinematics --robot=/home/ur5/openrave/src/robots/ur5_dummyhand.xml, I get the same error as I did with the modified .dae.

File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 5253, in solveLiWoernleHiller
    if localnumrepeating is not None and (numrepeating is None or numrepeating > localnumrepeating):
UnboundLocalError: local variable 'numrepeating' referenced before assignment


Maybe the problem does have to do with ikfast.
Thanks,
Matt
Reply | Threaded
Open this post in threaded view
|

Re: Universal Robots UR5 & Inverse Kinematics Database Generator

Humpelstilzchen
Hi,

Openrave b89980e17d72084d0728e1a8067ba684e75156a2
sympy 0.7.1

greetings,
Erik

Am 20.01.2016 um 18:42 schrieb Matthew Corsaro:

> Hi Erik,
>
> Sorry to bother you, but I am still unable to generate the ik after
> updating OpenRAVE. Which version are you using? I installed the newest
> version of OpenRAVE with git clone --branch latest_stable
> https://github.com/rdiankov/openrave.git
> Using the same ur5_robot.dae and ur5_dummyhand.xml, I ran openrave0.9.py
> --database inversekinematics --robot=ur5_dummyhand.xml, I now get the
> following error:
>
> Traceback (most recent call last):
>   File "/usr/local/bin/openrave0.9.py", line 126, in <module>
>     database.run(args=args)
>   File
> "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py",
> line 1113, in run
>     InverseKinematicsModel.RunFromParser(*args,**kwargs)
>   File
> "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py",
> line 1078, in RunFromParser
>     model =
> DatabaseGenerator.RunFromParser(Model=Model,parser=parser,robotatts=robotatts,args=args,**kwargs)
>   File
> "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/__init__.py",
> line 252, in RunFromParser
>     model.autogenerate(options=options)
>   File
> "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py",
> line 648, in autogenerate
>
> self.generate(iktype=iktype,freejoints=freejoints,precision=precision,forceikbuild=forceikbuild,outputlang=outputlang,ipython=ipython,ikfastmaxcasedepth=ikfastmaxcasedepth)
>   File
> "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py",
> line 874, in generate
>     chaintree =
> solver.generateIkSolver(baselink=baselink,eelink=eelink,freeindices=self.freeindices,solvefn=solvefn)
>   File
> "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py",
> line 2257, in generateIkSolver
>     chaintree = solvefn(self, LinksRaw, jointvars, isolvejointvars)
>   File
> "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py",
> line 741, in solveFullIK_6D
>     return self.ikfast.IKFastSolver.solveFullIK_6D(*args,**kwargs)
>   File
> "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py",
> line 2930, in solveFullIK_6D
>     raise self.CannotSolveError('cannot solve 6D mechanism!')
> openravepy.ikfast.CannotSolveError: CannotSolveError: cannot solve 6D
> mechanism!
>
> The full output of the command is available here:
> http://paste.ubuntu.com/14583511/
>
> Thank you,
> Matt
>
> On Tue, Jan 19, 2016 at 2:32 PM, Matthew Corsaro <[hidden email]>
> wrote:
>
>> Hi Erik,
>>
>> Thanks for trying it on your machine. I installed OpenRAVE 0.9 on December
>> 7 from source on my 14.04 computer, following these instructions
>> <http://openrave.org/docs/latest_stable/coreapihtml/installation_linux.html>.
>> Is there a way to perform updates now? The PPA installation method doesn't
>> seem to be compatible with 14.04, so I can't install that way and use
>> apt-get update to get the latest release. I also tried replacing
>> openrave.py with openrave0.9.py in my command, and I got the same error.
>>
>> Thank you,
>> Matt
>>
>> On Sat, Jan 16, 2016 at 9:39 AM, Erik Andresen <[hidden email]> wrote:
>>
>>> I tested the two files and after an hour or so openrave compiled me an ik
>>> file.
>>>
>>> Openrave is very picky about the openrave version, so make sure you use
>>> the recommend one.
>>>
>>> greetings,
>>> Erik
>>>
>>>
>>> Am 15.01.2016 um 20:05 schrieb Matt:
>>>> Thank, Erik. The .dae was too big to fit in pastebin, so I left some
>>> parts
>>>> out. Here's the complete  ur5_robot.dae
>>>> <https://www.dropbox.com/s/aiga0xndt60wj16/ur5_robot.dae?dl=1>  .
>>>>
>>>> I removed my modifications and created a   ur5_dummyhand.xml
>>>> <http://paste.ubuntu.com/14507333/>   instead. The arm doesn't have a
>>> hand
>>>> yet, but I'll update this file and regenerate the kinematics once one
>>> has
>>>> been chosen. When I try to generate the ik with openrave.py --database
>>>> inversekinematics
>>> --robot=/home/ur5/openrave/src/robots/ur5_dummyhand.xml, I
>>>> get the  same error <http://paste.ubuntu.com/14507461/>   as I did
>>> with the
>>>> modified .dae.
>>>>
>>>> File
>>>>
>>> "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py",
>>>> line 5253, in solveLiWoernleHiller
>>>>     if localnumrepeating is not None and (numrepeating is None or
>>>> numrepeating > localnumrepeating):
>>>> UnboundLocalError: local variable 'numrepeating' referenced before
>>>> assignment <http://paste.ubuntu.com/14507461/>
>>>>
>>>> Maybe the problem does have to do with ikfast.
>>>> Thanks,
>>>> Matt
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context:
>>> http://openrave-users-list.185357.n3.nabble.com/Universal-Robots-UR5-Inverse-Kinematics-Database-Generator-tp4027722p4027726.html
>>>> Sent from the OpenRAVE Users List mailing list archive at Nabble.com.
>>>>
>>>>
>>> ------------------------------------------------------------------------------
>>>> Site24x7 APM Insight: Get Deep Visibility into Application Performance
>>>> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
>>>> Monitor end-to-end web transactions and take corrective actions now
>>>> Troubleshoot faster and improve end-user experience. Signup Now!
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
>>>> _______________________________________________
>>>> Openrave-users mailing list
>>>> [hidden email]
>>>> https://lists.sourceforge.net/lists/listinfo/openrave-users
>>>>
>>>
>>>
>>>
>>
>


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users

signature.asc (188 bytes) Download Attachment