1 #define IKFAST_HAS_LIBRARY 25 #define IKFAST_COMPILE_ASSERT(x) extern int __dummy[(int)x] 40 #ifndef __PRETTY_FUNCTION__ 41 #define __PRETTY_FUNCTION__ __FUNCDNAME__ 45 #ifndef __PRETTY_FUNCTION__ 46 #define __PRETTY_FUNCTION__ __func__ 49 #define IKFAST_ASSERT(b) { if( !(b) ) { std::stringstream ss; ss << "ikfast exception: " << __FILE__ << ":" << __LINE__ << ": " <<__PRETTY_FUNCTION__ << ": Assertion '" << #b << "' failed"; throw std::runtime_error(ss.str()); } } 54 #define IKFAST_ALIGNED16(x) __declspec(align(16)) x 56 #define IKFAST_ALIGNED16(x) x __attribute((aligned(16))) 59 #define IK2PI ((IkReal)6.28318530717959) 60 #define IKPI ((IkReal)3.14159265358979) 61 #define IKPI_2 ((IkReal)1.57079632679490) 77 void dgetrf_ (
const int* m,
const int* n,
double* a,
const int* lda,
int* ipiv,
int* info);
78 void zgetrf_ (
const int* m,
const int* n, std::complex<double>* a,
const int* lda,
int* ipiv,
int* info);
79 void dgetri_(
const int* n,
const double* a,
const int* lda,
int* ipiv,
double* work,
const int* lwork,
int* info);
80 void dgesv_ (
const int* n,
const int* nrhs,
double* a,
const int* lda,
int* ipiv,
double* b,
const int* ldb,
int* info);
81 void dgetrs_(
const char *trans,
const int *n,
const int *nrhs,
double *a,
const int *lda,
int *ipiv,
double *b,
const int *ldb,
int *info);
82 void dgeev_(
const char *jobvl,
const char *jobvr,
const int *n,
double *a,
const int *lda,
double *wr,
double *wi,
double *vl,
const int *ldvl,
double *vr,
const int *ldvr,
double *work,
const int *lwork,
int *info);
87 #ifdef IKFAST_NAMESPACE 88 namespace IKFAST_NAMESPACE {
91 inline float IKabs(
float f) {
return fabsf(f); }
92 inline double IKabs(
double f) {
return fabs(f); }
94 inline float IKsqr(
float f) {
return f*f; }
95 inline double IKsqr(
double f) {
return f*f; }
97 inline float IKlog(
float f) {
return logf(f); }
98 inline double IKlog(
double f) {
return log(f); }
101 #ifndef IKFAST_SINCOS_THRESH 102 #define IKFAST_SINCOS_THRESH ((IkReal)1e-7) 106 #ifndef IKFAST_ATAN2_MAGTHRESH 107 #define IKFAST_ATAN2_MAGTHRESH ((IkReal)1e-7) 111 #ifndef IKFAST_SOLUTION_THRESH 112 #define IKFAST_SOLUTION_THRESH ((IkReal)1e-6) 116 #ifndef IKFAST_EVALCOND_THRESH 117 #define IKFAST_EVALCOND_THRESH ((IkReal)0.00001) 124 if( f <= -1 )
return float(-
IKPI_2);
125 else if( f >= 1 )
return float(
IKPI_2);
131 if( f <= -1 )
return -
IKPI_2;
132 else if( f >= 1 )
return IKPI_2;
157 if( f <= -1 )
return float(
IKPI);
158 else if( f >= 1 )
return float(0);
164 if( f <= -1 )
return IKPI;
165 else if( f >= 1 )
return 0;
168 inline float IKsin(
float f) {
return sinf(f); }
170 inline float IKcos(
float f) {
return cosf(f); }
172 inline float IKtan(
float f) {
return tanf(f); }
174 inline float IKsqrt(
float f) {
if( f <= 0.0f )
return 0.0f;
return sqrtf(f); }
175 inline double IKsqrt(
double f) {
if( f <= 0.0 )
return 0.0;
return sqrt(f); }
177 return atan2f(fy,fx);
184 else if( isnan(fx) ) {
187 return atan2f(fy,fx);
197 else if( isnan(fx) ) {
203 template <
typename T>
210 template <
typename T>
216 if( !isnan(fy) && !isnan(fx) ) {
245 template <
typename T>
264 ret.
value = (T)1.0e30;
268 ret.
value = T(1.0)/f;
273 int num = n > 0 ? n : -n;
277 else if( num == 3 ) {
299 IKFAST_API
void ComputeFk(
const IkReal* j, IkReal* eetrans, IkReal* eerot) {
300 IkReal x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40,x41,x42;
333 x32=((((-1.0)*x30))+x21);
334 x33=((((-1.0)*x27))+(((-1.0)*x25)));
336 x35=(((x0*x25))+((x26*x7)));
338 x37=(x20*(((((-1.0)*x22))+x21)));
339 x38=(x18*(((((-1.0)*x27))+(((-1.0)*x25)))));
342 x41=(((x11*x37))+((x10*(((((-1.0)*x29))+((x1*x35)))))));
343 x42=(((x24*(((((-1.0)*x0*x3))+x40))))+((x23*(((((-1.0)*x18*x21))+x31)))));
344 eerot[0]=(((x41*x8))+((x9*((((x1*x2))+x39)))));
345 eerot[1]=(((x8*(((((-1.0)*x12*x2))+(((-1.0)*x17*x35))))))+((x41*x9)));
346 eerot[2]=(((x11*(((((-1.0)*x12*x35))+x29))))+((x10*x37)));
347 IkReal x43=((1.0)*x22);
348 eetrans[0]=(((x10*(((((-1.0)*x15*x43))+((x15*x21))))))+(((0.15)*x0))+((x16*x21))+((x11*(((((-1.0)*x19*x35))+((x13*x3))))))+(((-1.0)*x16*x43))+(((0.87)*x26)));
349 eerot[3]=(((x42*x8))+((x9*(((((-1.0)*x0*x12))+(((-1.0)*x17*x38)))))));
350 eerot[4]=(((x8*((((x0*x1))+((x3*x38))))))+((x42*x9)));
351 eerot[5]=(((x11*(((((-1.0)*x0*x17))+x40))))+((x10*(((((-1.0)*x31))+((x2*x21)))))));
352 IkReal x44=((1.0)*x22);
353 eetrans[1]=(((x11*((((x19*x38))+(((-1.0)*x15*x3))))))+(((0.87)*x2*x5))+((x10*((((x13*x21))+(((-1.0)*x13*x44))))))+(((0.15)*x2))+((x14*x21))+(((-1.0)*x14*x44)));
354 eerot[6]=(((x8*(((((-1.0)*x10*x12*x32))+(((-1.0)*x11*x33))))))+((x3*x9*(((((-1.0)*x21))+x30)))));
355 eerot[7]=(((x9*((((x23*x33))+((x24*x34))))))+((x3*x32*x8)));
356 eerot[8]=(((x28*x32))+((x10*((x25+x27)))));
357 eetrans[2]=((0.68)+((x10*(((((0.165)*x27))+(((0.165)*x25))))))+((x28*(((((-0.165)*x22))+(((0.165)*x21))))))+(((1.08)*x25))+(((1.08)*x27))+(((0.87)*x6)));
370 IkReal j0,cj0,sj0,htj0,j0mul,j1,cj1,sj1,htj1,j1mul,j2,cj2,sj2,htj2,j2mul,j3,cj3,sj3,htj3,j3mul,j4,cj4,sj4,htj4,j4mul,j5,cj5,
sj5,htj5,j5mul,new_r00,r00,rxp0_0,new_r01,r01,rxp0_1,new_r02,r02,rxp0_2,new_r10,r10,rxp1_0,new_r11,r11,rxp1_1,new_r12,r12,rxp1_2,new_r20,r20,rxp2_0,new_r21,r21,rxp2_1,new_r22,r22,rxp2_2,new_px,px,npx,new_py,py,npy,new_pz,pz,npz,pp;
371 unsigned char _ij0[2], _nj0,_ij1[2], _nj1,_ij2[2], _nj2,_ij3[2], _nj3,_ij4[2], _nj4,_ij5[2],
_nj5;
376 j0=numeric_limits<IkReal>::quiet_NaN(); _ij0[0] = -1; _ij0[1] = -1; _nj0 = -1; j1=numeric_limits<IkReal>::quiet_NaN(); _ij1[0] = -1; _ij1[1] = -1; _nj1 = -1; j2=numeric_limits<IkReal>::quiet_NaN(); _ij2[0] = -1; _ij2[1] = -1; _nj2 = -1; j3=numeric_limits<IkReal>::quiet_NaN(); _ij3[0] = -1; _ij3[1] = -1; _nj3 = -1; j4=numeric_limits<IkReal>::quiet_NaN(); _ij4[0] = -1; _ij4[1] = -1; _nj4 = -1; j5=numeric_limits<IkReal>::quiet_NaN(); _ij5[0] = -1; _ij5[1] = -1; _nj5 = -1;
377 for(
int dummyiter = 0; dummyiter < 1; ++dummyiter) {
388 px = eetrans[0]; py = eetrans[1]; pz = eetrans[2];
393 new_px=(px+(((-0.165)*r02)));
394 new_r10=((-1.0)*r10);
395 new_r11=((-1.0)*r11);
396 new_r12=((-1.0)*r12);
397 new_py=((((0.165)*r12))+(((-1.0)*py)));
398 new_r20=((-1.0)*r20);
399 new_r21=((-1.0)*r21);
400 new_r22=((-1.0)*r22);
401 new_pz=((0.68)+(((-1.0)*pz))+(((0.165)*r22)));
402 r00 = new_r00; r01 = new_r01; r02 = new_r02; r10 = new_r10; r11 = new_r11; r12 = new_r12; r20 = new_r20; r21 = new_r21; r22 = new_r22; px = new_px; py = new_py; pz = new_pz;
403 IkReal x45=((1.0)*px);
404 IkReal x46=((1.0)*pz);
405 IkReal x47=((1.0)*py);
406 pp=((px*px)+(py*py)+(pz*pz));
407 npx=(((px*r00))+((py*r10))+((pz*r20)));
408 npy=(((px*r01))+((py*r11))+((pz*r21)));
409 npz=(((px*r02))+((py*r12))+((pz*r22)));
410 rxp0_0=((((-1.0)*r20*x47))+((pz*r10)));
411 rxp0_1=(((px*r20))+(((-1.0)*r00*x46)));
412 rxp0_2=((((-1.0)*r10*x45))+((py*r00)));
413 rxp1_0=((((-1.0)*r21*x47))+((pz*r11)));
414 rxp1_1=(((px*r21))+(((-1.0)*r01*x46)));
415 rxp1_2=((((-1.0)*r11*x45))+((py*r01)));
416 rxp2_0=((((-1.0)*r22*x47))+((pz*r12)));
417 rxp2_1=((((-1.0)*r02*x46))+((px*r22)));
418 rxp2_2=((((-1.0)*r12*x45))+((py*r02)));
422 if(
IKabs(j0eval[0]) < 0.0000010000000000 )
429 IkReal j0array[2], cj0array[2], sj0array[2];
430 bool j0valid[2]={
false};
436 IkReal x48=x49.
value;
437 j0array[0]=((-1.0)*x48);
438 sj0array[0]=
IKsin(j0array[0]);
439 cj0array[0]=
IKcos(j0array[0]);
440 j0array[1]=((3.14159265358979)+(((-1.0)*x48)));
441 sj0array[1]=
IKsin(j0array[1]);
442 cj0array[1]=
IKcos(j0array[1]);
443 if( j0array[0] >
IKPI )
447 else if( j0array[0] < -
IKPI )
451 if( j0array[1] >
IKPI )
455 else if( j0array[1] < -
IKPI )
459 for(
int ij0 = 0; ij0 < 2; ++ij0)
465 _ij0[0] = ij0; _ij0[1] = -1;
466 for(
int iij0 = ij0+1; iij0 < 2; ++iij0)
470 j0valid[iij0]=
false; _ij0[1] = iij0;
break;
473 j0 = j0array[ij0]; cj0 = cj0array[ij0]; sj0 = sj0array[ij0];
476 IkReal j2array[2], cj2array[2], sj2array[2];
477 bool j2valid[2]={
false};
479 cj2array[0]=((-1.01149425287356)+(((0.532141336739038)*pp))+(((0.159642401021711)*cj0*py))+(((-0.159642401021711)*px*sj0)));
482 j2valid[0] = j2valid[1] =
true;
483 j2array[0] =
IKacos(cj2array[0]);
484 sj2array[0] =
IKsin(j2array[0]);
485 cj2array[1] = cj2array[0];
486 j2array[1] = -j2array[0];
487 sj2array[1] = -sj2array[0];
489 else if( isnan(cj2array[0]) )
493 cj2array[0] = 1; sj2array[0] = 0; j2array[0] = 0;
495 for(
int ij2 = 0; ij2 < 2; ++ij2)
501 _ij2[0] = ij2; _ij2[1] = -1;
502 for(
int iij2 = ij2+1; iij2 < 2; ++iij2)
506 j2valid[iij2]=
false; _ij2[1] = iij2;
break;
509 j2 = j2array[ij2]; cj2 = cj2array[ij2]; sj2 = sj2array[ij2];
515 IkReal x52=((675.0)*cj2);
516 IkReal x53=((675.0)*sj2);
517 j1eval[0]=((-1.02346743295019)+(((-1.0)*cj2)));
518 j1eval[1]=((
IKabs(((81.5625)+(((543.75)*x50))+(((-543.75)*x51))+(((-1.0)*x51*x52))+((x50*x52))+((pz*x53))+(((101.25)*cj2)))))+(
IKabs(((((543.75)*pz))+(((-101.25)*sj2))+((x51*x53))+((pz*x52))+(((-1.0)*x50*x53))))));
519 j1eval[2]=
IKsign(((-1202.0625)+(((-1174.5)*cj2))));
520 if(
IKabs(j1eval[0]) < 0.0000010000000000 ||
IKabs(j1eval[1]) < 0.0000010000000000 ||
IKabs(j1eval[2]) < 0.0000010000000000 )
524 IkReal x54=((27.0)*cj2);
528 IkReal x58=((8.27586206896552)*cj2);
529 IkReal x59=((25.0)*pz);
530 j1eval[0]=((1.0)+(((-8.27586206896552)*x57))+(((-1.0)*x56*x58))+(((6.66666666666667)*x55))+(((1.24137931034483)*cj2))+((x55*x58))+(((-6.66666666666667)*x56)));
531 j1eval[1]=((
IKabs(((((23.49)*sj2))+(((-1.0)*x55*x59))+(((29.16)*cj2*sj2))+((x56*x59))+(((-3.75)*pz)))))+(
IKabs(((-18.9225)+(((-46.98)*cj2))+(((-29.16)*(cj2*cj2)))+((pz*x59))))));
532 j1eval[2]=
IKsign(((3.2625)+(((-27.0)*x57))+(((21.75)*x55))+(((-1.0)*x54*x56))+(((-21.75)*x56))+(((4.05)*cj2))+((x54*x55))));
533 if(
IKabs(j1eval[0]) < 0.0000010000000000 ||
IKabs(j1eval[1]) < 0.0000010000000000 ||
IKabs(j1eval[2]) < 0.0000010000000000 )
543 IkReal x66=((27.0)*cj2);
544 IkReal x67=((27.0)*sj2);
545 IkReal x68=((25.0)*x61);
546 IkReal x69=((44.4444444444444)*x61);
547 IkReal x70=(x60*x63);
548 j1eval[0]=((-1.0)+(((-44.4444444444444)*x62))+((x60*x69))+(((13.3333333333333)*x64))+(((-44.4444444444444)*x70))+(((-13.3333333333333)*x65))+(((-1.0)*x69))+(((88.8888888888889)*x64*x65)));
549 j1eval[1]=((
IKabs(((3.2625)+(((21.75)*x65))+(((-1.0)*x64*x66))+(((-21.75)*x64))+((pz*x67))+((x65*x66))+(((4.05)*cj2)))))+(
IKabs(((((-4.05)*sj2))+(((21.75)*pz))+(((-1.0)*x65*x67))+((pz*x66))+((x64*x67))))));
550 j1eval[2]=
IKsign(((-0.5625)+(((-7.5)*x65))+((x60*x68))+(((50.0)*x64*x65))+(((-25.0)*x70))+(((-1.0)*x68))+(((-25.0)*x62))+(((7.5)*x64))));
551 if(
IKabs(j1eval[0]) < 0.0000010000000000 ||
IKabs(j1eval[1]) < 0.0000010000000000 ||
IKabs(j1eval[2]) < 0.0000010000000000 )
558 IkReal j1array[1], cj1array[1], sj1array[1];
559 bool j1valid[1]={
false};
565 IkReal x75=((27.0)*cj2);
566 IkReal x76=((27.0)*sj2);
567 IkReal x77=((25.0)*x71);
576 j1array[0]=((-1.5707963267949)+(x78.
value)+(((1.5707963267949)*(x79.
value))));
577 sj1array[0]=
IKsin(j1array[0]);
578 cj1array[0]=
IKcos(j1array[0]);
579 if( j1array[0] >
IKPI )
583 else if( j1array[0] < -
IKPI )
587 for(
int ij1 = 0; ij1 < 1; ++ij1)
593 _ij1[0] = ij1; _ij1[1] = -1;
594 for(
int iij1 = ij1+1; iij1 < 1; ++iij1)
598 j1valid[iij1]=
false; _ij1[1] = iij1;
break;
601 j1 = j1array[ij1]; cj1 = cj1array[ij1]; sj1 = sj1array[ij1];
604 IkReal x80=
IKcos(j1);
605 IkReal x81=
IKsin(j1);
608 IkReal x84=((1.08)*sj2);
609 IkReal x85=((1.08)*cj2);
611 IkReal x87=((1.74)*x81);
612 evalcond[0]=(((x81*x84))+(((0.87)*x80))+pz+((x80*x85)));
613 evalcond[1]=((0.15)+(((-1.0)*x80*x84))+((x81*x85))+(((0.87)*x81))+x82+(((-1.0)*x83)));
614 evalcond[2]=((((-1.0)*x80*x82))+((pz*x81))+x84+(((-0.15)*x80))+((x80*x83)));
615 evalcond[3]=((0.87)+(((0.15)*x81))+((x81*x82))+(((-1.0)*x81*x83))+x86+x85);
616 evalcond[4]=((0.387)+(((-1.0)*x82*x87))+(((0.3)*x83))+(((-0.261)*x81))+(((-1.74)*x86))+(((-1.0)*pp))+((x83*x87))+(((-0.3)*x82)));
623 rotationfunction0(solutions);
634 IkReal j1array[1], cj1array[1], sj1array[1];
635 bool j1valid[1]={
false};
637 IkReal x863=(px*sj0);
638 IkReal x864=(cj0*py);
639 IkReal x865=((27.0)*cj2);
640 IkReal x866=((25.0)*pz);
649 j1array[0]=((-1.5707963267949)+(x867.
value)+(((1.5707963267949)*(x868.
value))));
650 sj1array[0]=
IKsin(j1array[0]);
651 cj1array[0]=
IKcos(j1array[0]);
652 if( j1array[0] >
IKPI )
656 else if( j1array[0] < -
IKPI )
660 for(
int ij1 = 0; ij1 < 1; ++ij1)
666 _ij1[0] = ij1; _ij1[1] = -1;
667 for(
int iij1 = ij1+1; iij1 < 1; ++iij1)
671 j1valid[iij1]=
false; _ij1[1] = iij1;
break;
674 j1 = j1array[ij1]; cj1 = cj1array[ij1]; sj1 = sj1array[ij1];
677 IkReal x869=
IKcos(j1);
678 IkReal x870=
IKsin(j1);
679 IkReal x871=(cj0*py);
680 IkReal x872=(px*sj0);
681 IkReal x873=((1.08)*sj2);
682 IkReal x874=((1.08)*cj2);
683 IkReal x875=(pz*x869);
684 IkReal x876=((1.74)*x870);
685 evalcond[0]=(((x870*x873))+(((0.87)*x869))+pz+((x869*x874)));
686 evalcond[1]=((0.15)+((x870*x874))+(((-1.0)*x869*x873))+(((-1.0)*x872))+(((0.87)*x870))+x871);
687 evalcond[2]=((((-1.0)*x869*x871))+(((-0.15)*x869))+((x869*x872))+x873+((pz*x870)));
688 evalcond[3]=((0.87)+((x870*x871))+(((-1.0)*x870*x872))+(((0.15)*x870))+x874+x875);
689 evalcond[4]=((0.387)+(((-0.3)*x871))+(((0.3)*x872))+((x872*x876))+(((-1.0)*x871*x876))+(((-0.261)*x870))+(((-1.0)*pp))+(((-1.74)*x875)));
696 rotationfunction0(solutions);
707 IkReal j1array[1], cj1array[1], sj1array[1];
708 bool j1valid[1]={
false};
710 IkReal x877=(cj0*py);
711 IkReal x878=(px*sj0);
712 IkReal x879=((675.0)*cj2);
713 IkReal x880=((675.0)*sj2);
714 CheckValue<IkReal> x881 =
IKatan2WithCheck(IkReal(((81.5625)+(((-543.75)*x878))+((pz*x880))+(((543.75)*x877))+(((-1.0)*x878*x879))+((x877*x879))+(((101.25)*cj2)))),IkReal(((((543.75)*pz))+(((-1.0)*x877*x880))+((x878*x880))+(((-101.25)*sj2))+((pz*x879)))),
IKFAST_ATAN2_MAGTHRESH);
722 j1array[0]=((-1.5707963267949)+(x881.
value)+(((1.5707963267949)*(x882.
value))));
723 sj1array[0]=
IKsin(j1array[0]);
724 cj1array[0]=
IKcos(j1array[0]);
725 if( j1array[0] >
IKPI )
729 else if( j1array[0] < -
IKPI )
733 for(
int ij1 = 0; ij1 < 1; ++ij1)
739 _ij1[0] = ij1; _ij1[1] = -1;
740 for(
int iij1 = ij1+1; iij1 < 1; ++iij1)
744 j1valid[iij1]=
false; _ij1[1] = iij1;
break;
747 j1 = j1array[ij1]; cj1 = cj1array[ij1]; sj1 = sj1array[ij1];
750 IkReal x883=
IKcos(j1);
751 IkReal x884=
IKsin(j1);
752 IkReal x885=(cj0*py);
753 IkReal x886=(px*sj0);
754 IkReal x887=((1.08)*sj2);
755 IkReal x888=((1.08)*cj2);
756 IkReal x889=(pz*x883);
757 IkReal x890=((1.74)*x884);
758 evalcond[0]=(((x883*x888))+pz+(((0.87)*x883))+((x884*x887)));
759 evalcond[1]=((0.15)+(((-1.0)*x883*x887))+(((-1.0)*x886))+(((0.87)*x884))+x885+((x884*x888)));
760 evalcond[2]=((((-0.15)*x883))+(((-1.0)*x883*x885))+((pz*x884))+((x883*x886))+x887);
761 evalcond[3]=((0.87)+(((-1.0)*x884*x886))+(((0.15)*x884))+x889+x888+((x884*x885)));
762 evalcond[4]=((0.387)+((x886*x890))+(((-1.74)*x889))+(((0.3)*x886))+(((-1.0)*pp))+(((-0.3)*x885))+(((-1.0)*x885*x890))+(((-0.261)*x884)));
769 rotationfunction0(solutions);
788 for(
int rotationiter = 0; rotationiter < 1; ++rotationiter) {
789 IkReal x88=((1.0)*sj0);
790 IkReal x89=(cj0*r12);
791 IkReal x90=((1.0)*sj1);
792 IkReal x91=((1.0)*cj1);
793 IkReal x92=(cj0*r11);
794 IkReal x93=(cj0*r10);
795 IkReal x94=(((cj2*sj1))+(((-1.0)*sj2*x91)));
796 IkReal x95=(((cj1*sj2))+(((-1.0)*cj2*x90)));
797 IkReal x96=((((-1.0)*sj2*x90))+(((-1.0)*cj2*x91)));
798 new_r00=(((r10*sj0))+((cj0*r00)));
799 new_r01=(((r11*sj0))+((cj0*r01)));
800 new_r02=(((r12*sj0))+((cj0*r02)));
801 new_r10=(((r20*x94))+(((-1.0)*r00*x88*x96))+((x93*x96)));
802 new_r11=(((r21*x94))+((x92*x96))+(((-1.0)*r01*x88*x96)));
803 new_r12=(((x89*x96))+(((-1.0)*r02*x88*x96))+((r22*x94)));
804 new_r20=(((r20*x96))+(((-1.0)*r00*x88*x95))+((x93*x95)));
805 new_r21=(((r21*x96))+((x92*x95))+(((-1.0)*r01*x88*x95)));
806 new_r22=(((x89*x95))+(((-1.0)*r02*x88*x95))+((r22*x96)));
808 IkReal j4array[2], cj4array[2], sj4array[2];
809 bool j4valid[2]={
false};
814 j4valid[0] = j4valid[1] =
true;
815 j4array[0] =
IKacos(cj4array[0]);
816 sj4array[0] =
IKsin(j4array[0]);
817 cj4array[1] = cj4array[0];
818 j4array[1] = -j4array[0];
819 sj4array[1] = -sj4array[0];
821 else if( isnan(cj4array[0]) )
825 cj4array[0] = 1; sj4array[0] = 0; j4array[0] = 0;
827 for(
int ij4 = 0; ij4 < 2; ++ij4)
833 _ij4[0] = ij4; _ij4[1] = -1;
834 for(
int iij4 = ij4+1; iij4 < 2; ++iij4)
838 j4valid[iij4]=
false; _ij4[1] = iij4;
break;
841 j4 = j4array[ij4]; cj4 = cj4array[ij4]; sj4 = sj4array[ij4];
847 j5eval[2]=((
IKabs(new_r20))+(
IKabs(new_r21)));
848 if(
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000 ||
IKabs(j5eval[2]) < 0.0000010000000000 )
854 j3eval[2]=((
IKabs(new_r12))+(
IKabs(new_r02)));
855 if(
IKabs(j3eval[0]) < 0.0000010000000000 ||
IKabs(j3eval[1]) < 0.0000010000000000 ||
IKabs(j3eval[2]) < 0.0000010000000000 )
861 if(
IKabs(j3eval[0]) < 0.0000010000000000 ||
IKabs(j3eval[1]) < 0.0000010000000000 )
865 bool bgotonextstatement =
true;
868 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(j4))), 6.28318530717959)));
873 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 &&
IKabs(evalcond[2]) < 0.0000050000000000 &&
IKabs(evalcond[3]) < 0.0000050000000000 &&
IKabs(evalcond[4]) < 0.0000050000000000 )
875 bgotonextstatement=
false;
881 j3=
IKatan2(((-1.0)*new_r01), new_r00);
883 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
884 vinfos[0].jointtype = 1;
885 vinfos[0].foffset = j0;
886 vinfos[0].indices[0] = _ij0[0];
887 vinfos[0].indices[1] = _ij0[1];
888 vinfos[0].maxsolutions = _nj0;
889 vinfos[1].jointtype = 1;
890 vinfos[1].foffset = j1;
891 vinfos[1].indices[0] = _ij1[0];
892 vinfos[1].indices[1] = _ij1[1];
893 vinfos[1].maxsolutions = _nj1;
894 vinfos[2].jointtype = 1;
895 vinfos[2].foffset = j2;
896 vinfos[2].indices[0] = _ij2[0];
897 vinfos[2].indices[1] = _ij2[1];
898 vinfos[2].maxsolutions = _nj2;
899 vinfos[3].jointtype = 1;
900 vinfos[3].foffset = j3;
901 vinfos[3].fmul = j3mul;
902 vinfos[3].freeind = 0;
903 vinfos[3].maxsolutions = 0;
904 vinfos[4].jointtype = 1;
905 vinfos[4].foffset = j4;
906 vinfos[4].indices[0] = _ij4[0];
907 vinfos[4].indices[1] = _ij4[1];
908 vinfos[4].maxsolutions = _nj4;
909 vinfos[5].jointtype = 1;
910 vinfos[5].foffset = j5;
911 vinfos[5].fmul = j5mul;
912 vinfos[5].freeind = 0;
913 vinfos[5].maxsolutions = 0;
914 std::vector<int> vfree(1);
921 if( bgotonextstatement )
923 bool bgotonextstatement =
true;
926 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-3.14159265358979)+j4)))), 6.28318530717959)));
931 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 &&
IKabs(evalcond[2]) < 0.0000050000000000 &&
IKabs(evalcond[3]) < 0.0000050000000000 &&
IKabs(evalcond[4]) < 0.0000050000000000 )
933 bgotonextstatement=
false;
939 j3=
IKatan2(new_r01, ((-1.0)*new_r11));
941 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
942 vinfos[0].jointtype = 1;
943 vinfos[0].foffset = j0;
944 vinfos[0].indices[0] = _ij0[0];
945 vinfos[0].indices[1] = _ij0[1];
946 vinfos[0].maxsolutions = _nj0;
947 vinfos[1].jointtype = 1;
948 vinfos[1].foffset = j1;
949 vinfos[1].indices[0] = _ij1[0];
950 vinfos[1].indices[1] = _ij1[1];
951 vinfos[1].maxsolutions = _nj1;
952 vinfos[2].jointtype = 1;
953 vinfos[2].foffset = j2;
954 vinfos[2].indices[0] = _ij2[0];
955 vinfos[2].indices[1] = _ij2[1];
956 vinfos[2].maxsolutions = _nj2;
957 vinfos[3].jointtype = 1;
958 vinfos[3].foffset = j3;
959 vinfos[3].fmul = j3mul;
960 vinfos[3].freeind = 0;
961 vinfos[3].maxsolutions = 0;
962 vinfos[4].jointtype = 1;
963 vinfos[4].foffset = j4;
964 vinfos[4].indices[0] = _ij4[0];
965 vinfos[4].indices[1] = _ij4[1];
966 vinfos[4].maxsolutions = _nj4;
967 vinfos[5].jointtype = 1;
968 vinfos[5].foffset = j5;
969 vinfos[5].fmul = j5mul;
970 vinfos[5].freeind = 0;
971 vinfos[5].maxsolutions = 0;
972 std::vector<int> vfree(1);
979 if( bgotonextstatement )
981 bool bgotonextstatement =
true;
984 evalcond[0]=((
IKabs(new_r20))+(
IKabs(new_r21)));
985 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
987 bgotonextstatement=
false;
994 IkReal x97=new_r22*new_r22;
995 IkReal x98=((16.0)*new_r10);
996 IkReal x99=((16.0)*new_r01);
997 IkReal x100=((16.0)*new_r00);
998 IkReal x101=(new_r11*new_r22);
999 IkReal x102=((8.0)*new_r00);
1000 IkReal x103=(x97*x98);
1001 IkReal x104=(x97*x99);
1002 j3eval[0]=((
IKabs((((new_r22*x102))+(((-8.0)*new_r11)))))+(
IKabs(((((32.0)*new_r00))+(((-16.0)*x101))+(((-1.0)*x100*x97)))))+(
IKabs((((x102*x97))+(((-8.0)*x101)))))+(
IKabs((x104+(((-1.0)*x99)))))+(
IKabs(((((-1.0)*x104))+x99)))+(
IKabs(((((-32.0)*new_r11*x97))+((new_r22*x100))+(((16.0)*new_r11)))))+(
IKabs(((((-1.0)*x103))+x98)))+(
IKabs((x103+(((-1.0)*x98))))));
1003 if(
IKabs(j3eval[0]) < 0.0000000010000000 )
1009 IkReal op[4+1], zeror[4];
1011 IkReal j3evalpoly[1];
1012 IkReal x105=new_r22*new_r22;
1013 IkReal x106=((16.0)*new_r01);
1014 IkReal x107=(new_r00*new_r22);
1015 IkReal x108=(x105*x106);
1016 IkReal x109=((((8.0)*x107))+(((-8.0)*new_r11)));
1018 op[1]=((((-1.0)*x106))+x108);
1019 op[2]=((((-32.0)*new_r11*x105))+(((16.0)*x107))+(((16.0)*new_r11)));
1020 op[3]=((((-1.0)*x108))+x106);
1022 polyroots4(op,zeror,numroots);
1023 IkReal j3array[4], cj3array[4], sj3array[4], tempj3array[1];
1024 int numsolutions = 0;
1025 for(
int ij3 = 0; ij3 < numroots; ++ij3)
1027 IkReal htj3 = zeror[ij3];
1028 tempj3array[0]=((2.0)*(
atan(htj3)));
1029 for(
int kj3 = 0; kj3 < 1; ++kj3)
1031 j3array[numsolutions] = tempj3array[kj3];
1032 if( j3array[numsolutions] >
IKPI )
1034 j3array[numsolutions]-=
IK2PI;
1036 else if( j3array[numsolutions] < -
IKPI )
1038 j3array[numsolutions]+=
IK2PI;
1040 sj3array[numsolutions] =
IKsin(j3array[numsolutions]);
1041 cj3array[numsolutions] =
IKcos(j3array[numsolutions]);
1045 bool j3valid[4]={
true,
true,
true,
true};
1047 for(
int ij3 = 0; ij3 < numsolutions; ++ij3)
1053 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
1056 IkReal x110=new_r22*new_r22;
1057 IkReal x111=((16.0)*new_r10);
1058 IkReal x112=(new_r11*new_r22);
1059 IkReal x113=((8.0)*x112);
1060 IkReal x114=(new_r00*x110);
1061 IkReal x115=(x110*x111);
1062 IkReal x116=((8.0)*x114);
1063 j3evalpoly[0]=((((htj3*htj3)*(((((32.0)*new_r00))+(((-16.0)*x114))+(((-16.0)*x112))))))+(((htj3*htj3*htj3)*(((((-1.0)*x115))+x111))))+(((-1.0)*x113))+x116+((htj3*(((((-1.0)*x111))+x115))))+(((htj3*htj3*htj3*htj3)*(((((-1.0)*x113))+x116)))));
1064 if(
IKabs(j3evalpoly[0]) > 0.0000000010000000 )
1068 _ij3[0] = ij3; _ij3[1] = -1;
1069 for(
int iij3 = ij3+1; iij3 < numsolutions; ++iij3)
1073 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
1082 IkReal x117=cj3*cj3;
1083 IkReal x118=new_r22*new_r22;
1084 IkReal x119=(new_r22*sj3);
1085 IkReal x120=((((-1.0)*x117))+(((-1.0)*x118))+((x117*x118)));
1088 j5eval[2]=((
IKabs((((new_r01*x119))+(((-1.0)*cj3*new_r00)))))+(
IKabs((((new_r00*x119))+((cj3*new_r01))))));
1089 if(
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000 ||
IKabs(j5eval[2]) < 0.0000010000000000 )
1098 if(
IKabs(j5eval[0]) < 0.0000010000000000 )
1107 if(
IKabs(j5eval[0]) < 0.0000010000000000 )
1111 bool bgotonextstatement =
true;
1114 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-1.5707963267949)+j3)))), 6.28318530717959)));
1115 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
1117 bgotonextstatement=
false;
1119 IkReal j5array[1], cj5array[1], sj5array[1];
1120 bool j5valid[1]={
false};
1124 j5array[0]=
IKatan2(((-1.0)*new_r11), new_r10);
1125 sj5array[0]=
IKsin(j5array[0]);
1126 cj5array[0]=
IKcos(j5array[0]);
1127 if( j5array[0] >
IKPI )
1131 else if( j5array[0] < -
IKPI )
1132 { j5array[0]+=
IK2PI;
1135 for(
int ij5 = 0; ij5 < 1; ++ij5)
1141 _ij5[0] = ij5; _ij5[1] = -1;
1142 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
1146 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
1149 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
1152 IkReal x121=
IKsin(j5);
1153 IkReal x122=
IKcos(j5);
1154 evalcond[0]=(x121+new_r11);
1155 evalcond[1]=((-1.0)*x121);
1156 evalcond[2]=((-1.0)*x122);
1157 evalcond[3]=((((-1.0)*x122))+new_r10);
1165 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
1166 vinfos[0].jointtype = 1;
1167 vinfos[0].foffset = j0;
1168 vinfos[0].indices[0] = _ij0[0];
1169 vinfos[0].indices[1] = _ij0[1];
1170 vinfos[0].maxsolutions = _nj0;
1171 vinfos[1].jointtype = 1;
1172 vinfos[1].foffset = j1;
1173 vinfos[1].indices[0] = _ij1[0];
1174 vinfos[1].indices[1] = _ij1[1];
1175 vinfos[1].maxsolutions = _nj1;
1176 vinfos[2].jointtype = 1;
1177 vinfos[2].foffset = j2;
1178 vinfos[2].indices[0] = _ij2[0];
1179 vinfos[2].indices[1] = _ij2[1];
1180 vinfos[2].maxsolutions = _nj2;
1181 vinfos[3].jointtype = 1;
1182 vinfos[3].foffset = j3;
1183 vinfos[3].indices[0] = _ij3[0];
1184 vinfos[3].indices[1] = _ij3[1];
1185 vinfos[3].maxsolutions = _nj3;
1186 vinfos[4].jointtype = 1;
1187 vinfos[4].foffset = j4;
1188 vinfos[4].indices[0] = _ij4[0];
1189 vinfos[4].indices[1] = _ij4[1];
1190 vinfos[4].maxsolutions = _nj4;
1191 vinfos[5].jointtype = 1;
1192 vinfos[5].foffset = j5;
1193 vinfos[5].indices[0] = _ij5[0];
1194 vinfos[5].indices[1] = _ij5[1];
1195 vinfos[5].maxsolutions = _nj5;
1196 std::vector<int> vfree(0);
1204 if( bgotonextstatement )
1206 bool bgotonextstatement =
true;
1209 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((1.5707963267949)+j3)))), 6.28318530717959)));
1210 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
1212 bgotonextstatement=
false;
1214 IkReal j5array[1], cj5array[1], sj5array[1];
1215 bool j5valid[1]={
false};
1219 j5array[0]=
IKatan2(new_r11, ((-1.0)*new_r10));
1220 sj5array[0]=
IKsin(j5array[0]);
1221 cj5array[0]=
IKcos(j5array[0]);
1222 if( j5array[0] >
IKPI )
1226 else if( j5array[0] < -
IKPI )
1227 { j5array[0]+=
IK2PI;
1230 for(
int ij5 = 0; ij5 < 1; ++ij5)
1236 _ij5[0] = ij5; _ij5[1] = -1;
1237 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
1241 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
1244 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
1247 IkReal x123=
IKsin(j5);
1248 IkReal x124=
IKcos(j5);
1249 evalcond[0]=((-1.0)*x123);
1250 evalcond[1]=((-1.0)*x124);
1251 evalcond[2]=(x123+(((-1.0)*new_r11)));
1252 evalcond[3]=((((-1.0)*new_r10))+(((-1.0)*x124)));
1260 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
1261 vinfos[0].jointtype = 1;
1262 vinfos[0].foffset = j0;
1263 vinfos[0].indices[0] = _ij0[0];
1264 vinfos[0].indices[1] = _ij0[1];
1265 vinfos[0].maxsolutions = _nj0;
1266 vinfos[1].jointtype = 1;
1267 vinfos[1].foffset = j1;
1268 vinfos[1].indices[0] = _ij1[0];
1269 vinfos[1].indices[1] = _ij1[1];
1270 vinfos[1].maxsolutions = _nj1;
1271 vinfos[2].jointtype = 1;
1272 vinfos[2].foffset = j2;
1273 vinfos[2].indices[0] = _ij2[0];
1274 vinfos[2].indices[1] = _ij2[1];
1275 vinfos[2].maxsolutions = _nj2;
1276 vinfos[3].jointtype = 1;
1277 vinfos[3].foffset = j3;
1278 vinfos[3].indices[0] = _ij3[0];
1279 vinfos[3].indices[1] = _ij3[1];
1280 vinfos[3].maxsolutions = _nj3;
1281 vinfos[4].jointtype = 1;
1282 vinfos[4].foffset = j4;
1283 vinfos[4].indices[0] = _ij4[0];
1284 vinfos[4].indices[1] = _ij4[1];
1285 vinfos[4].maxsolutions = _nj4;
1286 vinfos[5].jointtype = 1;
1287 vinfos[5].foffset = j5;
1288 vinfos[5].indices[0] = _ij5[0];
1289 vinfos[5].indices[1] = _ij5[1];
1290 vinfos[5].maxsolutions = _nj5;
1291 std::vector<int> vfree(0);
1299 if( bgotonextstatement )
1301 bool bgotonextstatement =
true;
1304 IkReal x125=new_r22*new_r22;
1309 if(((x125*(x126.
value))) < -0.00001)
1312 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-1.0)+(
IKsign(sj3)))))+(
IKabs((cj3+(((-1.0)*gconst12)))))), 6.28318530717959)));
1313 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
1315 bgotonextstatement=
false;
1318 IkReal x127=new_r22*new_r22;
1323 if((((1.0)+(((-1.0)*(gconst12*gconst12))))) < -0.00001)
1325 sj3=
IKsqrt(((1.0)+(((-1.0)*(gconst12*gconst12)))));
1334 if(((x127*(x128.
value))) < -0.00001)
1337 j5eval[0]=((
IKabs(new_r00))+(
IKabs(new_r01)));
1338 if(
IKabs(j5eval[0]) < 0.0000010000000000 )
1341 IkReal j5array[1], cj5array[1], sj5array[1];
1342 bool j5valid[1]={
false};
1344 if((((1.0)+(((-1.0)*(gconst12*gconst12))))) < -0.00001)
1352 j5array[0]=
IKatan2(((((-1.0)*new_r11*(
IKsqrt(((1.0)+(((-1.0)*(gconst12*gconst12))))))))+(((-1.0)*gconst12*new_r01))), (new_r00*(x129.
value)));
1353 sj5array[0]=
IKsin(j5array[0]);
1354 cj5array[0]=
IKcos(j5array[0]);
1355 if( j5array[0] >
IKPI )
1359 else if( j5array[0] < -
IKPI )
1360 { j5array[0]+=
IK2PI;
1363 for(
int ij5 = 0; ij5 < 1; ++ij5)
1369 _ij5[0] = ij5; _ij5[1] = -1;
1370 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
1374 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
1377 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
1380 IkReal x130=
IKsin(j5);
1381 IkReal x131=
IKcos(j5);
1382 IkReal x132=((1.0)*x131);
1383 if((((1.0)+(((-1.0)*(gconst12*gconst12))))) < -0.00001)
1385 IkReal x133=
IKsqrt(((1.0)+(((-1.0)*(gconst12*gconst12)))));
1386 evalcond[0]=((-1.0)*x130);
1387 evalcond[1]=((-1.0)*x131);
1388 evalcond[2]=(((gconst12*x130))+new_r01);
1389 evalcond[3]=((((-1.0)*gconst12*x132))+new_r00);
1390 evalcond[4]=(((x130*x133))+new_r11);
1391 evalcond[5]=((((-1.0)*x132*x133))+new_r10);
1392 evalcond[6]=(((gconst12*new_r01))+x130+((new_r11*x133)));
1393 evalcond[7]=(((gconst12*new_r00))+(((-1.0)*x132))+((new_r10*x133)));
1401 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
1402 vinfos[0].jointtype = 1;
1403 vinfos[0].foffset = j0;
1404 vinfos[0].indices[0] = _ij0[0];
1405 vinfos[0].indices[1] = _ij0[1];
1406 vinfos[0].maxsolutions = _nj0;
1407 vinfos[1].jointtype = 1;
1408 vinfos[1].foffset = j1;
1409 vinfos[1].indices[0] = _ij1[0];
1410 vinfos[1].indices[1] = _ij1[1];
1411 vinfos[1].maxsolutions = _nj1;
1412 vinfos[2].jointtype = 1;
1413 vinfos[2].foffset = j2;
1414 vinfos[2].indices[0] = _ij2[0];
1415 vinfos[2].indices[1] = _ij2[1];
1416 vinfos[2].maxsolutions = _nj2;
1417 vinfos[3].jointtype = 1;
1418 vinfos[3].foffset = j3;
1419 vinfos[3].indices[0] = _ij3[0];
1420 vinfos[3].indices[1] = _ij3[1];
1421 vinfos[3].maxsolutions = _nj3;
1422 vinfos[4].jointtype = 1;
1423 vinfos[4].foffset = j4;
1424 vinfos[4].indices[0] = _ij4[0];
1425 vinfos[4].indices[1] = _ij4[1];
1426 vinfos[4].maxsolutions = _nj4;
1427 vinfos[5].jointtype = 1;
1428 vinfos[5].foffset = j5;
1429 vinfos[5].indices[0] = _ij5[0];
1430 vinfos[5].indices[1] = _ij5[1];
1431 vinfos[5].maxsolutions = _nj5;
1432 std::vector<int> vfree(0);
1441 IkReal j5array[1], cj5array[1], sj5array[1];
1442 bool j5valid[1]={
false};
1452 j5array[0]=((-1.5707963267949)+(x134.
value)+(((1.5707963267949)*(x135.
value))));
1453 sj5array[0]=
IKsin(j5array[0]);
1454 cj5array[0]=
IKcos(j5array[0]);
1455 if( j5array[0] >
IKPI )
1459 else if( j5array[0] < -
IKPI )
1460 { j5array[0]+=
IK2PI;
1463 for(
int ij5 = 0; ij5 < 1; ++ij5)
1469 _ij5[0] = ij5; _ij5[1] = -1;
1470 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
1474 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
1477 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
1480 IkReal x136=
IKsin(j5);
1481 IkReal x137=
IKcos(j5);
1482 IkReal x138=((1.0)*x137);
1483 if((((1.0)+(((-1.0)*(gconst12*gconst12))))) < -0.00001)
1485 IkReal x139=
IKsqrt(((1.0)+(((-1.0)*(gconst12*gconst12)))));
1486 evalcond[0]=((-1.0)*x136);
1487 evalcond[1]=((-1.0)*x137);
1488 evalcond[2]=(((gconst12*x136))+new_r01);
1489 evalcond[3]=((((-1.0)*gconst12*x138))+new_r00);
1490 evalcond[4]=(((x136*x139))+new_r11);
1491 evalcond[5]=((((-1.0)*x138*x139))+new_r10);
1492 evalcond[6]=(((gconst12*new_r01))+x136+((new_r11*x139)));
1493 evalcond[7]=(((gconst12*new_r00))+(((-1.0)*x138))+((new_r10*x139)));
1501 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
1502 vinfos[0].jointtype = 1;
1503 vinfos[0].foffset = j0;
1504 vinfos[0].indices[0] = _ij0[0];
1505 vinfos[0].indices[1] = _ij0[1];
1506 vinfos[0].maxsolutions = _nj0;
1507 vinfos[1].jointtype = 1;
1508 vinfos[1].foffset = j1;
1509 vinfos[1].indices[0] = _ij1[0];
1510 vinfos[1].indices[1] = _ij1[1];
1511 vinfos[1].maxsolutions = _nj1;
1512 vinfos[2].jointtype = 1;
1513 vinfos[2].foffset = j2;
1514 vinfos[2].indices[0] = _ij2[0];
1515 vinfos[2].indices[1] = _ij2[1];
1516 vinfos[2].maxsolutions = _nj2;
1517 vinfos[3].jointtype = 1;
1518 vinfos[3].foffset = j3;
1519 vinfos[3].indices[0] = _ij3[0];
1520 vinfos[3].indices[1] = _ij3[1];
1521 vinfos[3].maxsolutions = _nj3;
1522 vinfos[4].jointtype = 1;
1523 vinfos[4].foffset = j4;
1524 vinfos[4].indices[0] = _ij4[0];
1525 vinfos[4].indices[1] = _ij4[1];
1526 vinfos[4].maxsolutions = _nj4;
1527 vinfos[5].jointtype = 1;
1528 vinfos[5].foffset = j5;
1529 vinfos[5].indices[0] = _ij5[0];
1530 vinfos[5].indices[1] = _ij5[1];
1531 vinfos[5].maxsolutions = _nj5;
1532 std::vector<int> vfree(0);
1544 if( bgotonextstatement )
1546 bool bgotonextstatement =
true;
1549 IkReal x140=new_r22*new_r22;
1554 if(((x140*(x141.
value))) < -0.00001)
1557 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((1.0)+(
IKsign(sj3)))))+(
IKabs((cj3+(((-1.0)*gconst12)))))), 6.28318530717959)));
1558 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
1560 bgotonextstatement=
false;
1563 IkReal x142=new_r22*new_r22;
1568 if((((1.0)+(((-1.0)*(gconst12*gconst12))))) < -0.00001)
1570 sj3=((-1.0)*(
IKsqrt(((1.0)+(((-1.0)*(gconst12*gconst12)))))));
1574 j3=((-1.0)*(
IKacos(gconst12)));
1579 if(((x142*(x143.
value))) < -0.00001)
1582 j5eval[0]=((
IKabs(new_r00))+(
IKabs(new_r01)));
1583 if(
IKabs(j5eval[0]) < 0.0000010000000000 )
1586 IkReal j5array[1], cj5array[1], sj5array[1];
1587 bool j5valid[1]={
false};
1589 if((((1.0)+(((-1.0)*(gconst12*gconst12))))) < -0.00001)
1597 j5array[0]=
IKatan2((((new_r11*(
IKsqrt(((1.0)+(((-1.0)*(gconst12*gconst12))))))))+(((-1.0)*gconst12*new_r01))), (new_r00*(x144.
value)));
1598 sj5array[0]=
IKsin(j5array[0]);
1599 cj5array[0]=
IKcos(j5array[0]);
1600 if( j5array[0] >
IKPI )
1604 else if( j5array[0] < -
IKPI )
1605 { j5array[0]+=
IK2PI;
1608 for(
int ij5 = 0; ij5 < 1; ++ij5)
1614 _ij5[0] = ij5; _ij5[1] = -1;
1615 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
1619 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
1622 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
1625 IkReal x145=
IKsin(j5);
1626 IkReal x146=
IKcos(j5);
1627 IkReal x147=((1.0)*x146);
1628 if((((1.0)+(((-1.0)*(gconst12*gconst12))))) < -0.00001)
1630 IkReal x148=
IKsqrt(((1.0)+(((-1.0)*(gconst12*gconst12)))));
1631 IkReal x149=((1.0)*x148);
1632 evalcond[0]=((-1.0)*x145);
1633 evalcond[1]=((-1.0)*x146);
1634 evalcond[2]=(((gconst12*x145))+new_r01);
1635 evalcond[3]=((((-1.0)*gconst12*x147))+new_r00);
1636 evalcond[4]=(((x146*x148))+new_r10);
1637 evalcond[5]=((((-1.0)*x145*x149))+new_r11);
1638 evalcond[6]=(((gconst12*new_r01))+(((-1.0)*new_r11*x149))+x145);
1639 evalcond[7]=((((-1.0)*x147))+((gconst12*new_r00))+(((-1.0)*new_r10*x149)));
1647 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
1648 vinfos[0].jointtype = 1;
1649 vinfos[0].foffset = j0;
1650 vinfos[0].indices[0] = _ij0[0];
1651 vinfos[0].indices[1] = _ij0[1];
1652 vinfos[0].maxsolutions = _nj0;
1653 vinfos[1].jointtype = 1;
1654 vinfos[1].foffset = j1;
1655 vinfos[1].indices[0] = _ij1[0];
1656 vinfos[1].indices[1] = _ij1[1];
1657 vinfos[1].maxsolutions = _nj1;
1658 vinfos[2].jointtype = 1;
1659 vinfos[2].foffset = j2;
1660 vinfos[2].indices[0] = _ij2[0];
1661 vinfos[2].indices[1] = _ij2[1];
1662 vinfos[2].maxsolutions = _nj2;
1663 vinfos[3].jointtype = 1;
1664 vinfos[3].foffset = j3;
1665 vinfos[3].indices[0] = _ij3[0];
1666 vinfos[3].indices[1] = _ij3[1];
1667 vinfos[3].maxsolutions = _nj3;
1668 vinfos[4].jointtype = 1;
1669 vinfos[4].foffset = j4;
1670 vinfos[4].indices[0] = _ij4[0];
1671 vinfos[4].indices[1] = _ij4[1];
1672 vinfos[4].maxsolutions = _nj4;
1673 vinfos[5].jointtype = 1;
1674 vinfos[5].foffset = j5;
1675 vinfos[5].indices[0] = _ij5[0];
1676 vinfos[5].indices[1] = _ij5[1];
1677 vinfos[5].maxsolutions = _nj5;
1678 std::vector<int> vfree(0);
1687 IkReal j5array[1], cj5array[1], sj5array[1];
1688 bool j5valid[1]={
false};
1698 j5array[0]=((-1.5707963267949)+(x150.
value)+(((1.5707963267949)*(x151.
value))));
1699 sj5array[0]=
IKsin(j5array[0]);
1700 cj5array[0]=
IKcos(j5array[0]);
1701 if( j5array[0] >
IKPI )
1705 else if( j5array[0] < -
IKPI )
1706 { j5array[0]+=
IK2PI;
1709 for(
int ij5 = 0; ij5 < 1; ++ij5)
1715 _ij5[0] = ij5; _ij5[1] = -1;
1716 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
1720 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
1723 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
1726 IkReal x152=
IKsin(j5);
1727 IkReal x153=
IKcos(j5);
1728 IkReal x154=((1.0)*x153);
1729 if((((1.0)+(((-1.0)*(gconst12*gconst12))))) < -0.00001)
1731 IkReal x155=
IKsqrt(((1.0)+(((-1.0)*(gconst12*gconst12)))));
1732 IkReal x156=((1.0)*x155);
1733 evalcond[0]=((-1.0)*x152);
1734 evalcond[1]=((-1.0)*x153);
1735 evalcond[2]=(((gconst12*x152))+new_r01);
1736 evalcond[3]=(new_r00+(((-1.0)*gconst12*x154)));
1737 evalcond[4]=(((x153*x155))+new_r10);
1738 evalcond[5]=((((-1.0)*x152*x156))+new_r11);
1739 evalcond[6]=(((gconst12*new_r01))+x152+(((-1.0)*new_r11*x156)));
1740 evalcond[7]=(((gconst12*new_r00))+(((-1.0)*x154))+(((-1.0)*new_r10*x156)));
1748 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
1749 vinfos[0].jointtype = 1;
1750 vinfos[0].foffset = j0;
1751 vinfos[0].indices[0] = _ij0[0];
1752 vinfos[0].indices[1] = _ij0[1];
1753 vinfos[0].maxsolutions = _nj0;
1754 vinfos[1].jointtype = 1;
1755 vinfos[1].foffset = j1;
1756 vinfos[1].indices[0] = _ij1[0];
1757 vinfos[1].indices[1] = _ij1[1];
1758 vinfos[1].maxsolutions = _nj1;
1759 vinfos[2].jointtype = 1;
1760 vinfos[2].foffset = j2;
1761 vinfos[2].indices[0] = _ij2[0];
1762 vinfos[2].indices[1] = _ij2[1];
1763 vinfos[2].maxsolutions = _nj2;
1764 vinfos[3].jointtype = 1;
1765 vinfos[3].foffset = j3;
1766 vinfos[3].indices[0] = _ij3[0];
1767 vinfos[3].indices[1] = _ij3[1];
1768 vinfos[3].maxsolutions = _nj3;
1769 vinfos[4].jointtype = 1;
1770 vinfos[4].foffset = j4;
1771 vinfos[4].indices[0] = _ij4[0];
1772 vinfos[4].indices[1] = _ij4[1];
1773 vinfos[4].maxsolutions = _nj4;
1774 vinfos[5].jointtype = 1;
1775 vinfos[5].foffset = j5;
1776 vinfos[5].indices[0] = _ij5[0];
1777 vinfos[5].indices[1] = _ij5[1];
1778 vinfos[5].maxsolutions = _nj5;
1779 std::vector<int> vfree(0);
1791 if( bgotonextstatement )
1793 bool bgotonextstatement =
true;
1796 IkReal x157=new_r22*new_r22;
1801 if(((x157*(x158.
value))) < -0.00001)
1803 IkReal gconst13=((-1.0)*(
IKsqrt((x157*(x158.
value)))));
1804 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-1.0)+(
IKsign(sj3)))))+(
IKabs((cj3+(((-1.0)*gconst13)))))), 6.28318530717959)));
1805 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
1807 bgotonextstatement=
false;
1810 IkReal x159=new_r22*new_r22;
1815 if((((1.0)+(((-1.0)*(gconst13*gconst13))))) < -0.00001)
1817 sj3=
IKsqrt(((1.0)+(((-1.0)*(gconst13*gconst13)))));
1826 if(((x159*(x160.
value))) < -0.00001)
1828 IkReal gconst13=((-1.0)*(
IKsqrt((x159*(x160.
value)))));
1829 j5eval[0]=((
IKabs(new_r00))+(
IKabs(new_r01)));
1830 if(
IKabs(j5eval[0]) < 0.0000010000000000 )
1833 IkReal j5array[1], cj5array[1], sj5array[1];
1834 bool j5valid[1]={
false};
1836 if((((1.0)+(((-1.0)*(gconst13*gconst13))))) < -0.00001)
1844 j5array[0]=
IKatan2(((((-1.0)*gconst13*new_r01))+(((-1.0)*new_r11*(
IKsqrt(((1.0)+(((-1.0)*(gconst13*gconst13))))))))), (new_r00*(x161.
value)));
1845 sj5array[0]=
IKsin(j5array[0]);
1846 cj5array[0]=
IKcos(j5array[0]);
1847 if( j5array[0] >
IKPI )
1851 else if( j5array[0] < -
IKPI )
1852 { j5array[0]+=
IK2PI;
1855 for(
int ij5 = 0; ij5 < 1; ++ij5)
1861 _ij5[0] = ij5; _ij5[1] = -1;
1862 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
1866 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
1869 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
1872 IkReal x162=
IKsin(j5);
1873 IkReal x163=
IKcos(j5);
1874 IkReal x164=((1.0)*x163);
1875 if((((1.0)+(((-1.0)*(gconst13*gconst13))))) < -0.00001)
1877 IkReal x165=
IKsqrt(((1.0)+(((-1.0)*(gconst13*gconst13)))));
1878 evalcond[0]=((-1.0)*x162);
1879 evalcond[1]=((-1.0)*x163);
1880 evalcond[2]=(new_r01+((gconst13*x162)));
1881 evalcond[3]=(new_r00+(((-1.0)*gconst13*x164)));
1882 evalcond[4]=(((x162*x165))+new_r11);
1883 evalcond[5]=(new_r10+(((-1.0)*x164*x165)));
1884 evalcond[6]=(((new_r11*x165))+x162+((gconst13*new_r01)));
1885 evalcond[7]=((((-1.0)*x164))+((new_r10*x165))+((gconst13*new_r00)));
1893 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
1894 vinfos[0].jointtype = 1;
1895 vinfos[0].foffset = j0;
1896 vinfos[0].indices[0] = _ij0[0];
1897 vinfos[0].indices[1] = _ij0[1];
1898 vinfos[0].maxsolutions = _nj0;
1899 vinfos[1].jointtype = 1;
1900 vinfos[1].foffset = j1;
1901 vinfos[1].indices[0] = _ij1[0];
1902 vinfos[1].indices[1] = _ij1[1];
1903 vinfos[1].maxsolutions = _nj1;
1904 vinfos[2].jointtype = 1;
1905 vinfos[2].foffset = j2;
1906 vinfos[2].indices[0] = _ij2[0];
1907 vinfos[2].indices[1] = _ij2[1];
1908 vinfos[2].maxsolutions = _nj2;
1909 vinfos[3].jointtype = 1;
1910 vinfos[3].foffset = j3;
1911 vinfos[3].indices[0] = _ij3[0];
1912 vinfos[3].indices[1] = _ij3[1];
1913 vinfos[3].maxsolutions = _nj3;
1914 vinfos[4].jointtype = 1;
1915 vinfos[4].foffset = j4;
1916 vinfos[4].indices[0] = _ij4[0];
1917 vinfos[4].indices[1] = _ij4[1];
1918 vinfos[4].maxsolutions = _nj4;
1919 vinfos[5].jointtype = 1;
1920 vinfos[5].foffset = j5;
1921 vinfos[5].indices[0] = _ij5[0];
1922 vinfos[5].indices[1] = _ij5[1];
1923 vinfos[5].maxsolutions = _nj5;
1924 std::vector<int> vfree(0);
1933 IkReal j5array[1], cj5array[1], sj5array[1];
1934 bool j5valid[1]={
false};
1944 j5array[0]=((-1.5707963267949)+(x166.
value)+(((1.5707963267949)*(x167.
value))));
1945 sj5array[0]=
IKsin(j5array[0]);
1946 cj5array[0]=
IKcos(j5array[0]);
1947 if( j5array[0] >
IKPI )
1951 else if( j5array[0] < -
IKPI )
1952 { j5array[0]+=
IK2PI;
1955 for(
int ij5 = 0; ij5 < 1; ++ij5)
1961 _ij5[0] = ij5; _ij5[1] = -1;
1962 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
1966 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
1969 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
1972 IkReal x168=
IKsin(j5);
1973 IkReal x169=
IKcos(j5);
1974 IkReal x170=((1.0)*x169);
1975 if((((1.0)+(((-1.0)*(gconst13*gconst13))))) < -0.00001)
1977 IkReal x171=
IKsqrt(((1.0)+(((-1.0)*(gconst13*gconst13)))));
1978 evalcond[0]=((-1.0)*x168);
1979 evalcond[1]=((-1.0)*x169);
1980 evalcond[2]=(new_r01+((gconst13*x168)));
1981 evalcond[3]=((((-1.0)*gconst13*x170))+new_r00);
1982 evalcond[4]=(((x168*x171))+new_r11);
1983 evalcond[5]=((((-1.0)*x170*x171))+new_r10);
1984 evalcond[6]=(((new_r11*x171))+x168+((gconst13*new_r01)));
1985 evalcond[7]=(((new_r10*x171))+(((-1.0)*x170))+((gconst13*new_r00)));
1993 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
1994 vinfos[0].jointtype = 1;
1995 vinfos[0].foffset = j0;
1996 vinfos[0].indices[0] = _ij0[0];
1997 vinfos[0].indices[1] = _ij0[1];
1998 vinfos[0].maxsolutions = _nj0;
1999 vinfos[1].jointtype = 1;
2000 vinfos[1].foffset = j1;
2001 vinfos[1].indices[0] = _ij1[0];
2002 vinfos[1].indices[1] = _ij1[1];
2003 vinfos[1].maxsolutions = _nj1;
2004 vinfos[2].jointtype = 1;
2005 vinfos[2].foffset = j2;
2006 vinfos[2].indices[0] = _ij2[0];
2007 vinfos[2].indices[1] = _ij2[1];
2008 vinfos[2].maxsolutions = _nj2;
2009 vinfos[3].jointtype = 1;
2010 vinfos[3].foffset = j3;
2011 vinfos[3].indices[0] = _ij3[0];
2012 vinfos[3].indices[1] = _ij3[1];
2013 vinfos[3].maxsolutions = _nj3;
2014 vinfos[4].jointtype = 1;
2015 vinfos[4].foffset = j4;
2016 vinfos[4].indices[0] = _ij4[0];
2017 vinfos[4].indices[1] = _ij4[1];
2018 vinfos[4].maxsolutions = _nj4;
2019 vinfos[5].jointtype = 1;
2020 vinfos[5].foffset = j5;
2021 vinfos[5].indices[0] = _ij5[0];
2022 vinfos[5].indices[1] = _ij5[1];
2023 vinfos[5].maxsolutions = _nj5;
2024 std::vector<int> vfree(0);
2036 if( bgotonextstatement )
2038 bool bgotonextstatement =
true;
2041 IkReal x172=new_r22*new_r22;
2046 if(((x172*(x173.
value))) < -0.00001)
2048 IkReal gconst13=((-1.0)*(
IKsqrt((x172*(x173.
value)))));
2049 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs((cj3+(((-1.0)*gconst13)))))+(
IKabs(((1.0)+(
IKsign(sj3)))))), 6.28318530717959)));
2050 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
2052 bgotonextstatement=
false;
2055 IkReal x174=new_r22*new_r22;
2060 if((((1.0)+(((-1.0)*(gconst13*gconst13))))) < -0.00001)
2062 sj3=((-1.0)*(
IKsqrt(((1.0)+(((-1.0)*(gconst13*gconst13)))))));
2066 j3=((-1.0)*(
IKacos(gconst13)));
2071 if(((x174*(x175.
value))) < -0.00001)
2073 IkReal gconst13=((-1.0)*(
IKsqrt((x174*(x175.
value)))));
2074 j5eval[0]=((
IKabs(new_r00))+(
IKabs(new_r01)));
2075 if(
IKabs(j5eval[0]) < 0.0000010000000000 )
2078 IkReal j5array[1], cj5array[1], sj5array[1];
2079 bool j5valid[1]={
false};
2081 if((((1.0)+(((-1.0)*(gconst13*gconst13))))) < -0.00001)
2089 j5array[0]=
IKatan2(((((-1.0)*gconst13*new_r01))+((new_r11*(
IKsqrt(((1.0)+(((-1.0)*(gconst13*gconst13))))))))), (new_r00*(x176.
value)));
2090 sj5array[0]=
IKsin(j5array[0]);
2091 cj5array[0]=
IKcos(j5array[0]);
2092 if( j5array[0] >
IKPI )
2096 else if( j5array[0] < -
IKPI )
2097 { j5array[0]+=
IK2PI;
2100 for(
int ij5 = 0; ij5 < 1; ++ij5)
2106 _ij5[0] = ij5; _ij5[1] = -1;
2107 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
2111 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
2114 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
2117 IkReal x177=
IKsin(j5);
2118 IkReal x178=
IKcos(j5);
2119 IkReal x179=((1.0)*x178);
2120 if((((1.0)+(((-1.0)*(gconst13*gconst13))))) < -0.00001)
2122 IkReal x180=
IKsqrt(((1.0)+(((-1.0)*(gconst13*gconst13)))));
2123 IkReal x181=((1.0)*x180);
2124 evalcond[0]=((-1.0)*x177);
2125 evalcond[1]=((-1.0)*x178);
2126 evalcond[2]=(new_r01+((gconst13*x177)));
2127 evalcond[3]=((((-1.0)*gconst13*x179))+new_r00);
2128 evalcond[4]=(((x178*x180))+new_r10);
2129 evalcond[5]=((((-1.0)*x177*x181))+new_r11);
2130 evalcond[6]=(x177+(((-1.0)*new_r11*x181))+((gconst13*new_r01)));
2131 evalcond[7]=((((-1.0)*x179))+((gconst13*new_r00))+(((-1.0)*new_r10*x181)));
2139 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
2140 vinfos[0].jointtype = 1;
2141 vinfos[0].foffset = j0;
2142 vinfos[0].indices[0] = _ij0[0];
2143 vinfos[0].indices[1] = _ij0[1];
2144 vinfos[0].maxsolutions = _nj0;
2145 vinfos[1].jointtype = 1;
2146 vinfos[1].foffset = j1;
2147 vinfos[1].indices[0] = _ij1[0];
2148 vinfos[1].indices[1] = _ij1[1];
2149 vinfos[1].maxsolutions = _nj1;
2150 vinfos[2].jointtype = 1;
2151 vinfos[2].foffset = j2;
2152 vinfos[2].indices[0] = _ij2[0];
2153 vinfos[2].indices[1] = _ij2[1];
2154 vinfos[2].maxsolutions = _nj2;
2155 vinfos[3].jointtype = 1;
2156 vinfos[3].foffset = j3;
2157 vinfos[3].indices[0] = _ij3[0];
2158 vinfos[3].indices[1] = _ij3[1];
2159 vinfos[3].maxsolutions = _nj3;
2160 vinfos[4].jointtype = 1;
2161 vinfos[4].foffset = j4;
2162 vinfos[4].indices[0] = _ij4[0];
2163 vinfos[4].indices[1] = _ij4[1];
2164 vinfos[4].maxsolutions = _nj4;
2165 vinfos[5].jointtype = 1;
2166 vinfos[5].foffset = j5;
2167 vinfos[5].indices[0] = _ij5[0];
2168 vinfos[5].indices[1] = _ij5[1];
2169 vinfos[5].maxsolutions = _nj5;
2170 std::vector<int> vfree(0);
2179 IkReal j5array[1], cj5array[1], sj5array[1];
2180 bool j5valid[1]={
false};
2190 j5array[0]=((-1.5707963267949)+(x182.
value)+(((1.5707963267949)*(x183.
value))));
2191 sj5array[0]=
IKsin(j5array[0]);
2192 cj5array[0]=
IKcos(j5array[0]);
2193 if( j5array[0] >
IKPI )
2197 else if( j5array[0] < -
IKPI )
2198 { j5array[0]+=
IK2PI;
2201 for(
int ij5 = 0; ij5 < 1; ++ij5)
2207 _ij5[0] = ij5; _ij5[1] = -1;
2208 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
2212 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
2215 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
2218 IkReal x184=
IKsin(j5);
2219 IkReal x185=
IKcos(j5);
2220 IkReal x186=((1.0)*x185);
2221 if((((1.0)+(((-1.0)*(gconst13*gconst13))))) < -0.00001)
2223 IkReal x187=
IKsqrt(((1.0)+(((-1.0)*(gconst13*gconst13)))));
2224 IkReal x188=((1.0)*x187);
2225 evalcond[0]=((-1.0)*x184);
2226 evalcond[1]=((-1.0)*x185);
2227 evalcond[2]=(((gconst13*x184))+new_r01);
2228 evalcond[3]=((((-1.0)*gconst13*x186))+new_r00);
2229 evalcond[4]=(((x185*x187))+new_r10);
2230 evalcond[5]=((((-1.0)*x184*x188))+new_r11);
2231 evalcond[6]=(x184+(((-1.0)*new_r11*x188))+((gconst13*new_r01)));
2232 evalcond[7]=((((-1.0)*x186))+((gconst13*new_r00))+(((-1.0)*new_r10*x188)));
2240 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
2241 vinfos[0].jointtype = 1;
2242 vinfos[0].foffset = j0;
2243 vinfos[0].indices[0] = _ij0[0];
2244 vinfos[0].indices[1] = _ij0[1];
2245 vinfos[0].maxsolutions = _nj0;
2246 vinfos[1].jointtype = 1;
2247 vinfos[1].foffset = j1;
2248 vinfos[1].indices[0] = _ij1[0];
2249 vinfos[1].indices[1] = _ij1[1];
2250 vinfos[1].maxsolutions = _nj1;
2251 vinfos[2].jointtype = 1;
2252 vinfos[2].foffset = j2;
2253 vinfos[2].indices[0] = _ij2[0];
2254 vinfos[2].indices[1] = _ij2[1];
2255 vinfos[2].maxsolutions = _nj2;
2256 vinfos[3].jointtype = 1;
2257 vinfos[3].foffset = j3;
2258 vinfos[3].indices[0] = _ij3[0];
2259 vinfos[3].indices[1] = _ij3[1];
2260 vinfos[3].maxsolutions = _nj3;
2261 vinfos[4].jointtype = 1;
2262 vinfos[4].foffset = j4;
2263 vinfos[4].indices[0] = _ij4[0];
2264 vinfos[4].indices[1] = _ij4[1];
2265 vinfos[4].maxsolutions = _nj4;
2266 vinfos[5].jointtype = 1;
2267 vinfos[5].foffset = j5;
2268 vinfos[5].indices[0] = _ij5[0];
2269 vinfos[5].indices[1] = _ij5[1];
2270 vinfos[5].maxsolutions = _nj5;
2271 std::vector<int> vfree(0);
2283 if( bgotonextstatement )
2285 bool bgotonextstatement =
true;
2290 bgotonextstatement=
false;
2295 if( bgotonextstatement )
2309 IkReal j5array[1], cj5array[1], sj5array[1];
2310 bool j5valid[1]={
false};
2312 IkReal x189=((1.0)*new_r22);
2313 IkReal x190=(cj3*new_r01);
2320 j5array[0]=
IKatan2(((((-1.0)*x190))+(((-1.0)*new_r11*sj3))), ((x191.
value)*(((((-1.0)*new_r11*x189))+((new_r11*new_r22*(cj3*cj3)))+new_r00+(((-1.0)*sj3*x189*x190))))));
2321 sj5array[0]=
IKsin(j5array[0]);
2322 cj5array[0]=
IKcos(j5array[0]);
2323 if( j5array[0] >
IKPI )
2327 else if( j5array[0] < -
IKPI )
2328 { j5array[0]+=
IK2PI;
2331 for(
int ij5 = 0; ij5 < 1; ++ij5)
2337 _ij5[0] = ij5; _ij5[1] = -1;
2338 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
2342 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
2345 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
2347 IkReal evalcond[10];
2348 IkReal x192=
IKsin(j5);
2349 IkReal x193=
IKcos(j5);
2350 IkReal x194=((1.0)*cj3);
2351 IkReal x195=((1.0)*sj3);
2352 IkReal x196=(cj3*new_r10);
2353 IkReal x197=(cj3*new_r11);
2354 IkReal x198=((1.0)*x193);
2355 IkReal x199=(new_r22*x193);
2356 IkReal x200=(sj3*x192);
2357 IkReal x201=(new_r22*x192);
2358 evalcond[0]=(((new_r11*sj3))+x192+((cj3*new_r01)));
2359 evalcond[1]=(((new_r10*sj3))+(((-1.0)*x198))+((cj3*new_r00)));
2360 evalcond[2]=(((sj3*x199))+((cj3*x192))+new_r01);
2361 evalcond[3]=(((new_r22*x200))+new_r00+(((-1.0)*x193*x194)));
2362 evalcond[4]=((((-1.0)*x194*x199))+x200+new_r11);
2363 evalcond[5]=(x196+(((-1.0)*new_r00*x195))+(((-1.0)*x201)));
2364 evalcond[6]=((((-1.0)*new_r22*x198))+x197+(((-1.0)*new_r01*x195)));
2365 evalcond[7]=((((-1.0)*x194*x201))+new_r10+(((-1.0)*x193*x195)));
2366 evalcond[8]=((((-1.0)*new_r00*new_r22*x195))+(((-1.0)*x192))+((new_r22*x196)));
2367 evalcond[9]=((((-1.0)*x198))+((new_r22*x197))+(((-1.0)*new_r01*new_r22*x195)));
2375 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
2376 vinfos[0].jointtype = 1;
2377 vinfos[0].foffset = j0;
2378 vinfos[0].indices[0] = _ij0[0];
2379 vinfos[0].indices[1] = _ij0[1];
2380 vinfos[0].maxsolutions = _nj0;
2381 vinfos[1].jointtype = 1;
2382 vinfos[1].foffset = j1;
2383 vinfos[1].indices[0] = _ij1[0];
2384 vinfos[1].indices[1] = _ij1[1];
2385 vinfos[1].maxsolutions = _nj1;
2386 vinfos[2].jointtype = 1;
2387 vinfos[2].foffset = j2;
2388 vinfos[2].indices[0] = _ij2[0];
2389 vinfos[2].indices[1] = _ij2[1];
2390 vinfos[2].maxsolutions = _nj2;
2391 vinfos[3].jointtype = 1;
2392 vinfos[3].foffset = j3;
2393 vinfos[3].indices[0] = _ij3[0];
2394 vinfos[3].indices[1] = _ij3[1];
2395 vinfos[3].maxsolutions = _nj3;
2396 vinfos[4].jointtype = 1;
2397 vinfos[4].foffset = j4;
2398 vinfos[4].indices[0] = _ij4[0];
2399 vinfos[4].indices[1] = _ij4[1];
2400 vinfos[4].maxsolutions = _nj4;
2401 vinfos[5].jointtype = 1;
2402 vinfos[5].foffset = j5;
2403 vinfos[5].indices[0] = _ij5[0];
2404 vinfos[5].indices[1] = _ij5[1];
2405 vinfos[5].maxsolutions = _nj5;
2406 std::vector<int> vfree(0);
2419 IkReal j5array[1], cj5array[1], sj5array[1];
2420 bool j5valid[1]={
false};
2422 IkReal x202=((1.0)*new_r01);
2429 j5array[0]=
IKatan2(((((-1.0)*new_r11*sj3))+(((-1.0)*cj3*x202))), ((x203.
value)*((((cj3*new_r11))+(((-1.0)*sj3*x202))))));
2430 sj5array[0]=
IKsin(j5array[0]);
2431 cj5array[0]=
IKcos(j5array[0]);
2432 if( j5array[0] >
IKPI )
2436 else if( j5array[0] < -
IKPI )
2437 { j5array[0]+=
IK2PI;
2440 for(
int ij5 = 0; ij5 < 1; ++ij5)
2446 _ij5[0] = ij5; _ij5[1] = -1;
2447 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
2451 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
2454 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
2456 IkReal evalcond[10];
2457 IkReal x204=
IKsin(j5);
2458 IkReal x205=
IKcos(j5);
2459 IkReal x206=((1.0)*cj3);
2460 IkReal x207=((1.0)*sj3);
2461 IkReal x208=(cj3*new_r10);
2462 IkReal x209=(cj3*new_r11);
2463 IkReal x210=((1.0)*x205);
2464 IkReal x211=(new_r22*x205);
2465 IkReal x212=(sj3*x204);
2466 IkReal x213=(new_r22*x204);
2467 evalcond[0]=(((new_r11*sj3))+x204+((cj3*new_r01)));
2468 evalcond[1]=(((new_r10*sj3))+((cj3*new_r00))+(((-1.0)*x210)));
2469 evalcond[2]=(((cj3*x204))+((sj3*x211))+new_r01);
2470 evalcond[3]=(((new_r22*x212))+(((-1.0)*x205*x206))+new_r00);
2471 evalcond[4]=((((-1.0)*x206*x211))+x212+new_r11);
2472 evalcond[5]=((((-1.0)*new_r00*x207))+x208+(((-1.0)*x213)));
2473 evalcond[6]=(x209+(((-1.0)*new_r22*x210))+(((-1.0)*new_r01*x207)));
2474 evalcond[7]=((((-1.0)*x206*x213))+(((-1.0)*x205*x207))+new_r10);
2475 evalcond[8]=(((new_r22*x208))+(((-1.0)*new_r00*new_r22*x207))+(((-1.0)*x204)));
2476 evalcond[9]=((((-1.0)*new_r01*new_r22*x207))+((new_r22*x209))+(((-1.0)*x210)));
2484 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
2485 vinfos[0].jointtype = 1;
2486 vinfos[0].foffset = j0;
2487 vinfos[0].indices[0] = _ij0[0];
2488 vinfos[0].indices[1] = _ij0[1];
2489 vinfos[0].maxsolutions = _nj0;
2490 vinfos[1].jointtype = 1;
2491 vinfos[1].foffset = j1;
2492 vinfos[1].indices[0] = _ij1[0];
2493 vinfos[1].indices[1] = _ij1[1];
2494 vinfos[1].maxsolutions = _nj1;
2495 vinfos[2].jointtype = 1;
2496 vinfos[2].foffset = j2;
2497 vinfos[2].indices[0] = _ij2[0];
2498 vinfos[2].indices[1] = _ij2[1];
2499 vinfos[2].maxsolutions = _nj2;
2500 vinfos[3].jointtype = 1;
2501 vinfos[3].foffset = j3;
2502 vinfos[3].indices[0] = _ij3[0];
2503 vinfos[3].indices[1] = _ij3[1];
2504 vinfos[3].maxsolutions = _nj3;
2505 vinfos[4].jointtype = 1;
2506 vinfos[4].foffset = j4;
2507 vinfos[4].indices[0] = _ij4[0];
2508 vinfos[4].indices[1] = _ij4[1];
2509 vinfos[4].maxsolutions = _nj4;
2510 vinfos[5].jointtype = 1;
2511 vinfos[5].foffset = j5;
2512 vinfos[5].indices[0] = _ij5[0];
2513 vinfos[5].indices[1] = _ij5[1];
2514 vinfos[5].maxsolutions = _nj5;
2515 std::vector<int> vfree(0);
2528 IkReal j5array[1], cj5array[1], sj5array[1];
2529 bool j5valid[1]={
false};
2531 IkReal x214=cj3*cj3;
2532 IkReal x215=new_r22*new_r22;
2533 IkReal x216=(new_r22*sj3);
2542 j5array[0]=((-1.5707963267949)+(((1.5707963267949)*(x217.
value)))+(x218.
value));
2543 sj5array[0]=
IKsin(j5array[0]);
2544 cj5array[0]=
IKcos(j5array[0]);
2545 if( j5array[0] >
IKPI )
2549 else if( j5array[0] < -
IKPI )
2550 { j5array[0]+=
IK2PI;
2553 for(
int ij5 = 0; ij5 < 1; ++ij5)
2559 _ij5[0] = ij5; _ij5[1] = -1;
2560 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
2564 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
2567 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
2569 IkReal evalcond[10];
2570 IkReal x219=
IKsin(j5);
2571 IkReal x220=
IKcos(j5);
2572 IkReal x221=((1.0)*cj3);
2573 IkReal x222=((1.0)*sj3);
2574 IkReal x223=(cj3*new_r10);
2575 IkReal x224=(cj3*new_r11);
2576 IkReal x225=((1.0)*x220);
2577 IkReal x226=(new_r22*x220);
2578 IkReal x227=(sj3*x219);
2579 IkReal x228=(new_r22*x219);
2580 evalcond[0]=(((new_r11*sj3))+x219+((cj3*new_r01)));
2581 evalcond[1]=(((new_r10*sj3))+((cj3*new_r00))+(((-1.0)*x225)));
2582 evalcond[2]=(((cj3*x219))+((sj3*x226))+new_r01);
2583 evalcond[3]=((((-1.0)*x220*x221))+((new_r22*x227))+new_r00);
2584 evalcond[4]=(x227+(((-1.0)*x221*x226))+new_r11);
2585 evalcond[5]=(x223+(((-1.0)*new_r00*x222))+(((-1.0)*x228)));
2586 evalcond[6]=((((-1.0)*new_r01*x222))+x224+(((-1.0)*new_r22*x225)));
2587 evalcond[7]=((((-1.0)*x220*x222))+(((-1.0)*x221*x228))+new_r10);
2588 evalcond[8]=((((-1.0)*new_r00*new_r22*x222))+(((-1.0)*x219))+((new_r22*x223)));
2589 evalcond[9]=((((-1.0)*new_r01*new_r22*x222))+((new_r22*x224))+(((-1.0)*x225)));
2597 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
2598 vinfos[0].jointtype = 1;
2599 vinfos[0].foffset = j0;
2600 vinfos[0].indices[0] = _ij0[0];
2601 vinfos[0].indices[1] = _ij0[1];
2602 vinfos[0].maxsolutions = _nj0;
2603 vinfos[1].jointtype = 1;
2604 vinfos[1].foffset = j1;
2605 vinfos[1].indices[0] = _ij1[0];
2606 vinfos[1].indices[1] = _ij1[1];
2607 vinfos[1].maxsolutions = _nj1;
2608 vinfos[2].jointtype = 1;
2609 vinfos[2].foffset = j2;
2610 vinfos[2].indices[0] = _ij2[0];
2611 vinfos[2].indices[1] = _ij2[1];
2612 vinfos[2].maxsolutions = _nj2;
2613 vinfos[3].jointtype = 1;
2614 vinfos[3].foffset = j3;
2615 vinfos[3].indices[0] = _ij3[0];
2616 vinfos[3].indices[1] = _ij3[1];
2617 vinfos[3].maxsolutions = _nj3;
2618 vinfos[4].jointtype = 1;
2619 vinfos[4].foffset = j4;
2620 vinfos[4].indices[0] = _ij4[0];
2621 vinfos[4].indices[1] = _ij4[1];
2622 vinfos[4].maxsolutions = _nj4;
2623 vinfos[5].jointtype = 1;
2624 vinfos[5].foffset = j5;
2625 vinfos[5].indices[0] = _ij5[0];
2626 vinfos[5].indices[1] = _ij5[1];
2627 vinfos[5].maxsolutions = _nj5;
2628 std::vector<int> vfree(0);
2645 if( bgotonextstatement )
2647 bool bgotonextstatement =
true;
2652 bgotonextstatement=
false;
2657 if( bgotonextstatement )
2668 IkReal j3array[1], cj3array[1], sj3array[1];
2669 bool j3valid[1]={
false};
2675 IkReal x229=x230.
value;
2682 j3array[0]=
IKatan2((x229*(x231.
value)*(((1.0)+(((-1.0)*(cj4*cj4)))+(((-1.0)*(new_r12*new_r12)))))), ((-1.0)*new_r12*x229));
2683 sj3array[0]=
IKsin(j3array[0]);
2684 cj3array[0]=
IKcos(j3array[0]);
2685 if( j3array[0] >
IKPI )
2689 else if( j3array[0] < -
IKPI )
2690 { j3array[0]+=
IK2PI;
2693 for(
int ij3 = 0; ij3 < 1; ++ij3)
2699 _ij3[0] = ij3; _ij3[1] = -1;
2700 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
2704 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
2707 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
2710 IkReal x232=
IKsin(j3);
2711 IkReal x233=
IKcos(j3);
2712 IkReal x234=((1.0)*cj4);
2713 IkReal x235=((1.0)*sj4);
2714 IkReal x236=(new_r02*x232);
2715 IkReal x237=(new_r12*x233);
2716 IkReal x238=(sj4*x233);
2717 evalcond[0]=(x238+new_r12);
2718 evalcond[1]=(new_r02+(((-1.0)*x232*x235)));
2719 evalcond[2]=(((new_r02*x233))+((new_r12*x232)));
2720 evalcond[3]=(sj4+x237+(((-1.0)*x236)));
2721 evalcond[4]=(((new_r22*sj4))+((cj4*x237))+(((-1.0)*x234*x236)));
2722 evalcond[5]=(((new_r10*x238))+(((-1.0)*new_r20*x234))+(((-1.0)*new_r00*x232*x235)));
2723 evalcond[6]=((((-1.0)*new_r01*x232*x235))+(((-1.0)*new_r21*x234))+((new_r11*x238)));
2724 evalcond[7]=((1.0)+(((-1.0)*new_r22*x234))+(((-1.0)*x235*x236))+((sj4*x237)));
2735 j5eval[2]=((
IKabs(new_r20))+(
IKabs(new_r21)));
2736 if(
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000 ||
IKabs(j5eval[2]) < 0.0000010000000000 )
2742 if(
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000 )
2749 if(
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000 ||
IKabs(j5eval[2]) < 0.0000010000000000 )
2753 bool bgotonextstatement =
true;
2756 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(j4))), 6.28318530717959)));
2757 evalcond[1]=new_r12;
2758 evalcond[2]=new_r02;
2759 evalcond[3]=new_r20;
2760 evalcond[4]=new_r21;
2761 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 &&
IKabs(evalcond[2]) < 0.0000050000000000 &&
IKabs(evalcond[3]) < 0.0000050000000000 &&
IKabs(evalcond[4]) < 0.0000050000000000 )
2763 bgotonextstatement=
false;
2765 IkReal j5array[1], cj5array[1], sj5array[1];
2766 bool j5valid[1]={
false};
2768 IkReal x239=((1.0)*new_r01);
2771 j5array[0]=
IKatan2(((((-1.0)*cj3*x239))+(((-1.0)*new_r00*sj3))), (((cj3*new_r00))+(((-1.0)*sj3*x239))));
2772 sj5array[0]=
IKsin(j5array[0]);
2773 cj5array[0]=
IKcos(j5array[0]);
2774 if( j5array[0] >
IKPI )
2778 else if( j5array[0] < -
IKPI )
2779 { j5array[0]+=
IK2PI;
2782 for(
int ij5 = 0; ij5 < 1; ++ij5)
2788 _ij5[0] = ij5; _ij5[1] = -1;
2789 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
2793 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
2796 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
2799 IkReal x240=
IKsin(j5);
2800 IkReal x241=
IKcos(j5);
2801 IkReal x242=((1.0)*sj3);
2802 IkReal x243=(sj3*x240);
2803 IkReal x244=((1.0)*x241);
2804 IkReal x245=((1.0)*x240);
2805 IkReal x246=(cj3*x244);
2806 evalcond[0]=(((new_r11*sj3))+x240+((cj3*new_r01)));
2807 evalcond[1]=(((new_r10*sj3))+((cj3*new_r00))+(((-1.0)*x244)));
2808 evalcond[2]=(((sj3*x241))+new_r01+((cj3*x240)));
2809 evalcond[3]=(x243+(((-1.0)*x246))+new_r00);
2810 evalcond[4]=(x243+(((-1.0)*x246))+new_r11);
2811 evalcond[5]=((((-1.0)*new_r00*x242))+((cj3*new_r10))+(((-1.0)*x245)));
2812 evalcond[6]=((((-1.0)*new_r01*x242))+((cj3*new_r11))+(((-1.0)*x244)));
2813 evalcond[7]=((((-1.0)*x241*x242))+(((-1.0)*cj3*x245))+new_r10);
2821 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
2822 vinfos[0].jointtype = 1;
2823 vinfos[0].foffset = j0;
2824 vinfos[0].indices[0] = _ij0[0];
2825 vinfos[0].indices[1] = _ij0[1];
2826 vinfos[0].maxsolutions = _nj0;
2827 vinfos[1].jointtype = 1;
2828 vinfos[1].foffset = j1;
2829 vinfos[1].indices[0] = _ij1[0];
2830 vinfos[1].indices[1] = _ij1[1];
2831 vinfos[1].maxsolutions = _nj1;
2832 vinfos[2].jointtype = 1;
2833 vinfos[2].foffset = j2;
2834 vinfos[2].indices[0] = _ij2[0];
2835 vinfos[2].indices[1] = _ij2[1];
2836 vinfos[2].maxsolutions = _nj2;
2837 vinfos[3].jointtype = 1;
2838 vinfos[3].foffset = j3;
2839 vinfos[3].indices[0] = _ij3[0];
2840 vinfos[3].indices[1] = _ij3[1];
2841 vinfos[3].maxsolutions = _nj3;
2842 vinfos[4].jointtype = 1;
2843 vinfos[4].foffset = j4;
2844 vinfos[4].indices[0] = _ij4[0];
2845 vinfos[4].indices[1] = _ij4[1];
2846 vinfos[4].maxsolutions = _nj4;
2847 vinfos[5].jointtype = 1;
2848 vinfos[5].foffset = j5;
2849 vinfos[5].indices[0] = _ij5[0];
2850 vinfos[5].indices[1] = _ij5[1];
2851 vinfos[5].maxsolutions = _nj5;
2852 std::vector<int> vfree(0);
2860 if( bgotonextstatement )
2862 bool bgotonextstatement =
true;
2865 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-3.14159265358979)+j4)))), 6.28318530717959)));
2866 evalcond[1]=new_r12;
2867 evalcond[2]=new_r02;
2868 evalcond[3]=new_r20;
2869 evalcond[4]=new_r21;
2870 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 &&
IKabs(evalcond[2]) < 0.0000050000000000 &&
IKabs(evalcond[3]) < 0.0000050000000000 &&
IKabs(evalcond[4]) < 0.0000050000000000 )
2872 bgotonextstatement=
false;
2874 IkReal j5array[1], cj5array[1], sj5array[1];
2875 bool j5valid[1]={
false};
2877 IkReal x247=((1.0)*cj3);
2880 j5array[0]=
IKatan2(((((-1.0)*new_r01*x247))+(((-1.0)*new_r11*sj3))), (((new_r01*sj3))+(((-1.0)*new_r11*x247))));
2881 sj5array[0]=
IKsin(j5array[0]);
2882 cj5array[0]=
IKcos(j5array[0]);
2883 if( j5array[0] >
IKPI )
2887 else if( j5array[0] < -
IKPI )
2888 { j5array[0]+=
IK2PI;
2891 for(
int ij5 = 0; ij5 < 1; ++ij5)
2897 _ij5[0] = ij5; _ij5[1] = -1;
2898 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
2902 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
2905 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
2908 IkReal x248=
IKsin(j5);
2909 IkReal x249=
IKcos(j5);
2910 IkReal x250=((1.0)*sj3);
2911 IkReal x251=(cj3*x248);
2912 IkReal x252=((1.0)*x249);
2913 IkReal x253=(x249*x250);
2914 evalcond[0]=(((new_r11*sj3))+x248+((cj3*new_r01)));
2915 evalcond[1]=(x248+((cj3*new_r10))+(((-1.0)*new_r00*x250)));
2916 evalcond[2]=((((-1.0)*new_r01*x250))+x249+((cj3*new_r11)));
2917 evalcond[3]=(((new_r10*sj3))+((cj3*new_r00))+(((-1.0)*x252)));
2918 evalcond[4]=(((sj3*x248))+new_r11+((cj3*x249)));
2919 evalcond[5]=(x251+new_r01+(((-1.0)*x253)));
2920 evalcond[6]=(x251+new_r10+(((-1.0)*x253)));
2921 evalcond[7]=((((-1.0)*x248*x250))+(((-1.0)*cj3*x252))+new_r00);
2929 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
2930 vinfos[0].jointtype = 1;
2931 vinfos[0].foffset = j0;
2932 vinfos[0].indices[0] = _ij0[0];
2933 vinfos[0].indices[1] = _ij0[1];
2934 vinfos[0].maxsolutions = _nj0;
2935 vinfos[1].jointtype = 1;
2936 vinfos[1].foffset = j1;
2937 vinfos[1].indices[0] = _ij1[0];
2938 vinfos[1].indices[1] = _ij1[1];
2939 vinfos[1].maxsolutions = _nj1;
2940 vinfos[2].jointtype = 1;
2941 vinfos[2].foffset = j2;
2942 vinfos[2].indices[0] = _ij2[0];
2943 vinfos[2].indices[1] = _ij2[1];
2944 vinfos[2].maxsolutions = _nj2;
2945 vinfos[3].jointtype = 1;
2946 vinfos[3].foffset = j3;
2947 vinfos[3].indices[0] = _ij3[0];
2948 vinfos[3].indices[1] = _ij3[1];
2949 vinfos[3].maxsolutions = _nj3;
2950 vinfos[4].jointtype = 1;
2951 vinfos[4].foffset = j4;
2952 vinfos[4].indices[0] = _ij4[0];
2953 vinfos[4].indices[1] = _ij4[1];
2954 vinfos[4].maxsolutions = _nj4;
2955 vinfos[5].jointtype = 1;
2956 vinfos[5].foffset = j5;
2957 vinfos[5].indices[0] = _ij5[0];
2958 vinfos[5].indices[1] = _ij5[1];
2959 vinfos[5].maxsolutions = _nj5;
2960 std::vector<int> vfree(0);
2968 if( bgotonextstatement )
2970 bool bgotonextstatement =
true;
2973 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-1.5707963267949)+j4)))), 6.28318530717959)));
2974 evalcond[1]=new_r22;
2975 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 )
2977 bgotonextstatement=
false;
2979 IkReal j5array[1], cj5array[1], sj5array[1];
2980 bool j5valid[1]={
false};
2984 j5array[0]=
IKatan2(new_r20, new_r21);
2985 sj5array[0]=
IKsin(j5array[0]);
2986 cj5array[0]=
IKcos(j5array[0]);
2987 if( j5array[0] >
IKPI )
2991 else if( j5array[0] < -
IKPI )
2992 { j5array[0]+=
IK2PI;
2995 for(
int ij5 = 0; ij5 < 1; ++ij5)
3001 _ij5[0] = ij5; _ij5[1] = -1;
3002 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
3006 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
3009 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
3012 IkReal x254=
IKsin(j5);
3013 IkReal x255=
IKcos(j5);
3014 IkReal x256=((1.0)*x255);
3015 IkReal x257=((1.0)*x254);
3016 evalcond[0]=(new_r20+(((-1.0)*x257)));
3017 evalcond[1]=(new_r21+(((-1.0)*x256)));
3018 evalcond[2]=(((sj3*x254))+new_r11);
3019 evalcond[3]=(new_r01+(((-1.0)*new_r12*x257)));
3020 evalcond[4]=((((-1.0)*cj3*x256))+new_r00);
3021 evalcond[5]=((((-1.0)*sj3*x256))+new_r10);
3022 evalcond[6]=(((new_r11*sj3))+x254+((cj3*new_r01)));
3023 evalcond[7]=(((new_r10*sj3))+((cj3*new_r00))+(((-1.0)*x256)));
3031 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
3032 vinfos[0].jointtype = 1;
3033 vinfos[0].foffset = j0;
3034 vinfos[0].indices[0] = _ij0[0];
3035 vinfos[0].indices[1] = _ij0[1];
3036 vinfos[0].maxsolutions = _nj0;
3037 vinfos[1].jointtype = 1;
3038 vinfos[1].foffset = j1;
3039 vinfos[1].indices[0] = _ij1[0];
3040 vinfos[1].indices[1] = _ij1[1];
3041 vinfos[1].maxsolutions = _nj1;
3042 vinfos[2].jointtype = 1;
3043 vinfos[2].foffset = j2;
3044 vinfos[2].indices[0] = _ij2[0];
3045 vinfos[2].indices[1] = _ij2[1];
3046 vinfos[2].maxsolutions = _nj2;
3047 vinfos[3].jointtype = 1;
3048 vinfos[3].foffset = j3;
3049 vinfos[3].indices[0] = _ij3[0];
3050 vinfos[3].indices[1] = _ij3[1];
3051 vinfos[3].maxsolutions = _nj3;
3052 vinfos[4].jointtype = 1;
3053 vinfos[4].foffset = j4;
3054 vinfos[4].indices[0] = _ij4[0];
3055 vinfos[4].indices[1] = _ij4[1];
3056 vinfos[4].maxsolutions = _nj4;
3057 vinfos[5].jointtype = 1;
3058 vinfos[5].foffset = j5;
3059 vinfos[5].indices[0] = _ij5[0];
3060 vinfos[5].indices[1] = _ij5[1];
3061 vinfos[5].maxsolutions = _nj5;
3062 std::vector<int> vfree(0);
3070 if( bgotonextstatement )
3072 bool bgotonextstatement =
true;
3075 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((1.5707963267949)+j4)))), 6.28318530717959)));
3076 evalcond[1]=new_r22;
3077 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 )
3079 bgotonextstatement=
false;
3081 IkReal j5array[1], cj5array[1], sj5array[1];
3082 bool j5valid[1]={
false};
3086 j5array[0]=
IKatan2(((-1.0)*new_r20), ((-1.0)*new_r21));
3087 sj5array[0]=
IKsin(j5array[0]);
3088 cj5array[0]=
IKcos(j5array[0]);
3089 if( j5array[0] >
IKPI )
3093 else if( j5array[0] < -
IKPI )
3094 { j5array[0]+=
IK2PI;
3097 for(
int ij5 = 0; ij5 < 1; ++ij5)
3103 _ij5[0] = ij5; _ij5[1] = -1;
3104 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
3108 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
3111 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
3114 IkReal x258=
IKsin(j5);
3115 IkReal x259=
IKcos(j5);
3116 IkReal x260=((1.0)*x259);
3117 evalcond[0]=(x258+new_r20);
3118 evalcond[1]=(x259+new_r21);
3119 evalcond[2]=(((new_r12*x258))+new_r01);
3120 evalcond[3]=(((sj3*x258))+new_r11);
3121 evalcond[4]=((((-1.0)*cj3*x260))+new_r00);
3122 evalcond[5]=((((-1.0)*sj3*x260))+new_r10);
3123 evalcond[6]=(((new_r11*sj3))+x258+((cj3*new_r01)));
3124 evalcond[7]=(((new_r10*sj3))+((cj3*new_r00))+(((-1.0)*x260)));
3132 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
3133 vinfos[0].jointtype = 1;
3134 vinfos[0].foffset = j0;
3135 vinfos[0].indices[0] = _ij0[0];
3136 vinfos[0].indices[1] = _ij0[1];
3137 vinfos[0].maxsolutions = _nj0;
3138 vinfos[1].jointtype = 1;
3139 vinfos[1].foffset = j1;
3140 vinfos[1].indices[0] = _ij1[0];
3141 vinfos[1].indices[1] = _ij1[1];
3142 vinfos[1].maxsolutions = _nj1;
3143 vinfos[2].jointtype = 1;
3144 vinfos[2].foffset = j2;
3145 vinfos[2].indices[0] = _ij2[0];
3146 vinfos[2].indices[1] = _ij2[1];
3147 vinfos[2].maxsolutions = _nj2;
3148 vinfos[3].jointtype = 1;
3149 vinfos[3].foffset = j3;
3150 vinfos[3].indices[0] = _ij3[0];
3151 vinfos[3].indices[1] = _ij3[1];
3152 vinfos[3].maxsolutions = _nj3;
3153 vinfos[4].jointtype = 1;
3154 vinfos[4].foffset = j4;
3155 vinfos[4].indices[0] = _ij4[0];
3156 vinfos[4].indices[1] = _ij4[1];
3157 vinfos[4].maxsolutions = _nj4;
3158 vinfos[5].jointtype = 1;
3159 vinfos[5].foffset = j5;
3160 vinfos[5].indices[0] = _ij5[0];
3161 vinfos[5].indices[1] = _ij5[1];
3162 vinfos[5].maxsolutions = _nj5;
3163 std::vector<int> vfree(0);
3171 if( bgotonextstatement )
3173 bool bgotonextstatement =
true;
3176 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(j3))), 6.28318530717959)));
3177 evalcond[1]=new_r02;
3178 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 )
3180 bgotonextstatement=
false;
3182 IkReal j5array[1], cj5array[1], sj5array[1];
3183 bool j5valid[1]={
false};
3187 j5array[0]=
IKatan2(((-1.0)*new_r01), new_r00);
3188 sj5array[0]=
IKsin(j5array[0]);
3189 cj5array[0]=
IKcos(j5array[0]);
3190 if( j5array[0] >
IKPI )
3194 else if( j5array[0] < -
IKPI )
3195 { j5array[0]+=
IK2PI;
3198 for(
int ij5 = 0; ij5 < 1; ++ij5)
3204 _ij5[0] = ij5; _ij5[1] = -1;
3205 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
3209 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
3212 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
3215 IkReal x261=
IKsin(j5);
3216 IkReal x262=
IKcos(j5);
3217 IkReal x263=((1.0)*cj4);
3218 IkReal x264=((1.0)*x262);
3219 IkReal x265=((1.0)*x261);
3220 evalcond[0]=(x261+new_r01);
3221 evalcond[1]=(new_r00+(((-1.0)*x264)));
3222 evalcond[2]=((((-1.0)*sj4*x265))+new_r20);
3223 evalcond[3]=((((-1.0)*sj4*x264))+new_r21);
3224 evalcond[4]=((((-1.0)*x262*x263))+new_r11);
3225 evalcond[5]=((((-1.0)*x261*x263))+new_r10);
3226 evalcond[6]=(((new_r20*sj4))+((cj4*new_r10))+(((-1.0)*x265)));
3227 evalcond[7]=(((cj4*new_r11))+((new_r21*sj4))+(((-1.0)*x264)));
3235 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
3236 vinfos[0].jointtype = 1;
3237 vinfos[0].foffset = j0;
3238 vinfos[0].indices[0] = _ij0[0];
3239 vinfos[0].indices[1] = _ij0[1];
3240 vinfos[0].maxsolutions = _nj0;
3241 vinfos[1].jointtype = 1;
3242 vinfos[1].foffset = j1;
3243 vinfos[1].indices[0] = _ij1[0];
3244 vinfos[1].indices[1] = _ij1[1];
3245 vinfos[1].maxsolutions = _nj1;
3246 vinfos[2].jointtype = 1;
3247 vinfos[2].foffset = j2;
3248 vinfos[2].indices[0] = _ij2[0];
3249 vinfos[2].indices[1] = _ij2[1];
3250 vinfos[2].maxsolutions = _nj2;
3251 vinfos[3].jointtype = 1;
3252 vinfos[3].foffset = j3;
3253 vinfos[3].indices[0] = _ij3[0];
3254 vinfos[3].indices[1] = _ij3[1];
3255 vinfos[3].maxsolutions = _nj3;
3256 vinfos[4].jointtype = 1;
3257 vinfos[4].foffset = j4;
3258 vinfos[4].indices[0] = _ij4[0];
3259 vinfos[4].indices[1] = _ij4[1];
3260 vinfos[4].maxsolutions = _nj4;
3261 vinfos[5].jointtype = 1;
3262 vinfos[5].foffset = j5;
3263 vinfos[5].indices[0] = _ij5[0];
3264 vinfos[5].indices[1] = _ij5[1];
3265 vinfos[5].maxsolutions = _nj5;
3266 std::vector<int> vfree(0);
3274 if( bgotonextstatement )
3276 bool bgotonextstatement =
true;
3279 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-3.14159265358979)+j3)))), 6.28318530717959)));
3280 evalcond[1]=new_r02;
3281 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 )
3283 bgotonextstatement=
false;
3285 IkReal j5array[1], cj5array[1], sj5array[1];
3286 bool j5valid[1]={
false};
3290 j5array[0]=
IKatan2(new_r01, ((-1.0)*new_r00));
3291 sj5array[0]=
IKsin(j5array[0]);
3292 cj5array[0]=
IKcos(j5array[0]);
3293 if( j5array[0] >
IKPI )
3297 else if( j5array[0] < -
IKPI )
3298 { j5array[0]+=
IK2PI;
3301 for(
int ij5 = 0; ij5 < 1; ++ij5)
3307 _ij5[0] = ij5; _ij5[1] = -1;
3308 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
3312 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
3315 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
3318 IkReal x266=
IKsin(j5);
3319 IkReal x267=
IKcos(j5);
3320 IkReal x268=((1.0)*cj4);
3321 IkReal x269=((1.0)*x267);
3322 IkReal x270=((1.0)*x266);
3323 evalcond[0]=(x266+(((-1.0)*new_r01)));
3324 evalcond[1]=(((cj4*x267))+new_r11);
3325 evalcond[2]=((((-1.0)*sj4*x270))+new_r20);
3326 evalcond[3]=((((-1.0)*sj4*x269))+new_r21);
3327 evalcond[4]=((((-1.0)*new_r00))+(((-1.0)*x269)));
3328 evalcond[5]=((((-1.0)*new_r10))+(((-1.0)*x266*x268)));
3329 evalcond[6]=(((new_r20*sj4))+(((-1.0)*new_r10*x268))+(((-1.0)*x270)));
3330 evalcond[7]=((((-1.0)*new_r11*x268))+((new_r21*sj4))+(((-1.0)*x269)));
3338 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
3339 vinfos[0].jointtype = 1;
3340 vinfos[0].foffset = j0;
3341 vinfos[0].indices[0] = _ij0[0];
3342 vinfos[0].indices[1] = _ij0[1];
3343 vinfos[0].maxsolutions = _nj0;
3344 vinfos[1].jointtype = 1;
3345 vinfos[1].foffset = j1;
3346 vinfos[1].indices[0] = _ij1[0];
3347 vinfos[1].indices[1] = _ij1[1];
3348 vinfos[1].maxsolutions = _nj1;
3349 vinfos[2].jointtype = 1;
3350 vinfos[2].foffset = j2;
3351 vinfos[2].indices[0] = _ij2[0];
3352 vinfos[2].indices[1] = _ij2[1];
3353 vinfos[2].maxsolutions = _nj2;
3354 vinfos[3].jointtype = 1;
3355 vinfos[3].foffset = j3;
3356 vinfos[3].indices[0] = _ij3[0];
3357 vinfos[3].indices[1] = _ij3[1];
3358 vinfos[3].maxsolutions = _nj3;
3359 vinfos[4].jointtype = 1;
3360 vinfos[4].foffset = j4;
3361 vinfos[4].indices[0] = _ij4[0];
3362 vinfos[4].indices[1] = _ij4[1];
3363 vinfos[4].maxsolutions = _nj4;
3364 vinfos[5].jointtype = 1;
3365 vinfos[5].foffset = j5;
3366 vinfos[5].indices[0] = _ij5[0];
3367 vinfos[5].indices[1] = _ij5[1];
3368 vinfos[5].maxsolutions = _nj5;
3369 std::vector<int> vfree(0);
3377 if( bgotonextstatement )
3379 bool bgotonextstatement =
true;
3382 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-1.5707963267949)+j3)))), 6.28318530717959)));
3383 evalcond[1]=new_r12;
3384 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 )
3386 bgotonextstatement=
false;
3388 IkReal j5array[1], cj5array[1], sj5array[1];
3389 bool j5valid[1]={
false};
3393 j5array[0]=
IKatan2(((-1.0)*new_r11), new_r10);
3394 sj5array[0]=
IKsin(j5array[0]);
3395 cj5array[0]=
IKcos(j5array[0]);
3396 if( j5array[0] >
IKPI )
3400 else if( j5array[0] < -
IKPI )
3401 { j5array[0]+=
IK2PI;
3404 for(
int ij5 = 0; ij5 < 1; ++ij5)
3410 _ij5[0] = ij5; _ij5[1] = -1;
3411 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
3415 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
3418 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
3421 IkReal x271=
IKcos(j5);
3422 IkReal x272=
IKsin(j5);
3423 IkReal x273=((1.0)*cj4);
3424 IkReal x274=((1.0)*x271);
3425 IkReal x275=((1.0)*x272);
3426 evalcond[0]=(x272+new_r11);
3427 evalcond[1]=((((-1.0)*x274))+new_r10);
3428 evalcond[2]=(((cj4*x271))+new_r01);
3429 evalcond[3]=(((cj4*x272))+new_r00);
3430 evalcond[4]=((((-1.0)*new_r02*x275))+new_r20);
3431 evalcond[5]=((((-1.0)*new_r02*x274))+new_r21);
3432 evalcond[6]=(((new_r20*sj4))+(((-1.0)*new_r00*x273))+(((-1.0)*x275)));
3433 evalcond[7]=((((-1.0)*new_r01*x273))+(((-1.0)*x274))+((new_r21*sj4)));
3441 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
3442 vinfos[0].jointtype = 1;
3443 vinfos[0].foffset = j0;
3444 vinfos[0].indices[0] = _ij0[0];
3445 vinfos[0].indices[1] = _ij0[1];
3446 vinfos[0].maxsolutions = _nj0;
3447 vinfos[1].jointtype = 1;
3448 vinfos[1].foffset = j1;
3449 vinfos[1].indices[0] = _ij1[0];
3450 vinfos[1].indices[1] = _ij1[1];
3451 vinfos[1].maxsolutions = _nj1;
3452 vinfos[2].jointtype = 1;
3453 vinfos[2].foffset = j2;
3454 vinfos[2].indices[0] = _ij2[0];
3455 vinfos[2].indices[1] = _ij2[1];
3456 vinfos[2].maxsolutions = _nj2;
3457 vinfos[3].jointtype = 1;
3458 vinfos[3].foffset = j3;
3459 vinfos[3].indices[0] = _ij3[0];
3460 vinfos[3].indices[1] = _ij3[1];
3461 vinfos[3].maxsolutions = _nj3;
3462 vinfos[4].jointtype = 1;
3463 vinfos[4].foffset = j4;
3464 vinfos[4].indices[0] = _ij4[0];
3465 vinfos[4].indices[1] = _ij4[1];
3466 vinfos[4].maxsolutions = _nj4;
3467 vinfos[5].jointtype = 1;
3468 vinfos[5].foffset = j5;
3469 vinfos[5].indices[0] = _ij5[0];
3470 vinfos[5].indices[1] = _ij5[1];
3471 vinfos[5].maxsolutions = _nj5;
3472 std::vector<int> vfree(0);
3480 if( bgotonextstatement )
3482 bool bgotonextstatement =
true;
3485 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((1.5707963267949)+j3)))), 6.28318530717959)));
3486 evalcond[1]=new_r12;
3487 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 )
3489 bgotonextstatement=
false;
3494 j3=-1.5707963267949;
3496 j5eval[1]=
IKsign(new_r02);
3497 j5eval[2]=((
IKabs(new_r20))+(
IKabs(new_r21)));
3498 if(
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000 ||
IKabs(j5eval[2]) < 0.0000010000000000 )
3504 j3=-1.5707963267949;
3506 if(
IKabs(j5eval[0]) < 0.0000010000000000 )
3512 j3=-1.5707963267949;
3515 if(
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000 )
3519 bool bgotonextstatement =
true;
3522 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-1.5707963267949)+j4)))), 6.28318530717959)));
3523 evalcond[1]=new_r22;
3524 evalcond[2]=new_r01;
3525 evalcond[3]=new_r00;
3526 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 &&
IKabs(evalcond[2]) < 0.0000050000000000 &&
IKabs(evalcond[3]) < 0.0000050000000000 )
3528 bgotonextstatement=
false;
3530 IkReal j5array[1], cj5array[1], sj5array[1];
3531 bool j5valid[1]={
false};
3535 j5array[0]=
IKatan2(new_r20, new_r21);
3536 sj5array[0]=
IKsin(j5array[0]);
3537 cj5array[0]=
IKcos(j5array[0]);
3538 if( j5array[0] >
IKPI )
3542 else if( j5array[0] < -
IKPI )
3543 { j5array[0]+=
IK2PI;
3546 for(
int ij5 = 0; ij5 < 1; ++ij5)
3552 _ij5[0] = ij5; _ij5[1] = -1;
3553 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
3557 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
3560 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
3563 IkReal x276=
IKsin(j5);
3564 IkReal x277=((1.0)*(
IKcos(j5)));
3565 evalcond[0]=((((-1.0)*x276))+new_r20);
3566 evalcond[1]=((((-1.0)*x277))+new_r21);
3567 evalcond[2]=(x276+(((-1.0)*new_r11)));
3568 evalcond[3]=((((-1.0)*new_r10))+(((-1.0)*x277)));
3576 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
3577 vinfos[0].jointtype = 1;
3578 vinfos[0].foffset = j0;
3579 vinfos[0].indices[0] = _ij0[0];
3580 vinfos[0].indices[1] = _ij0[1];
3581 vinfos[0].maxsolutions = _nj0;
3582 vinfos[1].jointtype = 1;
3583 vinfos[1].foffset = j1;
3584 vinfos[1].indices[0] = _ij1[0];
3585 vinfos[1].indices[1] = _ij1[1];
3586 vinfos[1].maxsolutions = _nj1;
3587 vinfos[2].jointtype = 1;
3588 vinfos[2].foffset = j2;
3589 vinfos[2].indices[0] = _ij2[0];
3590 vinfos[2].indices[1] = _ij2[1];
3591 vinfos[2].maxsolutions = _nj2;
3592 vinfos[3].jointtype = 1;
3593 vinfos[3].foffset = j3;
3594 vinfos[3].indices[0] = _ij3[0];
3595 vinfos[3].indices[1] = _ij3[1];
3596 vinfos[3].maxsolutions = _nj3;
3597 vinfos[4].jointtype = 1;
3598 vinfos[4].foffset = j4;
3599 vinfos[4].indices[0] = _ij4[0];
3600 vinfos[4].indices[1] = _ij4[1];
3601 vinfos[4].maxsolutions = _nj4;
3602 vinfos[5].jointtype = 1;
3603 vinfos[5].foffset = j5;
3604 vinfos[5].indices[0] = _ij5[0];
3605 vinfos[5].indices[1] = _ij5[1];
3606 vinfos[5].maxsolutions = _nj5;
3607 std::vector<int> vfree(0);
3615 if( bgotonextstatement )
3617 bool bgotonextstatement =
true;
3620 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((1.5707963267949)+j4)))), 6.28318530717959)));
3621 evalcond[1]=new_r22;
3622 evalcond[2]=new_r01;
3623 evalcond[3]=new_r00;
3624 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 &&
IKabs(evalcond[2]) < 0.0000050000000000 &&
IKabs(evalcond[3]) < 0.0000050000000000 )
3626 bgotonextstatement=
false;
3628 IkReal j5array[1], cj5array[1], sj5array[1];
3629 bool j5valid[1]={
false};
3633 j5array[0]=
IKatan2(new_r11, ((-1.0)*new_r21));
3634 sj5array[0]=
IKsin(j5array[0]);
3635 cj5array[0]=
IKcos(j5array[0]);
3636 if( j5array[0] >
IKPI )
3640 else if( j5array[0] < -
IKPI )
3641 { j5array[0]+=
IK2PI;
3644 for(
int ij5 = 0; ij5 < 1; ++ij5)
3650 _ij5[0] = ij5; _ij5[1] = -1;
3651 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
3655 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
3658 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
3661 IkReal x278=
IKsin(j5);
3662 IkReal x279=
IKcos(j5);
3663 evalcond[0]=(x278+new_r20);
3664 evalcond[1]=(x279+new_r21);
3665 evalcond[2]=(x278+(((-1.0)*new_r11)));
3666 evalcond[3]=((((-1.0)*x279))+(((-1.0)*new_r10)));
3674 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
3675 vinfos[0].jointtype = 1;
3676 vinfos[0].foffset = j0;
3677 vinfos[0].indices[0] = _ij0[0];
3678 vinfos[0].indices[1] = _ij0[1];
3679 vinfos[0].maxsolutions = _nj0;
3680 vinfos[1].jointtype = 1;
3681 vinfos[1].foffset = j1;
3682 vinfos[1].indices[0] = _ij1[0];
3683 vinfos[1].indices[1] = _ij1[1];
3684 vinfos[1].maxsolutions = _nj1;
3685 vinfos[2].jointtype = 1;
3686 vinfos[2].foffset = j2;
3687 vinfos[2].indices[0] = _ij2[0];
3688 vinfos[2].indices[1] = _ij2[1];
3689 vinfos[2].maxsolutions = _nj2;
3690 vinfos[3].jointtype = 1;
3691 vinfos[3].foffset = j3;
3692 vinfos[3].indices[0] = _ij3[0];
3693 vinfos[3].indices[1] = _ij3[1];
3694 vinfos[3].maxsolutions = _nj3;
3695 vinfos[4].jointtype = 1;
3696 vinfos[4].foffset = j4;
3697 vinfos[4].indices[0] = _ij4[0];
3698 vinfos[4].indices[1] = _ij4[1];
3699 vinfos[4].maxsolutions = _nj4;
3700 vinfos[5].jointtype = 1;
3701 vinfos[5].foffset = j5;
3702 vinfos[5].indices[0] = _ij5[0];
3703 vinfos[5].indices[1] = _ij5[1];
3704 vinfos[5].maxsolutions = _nj5;
3705 std::vector<int> vfree(0);
3713 if( bgotonextstatement )
3715 bool bgotonextstatement =
true;
3718 evalcond[0]=
IKabs(new_r02);
3719 evalcond[1]=new_r20;
3720 evalcond[2]=new_r21;
3721 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 &&
IKabs(evalcond[2]) < 0.0000050000000000 )
3723 bgotonextstatement=
false;
3725 IkReal j5array[1], cj5array[1], sj5array[1];
3726 bool j5valid[1]={
false};
3730 j5array[0]=
IKatan2(new_r11, ((-1.0)*new_r10));
3731 sj5array[0]=
IKsin(j5array[0]);
3732 cj5array[0]=
IKcos(j5array[0]);
3733 if( j5array[0] >
IKPI )
3737 else if( j5array[0] < -
IKPI )
3738 { j5array[0]+=
IK2PI;
3741 for(
int ij5 = 0; ij5 < 1; ++ij5)
3747 _ij5[0] = ij5; _ij5[1] = -1;
3748 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
3752 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
3755 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
3758 IkReal x280=
IKsin(j5);
3759 IkReal x281=
IKcos(j5);
3760 IkReal x282=((1.0)*cj4);
3761 IkReal x283=((1.0)*x281);
3762 evalcond[0]=(x280+(((-1.0)*new_r11)));
3763 evalcond[1]=((((-1.0)*x281*x282))+new_r01);
3764 evalcond[2]=((((-1.0)*x280*x282))+new_r00);
3765 evalcond[3]=((((-1.0)*new_r10))+(((-1.0)*x283)));
3766 evalcond[4]=(((cj4*new_r00))+(((-1.0)*x280)));
3767 evalcond[5]=(((cj4*new_r01))+(((-1.0)*x283)));
3775 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
3776 vinfos[0].jointtype = 1;
3777 vinfos[0].foffset = j0;
3778 vinfos[0].indices[0] = _ij0[0];
3779 vinfos[0].indices[1] = _ij0[1];
3780 vinfos[0].maxsolutions = _nj0;
3781 vinfos[1].jointtype = 1;
3782 vinfos[1].foffset = j1;
3783 vinfos[1].indices[0] = _ij1[0];
3784 vinfos[1].indices[1] = _ij1[1];
3785 vinfos[1].maxsolutions = _nj1;
3786 vinfos[2].jointtype = 1;
3787 vinfos[2].foffset = j2;
3788 vinfos[2].indices[0] = _ij2[0];
3789 vinfos[2].indices[1] = _ij2[1];
3790 vinfos[2].maxsolutions = _nj2;
3791 vinfos[3].jointtype = 1;
3792 vinfos[3].foffset = j3;
3793 vinfos[3].indices[0] = _ij3[0];
3794 vinfos[3].indices[1] = _ij3[1];
3795 vinfos[3].maxsolutions = _nj3;
3796 vinfos[4].jointtype = 1;
3797 vinfos[4].foffset = j4;
3798 vinfos[4].indices[0] = _ij4[0];
3799 vinfos[4].indices[1] = _ij4[1];
3800 vinfos[4].maxsolutions = _nj4;
3801 vinfos[5].jointtype = 1;
3802 vinfos[5].foffset = j5;
3803 vinfos[5].indices[0] = _ij5[0];
3804 vinfos[5].indices[1] = _ij5[1];
3805 vinfos[5].maxsolutions = _nj5;
3806 std::vector<int> vfree(0);
3814 if( bgotonextstatement )
3816 bool bgotonextstatement =
true;
3819 evalcond[0]=((
IKabs(new_r20))+(
IKabs(new_r21)));
3820 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
3822 bgotonextstatement=
false;
3824 IkReal j5array[1], cj5array[1], sj5array[1];
3825 bool j5valid[1]={
false};
3829 j5array[0]=
IKatan2(new_r11, ((-1.0)*new_r10));
3830 sj5array[0]=
IKsin(j5array[0]);
3831 cj5array[0]=
IKcos(j5array[0]);
3832 if( j5array[0] >
IKPI )
3836 else if( j5array[0] < -
IKPI )
3837 { j5array[0]+=
IK2PI;
3840 for(
int ij5 = 0; ij5 < 1; ++ij5)
3846 _ij5[0] = ij5; _ij5[1] = -1;
3847 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
3851 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
3854 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
3857 IkReal x284=
IKcos(j5);
3858 IkReal x285=
IKsin(j5);
3859 IkReal x286=((-1.0)*x285);
3860 IkReal x287=((-1.0)*x284);
3863 evalcond[2]=(new_r22*x287);
3864 evalcond[3]=(new_r22*x286);
3865 evalcond[4]=(x285+(((-1.0)*new_r11)));
3866 evalcond[5]=((((-1.0)*x284))+(((-1.0)*new_r10)));
3874 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
3875 vinfos[0].jointtype = 1;
3876 vinfos[0].foffset = j0;
3877 vinfos[0].indices[0] = _ij0[0];
3878 vinfos[0].indices[1] = _ij0[1];
3879 vinfos[0].maxsolutions = _nj0;
3880 vinfos[1].jointtype = 1;
3881 vinfos[1].foffset = j1;
3882 vinfos[1].indices[0] = _ij1[0];
3883 vinfos[1].indices[1] = _ij1[1];
3884 vinfos[1].maxsolutions = _nj1;
3885 vinfos[2].jointtype = 1;
3886 vinfos[2].foffset = j2;
3887 vinfos[2].indices[0] = _ij2[0];
3888 vinfos[2].indices[1] = _ij2[1];
3889 vinfos[2].maxsolutions = _nj2;
3890 vinfos[3].jointtype = 1;
3891 vinfos[3].foffset = j3;
3892 vinfos[3].indices[0] = _ij3[0];
3893 vinfos[3].indices[1] = _ij3[1];
3894 vinfos[3].maxsolutions = _nj3;
3895 vinfos[4].jointtype = 1;
3896 vinfos[4].foffset = j4;
3897 vinfos[4].indices[0] = _ij4[0];
3898 vinfos[4].indices[1] = _ij4[1];
3899 vinfos[4].maxsolutions = _nj4;
3900 vinfos[5].jointtype = 1;
3901 vinfos[5].foffset = j5;
3902 vinfos[5].indices[0] = _ij5[0];
3903 vinfos[5].indices[1] = _ij5[1];
3904 vinfos[5].maxsolutions = _nj5;
3905 std::vector<int> vfree(0);
3913 if( bgotonextstatement )
3915 bool bgotonextstatement =
true;
3920 bgotonextstatement=
false;
3925 if( bgotonextstatement )
3937 IkReal j5array[1], cj5array[1], sj5array[1];
3938 bool j5valid[1]={
false};
3951 sj5array[0]=
IKsin(j5array[0]);
3952 cj5array[0]=
IKcos(j5array[0]);
3953 if( j5array[0] >
IKPI )
3957 else if( j5array[0] < -
IKPI )
3958 { j5array[0]+=
IK2PI;
3961 for(
int ij5 = 0; ij5 < 1; ++ij5)
3967 _ij5[0] = ij5; _ij5[1] = -1;
3968 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
3972 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
3975 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
3978 IkReal x290=
IKsin(j5);
3979 IkReal x291=
IKcos(j5);
3980 IkReal x292=((1.0)*cj4);
3981 IkReal x293=((1.0)*x291);
3982 evalcond[0]=(((new_r02*x290))+new_r20);
3983 evalcond[1]=(((new_r02*x291))+new_r21);
3984 evalcond[2]=(x290+(((-1.0)*new_r11)));
3985 evalcond[3]=((((-1.0)*x291*x292))+new_r01);
3986 evalcond[4]=((((-1.0)*x290*x292))+new_r00);
3987 evalcond[5]=((((-1.0)*x293))+(((-1.0)*new_r10)));
3988 evalcond[6]=((((-1.0)*x290))+((new_r20*sj4))+((cj4*new_r00)));
3989 evalcond[7]=(((cj4*new_r01))+(((-1.0)*x293))+((new_r21*sj4)));
3997 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
3998 vinfos[0].jointtype = 1;
3999 vinfos[0].foffset = j0;
4000 vinfos[0].indices[0] = _ij0[0];
4001 vinfos[0].indices[1] = _ij0[1];
4002 vinfos[0].maxsolutions = _nj0;
4003 vinfos[1].jointtype = 1;
4004 vinfos[1].foffset = j1;
4005 vinfos[1].indices[0] = _ij1[0];
4006 vinfos[1].indices[1] = _ij1[1];
4007 vinfos[1].maxsolutions = _nj1;
4008 vinfos[2].jointtype = 1;
4009 vinfos[2].foffset = j2;
4010 vinfos[2].indices[0] = _ij2[0];
4011 vinfos[2].indices[1] = _ij2[1];
4012 vinfos[2].maxsolutions = _nj2;
4013 vinfos[3].jointtype = 1;
4014 vinfos[3].foffset = j3;
4015 vinfos[3].indices[0] = _ij3[0];
4016 vinfos[3].indices[1] = _ij3[1];
4017 vinfos[3].maxsolutions = _nj3;
4018 vinfos[4].jointtype = 1;
4019 vinfos[4].foffset = j4;
4020 vinfos[4].indices[0] = _ij4[0];
4021 vinfos[4].indices[1] = _ij4[1];
4022 vinfos[4].maxsolutions = _nj4;
4023 vinfos[5].jointtype = 1;
4024 vinfos[5].foffset = j5;
4025 vinfos[5].indices[0] = _ij5[0];
4026 vinfos[5].indices[1] = _ij5[1];
4027 vinfos[5].maxsolutions = _nj5;
4028 std::vector<int> vfree(0);
4041 IkReal j5array[1], cj5array[1], sj5array[1];
4042 bool j5valid[1]={
false};
4050 j5array[0]=
IKatan2(new_r11, ((-1.0)*new_r21*(x294.
value)));
4051 sj5array[0]=
IKsin(j5array[0]);
4052 cj5array[0]=
IKcos(j5array[0]);
4053 if( j5array[0] >
IKPI )
4057 else if( j5array[0] < -
IKPI )
4058 { j5array[0]+=
IK2PI;
4061 for(
int ij5 = 0; ij5 < 1; ++ij5)
4067 _ij5[0] = ij5; _ij5[1] = -1;
4068 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
4072 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
4075 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
4078 IkReal x295=
IKsin(j5);
4079 IkReal x296=
IKcos(j5);
4080 IkReal x297=((1.0)*cj4);
4081 IkReal x298=((1.0)*x296);
4082 evalcond[0]=(((new_r02*x295))+new_r20);
4083 evalcond[1]=(((new_r02*x296))+new_r21);
4084 evalcond[2]=(x295+(((-1.0)*new_r11)));
4085 evalcond[3]=((((-1.0)*x296*x297))+new_r01);
4086 evalcond[4]=((((-1.0)*x295*x297))+new_r00);
4087 evalcond[5]=((((-1.0)*x298))+(((-1.0)*new_r10)));
4088 evalcond[6]=((((-1.0)*x295))+((new_r20*sj4))+((cj4*new_r00)));
4089 evalcond[7]=(((cj4*new_r01))+(((-1.0)*x298))+((new_r21*sj4)));
4097 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
4098 vinfos[0].jointtype = 1;
4099 vinfos[0].foffset = j0;
4100 vinfos[0].indices[0] = _ij0[0];
4101 vinfos[0].indices[1] = _ij0[1];
4102 vinfos[0].maxsolutions = _nj0;
4103 vinfos[1].jointtype = 1;
4104 vinfos[1].foffset = j1;
4105 vinfos[1].indices[0] = _ij1[0];
4106 vinfos[1].indices[1] = _ij1[1];
4107 vinfos[1].maxsolutions = _nj1;
4108 vinfos[2].jointtype = 1;
4109 vinfos[2].foffset = j2;
4110 vinfos[2].indices[0] = _ij2[0];
4111 vinfos[2].indices[1] = _ij2[1];
4112 vinfos[2].maxsolutions = _nj2;
4113 vinfos[3].jointtype = 1;
4114 vinfos[3].foffset = j3;
4115 vinfos[3].indices[0] = _ij3[0];
4116 vinfos[3].indices[1] = _ij3[1];
4117 vinfos[3].maxsolutions = _nj3;
4118 vinfos[4].jointtype = 1;
4119 vinfos[4].foffset = j4;
4120 vinfos[4].indices[0] = _ij4[0];
4121 vinfos[4].indices[1] = _ij4[1];
4122 vinfos[4].maxsolutions = _nj4;
4123 vinfos[5].jointtype = 1;
4124 vinfos[5].foffset = j5;
4125 vinfos[5].indices[0] = _ij5[0];
4126 vinfos[5].indices[1] = _ij5[1];
4127 vinfos[5].maxsolutions = _nj5;
4128 std::vector<int> vfree(0);
4141 IkReal j5array[1], cj5array[1], sj5array[1];
4142 bool j5valid[1]={
false};
4152 j5array[0]=((-1.5707963267949)+(((1.5707963267949)*(x299.
value)))+(x300.
value));
4153 sj5array[0]=
IKsin(j5array[0]);
4154 cj5array[0]=
IKcos(j5array[0]);
4155 if( j5array[0] >
IKPI )
4159 else if( j5array[0] < -
IKPI )
4160 { j5array[0]+=
IK2PI;
4163 for(
int ij5 = 0; ij5 < 1; ++ij5)
4169 _ij5[0] = ij5; _ij5[1] = -1;
4170 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
4174 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
4177 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
4180 IkReal x301=
IKsin(j5);
4181 IkReal x302=
IKcos(j5);
4182 IkReal x303=((1.0)*cj4);
4183 IkReal x304=((1.0)*x302);
4184 evalcond[0]=(((new_r02*x301))+new_r20);
4185 evalcond[1]=(((new_r02*x302))+new_r21);
4186 evalcond[2]=(x301+(((-1.0)*new_r11)));
4187 evalcond[3]=((((-1.0)*x302*x303))+new_r01);
4188 evalcond[4]=((((-1.0)*x301*x303))+new_r00);
4189 evalcond[5]=((((-1.0)*new_r10))+(((-1.0)*x304)));
4190 evalcond[6]=(((new_r20*sj4))+((cj4*new_r00))+(((-1.0)*x301)));
4191 evalcond[7]=(((cj4*new_r01))+((new_r21*sj4))+(((-1.0)*x304)));
4199 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
4200 vinfos[0].jointtype = 1;
4201 vinfos[0].foffset = j0;
4202 vinfos[0].indices[0] = _ij0[0];
4203 vinfos[0].indices[1] = _ij0[1];
4204 vinfos[0].maxsolutions = _nj0;
4205 vinfos[1].jointtype = 1;
4206 vinfos[1].foffset = j1;
4207 vinfos[1].indices[0] = _ij1[0];
4208 vinfos[1].indices[1] = _ij1[1];
4209 vinfos[1].maxsolutions = _nj1;
4210 vinfos[2].jointtype = 1;
4211 vinfos[2].foffset = j2;
4212 vinfos[2].indices[0] = _ij2[0];
4213 vinfos[2].indices[1] = _ij2[1];
4214 vinfos[2].maxsolutions = _nj2;
4215 vinfos[3].jointtype = 1;
4216 vinfos[3].foffset = j3;
4217 vinfos[3].indices[0] = _ij3[0];
4218 vinfos[3].indices[1] = _ij3[1];
4219 vinfos[3].maxsolutions = _nj3;
4220 vinfos[4].jointtype = 1;
4221 vinfos[4].foffset = j4;
4222 vinfos[4].indices[0] = _ij4[0];
4223 vinfos[4].indices[1] = _ij4[1];
4224 vinfos[4].maxsolutions = _nj4;
4225 vinfos[5].jointtype = 1;
4226 vinfos[5].foffset = j5;
4227 vinfos[5].indices[0] = _ij5[0];
4228 vinfos[5].indices[1] = _ij5[1];
4229 vinfos[5].maxsolutions = _nj5;
4230 std::vector<int> vfree(0);
4242 if( bgotonextstatement )
4244 bool bgotonextstatement =
true;
4247 evalcond[0]=((
IKabs(new_r20))+(
IKabs(new_r21)));
4248 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
4250 bgotonextstatement=
false;
4258 if(
IKabs(j5eval[0]) < 0.0000000100000000 )
4264 IkReal op[2+1], zeror[2];
4269 polyroots2(op,zeror,numroots);
4270 IkReal j5array[2], cj5array[2], sj5array[2], tempj5array[1];
4271 int numsolutions = 0;
4272 for(
int ij5 = 0; ij5 < numroots; ++ij5)
4274 IkReal htj5 = zeror[ij5];
4275 tempj5array[0]=((2.0)*(
atan(htj5)));
4276 for(
int kj5 = 0; kj5 < 1; ++kj5)
4278 j5array[numsolutions] = tempj5array[kj5];
4279 if( j5array[numsolutions] >
IKPI )
4281 j5array[numsolutions]-=
IK2PI;
4283 else if( j5array[numsolutions] < -
IKPI )
4285 j5array[numsolutions]+=
IK2PI;
4287 sj5array[numsolutions] =
IKsin(j5array[numsolutions]);
4288 cj5array[numsolutions] =
IKcos(j5array[numsolutions]);
4292 bool j5valid[2]={
true,
true};
4294 for(
int ij5 = 0; ij5 < numsolutions; ++ij5)
4300 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
4303 _ij5[0] = ij5; _ij5[1] = -1;
4304 for(
int iij5 = ij5+1; iij5 < numsolutions; ++iij5)
4308 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
4312 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
4313 vinfos[0].jointtype = 1;
4314 vinfos[0].foffset = j0;
4315 vinfos[0].indices[0] = _ij0[0];
4316 vinfos[0].indices[1] = _ij0[1];
4317 vinfos[0].maxsolutions = _nj0;
4318 vinfos[1].jointtype = 1;
4319 vinfos[1].foffset = j1;
4320 vinfos[1].indices[0] = _ij1[0];
4321 vinfos[1].indices[1] = _ij1[1];
4322 vinfos[1].maxsolutions = _nj1;
4323 vinfos[2].jointtype = 1;
4324 vinfos[2].foffset = j2;
4325 vinfos[2].indices[0] = _ij2[0];
4326 vinfos[2].indices[1] = _ij2[1];
4327 vinfos[2].maxsolutions = _nj2;
4328 vinfos[3].jointtype = 1;
4329 vinfos[3].foffset = j3;
4330 vinfos[3].indices[0] = _ij3[0];
4331 vinfos[3].indices[1] = _ij3[1];
4332 vinfos[3].maxsolutions = _nj3;
4333 vinfos[4].jointtype = 1;
4334 vinfos[4].foffset = j4;
4335 vinfos[4].indices[0] = _ij4[0];
4336 vinfos[4].indices[1] = _ij4[1];
4337 vinfos[4].maxsolutions = _nj4;
4338 vinfos[5].jointtype = 1;
4339 vinfos[5].foffset = j5;
4340 vinfos[5].indices[0] = _ij5[0];
4341 vinfos[5].indices[1] = _ij5[1];
4342 vinfos[5].maxsolutions = _nj5;
4343 std::vector<int> vfree(0);
4354 if( bgotonextstatement )
4356 bool bgotonextstatement =
true;
4361 bgotonextstatement=
false;
4366 if( bgotonextstatement )
4383 IkReal j5array[1], cj5array[1], sj5array[1];
4384 bool j5valid[1]={
false};
4390 IkReal x305=x306.
value;
4401 j5array[0]=
IKatan2((new_r20*x305), (x305*(x307.
value)*(x308.
value)*(((((-1.0)*new_r01*sj4))+(((-1.0)*cj3*new_r20))))));
4402 sj5array[0]=
IKsin(j5array[0]);
4403 cj5array[0]=
IKcos(j5array[0]);
4404 if( j5array[0] >
IKPI )
4408 else if( j5array[0] < -
IKPI )
4409 { j5array[0]+=
IK2PI;
4412 for(
int ij5 = 0; ij5 < 1; ++ij5)
4418 _ij5[0] = ij5; _ij5[1] = -1;
4419 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
4423 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
4426 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
4428 IkReal evalcond[12];
4429 IkReal x309=
IKsin(j5);
4430 IkReal x310=
IKcos(j5);
4431 IkReal x311=(cj4*sj3);
4432 IkReal x312=(cj3*new_r10);
4433 IkReal x313=((1.0)*new_r01);
4434 IkReal x314=(cj3*new_r11);
4435 IkReal x315=((1.0)*new_r00);
4436 IkReal x316=((1.0)*x310);
4437 IkReal x317=(cj4*x309);
4438 IkReal x318=((1.0)*x309);
4439 evalcond[0]=((((-1.0)*sj4*x318))+new_r20);
4440 evalcond[1]=((((-1.0)*sj4*x316))+new_r21);
4441 evalcond[2]=(((new_r11*sj3))+x309+((cj3*new_r01)));
4442 evalcond[3]=(((new_r10*sj3))+(((-1.0)*x316))+((cj3*new_r00)));
4443 evalcond[4]=(((x310*x311))+((cj3*x309))+new_r01);
4444 evalcond[5]=(((x309*x311))+new_r00+(((-1.0)*cj3*x316)));
4445 evalcond[6]=(((sj3*x309))+(((-1.0)*cj3*cj4*x316))+new_r11);
4446 evalcond[7]=((((-1.0)*sj3*x315))+x312+(((-1.0)*x317)));
4447 evalcond[8]=((((-1.0)*sj3*x313))+(((-1.0)*cj4*x316))+x314);
4448 evalcond[9]=((((-1.0)*cj3*x317))+(((-1.0)*sj3*x316))+new_r10);
4449 evalcond[10]=(((new_r20*sj4))+((cj4*x312))+(((-1.0)*x318))+(((-1.0)*x311*x315)));
4450 evalcond[11]=(((cj4*x314))+(((-1.0)*x316))+((new_r21*sj4))+(((-1.0)*x311*x313)));
4458 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
4459 vinfos[0].jointtype = 1;
4460 vinfos[0].foffset = j0;
4461 vinfos[0].indices[0] = _ij0[0];
4462 vinfos[0].indices[1] = _ij0[1];
4463 vinfos[0].maxsolutions = _nj0;
4464 vinfos[1].jointtype = 1;
4465 vinfos[1].foffset = j1;
4466 vinfos[1].indices[0] = _ij1[0];
4467 vinfos[1].indices[1] = _ij1[1];
4468 vinfos[1].maxsolutions = _nj1;
4469 vinfos[2].jointtype = 1;
4470 vinfos[2].foffset = j2;
4471 vinfos[2].indices[0] = _ij2[0];
4472 vinfos[2].indices[1] = _ij2[1];
4473 vinfos[2].maxsolutions = _nj2;
4474 vinfos[3].jointtype = 1;
4475 vinfos[3].foffset = j3;
4476 vinfos[3].indices[0] = _ij3[0];
4477 vinfos[3].indices[1] = _ij3[1];
4478 vinfos[3].maxsolutions = _nj3;
4479 vinfos[4].jointtype = 1;
4480 vinfos[4].foffset = j4;
4481 vinfos[4].indices[0] = _ij4[0];
4482 vinfos[4].indices[1] = _ij4[1];
4483 vinfos[4].maxsolutions = _nj4;
4484 vinfos[5].jointtype = 1;
4485 vinfos[5].foffset = j5;
4486 vinfos[5].indices[0] = _ij5[0];
4487 vinfos[5].indices[1] = _ij5[1];
4488 vinfos[5].maxsolutions = _nj5;
4489 std::vector<int> vfree(0);
4502 IkReal j5array[1], cj5array[1], sj5array[1];
4503 bool j5valid[1]={
false};
4509 IkReal x319=x320.
value;
4516 j5array[0]=
IKatan2((new_r20*x319), (x319*(x321.
value)*((((new_r00*sj4))+((cj4*new_r20*sj3))))));
4517 sj5array[0]=
IKsin(j5array[0]);
4518 cj5array[0]=
IKcos(j5array[0]);
4519 if( j5array[0] >
IKPI )
4523 else if( j5array[0] < -
IKPI )
4524 { j5array[0]+=
IK2PI;
4527 for(
int ij5 = 0; ij5 < 1; ++ij5)
4533 _ij5[0] = ij5; _ij5[1] = -1;
4534 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
4538 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
4541 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
4543 IkReal evalcond[12];
4544 IkReal x322=
IKsin(j5);
4545 IkReal x323=
IKcos(j5);
4546 IkReal x324=(cj4*sj3);
4547 IkReal x325=(cj3*new_r10);
4548 IkReal x326=((1.0)*new_r01);
4549 IkReal x327=(cj3*new_r11);
4550 IkReal x328=((1.0)*new_r00);
4551 IkReal x329=((1.0)*x323);
4552 IkReal x330=(cj4*x322);
4553 IkReal x331=((1.0)*x322);
4554 evalcond[0]=((((-1.0)*sj4*x331))+new_r20);
4555 evalcond[1]=(new_r21+(((-1.0)*sj4*x329)));
4556 evalcond[2]=(((new_r11*sj3))+x322+((cj3*new_r01)));
4557 evalcond[3]=(((new_r10*sj3))+(((-1.0)*x329))+((cj3*new_r00)));
4558 evalcond[4]=(((x323*x324))+new_r01+((cj3*x322)));
4559 evalcond[5]=(((x322*x324))+(((-1.0)*cj3*x329))+new_r00);
4560 evalcond[6]=(((sj3*x322))+new_r11+(((-1.0)*cj3*cj4*x329)));
4561 evalcond[7]=(x325+(((-1.0)*x330))+(((-1.0)*sj3*x328)));
4562 evalcond[8]=(x327+(((-1.0)*cj4*x329))+(((-1.0)*sj3*x326)));
4563 evalcond[9]=((((-1.0)*cj3*x330))+new_r10+(((-1.0)*sj3*x329)));
4564 evalcond[10]=(((new_r20*sj4))+((cj4*x325))+(((-1.0)*x331))+(((-1.0)*x324*x328)));
4565 evalcond[11]=((((-1.0)*x329))+((cj4*x327))+((new_r21*sj4))+(((-1.0)*x324*x326)));
4573 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
4574 vinfos[0].jointtype = 1;
4575 vinfos[0].foffset = j0;
4576 vinfos[0].indices[0] = _ij0[0];
4577 vinfos[0].indices[1] = _ij0[1];
4578 vinfos[0].maxsolutions = _nj0;
4579 vinfos[1].jointtype = 1;
4580 vinfos[1].foffset = j1;
4581 vinfos[1].indices[0] = _ij1[0];
4582 vinfos[1].indices[1] = _ij1[1];
4583 vinfos[1].maxsolutions = _nj1;
4584 vinfos[2].jointtype = 1;
4585 vinfos[2].foffset = j2;
4586 vinfos[2].indices[0] = _ij2[0];
4587 vinfos[2].indices[1] = _ij2[1];
4588 vinfos[2].maxsolutions = _nj2;
4589 vinfos[3].jointtype = 1;
4590 vinfos[3].foffset = j3;
4591 vinfos[3].indices[0] = _ij3[0];
4592 vinfos[3].indices[1] = _ij3[1];
4593 vinfos[3].maxsolutions = _nj3;
4594 vinfos[4].jointtype = 1;
4595 vinfos[4].foffset = j4;
4596 vinfos[4].indices[0] = _ij4[0];
4597 vinfos[4].indices[1] = _ij4[1];
4598 vinfos[4].maxsolutions = _nj4;
4599 vinfos[5].jointtype = 1;
4600 vinfos[5].foffset = j5;
4601 vinfos[5].indices[0] = _ij5[0];
4602 vinfos[5].indices[1] = _ij5[1];
4603 vinfos[5].maxsolutions = _nj5;
4604 std::vector<int> vfree(0);
4617 IkReal j5array[1], cj5array[1], sj5array[1];
4618 bool j5valid[1]={
false};
4628 j5array[0]=((-1.5707963267949)+(((1.5707963267949)*(x332.
value)))+(x333.
value));
4629 sj5array[0]=
IKsin(j5array[0]);
4630 cj5array[0]=
IKcos(j5array[0]);
4631 if( j5array[0] >
IKPI )
4635 else if( j5array[0] < -
IKPI )
4636 { j5array[0]+=
IK2PI;
4639 for(
int ij5 = 0; ij5 < 1; ++ij5)
4645 _ij5[0] = ij5; _ij5[1] = -1;
4646 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
4650 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
4653 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
4655 IkReal evalcond[12];
4656 IkReal x334=
IKsin(j5);
4657 IkReal x335=
IKcos(j5);
4658 IkReal x336=(cj4*sj3);
4659 IkReal x337=(cj3*new_r10);
4660 IkReal x338=((1.0)*new_r01);
4661 IkReal x339=(cj3*new_r11);
4662 IkReal x340=((1.0)*new_r00);
4663 IkReal x341=((1.0)*x335);
4664 IkReal x342=(cj4*x334);
4665 IkReal x343=((1.0)*x334);
4666 evalcond[0]=((((-1.0)*sj4*x343))+new_r20);
4667 evalcond[1]=((((-1.0)*sj4*x341))+new_r21);
4668 evalcond[2]=(((new_r11*sj3))+x334+((cj3*new_r01)));
4669 evalcond[3]=(((new_r10*sj3))+((cj3*new_r00))+(((-1.0)*x341)));
4670 evalcond[4]=(((x335*x336))+((cj3*x334))+new_r01);
4671 evalcond[5]=((((-1.0)*cj3*x341))+((x334*x336))+new_r00);
4672 evalcond[6]=(((sj3*x334))+(((-1.0)*cj3*cj4*x341))+new_r11);
4673 evalcond[7]=(x337+(((-1.0)*sj3*x340))+(((-1.0)*x342)));
4674 evalcond[8]=((((-1.0)*sj3*x338))+(((-1.0)*cj4*x341))+x339);
4675 evalcond[9]=((((-1.0)*cj3*x342))+new_r10+(((-1.0)*sj3*x341)));
4676 evalcond[10]=(((new_r20*sj4))+(((-1.0)*x336*x340))+((cj4*x337))+(((-1.0)*x343)));
4677 evalcond[11]=(((cj4*x339))+((new_r21*sj4))+(((-1.0)*x341))+(((-1.0)*x336*x338)));
4685 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
4686 vinfos[0].jointtype = 1;
4687 vinfos[0].foffset = j0;
4688 vinfos[0].indices[0] = _ij0[0];
4689 vinfos[0].indices[1] = _ij0[1];
4690 vinfos[0].maxsolutions = _nj0;
4691 vinfos[1].jointtype = 1;
4692 vinfos[1].foffset = j1;
4693 vinfos[1].indices[0] = _ij1[0];
4694 vinfos[1].indices[1] = _ij1[1];
4695 vinfos[1].maxsolutions = _nj1;
4696 vinfos[2].jointtype = 1;
4697 vinfos[2].foffset = j2;
4698 vinfos[2].indices[0] = _ij2[0];
4699 vinfos[2].indices[1] = _ij2[1];
4700 vinfos[2].maxsolutions = _nj2;
4701 vinfos[3].jointtype = 1;
4702 vinfos[3].foffset = j3;
4703 vinfos[3].indices[0] = _ij3[0];
4704 vinfos[3].indices[1] = _ij3[1];
4705 vinfos[3].maxsolutions = _nj3;
4706 vinfos[4].jointtype = 1;
4707 vinfos[4].foffset = j4;
4708 vinfos[4].indices[0] = _ij4[0];
4709 vinfos[4].indices[1] = _ij4[1];
4710 vinfos[4].maxsolutions = _nj4;
4711 vinfos[5].jointtype = 1;
4712 vinfos[5].foffset = j5;
4713 vinfos[5].indices[0] = _ij5[0];
4714 vinfos[5].indices[1] = _ij5[1];
4715 vinfos[5].maxsolutions = _nj5;
4716 std::vector<int> vfree(0);
4735 IkReal j3array[1], cj3array[1], sj3array[1];
4736 bool j3valid[1]={
false};
4746 j3array[0]=((-1.5707963267949)+(((1.5707963267949)*(x344.
value)))+(x345.
value));
4747 sj3array[0]=
IKsin(j3array[0]);
4748 cj3array[0]=
IKcos(j3array[0]);
4749 if( j3array[0] >
IKPI )
4753 else if( j3array[0] < -
IKPI )
4754 { j3array[0]+=
IK2PI;
4757 for(
int ij3 = 0; ij3 < 1; ++ij3)
4763 _ij3[0] = ij3; _ij3[1] = -1;
4764 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
4768 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
4771 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
4774 IkReal x346=
IKsin(j3);
4775 IkReal x347=
IKcos(j3);
4776 IkReal x348=((1.0)*cj4);
4777 IkReal x349=((1.0)*sj4);
4778 IkReal x350=(new_r02*x346);
4779 IkReal x351=(new_r12*x347);
4780 IkReal x352=(sj4*x347);
4781 evalcond[0]=(x352+new_r12);
4782 evalcond[1]=((((-1.0)*x346*x349))+new_r02);
4783 evalcond[2]=(((new_r02*x347))+((new_r12*x346)));
4784 evalcond[3]=(sj4+(((-1.0)*x350))+x351);
4785 evalcond[4]=((((-1.0)*x348*x350))+((cj4*x351))+((new_r22*sj4)));
4786 evalcond[5]=((((-1.0)*new_r00*x346*x349))+(((-1.0)*new_r20*x348))+((new_r10*x352)));
4787 evalcond[6]=((((-1.0)*new_r01*x346*x349))+(((-1.0)*new_r21*x348))+((new_r11*x352)));
4788 evalcond[7]=((1.0)+((sj4*x351))+(((-1.0)*x349*x350))+(((-1.0)*new_r22*x348)));
4799 j5eval[2]=((
IKabs(new_r20))+(
IKabs(new_r21)));
4800 if(
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000 ||
IKabs(j5eval[2]) < 0.0000010000000000 )
4806 if(
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000 )
4813 if(
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000 ||
IKabs(j5eval[2]) < 0.0000010000000000 )
4817 bool bgotonextstatement =
true;
4820 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(j4))), 6.28318530717959)));
4821 evalcond[1]=new_r12;
4822 evalcond[2]=new_r02;
4823 evalcond[3]=new_r20;
4824 evalcond[4]=new_r21;
4825 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 &&
IKabs(evalcond[2]) < 0.0000050000000000 &&
IKabs(evalcond[3]) < 0.0000050000000000 &&
IKabs(evalcond[4]) < 0.0000050000000000 )
4827 bgotonextstatement=
false;
4829 IkReal j5array[1], cj5array[1], sj5array[1];
4830 bool j5valid[1]={
false};
4832 IkReal x353=((1.0)*new_r01);
4835 j5array[0]=
IKatan2(((((-1.0)*cj3*x353))+(((-1.0)*new_r00*sj3))), (((cj3*new_r00))+(((-1.0)*sj3*x353))));
4836 sj5array[0]=
IKsin(j5array[0]);
4837 cj5array[0]=
IKcos(j5array[0]);
4838 if( j5array[0] >
IKPI )
4842 else if( j5array[0] < -
IKPI )
4843 { j5array[0]+=
IK2PI;
4846 for(
int ij5 = 0; ij5 < 1; ++ij5)
4852 _ij5[0] = ij5; _ij5[1] = -1;
4853 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
4857 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
4860 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
4863 IkReal x354=
IKsin(j5);
4864 IkReal x355=
IKcos(j5);
4865 IkReal x356=((1.0)*sj3);
4866 IkReal x357=(sj3*x354);
4867 IkReal x358=((1.0)*x355);
4868 IkReal x359=((1.0)*x354);
4869 IkReal x360=(cj3*x358);
4870 evalcond[0]=(((new_r11*sj3))+x354+((cj3*new_r01)));
4871 evalcond[1]=(((new_r10*sj3))+(((-1.0)*x358))+((cj3*new_r00)));
4872 evalcond[2]=(((cj3*x354))+((sj3*x355))+new_r01);
4873 evalcond[3]=((((-1.0)*x360))+x357+new_r00);
4874 evalcond[4]=((((-1.0)*x360))+x357+new_r11);
4875 evalcond[5]=((((-1.0)*x359))+((cj3*new_r10))+(((-1.0)*new_r00*x356)));
4876 evalcond[6]=((((-1.0)*x358))+(((-1.0)*new_r01*x356))+((cj3*new_r11)));
4877 evalcond[7]=((((-1.0)*cj3*x359))+new_r10+(((-1.0)*x355*x356)));
4885 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
4886 vinfos[0].jointtype = 1;
4887 vinfos[0].foffset = j0;
4888 vinfos[0].indices[0] = _ij0[0];
4889 vinfos[0].indices[1] = _ij0[1];
4890 vinfos[0].maxsolutions = _nj0;
4891 vinfos[1].jointtype = 1;
4892 vinfos[1].foffset = j1;
4893 vinfos[1].indices[0] = _ij1[0];
4894 vinfos[1].indices[1] = _ij1[1];
4895 vinfos[1].maxsolutions = _nj1;
4896 vinfos[2].jointtype = 1;
4897 vinfos[2].foffset = j2;
4898 vinfos[2].indices[0] = _ij2[0];
4899 vinfos[2].indices[1] = _ij2[1];
4900 vinfos[2].maxsolutions = _nj2;
4901 vinfos[3].jointtype = 1;
4902 vinfos[3].foffset = j3;
4903 vinfos[3].indices[0] = _ij3[0];
4904 vinfos[3].indices[1] = _ij3[1];
4905 vinfos[3].maxsolutions = _nj3;
4906 vinfos[4].jointtype = 1;
4907 vinfos[4].foffset = j4;
4908 vinfos[4].indices[0] = _ij4[0];
4909 vinfos[4].indices[1] = _ij4[1];
4910 vinfos[4].maxsolutions = _nj4;
4911 vinfos[5].jointtype = 1;
4912 vinfos[5].foffset = j5;
4913 vinfos[5].indices[0] = _ij5[0];
4914 vinfos[5].indices[1] = _ij5[1];
4915 vinfos[5].maxsolutions = _nj5;
4916 std::vector<int> vfree(0);
4924 if( bgotonextstatement )
4926 bool bgotonextstatement =
true;
4929 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-3.14159265358979)+j4)))), 6.28318530717959)));
4930 evalcond[1]=new_r12;
4931 evalcond[2]=new_r02;
4932 evalcond[3]=new_r20;
4933 evalcond[4]=new_r21;
4934 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 &&
IKabs(evalcond[2]) < 0.0000050000000000 &&
IKabs(evalcond[3]) < 0.0000050000000000 &&
IKabs(evalcond[4]) < 0.0000050000000000 )
4936 bgotonextstatement=
false;
4938 IkReal j5array[1], cj5array[1], sj5array[1];
4939 bool j5valid[1]={
false};
4941 IkReal x361=((1.0)*cj3);
4944 j5array[0]=
IKatan2(((((-1.0)*new_r11*sj3))+(((-1.0)*new_r01*x361))), (((new_r01*sj3))+(((-1.0)*new_r11*x361))));
4945 sj5array[0]=
IKsin(j5array[0]);
4946 cj5array[0]=
IKcos(j5array[0]);
4947 if( j5array[0] >
IKPI )
4951 else if( j5array[0] < -
IKPI )
4952 { j5array[0]+=
IK2PI;
4955 for(
int ij5 = 0; ij5 < 1; ++ij5)
4961 _ij5[0] = ij5; _ij5[1] = -1;
4962 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
4966 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
4969 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
4972 IkReal x362=
IKsin(j5);
4973 IkReal x363=
IKcos(j5);
4974 IkReal x364=((1.0)*sj3);
4975 IkReal x365=(cj3*x362);
4976 IkReal x366=((1.0)*x363);
4977 IkReal x367=(x363*x364);
4978 evalcond[0]=(((new_r11*sj3))+x362+((cj3*new_r01)));
4979 evalcond[1]=((((-1.0)*new_r00*x364))+x362+((cj3*new_r10)));
4980 evalcond[2]=(x363+((cj3*new_r11))+(((-1.0)*new_r01*x364)));
4981 evalcond[3]=(((new_r10*sj3))+(((-1.0)*x366))+((cj3*new_r00)));
4982 evalcond[4]=(((sj3*x362))+new_r11+((cj3*x363)));
4983 evalcond[5]=((((-1.0)*x367))+x365+new_r01);
4984 evalcond[6]=((((-1.0)*x367))+x365+new_r10);
4985 evalcond[7]=((((-1.0)*x362*x364))+new_r00+(((-1.0)*cj3*x366)));
4993 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
4994 vinfos[0].jointtype = 1;
4995 vinfos[0].foffset = j0;
4996 vinfos[0].indices[0] = _ij0[0];
4997 vinfos[0].indices[1] = _ij0[1];
4998 vinfos[0].maxsolutions = _nj0;
4999 vinfos[1].jointtype = 1;
5000 vinfos[1].foffset = j1;
5001 vinfos[1].indices[0] = _ij1[0];
5002 vinfos[1].indices[1] = _ij1[1];
5003 vinfos[1].maxsolutions = _nj1;
5004 vinfos[2].jointtype = 1;
5005 vinfos[2].foffset = j2;
5006 vinfos[2].indices[0] = _ij2[0];
5007 vinfos[2].indices[1] = _ij2[1];
5008 vinfos[2].maxsolutions = _nj2;
5009 vinfos[3].jointtype = 1;
5010 vinfos[3].foffset = j3;
5011 vinfos[3].indices[0] = _ij3[0];
5012 vinfos[3].indices[1] = _ij3[1];
5013 vinfos[3].maxsolutions = _nj3;
5014 vinfos[4].jointtype = 1;
5015 vinfos[4].foffset = j4;
5016 vinfos[4].indices[0] = _ij4[0];
5017 vinfos[4].indices[1] = _ij4[1];
5018 vinfos[4].maxsolutions = _nj4;
5019 vinfos[5].jointtype = 1;
5020 vinfos[5].foffset = j5;
5021 vinfos[5].indices[0] = _ij5[0];
5022 vinfos[5].indices[1] = _ij5[1];
5023 vinfos[5].maxsolutions = _nj5;
5024 std::vector<int> vfree(0);
5032 if( bgotonextstatement )
5034 bool bgotonextstatement =
true;
5037 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-1.5707963267949)+j4)))), 6.28318530717959)));
5038 evalcond[1]=new_r22;
5039 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 )
5041 bgotonextstatement=
false;
5043 IkReal j5array[1], cj5array[1], sj5array[1];
5044 bool j5valid[1]={
false};
5048 j5array[0]=
IKatan2(new_r20, new_r21);
5049 sj5array[0]=
IKsin(j5array[0]);
5050 cj5array[0]=
IKcos(j5array[0]);
5051 if( j5array[0] >
IKPI )
5055 else if( j5array[0] < -
IKPI )
5056 { j5array[0]+=
IK2PI;
5059 for(
int ij5 = 0; ij5 < 1; ++ij5)
5065 _ij5[0] = ij5; _ij5[1] = -1;
5066 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
5070 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
5073 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
5076 IkReal x368=
IKsin(j5);
5077 IkReal x369=
IKcos(j5);
5078 IkReal x370=((1.0)*x369);
5079 IkReal x371=((1.0)*x368);
5080 evalcond[0]=((((-1.0)*x371))+new_r20);
5081 evalcond[1]=((((-1.0)*x370))+new_r21);
5082 evalcond[2]=(((sj3*x368))+new_r11);
5083 evalcond[3]=((((-1.0)*new_r12*x371))+new_r01);
5084 evalcond[4]=((((-1.0)*cj3*x370))+new_r00);
5085 evalcond[5]=((((-1.0)*sj3*x370))+new_r10);
5086 evalcond[6]=(((new_r11*sj3))+x368+((cj3*new_r01)));
5087 evalcond[7]=(((new_r10*sj3))+(((-1.0)*x370))+((cj3*new_r00)));
5095 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
5096 vinfos[0].jointtype = 1;
5097 vinfos[0].foffset = j0;
5098 vinfos[0].indices[0] = _ij0[0];
5099 vinfos[0].indices[1] = _ij0[1];
5100 vinfos[0].maxsolutions = _nj0;
5101 vinfos[1].jointtype = 1;
5102 vinfos[1].foffset = j1;
5103 vinfos[1].indices[0] = _ij1[0];
5104 vinfos[1].indices[1] = _ij1[1];
5105 vinfos[1].maxsolutions = _nj1;
5106 vinfos[2].jointtype = 1;
5107 vinfos[2].foffset = j2;
5108 vinfos[2].indices[0] = _ij2[0];
5109 vinfos[2].indices[1] = _ij2[1];
5110 vinfos[2].maxsolutions = _nj2;
5111 vinfos[3].jointtype = 1;
5112 vinfos[3].foffset = j3;
5113 vinfos[3].indices[0] = _ij3[0];
5114 vinfos[3].indices[1] = _ij3[1];
5115 vinfos[3].maxsolutions = _nj3;
5116 vinfos[4].jointtype = 1;
5117 vinfos[4].foffset = j4;
5118 vinfos[4].indices[0] = _ij4[0];
5119 vinfos[4].indices[1] = _ij4[1];
5120 vinfos[4].maxsolutions = _nj4;
5121 vinfos[5].jointtype = 1;
5122 vinfos[5].foffset = j5;
5123 vinfos[5].indices[0] = _ij5[0];
5124 vinfos[5].indices[1] = _ij5[1];
5125 vinfos[5].maxsolutions = _nj5;
5126 std::vector<int> vfree(0);
5134 if( bgotonextstatement )
5136 bool bgotonextstatement =
true;
5139 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((1.5707963267949)+j4)))), 6.28318530717959)));
5140 evalcond[1]=new_r22;
5141 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 )
5143 bgotonextstatement=
false;
5145 IkReal j5array[1], cj5array[1], sj5array[1];
5146 bool j5valid[1]={
false};
5150 j5array[0]=
IKatan2(((-1.0)*new_r20), ((-1.0)*new_r21));
5151 sj5array[0]=
IKsin(j5array[0]);
5152 cj5array[0]=
IKcos(j5array[0]);
5153 if( j5array[0] >
IKPI )
5157 else if( j5array[0] < -
IKPI )
5158 { j5array[0]+=
IK2PI;
5161 for(
int ij5 = 0; ij5 < 1; ++ij5)
5167 _ij5[0] = ij5; _ij5[1] = -1;
5168 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
5172 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
5175 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
5178 IkReal x372=
IKsin(j5);
5179 IkReal x373=
IKcos(j5);
5180 IkReal x374=((1.0)*x373);
5181 evalcond[0]=(x372+new_r20);
5182 evalcond[1]=(x373+new_r21);
5183 evalcond[2]=(((new_r12*x372))+new_r01);
5184 evalcond[3]=(((sj3*x372))+new_r11);
5185 evalcond[4]=((((-1.0)*cj3*x374))+new_r00);
5186 evalcond[5]=((((-1.0)*sj3*x374))+new_r10);
5187 evalcond[6]=(((new_r11*sj3))+x372+((cj3*new_r01)));
5188 evalcond[7]=(((new_r10*sj3))+(((-1.0)*x374))+((cj3*new_r00)));
5196 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
5197 vinfos[0].jointtype = 1;
5198 vinfos[0].foffset = j0;
5199 vinfos[0].indices[0] = _ij0[0];
5200 vinfos[0].indices[1] = _ij0[1];
5201 vinfos[0].maxsolutions = _nj0;
5202 vinfos[1].jointtype = 1;
5203 vinfos[1].foffset = j1;
5204 vinfos[1].indices[0] = _ij1[0];
5205 vinfos[1].indices[1] = _ij1[1];
5206 vinfos[1].maxsolutions = _nj1;
5207 vinfos[2].jointtype = 1;
5208 vinfos[2].foffset = j2;
5209 vinfos[2].indices[0] = _ij2[0];
5210 vinfos[2].indices[1] = _ij2[1];
5211 vinfos[2].maxsolutions = _nj2;
5212 vinfos[3].jointtype = 1;
5213 vinfos[3].foffset = j3;
5214 vinfos[3].indices[0] = _ij3[0];
5215 vinfos[3].indices[1] = _ij3[1];
5216 vinfos[3].maxsolutions = _nj3;
5217 vinfos[4].jointtype = 1;
5218 vinfos[4].foffset = j4;
5219 vinfos[4].indices[0] = _ij4[0];
5220 vinfos[4].indices[1] = _ij4[1];
5221 vinfos[4].maxsolutions = _nj4;
5222 vinfos[5].jointtype = 1;
5223 vinfos[5].foffset = j5;
5224 vinfos[5].indices[0] = _ij5[0];
5225 vinfos[5].indices[1] = _ij5[1];
5226 vinfos[5].maxsolutions = _nj5;
5227 std::vector<int> vfree(0);
5235 if( bgotonextstatement )
5237 bool bgotonextstatement =
true;
5240 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(j3))), 6.28318530717959)));
5241 evalcond[1]=new_r02;
5242 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 )
5244 bgotonextstatement=
false;
5246 IkReal j5array[1], cj5array[1], sj5array[1];
5247 bool j5valid[1]={
false};
5251 j5array[0]=
IKatan2(((-1.0)*new_r01), new_r00);
5252 sj5array[0]=
IKsin(j5array[0]);
5253 cj5array[0]=
IKcos(j5array[0]);
5254 if( j5array[0] >
IKPI )
5258 else if( j5array[0] < -
IKPI )
5259 { j5array[0]+=
IK2PI;
5262 for(
int ij5 = 0; ij5 < 1; ++ij5)
5268 _ij5[0] = ij5; _ij5[1] = -1;
5269 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
5273 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
5276 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
5279 IkReal x375=
IKsin(j5);
5280 IkReal x376=
IKcos(j5);
5281 IkReal x377=((1.0)*cj4);
5282 IkReal x378=((1.0)*x376);
5283 IkReal x379=((1.0)*x375);
5284 evalcond[0]=(x375+new_r01);
5285 evalcond[1]=((((-1.0)*x378))+new_r00);
5286 evalcond[2]=((((-1.0)*sj4*x379))+new_r20);
5287 evalcond[3]=((((-1.0)*sj4*x378))+new_r21);
5288 evalcond[4]=((((-1.0)*x376*x377))+new_r11);
5289 evalcond[5]=(new_r10+(((-1.0)*x375*x377)));
5290 evalcond[6]=(((new_r20*sj4))+((cj4*new_r10))+(((-1.0)*x379)));
5291 evalcond[7]=(((cj4*new_r11))+(((-1.0)*x378))+((new_r21*sj4)));
5299 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
5300 vinfos[0].jointtype = 1;
5301 vinfos[0].foffset = j0;
5302 vinfos[0].indices[0] = _ij0[0];
5303 vinfos[0].indices[1] = _ij0[1];
5304 vinfos[0].maxsolutions = _nj0;
5305 vinfos[1].jointtype = 1;
5306 vinfos[1].foffset = j1;
5307 vinfos[1].indices[0] = _ij1[0];
5308 vinfos[1].indices[1] = _ij1[1];
5309 vinfos[1].maxsolutions = _nj1;
5310 vinfos[2].jointtype = 1;
5311 vinfos[2].foffset = j2;
5312 vinfos[2].indices[0] = _ij2[0];
5313 vinfos[2].indices[1] = _ij2[1];
5314 vinfos[2].maxsolutions = _nj2;
5315 vinfos[3].jointtype = 1;
5316 vinfos[3].foffset = j3;
5317 vinfos[3].indices[0] = _ij3[0];
5318 vinfos[3].indices[1] = _ij3[1];
5319 vinfos[3].maxsolutions = _nj3;
5320 vinfos[4].jointtype = 1;
5321 vinfos[4].foffset = j4;
5322 vinfos[4].indices[0] = _ij4[0];
5323 vinfos[4].indices[1] = _ij4[1];
5324 vinfos[4].maxsolutions = _nj4;
5325 vinfos[5].jointtype = 1;
5326 vinfos[5].foffset = j5;
5327 vinfos[5].indices[0] = _ij5[0];
5328 vinfos[5].indices[1] = _ij5[1];
5329 vinfos[5].maxsolutions = _nj5;
5330 std::vector<int> vfree(0);
5338 if( bgotonextstatement )
5340 bool bgotonextstatement =
true;
5343 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-3.14159265358979)+j3)))), 6.28318530717959)));
5344 evalcond[1]=new_r02;
5345 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 )
5347 bgotonextstatement=
false;
5349 IkReal j5array[1], cj5array[1], sj5array[1];
5350 bool j5valid[1]={
false};
5354 j5array[0]=
IKatan2(new_r01, ((-1.0)*new_r00));
5355 sj5array[0]=
IKsin(j5array[0]);
5356 cj5array[0]=
IKcos(j5array[0]);
5357 if( j5array[0] >
IKPI )
5361 else if( j5array[0] < -
IKPI )
5362 { j5array[0]+=
IK2PI;
5365 for(
int ij5 = 0; ij5 < 1; ++ij5)
5371 _ij5[0] = ij5; _ij5[1] = -1;
5372 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
5376 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
5379 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
5382 IkReal x380=
IKsin(j5);
5383 IkReal x381=
IKcos(j5);
5384 IkReal x382=((1.0)*cj4);
5385 IkReal x383=((1.0)*x381);
5386 IkReal x384=((1.0)*x380);
5387 evalcond[0]=(x380+(((-1.0)*new_r01)));
5388 evalcond[1]=(new_r11+((cj4*x381)));
5389 evalcond[2]=((((-1.0)*sj4*x384))+new_r20);
5390 evalcond[3]=((((-1.0)*sj4*x383))+new_r21);
5391 evalcond[4]=((((-1.0)*x383))+(((-1.0)*new_r00)));
5392 evalcond[5]=((((-1.0)*x380*x382))+(((-1.0)*new_r10)));
5393 evalcond[6]=((((-1.0)*new_r10*x382))+((new_r20*sj4))+(((-1.0)*x384)));
5394 evalcond[7]=((((-1.0)*new_r11*x382))+(((-1.0)*x383))+((new_r21*sj4)));
5402 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
5403 vinfos[0].jointtype = 1;
5404 vinfos[0].foffset = j0;
5405 vinfos[0].indices[0] = _ij0[0];
5406 vinfos[0].indices[1] = _ij0[1];
5407 vinfos[0].maxsolutions = _nj0;
5408 vinfos[1].jointtype = 1;
5409 vinfos[1].foffset = j1;
5410 vinfos[1].indices[0] = _ij1[0];
5411 vinfos[1].indices[1] = _ij1[1];
5412 vinfos[1].maxsolutions = _nj1;
5413 vinfos[2].jointtype = 1;
5414 vinfos[2].foffset = j2;
5415 vinfos[2].indices[0] = _ij2[0];
5416 vinfos[2].indices[1] = _ij2[1];
5417 vinfos[2].maxsolutions = _nj2;
5418 vinfos[3].jointtype = 1;
5419 vinfos[3].foffset = j3;
5420 vinfos[3].indices[0] = _ij3[0];
5421 vinfos[3].indices[1] = _ij3[1];
5422 vinfos[3].maxsolutions = _nj3;
5423 vinfos[4].jointtype = 1;
5424 vinfos[4].foffset = j4;
5425 vinfos[4].indices[0] = _ij4[0];
5426 vinfos[4].indices[1] = _ij4[1];
5427 vinfos[4].maxsolutions = _nj4;
5428 vinfos[5].jointtype = 1;
5429 vinfos[5].foffset = j5;
5430 vinfos[5].indices[0] = _ij5[0];
5431 vinfos[5].indices[1] = _ij5[1];
5432 vinfos[5].maxsolutions = _nj5;
5433 std::vector<int> vfree(0);
5441 if( bgotonextstatement )
5443 bool bgotonextstatement =
true;
5446 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-1.5707963267949)+j3)))), 6.28318530717959)));
5447 evalcond[1]=new_r12;
5448 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 )
5450 bgotonextstatement=
false;
5452 IkReal j5array[1], cj5array[1], sj5array[1];
5453 bool j5valid[1]={
false};
5457 j5array[0]=
IKatan2(((-1.0)*new_r11), new_r10);
5458 sj5array[0]=
IKsin(j5array[0]);
5459 cj5array[0]=
IKcos(j5array[0]);
5460 if( j5array[0] >
IKPI )
5464 else if( j5array[0] < -
IKPI )
5465 { j5array[0]+=
IK2PI;
5468 for(
int ij5 = 0; ij5 < 1; ++ij5)
5474 _ij5[0] = ij5; _ij5[1] = -1;
5475 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
5479 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
5482 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
5485 IkReal x385=
IKcos(j5);
5486 IkReal x386=
IKsin(j5);
5487 IkReal x387=((1.0)*cj4);
5488 IkReal x388=((1.0)*x385);
5489 IkReal x389=((1.0)*x386);
5490 evalcond[0]=(x386+new_r11);
5491 evalcond[1]=((((-1.0)*x388))+new_r10);
5492 evalcond[2]=(new_r01+((cj4*x385)));
5493 evalcond[3]=(new_r00+((cj4*x386)));
5494 evalcond[4]=((((-1.0)*new_r02*x389))+new_r20);
5495 evalcond[5]=((((-1.0)*new_r02*x388))+new_r21);
5496 evalcond[6]=(((new_r20*sj4))+(((-1.0)*new_r00*x387))+(((-1.0)*x389)));
5497 evalcond[7]=((((-1.0)*new_r01*x387))+(((-1.0)*x388))+((new_r21*sj4)));
5505 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
5506 vinfos[0].jointtype = 1;
5507 vinfos[0].foffset = j0;
5508 vinfos[0].indices[0] = _ij0[0];
5509 vinfos[0].indices[1] = _ij0[1];
5510 vinfos[0].maxsolutions = _nj0;
5511 vinfos[1].jointtype = 1;
5512 vinfos[1].foffset = j1;
5513 vinfos[1].indices[0] = _ij1[0];
5514 vinfos[1].indices[1] = _ij1[1];
5515 vinfos[1].maxsolutions = _nj1;
5516 vinfos[2].jointtype = 1;
5517 vinfos[2].foffset = j2;
5518 vinfos[2].indices[0] = _ij2[0];
5519 vinfos[2].indices[1] = _ij2[1];
5520 vinfos[2].maxsolutions = _nj2;
5521 vinfos[3].jointtype = 1;
5522 vinfos[3].foffset = j3;
5523 vinfos[3].indices[0] = _ij3[0];
5524 vinfos[3].indices[1] = _ij3[1];
5525 vinfos[3].maxsolutions = _nj3;
5526 vinfos[4].jointtype = 1;
5527 vinfos[4].foffset = j4;
5528 vinfos[4].indices[0] = _ij4[0];
5529 vinfos[4].indices[1] = _ij4[1];
5530 vinfos[4].maxsolutions = _nj4;
5531 vinfos[5].jointtype = 1;
5532 vinfos[5].foffset = j5;
5533 vinfos[5].indices[0] = _ij5[0];
5534 vinfos[5].indices[1] = _ij5[1];
5535 vinfos[5].maxsolutions = _nj5;
5536 std::vector<int> vfree(0);
5544 if( bgotonextstatement )
5546 bool bgotonextstatement =
true;
5549 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((1.5707963267949)+j3)))), 6.28318530717959)));
5550 evalcond[1]=new_r12;
5551 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 )
5553 bgotonextstatement=
false;
5558 j3=-1.5707963267949;
5560 j5eval[1]=
IKsign(new_r02);
5561 j5eval[2]=((
IKabs(new_r20))+(
IKabs(new_r21)));
5562 if(
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000 ||
IKabs(j5eval[2]) < 0.0000010000000000 )
5568 j3=-1.5707963267949;
5570 if(
IKabs(j5eval[0]) < 0.0000010000000000 )
5576 j3=-1.5707963267949;
5579 if(
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000 )
5583 bool bgotonextstatement =
true;
5586 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-1.5707963267949)+j4)))), 6.28318530717959)));
5587 evalcond[1]=new_r22;
5588 evalcond[2]=new_r01;
5589 evalcond[3]=new_r00;
5590 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 &&
IKabs(evalcond[2]) < 0.0000050000000000 &&
IKabs(evalcond[3]) < 0.0000050000000000 )
5592 bgotonextstatement=
false;
5594 IkReal j5array[1], cj5array[1], sj5array[1];
5595 bool j5valid[1]={
false};
5599 j5array[0]=
IKatan2(new_r20, new_r21);
5600 sj5array[0]=
IKsin(j5array[0]);
5601 cj5array[0]=
IKcos(j5array[0]);
5602 if( j5array[0] >
IKPI )
5606 else if( j5array[0] < -
IKPI )
5607 { j5array[0]+=
IK2PI;
5610 for(
int ij5 = 0; ij5 < 1; ++ij5)
5616 _ij5[0] = ij5; _ij5[1] = -1;
5617 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
5621 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
5624 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
5627 IkReal x390=
IKsin(j5);
5628 IkReal x391=((1.0)*(
IKcos(j5)));
5629 evalcond[0]=((((-1.0)*x390))+new_r20);
5630 evalcond[1]=((((-1.0)*x391))+new_r21);
5631 evalcond[2]=(x390+(((-1.0)*new_r11)));
5632 evalcond[3]=((((-1.0)*x391))+(((-1.0)*new_r10)));
5640 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
5641 vinfos[0].jointtype = 1;
5642 vinfos[0].foffset = j0;
5643 vinfos[0].indices[0] = _ij0[0];
5644 vinfos[0].indices[1] = _ij0[1];
5645 vinfos[0].maxsolutions = _nj0;
5646 vinfos[1].jointtype = 1;
5647 vinfos[1].foffset = j1;
5648 vinfos[1].indices[0] = _ij1[0];
5649 vinfos[1].indices[1] = _ij1[1];
5650 vinfos[1].maxsolutions = _nj1;
5651 vinfos[2].jointtype = 1;
5652 vinfos[2].foffset = j2;
5653 vinfos[2].indices[0] = _ij2[0];
5654 vinfos[2].indices[1] = _ij2[1];
5655 vinfos[2].maxsolutions = _nj2;
5656 vinfos[3].jointtype = 1;
5657 vinfos[3].foffset = j3;
5658 vinfos[3].indices[0] = _ij3[0];
5659 vinfos[3].indices[1] = _ij3[1];
5660 vinfos[3].maxsolutions = _nj3;
5661 vinfos[4].jointtype = 1;
5662 vinfos[4].foffset = j4;
5663 vinfos[4].indices[0] = _ij4[0];
5664 vinfos[4].indices[1] = _ij4[1];
5665 vinfos[4].maxsolutions = _nj4;
5666 vinfos[5].jointtype = 1;
5667 vinfos[5].foffset = j5;
5668 vinfos[5].indices[0] = _ij5[0];
5669 vinfos[5].indices[1] = _ij5[1];
5670 vinfos[5].maxsolutions = _nj5;
5671 std::vector<int> vfree(0);
5679 if( bgotonextstatement )
5681 bool bgotonextstatement =
true;
5684 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((1.5707963267949)+j4)))), 6.28318530717959)));
5685 evalcond[1]=new_r22;
5686 evalcond[2]=new_r01;
5687 evalcond[3]=new_r00;
5688 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 &&
IKabs(evalcond[2]) < 0.0000050000000000 &&
IKabs(evalcond[3]) < 0.0000050000000000 )
5690 bgotonextstatement=
false;
5692 IkReal j5array[1], cj5array[1], sj5array[1];
5693 bool j5valid[1]={
false};
5697 j5array[0]=
IKatan2(new_r11, ((-1.0)*new_r21));
5698 sj5array[0]=
IKsin(j5array[0]);
5699 cj5array[0]=
IKcos(j5array[0]);
5700 if( j5array[0] >
IKPI )
5704 else if( j5array[0] < -
IKPI )
5705 { j5array[0]+=
IK2PI;
5708 for(
int ij5 = 0; ij5 < 1; ++ij5)
5714 _ij5[0] = ij5; _ij5[1] = -1;
5715 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
5719 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
5722 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
5725 IkReal x392=
IKsin(j5);
5726 IkReal x393=
IKcos(j5);
5727 evalcond[0]=(x392+new_r20);
5728 evalcond[1]=(x393+new_r21);
5729 evalcond[2]=(x392+(((-1.0)*new_r11)));
5730 evalcond[3]=((((-1.0)*x393))+(((-1.0)*new_r10)));
5738 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
5739 vinfos[0].jointtype = 1;
5740 vinfos[0].foffset = j0;
5741 vinfos[0].indices[0] = _ij0[0];
5742 vinfos[0].indices[1] = _ij0[1];
5743 vinfos[0].maxsolutions = _nj0;
5744 vinfos[1].jointtype = 1;
5745 vinfos[1].foffset = j1;
5746 vinfos[1].indices[0] = _ij1[0];
5747 vinfos[1].indices[1] = _ij1[1];
5748 vinfos[1].maxsolutions = _nj1;
5749 vinfos[2].jointtype = 1;
5750 vinfos[2].foffset = j2;
5751 vinfos[2].indices[0] = _ij2[0];
5752 vinfos[2].indices[1] = _ij2[1];
5753 vinfos[2].maxsolutions = _nj2;
5754 vinfos[3].jointtype = 1;
5755 vinfos[3].foffset = j3;
5756 vinfos[3].indices[0] = _ij3[0];
5757 vinfos[3].indices[1] = _ij3[1];
5758 vinfos[3].maxsolutions = _nj3;
5759 vinfos[4].jointtype = 1;
5760 vinfos[4].foffset = j4;
5761 vinfos[4].indices[0] = _ij4[0];
5762 vinfos[4].indices[1] = _ij4[1];
5763 vinfos[4].maxsolutions = _nj4;
5764 vinfos[5].jointtype = 1;
5765 vinfos[5].foffset = j5;
5766 vinfos[5].indices[0] = _ij5[0];
5767 vinfos[5].indices[1] = _ij5[1];
5768 vinfos[5].maxsolutions = _nj5;
5769 std::vector<int> vfree(0);
5777 if( bgotonextstatement )
5779 bool bgotonextstatement =
true;
5782 evalcond[0]=
IKabs(new_r02);
5783 evalcond[1]=new_r20;
5784 evalcond[2]=new_r21;
5785 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 &&
IKabs(evalcond[2]) < 0.0000050000000000 )
5787 bgotonextstatement=
false;
5789 IkReal j5array[1], cj5array[1], sj5array[1];
5790 bool j5valid[1]={
false};
5794 j5array[0]=
IKatan2(new_r11, ((-1.0)*new_r10));
5795 sj5array[0]=
IKsin(j5array[0]);
5796 cj5array[0]=
IKcos(j5array[0]);
5797 if( j5array[0] >
IKPI )
5801 else if( j5array[0] < -
IKPI )
5802 { j5array[0]+=
IK2PI;
5805 for(
int ij5 = 0; ij5 < 1; ++ij5)
5811 _ij5[0] = ij5; _ij5[1] = -1;
5812 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
5816 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
5819 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
5822 IkReal x394=
IKsin(j5);
5823 IkReal x395=
IKcos(j5);
5824 IkReal x396=((1.0)*cj4);
5825 IkReal x397=((1.0)*x395);
5826 evalcond[0]=(x394+(((-1.0)*new_r11)));
5827 evalcond[1]=((((-1.0)*x395*x396))+new_r01);
5828 evalcond[2]=((((-1.0)*x394*x396))+new_r00);
5829 evalcond[3]=((((-1.0)*x397))+(((-1.0)*new_r10)));
5830 evalcond[4]=((((-1.0)*x394))+((cj4*new_r00)));
5831 evalcond[5]=((((-1.0)*x397))+((cj4*new_r01)));
5839 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
5840 vinfos[0].jointtype = 1;
5841 vinfos[0].foffset = j0;
5842 vinfos[0].indices[0] = _ij0[0];
5843 vinfos[0].indices[1] = _ij0[1];
5844 vinfos[0].maxsolutions = _nj0;
5845 vinfos[1].jointtype = 1;
5846 vinfos[1].foffset = j1;
5847 vinfos[1].indices[0] = _ij1[0];
5848 vinfos[1].indices[1] = _ij1[1];
5849 vinfos[1].maxsolutions = _nj1;
5850 vinfos[2].jointtype = 1;
5851 vinfos[2].foffset = j2;
5852 vinfos[2].indices[0] = _ij2[0];
5853 vinfos[2].indices[1] = _ij2[1];
5854 vinfos[2].maxsolutions = _nj2;
5855 vinfos[3].jointtype = 1;
5856 vinfos[3].foffset = j3;
5857 vinfos[3].indices[0] = _ij3[0];
5858 vinfos[3].indices[1] = _ij3[1];
5859 vinfos[3].maxsolutions = _nj3;
5860 vinfos[4].jointtype = 1;
5861 vinfos[4].foffset = j4;
5862 vinfos[4].indices[0] = _ij4[0];
5863 vinfos[4].indices[1] = _ij4[1];
5864 vinfos[4].maxsolutions = _nj4;
5865 vinfos[5].jointtype = 1;
5866 vinfos[5].foffset = j5;
5867 vinfos[5].indices[0] = _ij5[0];
5868 vinfos[5].indices[1] = _ij5[1];
5869 vinfos[5].maxsolutions = _nj5;
5870 std::vector<int> vfree(0);
5878 if( bgotonextstatement )
5880 bool bgotonextstatement =
true;
5883 evalcond[0]=((
IKabs(new_r20))+(
IKabs(new_r21)));
5884 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
5886 bgotonextstatement=
false;
5888 IkReal j5array[1], cj5array[1], sj5array[1];
5889 bool j5valid[1]={
false};
5893 j5array[0]=
IKatan2(new_r11, ((-1.0)*new_r10));
5894 sj5array[0]=
IKsin(j5array[0]);
5895 cj5array[0]=
IKcos(j5array[0]);
5896 if( j5array[0] >
IKPI )
5900 else if( j5array[0] < -
IKPI )
5901 { j5array[0]+=
IK2PI;
5904 for(
int ij5 = 0; ij5 < 1; ++ij5)
5910 _ij5[0] = ij5; _ij5[1] = -1;
5911 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
5915 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
5918 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
5921 IkReal x398=
IKcos(j5);
5922 IkReal x399=
IKsin(j5);
5923 IkReal x400=((-1.0)*x399);
5924 IkReal x401=((-1.0)*x398);
5927 evalcond[2]=(new_r22*x401);
5928 evalcond[3]=(new_r22*x400);
5929 evalcond[4]=(x399+(((-1.0)*new_r11)));
5930 evalcond[5]=((((-1.0)*x398))+(((-1.0)*new_r10)));
5938 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
5939 vinfos[0].jointtype = 1;
5940 vinfos[0].foffset = j0;
5941 vinfos[0].indices[0] = _ij0[0];
5942 vinfos[0].indices[1] = _ij0[1];
5943 vinfos[0].maxsolutions = _nj0;
5944 vinfos[1].jointtype = 1;
5945 vinfos[1].foffset = j1;
5946 vinfos[1].indices[0] = _ij1[0];
5947 vinfos[1].indices[1] = _ij1[1];
5948 vinfos[1].maxsolutions = _nj1;
5949 vinfos[2].jointtype = 1;
5950 vinfos[2].foffset = j2;
5951 vinfos[2].indices[0] = _ij2[0];
5952 vinfos[2].indices[1] = _ij2[1];
5953 vinfos[2].maxsolutions = _nj2;
5954 vinfos[3].jointtype = 1;
5955 vinfos[3].foffset = j3;
5956 vinfos[3].indices[0] = _ij3[0];
5957 vinfos[3].indices[1] = _ij3[1];
5958 vinfos[3].maxsolutions = _nj3;
5959 vinfos[4].jointtype = 1;
5960 vinfos[4].foffset = j4;
5961 vinfos[4].indices[0] = _ij4[0];
5962 vinfos[4].indices[1] = _ij4[1];
5963 vinfos[4].maxsolutions = _nj4;
5964 vinfos[5].jointtype = 1;
5965 vinfos[5].foffset = j5;
5966 vinfos[5].indices[0] = _ij5[0];
5967 vinfos[5].indices[1] = _ij5[1];
5968 vinfos[5].maxsolutions = _nj5;
5969 std::vector<int> vfree(0);
5977 if( bgotonextstatement )
5979 bool bgotonextstatement =
true;
5984 bgotonextstatement=
false;
5989 if( bgotonextstatement )
6001 IkReal j5array[1], cj5array[1], sj5array[1];
6002 bool j5valid[1]={
false};
6015 sj5array[0]=
IKsin(j5array[0]);
6016 cj5array[0]=
IKcos(j5array[0]);
6017 if( j5array[0] >
IKPI )
6021 else if( j5array[0] < -
IKPI )
6022 { j5array[0]+=
IK2PI;
6025 for(
int ij5 = 0; ij5 < 1; ++ij5)
6031 _ij5[0] = ij5; _ij5[1] = -1;
6032 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
6036 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
6039 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
6042 IkReal x404=
IKsin(j5);
6043 IkReal x405=
IKcos(j5);
6044 IkReal x406=((1.0)*cj4);
6045 IkReal x407=((1.0)*x405);
6046 evalcond[0]=(new_r20+((new_r02*x404)));
6047 evalcond[1]=(new_r21+((new_r02*x405)));
6048 evalcond[2]=(x404+(((-1.0)*new_r11)));
6049 evalcond[3]=(new_r01+(((-1.0)*x405*x406)));
6050 evalcond[4]=((((-1.0)*x404*x406))+new_r00);
6051 evalcond[5]=((((-1.0)*new_r10))+(((-1.0)*x407)));
6052 evalcond[6]=(((new_r20*sj4))+((cj4*new_r00))+(((-1.0)*x404)));
6053 evalcond[7]=(((cj4*new_r01))+((new_r21*sj4))+(((-1.0)*x407)));
6061 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
6062 vinfos[0].jointtype = 1;
6063 vinfos[0].foffset = j0;
6064 vinfos[0].indices[0] = _ij0[0];
6065 vinfos[0].indices[1] = _ij0[1];
6066 vinfos[0].maxsolutions = _nj0;
6067 vinfos[1].jointtype = 1;
6068 vinfos[1].foffset = j1;
6069 vinfos[1].indices[0] = _ij1[0];
6070 vinfos[1].indices[1] = _ij1[1];
6071 vinfos[1].maxsolutions = _nj1;
6072 vinfos[2].jointtype = 1;
6073 vinfos[2].foffset = j2;
6074 vinfos[2].indices[0] = _ij2[0];
6075 vinfos[2].indices[1] = _ij2[1];
6076 vinfos[2].maxsolutions = _nj2;
6077 vinfos[3].jointtype = 1;
6078 vinfos[3].foffset = j3;
6079 vinfos[3].indices[0] = _ij3[0];
6080 vinfos[3].indices[1] = _ij3[1];
6081 vinfos[3].maxsolutions = _nj3;
6082 vinfos[4].jointtype = 1;
6083 vinfos[4].foffset = j4;
6084 vinfos[4].indices[0] = _ij4[0];
6085 vinfos[4].indices[1] = _ij4[1];
6086 vinfos[4].maxsolutions = _nj4;
6087 vinfos[5].jointtype = 1;
6088 vinfos[5].foffset = j5;
6089 vinfos[5].indices[0] = _ij5[0];
6090 vinfos[5].indices[1] = _ij5[1];
6091 vinfos[5].maxsolutions = _nj5;
6092 std::vector<int> vfree(0);
6105 IkReal j5array[1], cj5array[1], sj5array[1];
6106 bool j5valid[1]={
false};
6114 j5array[0]=
IKatan2(new_r11, ((-1.0)*new_r21*(x408.
value)));
6115 sj5array[0]=
IKsin(j5array[0]);
6116 cj5array[0]=
IKcos(j5array[0]);
6117 if( j5array[0] >
IKPI )
6121 else if( j5array[0] < -
IKPI )
6122 { j5array[0]+=
IK2PI;
6125 for(
int ij5 = 0; ij5 < 1; ++ij5)
6131 _ij5[0] = ij5; _ij5[1] = -1;
6132 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
6136 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
6139 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
6142 IkReal x409=
IKsin(j5);
6143 IkReal x410=
IKcos(j5);
6144 IkReal x411=((1.0)*cj4);
6145 IkReal x412=((1.0)*x410);
6146 evalcond[0]=(new_r20+((new_r02*x409)));
6147 evalcond[1]=(new_r21+((new_r02*x410)));
6148 evalcond[2]=(x409+(((-1.0)*new_r11)));
6149 evalcond[3]=((((-1.0)*x410*x411))+new_r01);
6150 evalcond[4]=(new_r00+(((-1.0)*x409*x411)));
6151 evalcond[5]=((((-1.0)*new_r10))+(((-1.0)*x412)));
6152 evalcond[6]=(((new_r20*sj4))+((cj4*new_r00))+(((-1.0)*x409)));
6153 evalcond[7]=(((cj4*new_r01))+((new_r21*sj4))+(((-1.0)*x412)));
6161 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
6162 vinfos[0].jointtype = 1;
6163 vinfos[0].foffset = j0;
6164 vinfos[0].indices[0] = _ij0[0];
6165 vinfos[0].indices[1] = _ij0[1];
6166 vinfos[0].maxsolutions = _nj0;
6167 vinfos[1].jointtype = 1;
6168 vinfos[1].foffset = j1;
6169 vinfos[1].indices[0] = _ij1[0];
6170 vinfos[1].indices[1] = _ij1[1];
6171 vinfos[1].maxsolutions = _nj1;
6172 vinfos[2].jointtype = 1;
6173 vinfos[2].foffset = j2;
6174 vinfos[2].indices[0] = _ij2[0];
6175 vinfos[2].indices[1] = _ij2[1];
6176 vinfos[2].maxsolutions = _nj2;
6177 vinfos[3].jointtype = 1;
6178 vinfos[3].foffset = j3;
6179 vinfos[3].indices[0] = _ij3[0];
6180 vinfos[3].indices[1] = _ij3[1];
6181 vinfos[3].maxsolutions = _nj3;
6182 vinfos[4].jointtype = 1;
6183 vinfos[4].foffset = j4;
6184 vinfos[4].indices[0] = _ij4[0];
6185 vinfos[4].indices[1] = _ij4[1];
6186 vinfos[4].maxsolutions = _nj4;
6187 vinfos[5].jointtype = 1;
6188 vinfos[5].foffset = j5;
6189 vinfos[5].indices[0] = _ij5[0];
6190 vinfos[5].indices[1] = _ij5[1];
6191 vinfos[5].maxsolutions = _nj5;
6192 std::vector<int> vfree(0);
6205 IkReal j5array[1], cj5array[1], sj5array[1];
6206 bool j5valid[1]={
false};
6216 j5array[0]=((-1.5707963267949)+(((1.5707963267949)*(x413.
value)))+(x414.
value));
6217 sj5array[0]=
IKsin(j5array[0]);
6218 cj5array[0]=
IKcos(j5array[0]);
6219 if( j5array[0] >
IKPI )
6223 else if( j5array[0] < -
IKPI )
6224 { j5array[0]+=
IK2PI;
6227 for(
int ij5 = 0; ij5 < 1; ++ij5)
6233 _ij5[0] = ij5; _ij5[1] = -1;
6234 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
6238 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
6241 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
6244 IkReal x415=
IKsin(j5);
6245 IkReal x416=
IKcos(j5);
6246 IkReal x417=((1.0)*cj4);
6247 IkReal x418=((1.0)*x416);
6248 evalcond[0]=(new_r20+((new_r02*x415)));
6249 evalcond[1]=(new_r21+((new_r02*x416)));
6250 evalcond[2]=(x415+(((-1.0)*new_r11)));
6251 evalcond[3]=((((-1.0)*x416*x417))+new_r01);
6252 evalcond[4]=((((-1.0)*x415*x417))+new_r00);
6253 evalcond[5]=((((-1.0)*new_r10))+(((-1.0)*x418)));
6254 evalcond[6]=(((new_r20*sj4))+((cj4*new_r00))+(((-1.0)*x415)));
6255 evalcond[7]=(((cj4*new_r01))+((new_r21*sj4))+(((-1.0)*x418)));
6263 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
6264 vinfos[0].jointtype = 1;
6265 vinfos[0].foffset = j0;
6266 vinfos[0].indices[0] = _ij0[0];
6267 vinfos[0].indices[1] = _ij0[1];
6268 vinfos[0].maxsolutions = _nj0;
6269 vinfos[1].jointtype = 1;
6270 vinfos[1].foffset = j1;
6271 vinfos[1].indices[0] = _ij1[0];
6272 vinfos[1].indices[1] = _ij1[1];
6273 vinfos[1].maxsolutions = _nj1;
6274 vinfos[2].jointtype = 1;
6275 vinfos[2].foffset = j2;
6276 vinfos[2].indices[0] = _ij2[0];
6277 vinfos[2].indices[1] = _ij2[1];
6278 vinfos[2].maxsolutions = _nj2;
6279 vinfos[3].jointtype = 1;
6280 vinfos[3].foffset = j3;
6281 vinfos[3].indices[0] = _ij3[0];
6282 vinfos[3].indices[1] = _ij3[1];
6283 vinfos[3].maxsolutions = _nj3;
6284 vinfos[4].jointtype = 1;
6285 vinfos[4].foffset = j4;
6286 vinfos[4].indices[0] = _ij4[0];
6287 vinfos[4].indices[1] = _ij4[1];
6288 vinfos[4].maxsolutions = _nj4;
6289 vinfos[5].jointtype = 1;
6290 vinfos[5].foffset = j5;
6291 vinfos[5].indices[0] = _ij5[0];
6292 vinfos[5].indices[1] = _ij5[1];
6293 vinfos[5].maxsolutions = _nj5;
6294 std::vector<int> vfree(0);
6306 if( bgotonextstatement )
6308 bool bgotonextstatement =
true;
6311 evalcond[0]=((
IKabs(new_r20))+(
IKabs(new_r21)));
6312 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
6314 bgotonextstatement=
false;
6322 if(
IKabs(j5eval[0]) < 0.0000000100000000 )
6328 IkReal op[2+1], zeror[2];
6333 polyroots2(op,zeror,numroots);
6334 IkReal j5array[2], cj5array[2], sj5array[2], tempj5array[1];
6335 int numsolutions = 0;
6336 for(
int ij5 = 0; ij5 < numroots; ++ij5)
6338 IkReal htj5 = zeror[ij5];
6339 tempj5array[0]=((2.0)*(
atan(htj5)));
6340 for(
int kj5 = 0; kj5 < 1; ++kj5)
6342 j5array[numsolutions] = tempj5array[kj5];
6343 if( j5array[numsolutions] >
IKPI )
6345 j5array[numsolutions]-=
IK2PI;
6347 else if( j5array[numsolutions] < -
IKPI )
6349 j5array[numsolutions]+=
IK2PI;
6351 sj5array[numsolutions] =
IKsin(j5array[numsolutions]);
6352 cj5array[numsolutions] =
IKcos(j5array[numsolutions]);
6356 bool j5valid[2]={
true,
true};
6358 for(
int ij5 = 0; ij5 < numsolutions; ++ij5)
6364 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
6367 _ij5[0] = ij5; _ij5[1] = -1;
6368 for(
int iij5 = ij5+1; iij5 < numsolutions; ++iij5)
6372 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
6376 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
6377 vinfos[0].jointtype = 1;
6378 vinfos[0].foffset = j0;
6379 vinfos[0].indices[0] = _ij0[0];
6380 vinfos[0].indices[1] = _ij0[1];
6381 vinfos[0].maxsolutions = _nj0;
6382 vinfos[1].jointtype = 1;
6383 vinfos[1].foffset = j1;
6384 vinfos[1].indices[0] = _ij1[0];
6385 vinfos[1].indices[1] = _ij1[1];
6386 vinfos[1].maxsolutions = _nj1;
6387 vinfos[2].jointtype = 1;
6388 vinfos[2].foffset = j2;
6389 vinfos[2].indices[0] = _ij2[0];
6390 vinfos[2].indices[1] = _ij2[1];
6391 vinfos[2].maxsolutions = _nj2;
6392 vinfos[3].jointtype = 1;
6393 vinfos[3].foffset = j3;
6394 vinfos[3].indices[0] = _ij3[0];
6395 vinfos[3].indices[1] = _ij3[1];
6396 vinfos[3].maxsolutions = _nj3;
6397 vinfos[4].jointtype = 1;
6398 vinfos[4].foffset = j4;
6399 vinfos[4].indices[0] = _ij4[0];
6400 vinfos[4].indices[1] = _ij4[1];
6401 vinfos[4].maxsolutions = _nj4;
6402 vinfos[5].jointtype = 1;
6403 vinfos[5].foffset = j5;
6404 vinfos[5].indices[0] = _ij5[0];
6405 vinfos[5].indices[1] = _ij5[1];
6406 vinfos[5].maxsolutions = _nj5;
6407 std::vector<int> vfree(0);
6418 if( bgotonextstatement )
6420 bool bgotonextstatement =
true;
6425 bgotonextstatement=
false;
6430 if( bgotonextstatement )
6447 IkReal j5array[1], cj5array[1], sj5array[1];
6448 bool j5valid[1]={
false};
6454 IkReal x419=x420.
value;
6465 j5array[0]=
IKatan2((new_r20*x419), (x419*(x421.
value)*(x422.
value)*(((((-1.0)*new_r01*sj4))+(((-1.0)*cj3*new_r20))))));
6466 sj5array[0]=
IKsin(j5array[0]);
6467 cj5array[0]=
IKcos(j5array[0]);
6468 if( j5array[0] >
IKPI )
6472 else if( j5array[0] < -
IKPI )
6473 { j5array[0]+=
IK2PI;
6476 for(
int ij5 = 0; ij5 < 1; ++ij5)
6482 _ij5[0] = ij5; _ij5[1] = -1;
6483 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
6487 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
6490 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
6492 IkReal evalcond[12];
6493 IkReal x423=
IKsin(j5);
6494 IkReal x424=
IKcos(j5);
6495 IkReal x425=(cj4*sj3);
6496 IkReal x426=(cj3*new_r10);
6497 IkReal x427=((1.0)*new_r01);
6498 IkReal x428=(cj3*new_r11);
6499 IkReal x429=((1.0)*new_r00);
6500 IkReal x430=((1.0)*x424);
6501 IkReal x431=(cj4*x423);
6502 IkReal x432=((1.0)*x423);
6503 evalcond[0]=(new_r20+(((-1.0)*sj4*x432)));
6504 evalcond[1]=(new_r21+(((-1.0)*sj4*x430)));
6505 evalcond[2]=(((new_r11*sj3))+x423+((cj3*new_r01)));
6506 evalcond[3]=((((-1.0)*x430))+((new_r10*sj3))+((cj3*new_r00)));
6507 evalcond[4]=(((x424*x425))+((cj3*x423))+new_r01);
6508 evalcond[5]=((((-1.0)*cj3*x430))+((x423*x425))+new_r00);
6509 evalcond[6]=((((-1.0)*cj3*cj4*x430))+((sj3*x423))+new_r11);
6510 evalcond[7]=((((-1.0)*sj3*x429))+(((-1.0)*x431))+x426);
6511 evalcond[8]=((((-1.0)*sj3*x427))+(((-1.0)*cj4*x430))+x428);
6512 evalcond[9]=((((-1.0)*sj3*x430))+(((-1.0)*cj3*x431))+new_r10);
6513 evalcond[10]=((((-1.0)*x432))+((new_r20*sj4))+((cj4*x426))+(((-1.0)*x425*x429)));
6514 evalcond[11]=((((-1.0)*x430))+((cj4*x428))+(((-1.0)*x425*x427))+((new_r21*sj4)));
6522 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
6523 vinfos[0].jointtype = 1;
6524 vinfos[0].foffset = j0;
6525 vinfos[0].indices[0] = _ij0[0];
6526 vinfos[0].indices[1] = _ij0[1];
6527 vinfos[0].maxsolutions = _nj0;
6528 vinfos[1].jointtype = 1;
6529 vinfos[1].foffset = j1;
6530 vinfos[1].indices[0] = _ij1[0];
6531 vinfos[1].indices[1] = _ij1[1];
6532 vinfos[1].maxsolutions = _nj1;
6533 vinfos[2].jointtype = 1;
6534 vinfos[2].foffset = j2;
6535 vinfos[2].indices[0] = _ij2[0];
6536 vinfos[2].indices[1] = _ij2[1];
6537 vinfos[2].maxsolutions = _nj2;
6538 vinfos[3].jointtype = 1;
6539 vinfos[3].foffset = j3;
6540 vinfos[3].indices[0] = _ij3[0];
6541 vinfos[3].indices[1] = _ij3[1];
6542 vinfos[3].maxsolutions = _nj3;
6543 vinfos[4].jointtype = 1;
6544 vinfos[4].foffset = j4;
6545 vinfos[4].indices[0] = _ij4[0];
6546 vinfos[4].indices[1] = _ij4[1];
6547 vinfos[4].maxsolutions = _nj4;
6548 vinfos[5].jointtype = 1;
6549 vinfos[5].foffset = j5;
6550 vinfos[5].indices[0] = _ij5[0];
6551 vinfos[5].indices[1] = _ij5[1];
6552 vinfos[5].maxsolutions = _nj5;
6553 std::vector<int> vfree(0);
6566 IkReal j5array[1], cj5array[1], sj5array[1];
6567 bool j5valid[1]={
false};
6573 IkReal x433=x434.
value;
6580 j5array[0]=
IKatan2((new_r20*x433), (x433*(x435.
value)*((((new_r00*sj4))+((cj4*new_r20*sj3))))));
6581 sj5array[0]=
IKsin(j5array[0]);
6582 cj5array[0]=
IKcos(j5array[0]);
6583 if( j5array[0] >
IKPI )
6587 else if( j5array[0] < -
IKPI )
6588 { j5array[0]+=
IK2PI;
6591 for(
int ij5 = 0; ij5 < 1; ++ij5)
6597 _ij5[0] = ij5; _ij5[1] = -1;
6598 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
6602 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
6605 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
6607 IkReal evalcond[12];
6608 IkReal x436=
IKsin(j5);
6609 IkReal x437=
IKcos(j5);
6610 IkReal x438=(cj4*sj3);
6611 IkReal x439=(cj3*new_r10);
6612 IkReal x440=((1.0)*new_r01);
6613 IkReal x441=(cj3*new_r11);
6614 IkReal x442=((1.0)*new_r00);
6615 IkReal x443=((1.0)*x437);
6616 IkReal x444=(cj4*x436);
6617 IkReal x445=((1.0)*x436);
6618 evalcond[0]=((((-1.0)*sj4*x445))+new_r20);
6619 evalcond[1]=((((-1.0)*sj4*x443))+new_r21);
6620 evalcond[2]=(((new_r11*sj3))+x436+((cj3*new_r01)));
6621 evalcond[3]=((((-1.0)*x443))+((new_r10*sj3))+((cj3*new_r00)));
6622 evalcond[4]=(((cj3*x436))+new_r01+((x437*x438)));
6623 evalcond[5]=(((x436*x438))+(((-1.0)*cj3*x443))+new_r00);
6624 evalcond[6]=(((sj3*x436))+(((-1.0)*cj3*cj4*x443))+new_r11);
6625 evalcond[7]=((((-1.0)*sj3*x442))+(((-1.0)*x444))+x439);
6626 evalcond[8]=((((-1.0)*sj3*x440))+(((-1.0)*cj4*x443))+x441);
6627 evalcond[9]=((((-1.0)*sj3*x443))+(((-1.0)*cj3*x444))+new_r10);
6628 evalcond[10]=((((-1.0)*x445))+(((-1.0)*x438*x442))+((new_r20*sj4))+((cj4*x439)));
6629 evalcond[11]=((((-1.0)*x443))+(((-1.0)*x438*x440))+((cj4*x441))+((new_r21*sj4)));
6637 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
6638 vinfos[0].jointtype = 1;
6639 vinfos[0].foffset = j0;
6640 vinfos[0].indices[0] = _ij0[0];
6641 vinfos[0].indices[1] = _ij0[1];
6642 vinfos[0].maxsolutions = _nj0;
6643 vinfos[1].jointtype = 1;
6644 vinfos[1].foffset = j1;
6645 vinfos[1].indices[0] = _ij1[0];
6646 vinfos[1].indices[1] = _ij1[1];
6647 vinfos[1].maxsolutions = _nj1;
6648 vinfos[2].jointtype = 1;
6649 vinfos[2].foffset = j2;
6650 vinfos[2].indices[0] = _ij2[0];
6651 vinfos[2].indices[1] = _ij2[1];
6652 vinfos[2].maxsolutions = _nj2;
6653 vinfos[3].jointtype = 1;
6654 vinfos[3].foffset = j3;
6655 vinfos[3].indices[0] = _ij3[0];
6656 vinfos[3].indices[1] = _ij3[1];
6657 vinfos[3].maxsolutions = _nj3;
6658 vinfos[4].jointtype = 1;
6659 vinfos[4].foffset = j4;
6660 vinfos[4].indices[0] = _ij4[0];
6661 vinfos[4].indices[1] = _ij4[1];
6662 vinfos[4].maxsolutions = _nj4;
6663 vinfos[5].jointtype = 1;
6664 vinfos[5].foffset = j5;
6665 vinfos[5].indices[0] = _ij5[0];
6666 vinfos[5].indices[1] = _ij5[1];
6667 vinfos[5].maxsolutions = _nj5;
6668 std::vector<int> vfree(0);
6681 IkReal j5array[1], cj5array[1], sj5array[1];
6682 bool j5valid[1]={
false};
6692 j5array[0]=((-1.5707963267949)+(((1.5707963267949)*(x446.
value)))+(x447.
value));
6693 sj5array[0]=
IKsin(j5array[0]);
6694 cj5array[0]=
IKcos(j5array[0]);
6695 if( j5array[0] >
IKPI )
6699 else if( j5array[0] < -
IKPI )
6700 { j5array[0]+=
IK2PI;
6703 for(
int ij5 = 0; ij5 < 1; ++ij5)
6709 _ij5[0] = ij5; _ij5[1] = -1;
6710 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
6714 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
6717 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
6719 IkReal evalcond[12];
6720 IkReal x448=
IKsin(j5);
6721 IkReal x449=
IKcos(j5);
6722 IkReal x450=(cj4*sj3);
6723 IkReal x451=(cj3*new_r10);
6724 IkReal x452=((1.0)*new_r01);
6725 IkReal x453=(cj3*new_r11);
6726 IkReal x454=((1.0)*new_r00);
6727 IkReal x455=((1.0)*x449);
6728 IkReal x456=(cj4*x448);
6729 IkReal x457=((1.0)*x448);
6730 evalcond[0]=((((-1.0)*sj4*x457))+new_r20);
6731 evalcond[1]=((((-1.0)*sj4*x455))+new_r21);
6732 evalcond[2]=(((new_r11*sj3))+x448+((cj3*new_r01)));
6733 evalcond[3]=(((new_r10*sj3))+(((-1.0)*x455))+((cj3*new_r00)));
6734 evalcond[4]=(((x449*x450))+((cj3*x448))+new_r01);
6735 evalcond[5]=(((x448*x450))+new_r00+(((-1.0)*cj3*x455)));
6736 evalcond[6]=((((-1.0)*cj3*cj4*x455))+((sj3*x448))+new_r11);
6737 evalcond[7]=((((-1.0)*x456))+(((-1.0)*sj3*x454))+x451);
6738 evalcond[8]=((((-1.0)*cj4*x455))+(((-1.0)*sj3*x452))+x453);
6739 evalcond[9]=((((-1.0)*sj3*x455))+new_r10+(((-1.0)*cj3*x456)));
6740 evalcond[10]=(((new_r20*sj4))+((cj4*x451))+(((-1.0)*x457))+(((-1.0)*x450*x454)));
6741 evalcond[11]=(((cj4*x453))+(((-1.0)*x455))+(((-1.0)*x450*x452))+((new_r21*sj4)));
6749 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
6750 vinfos[0].jointtype = 1;
6751 vinfos[0].foffset = j0;
6752 vinfos[0].indices[0] = _ij0[0];
6753 vinfos[0].indices[1] = _ij0[1];
6754 vinfos[0].maxsolutions = _nj0;
6755 vinfos[1].jointtype = 1;
6756 vinfos[1].foffset = j1;
6757 vinfos[1].indices[0] = _ij1[0];
6758 vinfos[1].indices[1] = _ij1[1];
6759 vinfos[1].maxsolutions = _nj1;
6760 vinfos[2].jointtype = 1;
6761 vinfos[2].foffset = j2;
6762 vinfos[2].indices[0] = _ij2[0];
6763 vinfos[2].indices[1] = _ij2[1];
6764 vinfos[2].maxsolutions = _nj2;
6765 vinfos[3].jointtype = 1;
6766 vinfos[3].foffset = j3;
6767 vinfos[3].indices[0] = _ij3[0];
6768 vinfos[3].indices[1] = _ij3[1];
6769 vinfos[3].maxsolutions = _nj3;
6770 vinfos[4].jointtype = 1;
6771 vinfos[4].foffset = j4;
6772 vinfos[4].indices[0] = _ij4[0];
6773 vinfos[4].indices[1] = _ij4[1];
6774 vinfos[4].maxsolutions = _nj4;
6775 vinfos[5].jointtype = 1;
6776 vinfos[5].foffset = j5;
6777 vinfos[5].indices[0] = _ij5[0];
6778 vinfos[5].indices[1] = _ij5[1];
6779 vinfos[5].maxsolutions = _nj5;
6780 std::vector<int> vfree(0);
6799 IkReal j5array[1], cj5array[1], sj5array[1];
6800 bool j5valid[1]={
false};
6810 j5array[0]=((-1.5707963267949)+(((1.5707963267949)*(x458.
value)))+(x459.
value));
6811 sj5array[0]=
IKsin(j5array[0]);
6812 cj5array[0]=
IKcos(j5array[0]);
6813 if( j5array[0] >
IKPI )
6817 else if( j5array[0] < -
IKPI )
6818 { j5array[0]+=
IK2PI;
6821 for(
int ij5 = 0; ij5 < 1; ++ij5)
6827 _ij5[0] = ij5; _ij5[1] = -1;
6828 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
6832 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
6835 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
6838 IkReal x460=((1.0)*sj4);
6839 evalcond[0]=((((-1.0)*x460*(
IKsin(j5))))+new_r20);
6840 evalcond[1]=((((-1.0)*x460*(
IKcos(j5))))+new_r21);
6851 j3eval[2]=((
IKabs(new_r12))+(
IKabs(new_r02)));
6852 if(
IKabs(j3eval[0]) < 0.0000010000000000 ||
IKabs(j3eval[1]) < 0.0000010000000000 ||
IKabs(j3eval[2]) < 0.0000010000000000 )
6858 if(
IKabs(j3eval[0]) < 0.0000010000000000 ||
IKabs(j3eval[1]) < 0.0000010000000000 )
6862 bool bgotonextstatement =
true;
6865 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(j4))), 6.28318530717959)));
6866 evalcond[1]=new_r12;
6867 evalcond[2]=new_r02;
6868 evalcond[3]=new_r20;
6869 evalcond[4]=new_r21;
6870 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 &&
IKabs(evalcond[2]) < 0.0000050000000000 &&
IKabs(evalcond[3]) < 0.0000050000000000 &&
IKabs(evalcond[4]) < 0.0000050000000000 )
6872 bgotonextstatement=
false;
6874 IkReal j3array[1], cj3array[1], sj3array[1];
6875 bool j3valid[1]={
false};
6877 IkReal x461=((1.0)*new_r01);
6880 j3array[0]=
IKatan2(((((-1.0)*cj5*x461))+(((-1.0)*new_r00*sj5))), ((((-1.0)*sj5*x461))+((cj5*new_r00))));
6881 sj3array[0]=
IKsin(j3array[0]);
6882 cj3array[0]=
IKcos(j3array[0]);
6883 if( j3array[0] >
IKPI )
6887 else if( j3array[0] < -
IKPI )
6888 { j3array[0]+=
IK2PI;
6891 for(
int ij3 = 0; ij3 < 1; ++ij3)
6897 _ij3[0] = ij3; _ij3[1] = -1;
6898 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
6902 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
6905 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
6908 IkReal x462=
IKcos(j3);
6909 IkReal x463=
IKsin(j3);
6910 IkReal x464=((1.0)*cj5);
6911 IkReal x465=(sj5*x463);
6912 IkReal x466=(sj5*x462);
6913 IkReal x467=((1.0)*x463);
6914 IkReal x468=(x462*x464);
6915 evalcond[0]=(((new_r11*x463))+sj5+((new_r01*x462)));
6916 evalcond[1]=(((cj5*x463))+x466+new_r01);
6917 evalcond[2]=((((-1.0)*x468))+x465+new_r00);
6918 evalcond[3]=((((-1.0)*x468))+x465+new_r11);
6919 evalcond[4]=(((new_r10*x463))+((new_r00*x462))+(((-1.0)*x464)));
6920 evalcond[5]=((((-1.0)*x463*x464))+(((-1.0)*x466))+new_r10);
6921 evalcond[6]=((((-1.0)*sj5))+((new_r10*x462))+(((-1.0)*new_r00*x467)));
6922 evalcond[7]=(((new_r11*x462))+(((-1.0)*new_r01*x467))+(((-1.0)*x464)));
6930 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
6931 vinfos[0].jointtype = 1;
6932 vinfos[0].foffset = j0;
6933 vinfos[0].indices[0] = _ij0[0];
6934 vinfos[0].indices[1] = _ij0[1];
6935 vinfos[0].maxsolutions = _nj0;
6936 vinfos[1].jointtype = 1;
6937 vinfos[1].foffset = j1;
6938 vinfos[1].indices[0] = _ij1[0];
6939 vinfos[1].indices[1] = _ij1[1];
6940 vinfos[1].maxsolutions = _nj1;
6941 vinfos[2].jointtype = 1;
6942 vinfos[2].foffset = j2;
6943 vinfos[2].indices[0] = _ij2[0];
6944 vinfos[2].indices[1] = _ij2[1];
6945 vinfos[2].maxsolutions = _nj2;
6946 vinfos[3].jointtype = 1;
6947 vinfos[3].foffset = j3;
6948 vinfos[3].indices[0] = _ij3[0];
6949 vinfos[3].indices[1] = _ij3[1];
6950 vinfos[3].maxsolutions = _nj3;
6951 vinfos[4].jointtype = 1;
6952 vinfos[4].foffset = j4;
6953 vinfos[4].indices[0] = _ij4[0];
6954 vinfos[4].indices[1] = _ij4[1];
6955 vinfos[4].maxsolutions = _nj4;
6956 vinfos[5].jointtype = 1;
6957 vinfos[5].foffset = j5;
6958 vinfos[5].indices[0] = _ij5[0];
6959 vinfos[5].indices[1] = _ij5[1];
6960 vinfos[5].maxsolutions = _nj5;
6961 std::vector<int> vfree(0);
6969 if( bgotonextstatement )
6971 bool bgotonextstatement =
true;
6974 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-3.14159265358979)+j4)))), 6.28318530717959)));
6975 evalcond[1]=new_r12;
6976 evalcond[2]=new_r02;
6977 evalcond[3]=new_r20;
6978 evalcond[4]=new_r21;
6979 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 &&
IKabs(evalcond[2]) < 0.0000050000000000 &&
IKabs(evalcond[3]) < 0.0000050000000000 &&
IKabs(evalcond[4]) < 0.0000050000000000 )
6981 bgotonextstatement=
false;
6986 j4=3.14159265358979;
6987 IkReal x469=(((new_r11*sj5))+((cj5*new_r01)));
6990 j3eval[2]=((
IKabs(((((-1.0)*cj5*sj5))+(((-1.0)*new_r01*new_r11)))))+(
IKabs(((-1.0)+(new_r01*new_r01)+(cj5*cj5)))));
6991 if(
IKabs(j3eval[0]) < 0.0000010000000000 ||
IKabs(j3eval[1]) < 0.0000010000000000 ||
IKabs(j3eval[2]) < 0.0000010000000000 )
6997 j4=3.14159265358979;
6998 IkReal x470=((1.0)*sj5);
6999 IkReal x471=(((new_r10*new_r11))+((new_r00*new_r01)));
7002 j3eval[2]=((
IKabs(((((-1.0)*new_r00*x470))+(((-1.0)*new_r11*x470)))))+(
IKabs((((new_r01*sj5))+(((-1.0)*new_r10*x470))))));
7003 if(
IKabs(j3eval[0]) < 0.0000010000000000 ||
IKabs(j3eval[1]) < 0.0000010000000000 ||
IKabs(j3eval[2]) < 0.0000010000000000 )
7009 j4=3.14159265358979;
7010 IkReal x472=((1.0)*sj5);
7011 IkReal x473=((new_r01*new_r01)+(new_r11*new_r11));
7013 j3eval[1]=((
IKabs((((cj5*new_r01))+(((-1.0)*new_r11*x472)))))+(
IKabs(((((-1.0)*new_r01*x472))+(((-1.0)*cj5*new_r11))))));
7015 if(
IKabs(j3eval[0]) < 0.0000010000000000 ||
IKabs(j3eval[1]) < 0.0000010000000000 ||
IKabs(j3eval[2]) < 0.0000010000000000 )
7019 bool bgotonextstatement =
true;
7022 evalcond[0]=((new_r01*new_r01)+(new_r11*new_r11));
7023 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
7025 bgotonextstatement=
false;
7030 j4=3.14159265358979;
7033 j3eval[0]=((
IKabs(new_r10))+(
IKabs(new_r00)));
7034 if(
IKabs(j3eval[0]) < 0.0000010000000000 )
7041 IkReal j3array[2], cj3array[2], sj3array[2];
7042 bool j3valid[2]={
false};
7048 IkReal x474=x475.
value;
7049 j3array[0]=((-1.0)*x474);
7050 sj3array[0]=
IKsin(j3array[0]);
7051 cj3array[0]=
IKcos(j3array[0]);
7052 j3array[1]=((3.14159265358979)+(((-1.0)*x474)));
7053 sj3array[1]=
IKsin(j3array[1]);
7054 cj3array[1]=
IKcos(j3array[1]);
7055 if( j3array[0] >
IKPI )
7059 else if( j3array[0] < -
IKPI )
7060 { j3array[0]+=
IK2PI;
7063 if( j3array[1] >
IKPI )
7067 else if( j3array[1] < -
IKPI )
7068 { j3array[1]+=
IK2PI;
7071 for(
int ij3 = 0; ij3 < 2; ++ij3)
7077 _ij3[0] = ij3; _ij3[1] = -1;
7078 for(
int iij3 = ij3+1; iij3 < 2; ++iij3)
7082 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
7085 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
7088 evalcond[0]=((((-1.0)*new_r00*(
IKsin(j3))))+((new_r10*(
IKcos(j3)))));
7096 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
7097 vinfos[0].jointtype = 1;
7098 vinfos[0].foffset = j0;
7099 vinfos[0].indices[0] = _ij0[0];
7100 vinfos[0].indices[1] = _ij0[1];
7101 vinfos[0].maxsolutions = _nj0;
7102 vinfos[1].jointtype = 1;
7103 vinfos[1].foffset = j1;
7104 vinfos[1].indices[0] = _ij1[0];
7105 vinfos[1].indices[1] = _ij1[1];
7106 vinfos[1].maxsolutions = _nj1;
7107 vinfos[2].jointtype = 1;
7108 vinfos[2].foffset = j2;
7109 vinfos[2].indices[0] = _ij2[0];
7110 vinfos[2].indices[1] = _ij2[1];
7111 vinfos[2].maxsolutions = _nj2;
7112 vinfos[3].jointtype = 1;
7113 vinfos[3].foffset = j3;
7114 vinfos[3].indices[0] = _ij3[0];
7115 vinfos[3].indices[1] = _ij3[1];
7116 vinfos[3].maxsolutions = _nj3;
7117 vinfos[4].jointtype = 1;
7118 vinfos[4].foffset = j4;
7119 vinfos[4].indices[0] = _ij4[0];
7120 vinfos[4].indices[1] = _ij4[1];
7121 vinfos[4].maxsolutions = _nj4;
7122 vinfos[5].jointtype = 1;
7123 vinfos[5].foffset = j5;
7124 vinfos[5].indices[0] = _ij5[0];
7125 vinfos[5].indices[1] = _ij5[1];
7126 vinfos[5].maxsolutions = _nj5;
7127 std::vector<int> vfree(0);
7139 if( bgotonextstatement )
7141 bool bgotonextstatement =
true;
7144 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(j5))), 6.28318530717959)));
7145 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
7147 bgotonextstatement=
false;
7149 IkReal j3array[1], cj3array[1], sj3array[1];
7150 bool j3valid[1]={
false};
7154 j3array[0]=
IKatan2(new_r01, ((-1.0)*new_r11));
7155 sj3array[0]=
IKsin(j3array[0]);
7156 cj3array[0]=
IKcos(j3array[0]);
7157 if( j3array[0] >
IKPI )
7161 else if( j3array[0] < -
IKPI )
7162 { j3array[0]+=
IK2PI;
7165 for(
int ij3 = 0; ij3 < 1; ++ij3)
7171 _ij3[0] = ij3; _ij3[1] = -1;
7172 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
7176 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
7179 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
7182 IkReal x476=
IKcos(j3);
7183 IkReal x477=
IKsin(j3);
7184 IkReal x478=((1.0)*x477);
7185 evalcond[0]=(x476+new_r11);
7186 evalcond[1]=((((-1.0)*x478))+new_r01);
7187 evalcond[2]=((((-1.0)*x476))+new_r00);
7188 evalcond[3]=((((-1.0)*x478))+new_r10);
7189 evalcond[4]=(((new_r01*x476))+((new_r11*x477)));
7190 evalcond[5]=((-1.0)+((new_r10*x477))+((new_r00*x476)));
7191 evalcond[6]=(((new_r10*x476))+(((-1.0)*new_r00*x478)));
7192 evalcond[7]=((1.0)+((new_r11*x476))+(((-1.0)*new_r01*x478)));
7200 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
7201 vinfos[0].jointtype = 1;
7202 vinfos[0].foffset = j0;
7203 vinfos[0].indices[0] = _ij0[0];
7204 vinfos[0].indices[1] = _ij0[1];
7205 vinfos[0].maxsolutions = _nj0;
7206 vinfos[1].jointtype = 1;
7207 vinfos[1].foffset = j1;
7208 vinfos[1].indices[0] = _ij1[0];
7209 vinfos[1].indices[1] = _ij1[1];
7210 vinfos[1].maxsolutions = _nj1;
7211 vinfos[2].jointtype = 1;
7212 vinfos[2].foffset = j2;
7213 vinfos[2].indices[0] = _ij2[0];
7214 vinfos[2].indices[1] = _ij2[1];
7215 vinfos[2].maxsolutions = _nj2;
7216 vinfos[3].jointtype = 1;
7217 vinfos[3].foffset = j3;
7218 vinfos[3].indices[0] = _ij3[0];
7219 vinfos[3].indices[1] = _ij3[1];
7220 vinfos[3].maxsolutions = _nj3;
7221 vinfos[4].jointtype = 1;
7222 vinfos[4].foffset = j4;
7223 vinfos[4].indices[0] = _ij4[0];
7224 vinfos[4].indices[1] = _ij4[1];
7225 vinfos[4].maxsolutions = _nj4;
7226 vinfos[5].jointtype = 1;
7227 vinfos[5].foffset = j5;
7228 vinfos[5].indices[0] = _ij5[0];
7229 vinfos[5].indices[1] = _ij5[1];
7230 vinfos[5].maxsolutions = _nj5;
7231 std::vector<int> vfree(0);
7239 if( bgotonextstatement )
7241 bool bgotonextstatement =
true;
7244 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-3.14159265358979)+j5)))), 6.28318530717959)));
7245 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
7247 bgotonextstatement=
false;
7249 IkReal j3array[1], cj3array[1], sj3array[1];
7250 bool j3valid[1]={
false};
7254 j3array[0]=
IKatan2(((-1.0)*new_r01), ((-1.0)*new_r00));
7255 sj3array[0]=
IKsin(j3array[0]);
7256 cj3array[0]=
IKcos(j3array[0]);
7257 if( j3array[0] >
IKPI )
7261 else if( j3array[0] < -
IKPI )
7262 { j3array[0]+=
IK2PI;
7265 for(
int ij3 = 0; ij3 < 1; ++ij3)
7271 _ij3[0] = ij3; _ij3[1] = -1;
7272 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
7276 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
7279 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
7282 IkReal x479=
IKsin(j3);
7283 IkReal x480=
IKcos(j3);
7284 IkReal x481=((1.0)*x479);
7285 evalcond[0]=(x479+new_r01);
7286 evalcond[1]=(x480+new_r00);
7287 evalcond[2]=(x479+new_r10);
7288 evalcond[3]=((((-1.0)*x480))+new_r11);
7289 evalcond[4]=(((new_r11*x479))+((new_r01*x480)));
7290 evalcond[5]=((1.0)+((new_r10*x479))+((new_r00*x480)));
7291 evalcond[6]=((((-1.0)*new_r00*x481))+((new_r10*x480)));
7292 evalcond[7]=((-1.0)+(((-1.0)*new_r01*x481))+((new_r11*x480)));
7300 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
7301 vinfos[0].jointtype = 1;
7302 vinfos[0].foffset = j0;
7303 vinfos[0].indices[0] = _ij0[0];
7304 vinfos[0].indices[1] = _ij0[1];
7305 vinfos[0].maxsolutions = _nj0;
7306 vinfos[1].jointtype = 1;
7307 vinfos[1].foffset = j1;
7308 vinfos[1].indices[0] = _ij1[0];
7309 vinfos[1].indices[1] = _ij1[1];
7310 vinfos[1].maxsolutions = _nj1;
7311 vinfos[2].jointtype = 1;
7312 vinfos[2].foffset = j2;
7313 vinfos[2].indices[0] = _ij2[0];
7314 vinfos[2].indices[1] = _ij2[1];
7315 vinfos[2].maxsolutions = _nj2;
7316 vinfos[3].jointtype = 1;
7317 vinfos[3].foffset = j3;
7318 vinfos[3].indices[0] = _ij3[0];
7319 vinfos[3].indices[1] = _ij3[1];
7320 vinfos[3].maxsolutions = _nj3;
7321 vinfos[4].jointtype = 1;
7322 vinfos[4].foffset = j4;
7323 vinfos[4].indices[0] = _ij4[0];
7324 vinfos[4].indices[1] = _ij4[1];
7325 vinfos[4].maxsolutions = _nj4;
7326 vinfos[5].jointtype = 1;
7327 vinfos[5].foffset = j5;
7328 vinfos[5].indices[0] = _ij5[0];
7329 vinfos[5].indices[1] = _ij5[1];
7330 vinfos[5].maxsolutions = _nj5;
7331 std::vector<int> vfree(0);
7339 if( bgotonextstatement )
7341 bool bgotonextstatement =
true;
7344 IkReal x483 = ((new_r01*new_r01)+(new_r11*new_r11));
7348 IkReal x482=
pow(x483,-0.5);
7353 IkReal gconst6=((-1.0)*(x484.
value));
7354 IkReal gconst7=((-1.0)*new_r01*x482);
7355 IkReal gconst8=(new_r11*x482);
7360 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((x485.
value)+j5)))), 6.28318530717959)));
7361 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
7363 bgotonextstatement=
false;
7370 IkReal x486=((-1.0)*(x488.
value));
7374 j4=3.14159265358979;
7378 IkReal gconst6=x486;
7379 IkReal gconst7=((-1.0)*new_r01*x487);
7380 IkReal gconst8=(new_r11*x487);
7381 IkReal x489=new_r01*new_r01;
7382 IkReal x490=(new_r00*new_r01);
7383 IkReal x491=(((new_r10*new_r11))+x490);
7385 IkReal x493=(new_r01*x492);
7388 j3eval[2]=((
IKabs(((((-1.0)*x489*x492))+((new_r10*x493)))))+(
IKabs((((x490*x492))+((new_r11*x493))))));
7389 if(
IKabs(j3eval[0]) < 0.0000010000000000 ||
IKabs(j3eval[1]) < 0.0000010000000000 ||
IKabs(j3eval[2]) < 0.0000010000000000 )
7397 IkReal x494=((-1.0)*(x496.
value));
7401 j4=3.14159265358979;
7405 IkReal gconst6=x494;
7406 IkReal gconst7=((-1.0)*new_r01*x495);
7407 IkReal gconst8=(new_r11*x495);
7408 IkReal x497=((new_r01*new_r01)+(new_r11*new_r11));
7411 if(
IKabs(j3eval[0]) < 0.0000010000000000 ||
IKabs(j3eval[1]) < 0.0000010000000000 )
7419 IkReal x498=((-1.0)*(x500.
value));
7423 j4=3.14159265358979;
7427 IkReal gconst6=x498;
7428 IkReal gconst7=((-1.0)*new_r01*x499);
7429 IkReal gconst8=(new_r11*x499);
7430 j3eval[0]=((new_r01*new_r01)+(new_r11*new_r11));
7431 if(
IKabs(j3eval[0]) < 0.0000010000000000 )
7435 bool bgotonextstatement =
true;
7438 evalcond[0]=((gconst7*gconst7)+(gconst8*gconst8));
7439 evalcond[1]=new_r01;
7440 evalcond[2]=new_r00;
7441 evalcond[3]=new_r11;
7442 evalcond[4]=new_r10;
7443 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 &&
IKabs(evalcond[2]) < 0.0000050000000000 &&
IKabs(evalcond[3]) < 0.0000050000000000 &&
IKabs(evalcond[4]) < 0.0000050000000000 )
7445 bgotonextstatement=
false;
7447 IkReal j3array[4], cj3array[4], sj3array[4];
7448 bool j3valid[4]={
false};
7451 sj3array[0]=
IKsin(j3array[0]);
7452 cj3array[0]=
IKcos(j3array[0]);
7453 j3array[1]=1.5707963267949;
7454 sj3array[1]=
IKsin(j3array[1]);
7455 cj3array[1]=
IKcos(j3array[1]);
7456 j3array[2]=3.14159265358979;
7457 sj3array[2]=
IKsin(j3array[2]);
7458 cj3array[2]=
IKcos(j3array[2]);
7459 j3array[3]=-1.5707963267949;
7460 sj3array[3]=
IKsin(j3array[3]);
7461 cj3array[3]=
IKcos(j3array[3]);
7462 if( j3array[0] >
IKPI )
7466 else if( j3array[0] < -
IKPI )
7467 { j3array[0]+=
IK2PI;
7470 if( j3array[1] >
IKPI )
7474 else if( j3array[1] < -
IKPI )
7475 { j3array[1]+=
IK2PI;
7478 if( j3array[2] >
IKPI )
7482 else if( j3array[2] < -
IKPI )
7483 { j3array[2]+=
IK2PI;
7486 if( j3array[3] >
IKPI )
7490 else if( j3array[3] < -
IKPI )
7491 { j3array[3]+=
IK2PI;
7494 for(
int ij3 = 0; ij3 < 4; ++ij3)
7500 _ij3[0] = ij3; _ij3[1] = -1;
7501 for(
int iij3 = ij3+1; iij3 < 4; ++iij3)
7505 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
7508 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
7511 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
7512 vinfos[0].jointtype = 1;
7513 vinfos[0].foffset = j0;
7514 vinfos[0].indices[0] = _ij0[0];
7515 vinfos[0].indices[1] = _ij0[1];
7516 vinfos[0].maxsolutions = _nj0;
7517 vinfos[1].jointtype = 1;
7518 vinfos[1].foffset = j1;
7519 vinfos[1].indices[0] = _ij1[0];
7520 vinfos[1].indices[1] = _ij1[1];
7521 vinfos[1].maxsolutions = _nj1;
7522 vinfos[2].jointtype = 1;
7523 vinfos[2].foffset = j2;
7524 vinfos[2].indices[0] = _ij2[0];
7525 vinfos[2].indices[1] = _ij2[1];
7526 vinfos[2].maxsolutions = _nj2;
7527 vinfos[3].jointtype = 1;
7528 vinfos[3].foffset = j3;
7529 vinfos[3].indices[0] = _ij3[0];
7530 vinfos[3].indices[1] = _ij3[1];
7531 vinfos[3].maxsolutions = _nj3;
7532 vinfos[4].jointtype = 1;
7533 vinfos[4].foffset = j4;
7534 vinfos[4].indices[0] = _ij4[0];
7535 vinfos[4].indices[1] = _ij4[1];
7536 vinfos[4].maxsolutions = _nj4;
7537 vinfos[5].jointtype = 1;
7538 vinfos[5].foffset = j5;
7539 vinfos[5].indices[0] = _ij5[0];
7540 vinfos[5].indices[1] = _ij5[1];
7541 vinfos[5].maxsolutions = _nj5;
7542 std::vector<int> vfree(0);
7550 if( bgotonextstatement )
7552 bool bgotonextstatement =
true;
7555 evalcond[0]=((
IKabs(new_r11))+(
IKabs(new_r00)));
7556 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
7558 bgotonextstatement=
false;
7565 IkReal x501=((-1.0)*(x502.
value));
7568 j4=3.14159265358979;
7574 IkReal gconst6=x501;
7575 IkReal x503 = new_r01*new_r01;
7579 IkReal gconst7=((-1.0)*new_r01*(
pow(x503,-0.5)));
7582 if(
IKabs(j3eval[0]) < 0.0000010000000000 )
7585 IkReal j3array[2], cj3array[2], sj3array[2];
7586 bool j3valid[2]={
false};
7592 cj3array[0]=((-1.0)*new_r01*(x504.
value));
7595 j3valid[0] = j3valid[1] =
true;
7596 j3array[0] =
IKacos(cj3array[0]);
7597 sj3array[0] =
IKsin(j3array[0]);
7598 cj3array[1] = cj3array[0];
7599 j3array[1] = -j3array[0];
7600 sj3array[1] = -sj3array[0];
7602 else if( isnan(cj3array[0]) )
7606 cj3array[0] = 1; sj3array[0] = 0; j3array[0] = 0;
7608 for(
int ij3 = 0; ij3 < 2; ++ij3)
7614 _ij3[0] = ij3; _ij3[1] = -1;
7615 for(
int iij3 = ij3+1; iij3 < 2; ++iij3)
7619 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
7622 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
7625 IkReal x505=
IKsin(j3);
7626 IkReal x506=
IKcos(j3);
7627 IkReal x507=((-1.0)*x505);
7628 evalcond[0]=(new_r10*x505);
7629 evalcond[1]=(gconst7*x507);
7630 evalcond[2]=(new_r01*x507);
7631 evalcond[3]=(gconst7+((new_r01*x506)));
7632 evalcond[4]=(gconst7+((new_r10*x506)));
7633 evalcond[5]=(((gconst7*x506))+new_r10);
7641 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
7642 vinfos[0].jointtype = 1;
7643 vinfos[0].foffset = j0;
7644 vinfos[0].indices[0] = _ij0[0];
7645 vinfos[0].indices[1] = _ij0[1];
7646 vinfos[0].maxsolutions = _nj0;
7647 vinfos[1].jointtype = 1;
7648 vinfos[1].foffset = j1;
7649 vinfos[1].indices[0] = _ij1[0];
7650 vinfos[1].indices[1] = _ij1[1];
7651 vinfos[1].maxsolutions = _nj1;
7652 vinfos[2].jointtype = 1;
7653 vinfos[2].foffset = j2;
7654 vinfos[2].indices[0] = _ij2[0];
7655 vinfos[2].indices[1] = _ij2[1];
7656 vinfos[2].maxsolutions = _nj2;
7657 vinfos[3].jointtype = 1;
7658 vinfos[3].foffset = j3;
7659 vinfos[3].indices[0] = _ij3[0];
7660 vinfos[3].indices[1] = _ij3[1];
7661 vinfos[3].maxsolutions = _nj3;
7662 vinfos[4].jointtype = 1;
7663 vinfos[4].foffset = j4;
7664 vinfos[4].indices[0] = _ij4[0];
7665 vinfos[4].indices[1] = _ij4[1];
7666 vinfos[4].maxsolutions = _nj4;
7667 vinfos[5].jointtype = 1;
7668 vinfos[5].foffset = j5;
7669 vinfos[5].indices[0] = _ij5[0];
7670 vinfos[5].indices[1] = _ij5[1];
7671 vinfos[5].maxsolutions = _nj5;
7672 std::vector<int> vfree(0);
7681 IkReal j3array[2], cj3array[2], sj3array[2];
7682 bool j3valid[2]={
false};
7688 cj3array[0]=((-1.0)*gconst7*(x508.
value));
7691 j3valid[0] = j3valid[1] =
true;
7692 j3array[0] =
IKacos(cj3array[0]);
7693 sj3array[0] =
IKsin(j3array[0]);
7694 cj3array[1] = cj3array[0];
7695 j3array[1] = -j3array[0];
7696 sj3array[1] = -sj3array[0];
7698 else if( isnan(cj3array[0]) )
7702 cj3array[0] = 1; sj3array[0] = 0; j3array[0] = 0;
7704 for(
int ij3 = 0; ij3 < 2; ++ij3)
7710 _ij3[0] = ij3; _ij3[1] = -1;
7711 for(
int iij3 = ij3+1; iij3 < 2; ++iij3)
7715 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
7718 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
7721 IkReal x509=
IKsin(j3);
7722 IkReal x510=
IKcos(j3);
7723 IkReal x511=(gconst7*x510);
7724 IkReal x512=((-1.0)*x509);
7725 evalcond[0]=(new_r10*x509);
7726 evalcond[1]=(gconst7*x512);
7727 evalcond[2]=(new_r01*x512);
7728 evalcond[3]=(x511+new_r01);
7729 evalcond[4]=(((new_r10*x510))+gconst7);
7730 evalcond[5]=(x511+new_r10);
7738 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
7739 vinfos[0].jointtype = 1;
7740 vinfos[0].foffset = j0;
7741 vinfos[0].indices[0] = _ij0[0];
7742 vinfos[0].indices[1] = _ij0[1];
7743 vinfos[0].maxsolutions = _nj0;
7744 vinfos[1].jointtype = 1;
7745 vinfos[1].foffset = j1;
7746 vinfos[1].indices[0] = _ij1[0];
7747 vinfos[1].indices[1] = _ij1[1];
7748 vinfos[1].maxsolutions = _nj1;
7749 vinfos[2].jointtype = 1;
7750 vinfos[2].foffset = j2;
7751 vinfos[2].indices[0] = _ij2[0];
7752 vinfos[2].indices[1] = _ij2[1];
7753 vinfos[2].maxsolutions = _nj2;
7754 vinfos[3].jointtype = 1;
7755 vinfos[3].foffset = j3;
7756 vinfos[3].indices[0] = _ij3[0];
7757 vinfos[3].indices[1] = _ij3[1];
7758 vinfos[3].maxsolutions = _nj3;
7759 vinfos[4].jointtype = 1;
7760 vinfos[4].foffset = j4;
7761 vinfos[4].indices[0] = _ij4[0];
7762 vinfos[4].indices[1] = _ij4[1];
7763 vinfos[4].maxsolutions = _nj4;
7764 vinfos[5].jointtype = 1;
7765 vinfos[5].foffset = j5;
7766 vinfos[5].indices[0] = _ij5[0];
7767 vinfos[5].indices[1] = _ij5[1];
7768 vinfos[5].maxsolutions = _nj5;
7769 std::vector<int> vfree(0);
7781 if( bgotonextstatement )
7783 bool bgotonextstatement =
true;
7786 evalcond[0]=((
IKabs(new_r10))+(
IKabs(new_r00)));
7787 evalcond[1]=gconst7;
7788 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 )
7790 bgotonextstatement=
false;
7797 IkReal x513=((-1.0)*(x514.
value));
7800 j4=3.14159265358979;
7808 IkReal gconst6=x513;
7809 IkReal gconst7=((-1.0)*new_r01);
7810 IkReal gconst8=new_r11;
7813 j3eval[2]=((
IKabs(new_r01*new_r01))+(
IKabs((new_r01*new_r11))));
7814 if(
IKabs(j3eval[0]) < 0.0000010000000000 ||
IKabs(j3eval[1]) < 0.0000010000000000 ||
IKabs(j3eval[2]) < 0.0000010000000000 )
7822 IkReal x515=((-1.0)*(x516.
value));
7825 j4=3.14159265358979;
7833 IkReal gconst6=x515;
7834 IkReal gconst7=((-1.0)*new_r01);
7835 IkReal gconst8=new_r11;
7837 j3eval[1]=((
IKabs((new_r01*new_r11)))+(
IKabs(((1.0)+(((-1.0)*(new_r01*new_r01)))))));
7839 if(
IKabs(j3eval[0]) < 0.0000010000000000 ||
IKabs(j3eval[1]) < 0.0000010000000000 ||
IKabs(j3eval[2]) < 0.0000010000000000 )
7847 IkReal x517=((-1.0)*(x518.
value));
7850 j4=3.14159265358979;
7858 IkReal gconst6=x517;
7859 IkReal gconst7=((-1.0)*new_r01);
7860 IkReal gconst8=new_r11;
7862 j3eval[1]=((((0.5)*(
IKabs(((-1.0)+(((2.0)*(new_r01*new_r01))))))))+(
IKabs((new_r01*new_r11))));
7864 if(
IKabs(j3eval[0]) < 0.0000010000000000 ||
IKabs(j3eval[1]) < 0.0000010000000000 ||
IKabs(j3eval[2]) < 0.0000010000000000 )
7871 IkReal j3array[1], cj3array[1], sj3array[1];
7872 bool j3valid[1]={
false};
7874 IkReal x519=((1.0)*new_r11);
7883 j3array[0]=((-1.5707963267949)+(x520.
value)+(((1.5707963267949)*(x521.
value))));
7884 sj3array[0]=
IKsin(j3array[0]);
7885 cj3array[0]=
IKcos(j3array[0]);
7886 if( j3array[0] >
IKPI )
7890 else if( j3array[0] < -
IKPI )
7891 { j3array[0]+=
IK2PI;
7894 for(
int ij3 = 0; ij3 < 1; ++ij3)
7900 _ij3[0] = ij3; _ij3[1] = -1;
7901 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
7905 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
7908 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
7911 IkReal x522=
IKcos(j3);
7912 IkReal x523=
IKsin(j3);
7913 IkReal x524=((1.0)*gconst8);
7914 IkReal x525=(gconst7*x522);
7915 IkReal x526=(gconst7*x523);
7916 IkReal x527=(x523*x524);
7917 evalcond[0]=(((new_r01*x522))+gconst7+((new_r11*x523)));
7918 evalcond[1]=(x526+((gconst8*x522))+new_r11);
7919 evalcond[2]=((((-1.0)*x527))+x525);
7920 evalcond[3]=((((-1.0)*x527))+x525+new_r01);
7921 evalcond[4]=((((-1.0)*x526))+(((-1.0)*x522*x524)));
7922 evalcond[5]=(gconst8+((new_r11*x522))+(((-1.0)*new_r01*x523)));
7930 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
7931 vinfos[0].jointtype = 1;
7932 vinfos[0].foffset = j0;
7933 vinfos[0].indices[0] = _ij0[0];
7934 vinfos[0].indices[1] = _ij0[1];
7935 vinfos[0].maxsolutions = _nj0;
7936 vinfos[1].jointtype = 1;
7937 vinfos[1].foffset = j1;
7938 vinfos[1].indices[0] = _ij1[0];
7939 vinfos[1].indices[1] = _ij1[1];
7940 vinfos[1].maxsolutions = _nj1;
7941 vinfos[2].jointtype = 1;
7942 vinfos[2].foffset = j2;
7943 vinfos[2].indices[0] = _ij2[0];
7944 vinfos[2].indices[1] = _ij2[1];
7945 vinfos[2].maxsolutions = _nj2;
7946 vinfos[3].jointtype = 1;
7947 vinfos[3].foffset = j3;
7948 vinfos[3].indices[0] = _ij3[0];
7949 vinfos[3].indices[1] = _ij3[1];
7950 vinfos[3].maxsolutions = _nj3;
7951 vinfos[4].jointtype = 1;
7952 vinfos[4].foffset = j4;
7953 vinfos[4].indices[0] = _ij4[0];
7954 vinfos[4].indices[1] = _ij4[1];
7955 vinfos[4].maxsolutions = _nj4;
7956 vinfos[5].jointtype = 1;
7957 vinfos[5].foffset = j5;
7958 vinfos[5].indices[0] = _ij5[0];
7959 vinfos[5].indices[1] = _ij5[1];
7960 vinfos[5].maxsolutions = _nj5;
7961 std::vector<int> vfree(0);
7974 IkReal j3array[1], cj3array[1], sj3array[1];
7975 bool j3valid[1]={
false};
7985 j3array[0]=((-1.5707963267949)+(x528.
value)+(((1.5707963267949)*(x529.
value))));
7986 sj3array[0]=
IKsin(j3array[0]);
7987 cj3array[0]=
IKcos(j3array[0]);
7988 if( j3array[0] >
IKPI )
7992 else if( j3array[0] < -
IKPI )
7993 { j3array[0]+=
IK2PI;
7996 for(
int ij3 = 0; ij3 < 1; ++ij3)
8002 _ij3[0] = ij3; _ij3[1] = -1;
8003 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
8007 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
8010 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
8013 IkReal x530=
IKcos(j3);
8014 IkReal x531=
IKsin(j3);
8015 IkReal x532=((1.0)*gconst8);
8016 IkReal x533=(gconst7*x530);
8017 IkReal x534=(gconst7*x531);
8018 IkReal x535=(x531*x532);
8019 evalcond[0]=(((new_r01*x530))+gconst7+((new_r11*x531)));
8020 evalcond[1]=(x534+((gconst8*x530))+new_r11);
8021 evalcond[2]=((((-1.0)*x535))+x533);
8022 evalcond[3]=((((-1.0)*x535))+x533+new_r01);
8023 evalcond[4]=((((-1.0)*x534))+(((-1.0)*x530*x532)));
8024 evalcond[5]=(gconst8+((new_r11*x530))+(((-1.0)*new_r01*x531)));
8032 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
8033 vinfos[0].jointtype = 1;
8034 vinfos[0].foffset = j0;
8035 vinfos[0].indices[0] = _ij0[0];
8036 vinfos[0].indices[1] = _ij0[1];
8037 vinfos[0].maxsolutions = _nj0;
8038 vinfos[1].jointtype = 1;
8039 vinfos[1].foffset = j1;
8040 vinfos[1].indices[0] = _ij1[0];
8041 vinfos[1].indices[1] = _ij1[1];
8042 vinfos[1].maxsolutions = _nj1;
8043 vinfos[2].jointtype = 1;
8044 vinfos[2].foffset = j2;
8045 vinfos[2].indices[0] = _ij2[0];
8046 vinfos[2].indices[1] = _ij2[1];
8047 vinfos[2].maxsolutions = _nj2;
8048 vinfos[3].jointtype = 1;
8049 vinfos[3].foffset = j3;
8050 vinfos[3].indices[0] = _ij3[0];
8051 vinfos[3].indices[1] = _ij3[1];
8052 vinfos[3].maxsolutions = _nj3;
8053 vinfos[4].jointtype = 1;
8054 vinfos[4].foffset = j4;
8055 vinfos[4].indices[0] = _ij4[0];
8056 vinfos[4].indices[1] = _ij4[1];
8057 vinfos[4].maxsolutions = _nj4;
8058 vinfos[5].jointtype = 1;
8059 vinfos[5].foffset = j5;
8060 vinfos[5].indices[0] = _ij5[0];
8061 vinfos[5].indices[1] = _ij5[1];
8062 vinfos[5].maxsolutions = _nj5;
8063 std::vector<int> vfree(0);
8076 IkReal j3array[1], cj3array[1], sj3array[1];
8077 bool j3valid[1]={
false};
8087 j3array[0]=((-1.5707963267949)+(x536.
value)+(((1.5707963267949)*(x537.
value))));
8088 sj3array[0]=
IKsin(j3array[0]);
8089 cj3array[0]=
IKcos(j3array[0]);
8090 if( j3array[0] >
IKPI )
8094 else if( j3array[0] < -
IKPI )
8095 { j3array[0]+=
IK2PI;
8098 for(
int ij3 = 0; ij3 < 1; ++ij3)
8104 _ij3[0] = ij3; _ij3[1] = -1;
8105 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
8109 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
8112 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
8115 IkReal x538=
IKcos(j3);
8116 IkReal x539=
IKsin(j3);
8117 IkReal x540=((1.0)*gconst8);
8118 IkReal x541=(gconst7*x538);
8119 IkReal x542=(gconst7*x539);
8120 IkReal x543=(x539*x540);
8121 evalcond[0]=(((new_r01*x538))+gconst7+((new_r11*x539)));
8122 evalcond[1]=(x542+((gconst8*x538))+new_r11);
8123 evalcond[2]=((((-1.0)*x543))+x541);
8124 evalcond[3]=((((-1.0)*x543))+x541+new_r01);
8125 evalcond[4]=((((-1.0)*x542))+(((-1.0)*x538*x540)));
8126 evalcond[5]=(gconst8+((new_r11*x538))+(((-1.0)*new_r01*x539)));
8134 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
8135 vinfos[0].jointtype = 1;
8136 vinfos[0].foffset = j0;
8137 vinfos[0].indices[0] = _ij0[0];
8138 vinfos[0].indices[1] = _ij0[1];
8139 vinfos[0].maxsolutions = _nj0;
8140 vinfos[1].jointtype = 1;
8141 vinfos[1].foffset = j1;
8142 vinfos[1].indices[0] = _ij1[0];
8143 vinfos[1].indices[1] = _ij1[1];
8144 vinfos[1].maxsolutions = _nj1;
8145 vinfos[2].jointtype = 1;
8146 vinfos[2].foffset = j2;
8147 vinfos[2].indices[0] = _ij2[0];
8148 vinfos[2].indices[1] = _ij2[1];
8149 vinfos[2].maxsolutions = _nj2;
8150 vinfos[3].jointtype = 1;
8151 vinfos[3].foffset = j3;
8152 vinfos[3].indices[0] = _ij3[0];
8153 vinfos[3].indices[1] = _ij3[1];
8154 vinfos[3].maxsolutions = _nj3;
8155 vinfos[4].jointtype = 1;
8156 vinfos[4].foffset = j4;
8157 vinfos[4].indices[0] = _ij4[0];
8158 vinfos[4].indices[1] = _ij4[1];
8159 vinfos[4].maxsolutions = _nj4;
8160 vinfos[5].jointtype = 1;
8161 vinfos[5].foffset = j5;
8162 vinfos[5].indices[0] = _ij5[0];
8163 vinfos[5].indices[1] = _ij5[1];
8164 vinfos[5].maxsolutions = _nj5;
8165 std::vector<int> vfree(0);
8177 if( bgotonextstatement )
8179 bool bgotonextstatement =
true;
8182 evalcond[0]=((
IKabs(new_r10))+(
IKabs(new_r01)));
8183 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
8185 bgotonextstatement=
false;
8187 IkReal j3array[2], cj3array[2], sj3array[2];
8188 bool j3valid[2]={
false};
8194 cj3array[0]=(new_r00*(x544.
value));
8197 j3valid[0] = j3valid[1] =
true;
8198 j3array[0] =
IKacos(cj3array[0]);
8199 sj3array[0] =
IKsin(j3array[0]);
8200 cj3array[1] = cj3array[0];
8201 j3array[1] = -j3array[0];
8202 sj3array[1] = -sj3array[0];
8204 else if( isnan(cj3array[0]) )
8208 cj3array[0] = 1; sj3array[0] = 0; j3array[0] = 0;
8210 for(
int ij3 = 0; ij3 < 2; ++ij3)
8216 _ij3[0] = ij3; _ij3[1] = -1;
8217 for(
int iij3 = ij3+1; iij3 < 2; ++iij3)
8221 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
8224 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
8227 IkReal x545=
IKsin(j3);
8228 IkReal x546=
IKcos(j3);
8229 IkReal x547=((-1.0)*x545);
8230 evalcond[0]=(new_r11*x545);
8231 evalcond[1]=(gconst8*x547);
8232 evalcond[2]=(new_r00*x547);
8233 evalcond[3]=(((gconst8*x546))+new_r11);
8234 evalcond[4]=(gconst8+((new_r11*x546)));
8235 evalcond[5]=(((new_r00*x546))+(((-1.0)*gconst8)));
8243 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
8244 vinfos[0].jointtype = 1;
8245 vinfos[0].foffset = j0;
8246 vinfos[0].indices[0] = _ij0[0];
8247 vinfos[0].indices[1] = _ij0[1];
8248 vinfos[0].maxsolutions = _nj0;
8249 vinfos[1].jointtype = 1;
8250 vinfos[1].foffset = j1;
8251 vinfos[1].indices[0] = _ij1[0];
8252 vinfos[1].indices[1] = _ij1[1];
8253 vinfos[1].maxsolutions = _nj1;
8254 vinfos[2].jointtype = 1;
8255 vinfos[2].foffset = j2;
8256 vinfos[2].indices[0] = _ij2[0];
8257 vinfos[2].indices[1] = _ij2[1];
8258 vinfos[2].maxsolutions = _nj2;
8259 vinfos[3].jointtype = 1;
8260 vinfos[3].foffset = j3;
8261 vinfos[3].indices[0] = _ij3[0];
8262 vinfos[3].indices[1] = _ij3[1];
8263 vinfos[3].maxsolutions = _nj3;
8264 vinfos[4].jointtype = 1;
8265 vinfos[4].foffset = j4;
8266 vinfos[4].indices[0] = _ij4[0];
8267 vinfos[4].indices[1] = _ij4[1];
8268 vinfos[4].maxsolutions = _nj4;
8269 vinfos[5].jointtype = 1;
8270 vinfos[5].foffset = j5;
8271 vinfos[5].indices[0] = _ij5[0];
8272 vinfos[5].indices[1] = _ij5[1];
8273 vinfos[5].maxsolutions = _nj5;
8274 std::vector<int> vfree(0);
8282 if( bgotonextstatement )
8284 bool bgotonextstatement =
true;
8287 evalcond[0]=((
IKabs(new_r00))+(
IKabs(new_r01)));
8288 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
8290 bgotonextstatement=
false;
8297 IkReal x548=((-1.0)*(x549.
value));
8300 j4=3.14159265358979;
8308 IkReal gconst6=x548;
8310 IkReal x550 = ((1.0)+(((-1.0)*(new_r10*new_r10))));
8314 IkReal gconst8=(new_r11*(
pow(x550,-0.5)));
8315 j3eval[0]=((
IKabs(new_r11))+(
IKabs(new_r10)));
8316 if(
IKabs(j3eval[0]) < 0.0000010000000000 )
8324 IkReal x551=((-1.0)*(x552.
value));
8327 j4=3.14159265358979;
8335 IkReal gconst6=x551;
8337 IkReal x553 = ((1.0)+(((-1.0)*(new_r10*new_r10))));
8341 IkReal gconst8=(new_r11*(
pow(x553,-0.5)));
8343 if(
IKabs(j3eval[0]) < 0.0000010000000000 )
8351 IkReal x554=((-1.0)*(x555.
value));
8354 j4=3.14159265358979;
8362 IkReal gconst6=x554;
8364 IkReal x556 = ((1.0)+(((-1.0)*(new_r10*new_r10))));
8368 IkReal gconst8=(new_r11*(
pow(x556,-0.5)));
8370 if(
IKabs(j3eval[0]) < 0.0000010000000000 )
8377 IkReal j3array[1], cj3array[1], sj3array[1];
8378 bool j3valid[1]={
false};
8391 sj3array[0]=
IKsin(j3array[0]);
8392 cj3array[0]=
IKcos(j3array[0]);
8393 if( j3array[0] >
IKPI )
8397 else if( j3array[0] < -
IKPI )
8398 { j3array[0]+=
IK2PI;
8401 for(
int ij3 = 0; ij3 < 1; ++ij3)
8407 _ij3[0] = ij3; _ij3[1] = -1;
8408 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
8412 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
8415 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
8418 IkReal x559=
IKsin(j3);
8419 IkReal x560=
IKcos(j3);
8420 IkReal x561=((1.0)*gconst8);
8421 IkReal x562=((-1.0)*gconst8);
8422 evalcond[0]=(new_r11*x559);
8423 evalcond[1]=(new_r10*x560);
8424 evalcond[2]=(x559*x562);
8425 evalcond[3]=(x560*x562);
8426 evalcond[4]=(((gconst8*x560))+new_r11);
8427 evalcond[5]=(gconst8+((new_r11*x560)));
8428 evalcond[6]=((((-1.0)*x559*x561))+new_r10);
8429 evalcond[7]=(((new_r10*x559))+(((-1.0)*x561)));
8437 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
8438 vinfos[0].jointtype = 1;
8439 vinfos[0].foffset = j0;
8440 vinfos[0].indices[0] = _ij0[0];
8441 vinfos[0].indices[1] = _ij0[1];
8442 vinfos[0].maxsolutions = _nj0;
8443 vinfos[1].jointtype = 1;
8444 vinfos[1].foffset = j1;
8445 vinfos[1].indices[0] = _ij1[0];
8446 vinfos[1].indices[1] = _ij1[1];
8447 vinfos[1].maxsolutions = _nj1;
8448 vinfos[2].jointtype = 1;
8449 vinfos[2].foffset = j2;
8450 vinfos[2].indices[0] = _ij2[0];
8451 vinfos[2].indices[1] = _ij2[1];
8452 vinfos[2].maxsolutions = _nj2;
8453 vinfos[3].jointtype = 1;
8454 vinfos[3].foffset = j3;
8455 vinfos[3].indices[0] = _ij3[0];
8456 vinfos[3].indices[1] = _ij3[1];
8457 vinfos[3].maxsolutions = _nj3;
8458 vinfos[4].jointtype = 1;
8459 vinfos[4].foffset = j4;
8460 vinfos[4].indices[0] = _ij4[0];
8461 vinfos[4].indices[1] = _ij4[1];
8462 vinfos[4].maxsolutions = _nj4;
8463 vinfos[5].jointtype = 1;
8464 vinfos[5].foffset = j5;
8465 vinfos[5].indices[0] = _ij5[0];
8466 vinfos[5].indices[1] = _ij5[1];
8467 vinfos[5].maxsolutions = _nj5;
8468 std::vector<int> vfree(0);
8481 IkReal j3array[1], cj3array[1], sj3array[1];
8482 bool j3valid[1]={
false};
8495 sj3array[0]=
IKsin(j3array[0]);
8496 cj3array[0]=
IKcos(j3array[0]);
8497 if( j3array[0] >
IKPI )
8501 else if( j3array[0] < -
IKPI )
8502 { j3array[0]+=
IK2PI;
8505 for(
int ij3 = 0; ij3 < 1; ++ij3)
8511 _ij3[0] = ij3; _ij3[1] = -1;
8512 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
8516 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
8519 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
8522 IkReal x565=
IKsin(j3);
8523 IkReal x566=
IKcos(j3);
8524 IkReal x567=((1.0)*gconst8);
8525 IkReal x568=((-1.0)*gconst8);
8526 evalcond[0]=(new_r11*x565);
8527 evalcond[1]=(new_r10*x566);
8528 evalcond[2]=(x565*x568);
8529 evalcond[3]=(x566*x568);
8530 evalcond[4]=(((gconst8*x566))+new_r11);
8531 evalcond[5]=(gconst8+((new_r11*x566)));
8532 evalcond[6]=(new_r10+(((-1.0)*x565*x567)));
8533 evalcond[7]=(((new_r10*x565))+(((-1.0)*x567)));
8541 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
8542 vinfos[0].jointtype = 1;
8543 vinfos[0].foffset = j0;
8544 vinfos[0].indices[0] = _ij0[0];
8545 vinfos[0].indices[1] = _ij0[1];
8546 vinfos[0].maxsolutions = _nj0;
8547 vinfos[1].jointtype = 1;
8548 vinfos[1].foffset = j1;
8549 vinfos[1].indices[0] = _ij1[0];
8550 vinfos[1].indices[1] = _ij1[1];
8551 vinfos[1].maxsolutions = _nj1;
8552 vinfos[2].jointtype = 1;
8553 vinfos[2].foffset = j2;
8554 vinfos[2].indices[0] = _ij2[0];
8555 vinfos[2].indices[1] = _ij2[1];
8556 vinfos[2].maxsolutions = _nj2;
8557 vinfos[3].jointtype = 1;
8558 vinfos[3].foffset = j3;
8559 vinfos[3].indices[0] = _ij3[0];
8560 vinfos[3].indices[1] = _ij3[1];
8561 vinfos[3].maxsolutions = _nj3;
8562 vinfos[4].jointtype = 1;
8563 vinfos[4].foffset = j4;
8564 vinfos[4].indices[0] = _ij4[0];
8565 vinfos[4].indices[1] = _ij4[1];
8566 vinfos[4].maxsolutions = _nj4;
8567 vinfos[5].jointtype = 1;
8568 vinfos[5].foffset = j5;
8569 vinfos[5].indices[0] = _ij5[0];
8570 vinfos[5].indices[1] = _ij5[1];
8571 vinfos[5].maxsolutions = _nj5;
8572 std::vector<int> vfree(0);
8585 IkReal j3array[1], cj3array[1], sj3array[1];
8586 bool j3valid[1]={
false};
8596 j3array[0]=((-1.5707963267949)+(x569.
value)+(((1.5707963267949)*(x570.
value))));
8597 sj3array[0]=
IKsin(j3array[0]);
8598 cj3array[0]=
IKcos(j3array[0]);
8599 if( j3array[0] >
IKPI )
8603 else if( j3array[0] < -
IKPI )
8604 { j3array[0]+=
IK2PI;
8607 for(
int ij3 = 0; ij3 < 1; ++ij3)
8613 _ij3[0] = ij3; _ij3[1] = -1;
8614 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
8618 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
8621 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
8624 IkReal x571=
IKsin(j3);
8625 IkReal x572=
IKcos(j3);
8626 IkReal x573=((1.0)*gconst8);
8627 IkReal x574=((-1.0)*gconst8);
8628 evalcond[0]=(new_r11*x571);
8629 evalcond[1]=(new_r10*x572);
8630 evalcond[2]=(x571*x574);
8631 evalcond[3]=(x572*x574);
8632 evalcond[4]=(((gconst8*x572))+new_r11);
8633 evalcond[5]=(((new_r11*x572))+gconst8);
8634 evalcond[6]=((((-1.0)*x571*x573))+new_r10);
8635 evalcond[7]=(((new_r10*x571))+(((-1.0)*x573)));
8643 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
8644 vinfos[0].jointtype = 1;
8645 vinfos[0].foffset = j0;
8646 vinfos[0].indices[0] = _ij0[0];
8647 vinfos[0].indices[1] = _ij0[1];
8648 vinfos[0].maxsolutions = _nj0;
8649 vinfos[1].jointtype = 1;
8650 vinfos[1].foffset = j1;
8651 vinfos[1].indices[0] = _ij1[0];
8652 vinfos[1].indices[1] = _ij1[1];
8653 vinfos[1].maxsolutions = _nj1;
8654 vinfos[2].jointtype = 1;
8655 vinfos[2].foffset = j2;
8656 vinfos[2].indices[0] = _ij2[0];
8657 vinfos[2].indices[1] = _ij2[1];
8658 vinfos[2].maxsolutions = _nj2;
8659 vinfos[3].jointtype = 1;
8660 vinfos[3].foffset = j3;
8661 vinfos[3].indices[0] = _ij3[0];
8662 vinfos[3].indices[1] = _ij3[1];
8663 vinfos[3].maxsolutions = _nj3;
8664 vinfos[4].jointtype = 1;
8665 vinfos[4].foffset = j4;
8666 vinfos[4].indices[0] = _ij4[0];
8667 vinfos[4].indices[1] = _ij4[1];
8668 vinfos[4].maxsolutions = _nj4;
8669 vinfos[5].jointtype = 1;
8670 vinfos[5].foffset = j5;
8671 vinfos[5].indices[0] = _ij5[0];
8672 vinfos[5].indices[1] = _ij5[1];
8673 vinfos[5].maxsolutions = _nj5;
8674 std::vector<int> vfree(0);
8686 if( bgotonextstatement )
8688 bool bgotonextstatement =
true;
8691 evalcond[0]=
IKabs(new_r01);
8692 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
8694 bgotonextstatement=
false;
8701 IkReal x575=((-1.0)*(x576.
value));
8704 j4=3.14159265358979;
8709 IkReal gconst6=x575;
8711 IkReal x577 = new_r11*new_r11;
8715 IkReal gconst8=(new_r11*(
pow(x577,-0.5)));
8716 j3eval[0]=((
IKabs(new_r10))+(
IKabs(new_r00)));
8717 if(
IKabs(j3eval[0]) < 0.0000010000000000 )
8725 IkReal x578=((-1.0)*(x579.
value));
8728 j4=3.14159265358979;
8733 IkReal gconst6=x578;
8735 IkReal x580 = new_r11*new_r11;
8739 IkReal gconst8=(new_r11*(
pow(x580,-0.5)));
8740 j3eval[0]=((
IKabs(new_r11))+(
IKabs(new_r10)));
8741 if(
IKabs(j3eval[0]) < 0.0000010000000000 )
8749 IkReal x581=((-1.0)*(x582.
value));
8752 j4=3.14159265358979;
8757 IkReal gconst6=x581;
8759 IkReal x583 = new_r11*new_r11;
8763 IkReal gconst8=(new_r11*(
pow(x583,-0.5)));
8765 if(
IKabs(j3eval[0]) < 0.0000010000000000 )
8772 IkReal j3array[1], cj3array[1], sj3array[1];
8773 bool j3valid[1]={
false};
8786 sj3array[0]=
IKsin(j3array[0]);
8787 cj3array[0]=
IKcos(j3array[0]);
8788 if( j3array[0] >
IKPI )
8792 else if( j3array[0] < -
IKPI )
8793 { j3array[0]+=
IK2PI;
8796 for(
int ij3 = 0; ij3 < 1; ++ij3)
8802 _ij3[0] = ij3; _ij3[1] = -1;
8803 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
8807 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
8810 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
8813 IkReal x586=
IKsin(j3);
8814 IkReal x587=
IKcos(j3);
8815 IkReal x588=((1.0)*gconst8);
8816 evalcond[0]=(new_r11*x586);
8817 evalcond[1]=((-1.0)*gconst8*x586);
8818 evalcond[2]=(((gconst8*x587))+new_r11);
8819 evalcond[3]=(gconst8+((new_r11*x587)));
8820 evalcond[4]=((((-1.0)*x587*x588))+new_r00);
8821 evalcond[5]=((((-1.0)*x586*x588))+new_r10);
8822 evalcond[6]=((((-1.0)*new_r00*x586))+((new_r10*x587)));
8823 evalcond[7]=(((new_r00*x587))+(((-1.0)*x588))+((new_r10*x586)));
8831 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
8832 vinfos[0].jointtype = 1;
8833 vinfos[0].foffset = j0;
8834 vinfos[0].indices[0] = _ij0[0];
8835 vinfos[0].indices[1] = _ij0[1];
8836 vinfos[0].maxsolutions = _nj0;
8837 vinfos[1].jointtype = 1;
8838 vinfos[1].foffset = j1;
8839 vinfos[1].indices[0] = _ij1[0];
8840 vinfos[1].indices[1] = _ij1[1];
8841 vinfos[1].maxsolutions = _nj1;
8842 vinfos[2].jointtype = 1;
8843 vinfos[2].foffset = j2;
8844 vinfos[2].indices[0] = _ij2[0];
8845 vinfos[2].indices[1] = _ij2[1];
8846 vinfos[2].maxsolutions = _nj2;
8847 vinfos[3].jointtype = 1;
8848 vinfos[3].foffset = j3;
8849 vinfos[3].indices[0] = _ij3[0];
8850 vinfos[3].indices[1] = _ij3[1];
8851 vinfos[3].maxsolutions = _nj3;
8852 vinfos[4].jointtype = 1;
8853 vinfos[4].foffset = j4;
8854 vinfos[4].indices[0] = _ij4[0];
8855 vinfos[4].indices[1] = _ij4[1];
8856 vinfos[4].maxsolutions = _nj4;
8857 vinfos[5].jointtype = 1;
8858 vinfos[5].foffset = j5;
8859 vinfos[5].indices[0] = _ij5[0];
8860 vinfos[5].indices[1] = _ij5[1];
8861 vinfos[5].maxsolutions = _nj5;
8862 std::vector<int> vfree(0);
8875 IkReal j3array[1], cj3array[1], sj3array[1];
8876 bool j3valid[1]={
false};
8886 j3array[0]=((-1.5707963267949)+(x589.
value)+(((1.5707963267949)*(x590.
value))));
8887 sj3array[0]=
IKsin(j3array[0]);
8888 cj3array[0]=
IKcos(j3array[0]);
8889 if( j3array[0] >
IKPI )
8893 else if( j3array[0] < -
IKPI )
8894 { j3array[0]+=
IK2PI;
8897 for(
int ij3 = 0; ij3 < 1; ++ij3)
8903 _ij3[0] = ij3; _ij3[1] = -1;
8904 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
8908 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
8911 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
8914 IkReal x591=
IKsin(j3);
8915 IkReal x592=
IKcos(j3);
8916 IkReal x593=((1.0)*gconst8);
8917 evalcond[0]=(new_r11*x591);
8918 evalcond[1]=((-1.0)*gconst8*x591);
8919 evalcond[2]=(((gconst8*x592))+new_r11);
8920 evalcond[3]=(((new_r11*x592))+gconst8);
8921 evalcond[4]=((((-1.0)*x592*x593))+new_r00);
8922 evalcond[5]=(new_r10+(((-1.0)*x591*x593)));
8923 evalcond[6]=(((new_r10*x592))+(((-1.0)*new_r00*x591)));
8924 evalcond[7]=(((new_r10*x591))+((new_r00*x592))+(((-1.0)*x593)));
8932 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
8933 vinfos[0].jointtype = 1;
8934 vinfos[0].foffset = j0;
8935 vinfos[0].indices[0] = _ij0[0];
8936 vinfos[0].indices[1] = _ij0[1];
8937 vinfos[0].maxsolutions = _nj0;
8938 vinfos[1].jointtype = 1;
8939 vinfos[1].foffset = j1;
8940 vinfos[1].indices[0] = _ij1[0];
8941 vinfos[1].indices[1] = _ij1[1];
8942 vinfos[1].maxsolutions = _nj1;
8943 vinfos[2].jointtype = 1;
8944 vinfos[2].foffset = j2;
8945 vinfos[2].indices[0] = _ij2[0];
8946 vinfos[2].indices[1] = _ij2[1];
8947 vinfos[2].maxsolutions = _nj2;
8948 vinfos[3].jointtype = 1;
8949 vinfos[3].foffset = j3;
8950 vinfos[3].indices[0] = _ij3[0];
8951 vinfos[3].indices[1] = _ij3[1];
8952 vinfos[3].maxsolutions = _nj3;
8953 vinfos[4].jointtype = 1;
8954 vinfos[4].foffset = j4;
8955 vinfos[4].indices[0] = _ij4[0];
8956 vinfos[4].indices[1] = _ij4[1];
8957 vinfos[4].maxsolutions = _nj4;
8958 vinfos[5].jointtype = 1;
8959 vinfos[5].foffset = j5;
8960 vinfos[5].indices[0] = _ij5[0];
8961 vinfos[5].indices[1] = _ij5[1];
8962 vinfos[5].maxsolutions = _nj5;
8963 std::vector<int> vfree(0);
8976 IkReal j3array[1], cj3array[1], sj3array[1];
8977 bool j3valid[1]={
false};
8987 j3array[0]=((-1.5707963267949)+(((1.5707963267949)*(x594.
value)))+(x595.
value));
8988 sj3array[0]=
IKsin(j3array[0]);
8989 cj3array[0]=
IKcos(j3array[0]);
8990 if( j3array[0] >
IKPI )
8994 else if( j3array[0] < -
IKPI )
8995 { j3array[0]+=
IK2PI;
8998 for(
int ij3 = 0; ij3 < 1; ++ij3)
9004 _ij3[0] = ij3; _ij3[1] = -1;
9005 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
9009 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
9012 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
9015 IkReal x596=
IKsin(j3);
9016 IkReal x597=
IKcos(j3);
9017 IkReal x598=((1.0)*gconst8);
9018 evalcond[0]=(new_r11*x596);
9019 evalcond[1]=((-1.0)*gconst8*x596);
9020 evalcond[2]=(((gconst8*x597))+new_r11);
9021 evalcond[3]=(((new_r11*x597))+gconst8);
9022 evalcond[4]=((((-1.0)*x597*x598))+new_r00);
9023 evalcond[5]=((((-1.0)*x596*x598))+new_r10);
9024 evalcond[6]=(((new_r10*x597))+(((-1.0)*new_r00*x596)));
9025 evalcond[7]=(((new_r10*x596))+((new_r00*x597))+(((-1.0)*x598)));
9033 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
9034 vinfos[0].jointtype = 1;
9035 vinfos[0].foffset = j0;
9036 vinfos[0].indices[0] = _ij0[0];
9037 vinfos[0].indices[1] = _ij0[1];
9038 vinfos[0].maxsolutions = _nj0;
9039 vinfos[1].jointtype = 1;
9040 vinfos[1].foffset = j1;
9041 vinfos[1].indices[0] = _ij1[0];
9042 vinfos[1].indices[1] = _ij1[1];
9043 vinfos[1].maxsolutions = _nj1;
9044 vinfos[2].jointtype = 1;
9045 vinfos[2].foffset = j2;
9046 vinfos[2].indices[0] = _ij2[0];
9047 vinfos[2].indices[1] = _ij2[1];
9048 vinfos[2].maxsolutions = _nj2;
9049 vinfos[3].jointtype = 1;
9050 vinfos[3].foffset = j3;
9051 vinfos[3].indices[0] = _ij3[0];
9052 vinfos[3].indices[1] = _ij3[1];
9053 vinfos[3].maxsolutions = _nj3;
9054 vinfos[4].jointtype = 1;
9055 vinfos[4].foffset = j4;
9056 vinfos[4].indices[0] = _ij4[0];
9057 vinfos[4].indices[1] = _ij4[1];
9058 vinfos[4].maxsolutions = _nj4;
9059 vinfos[5].jointtype = 1;
9060 vinfos[5].foffset = j5;
9061 vinfos[5].indices[0] = _ij5[0];
9062 vinfos[5].indices[1] = _ij5[1];
9063 vinfos[5].maxsolutions = _nj5;
9064 std::vector<int> vfree(0);
9076 if( bgotonextstatement )
9078 bool bgotonextstatement =
true;
9083 bgotonextstatement=
false;
9088 if( bgotonextstatement )
9102 IkReal j3array[1], cj3array[1], sj3array[1];
9103 bool j3valid[1]={
false};
9105 IkReal x599=((1.0)*new_r11);
9114 j3array[0]=((-1.5707963267949)+(((1.5707963267949)*(x600.
value)))+(x601.
value));
9115 sj3array[0]=
IKsin(j3array[0]);
9116 cj3array[0]=
IKcos(j3array[0]);
9117 if( j3array[0] >
IKPI )
9121 else if( j3array[0] < -
IKPI )
9122 { j3array[0]+=
IK2PI;
9125 for(
int ij3 = 0; ij3 < 1; ++ij3)
9131 _ij3[0] = ij3; _ij3[1] = -1;
9132 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
9136 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
9139 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
9142 IkReal x602=
IKcos(j3);
9143 IkReal x603=
IKsin(j3);
9144 IkReal x604=((1.0)*gconst8);
9145 IkReal x605=(gconst7*x602);
9146 IkReal x606=(gconst7*x603);
9147 IkReal x607=((1.0)*x603);
9148 IkReal x608=(x603*x604);
9149 evalcond[0]=(gconst7+((new_r11*x603))+((new_r01*x602)));
9150 evalcond[1]=(((gconst8*x602))+x606+new_r11);
9151 evalcond[2]=(x605+(((-1.0)*x608))+new_r01);
9152 evalcond[3]=(gconst7+((new_r10*x602))+(((-1.0)*new_r00*x607)));
9153 evalcond[4]=(gconst8+((new_r11*x602))+(((-1.0)*new_r01*x607)));
9154 evalcond[5]=(x605+(((-1.0)*x608))+new_r10);
9155 evalcond[6]=(((new_r10*x603))+((new_r00*x602))+(((-1.0)*x604)));
9156 evalcond[7]=((((-1.0)*x602*x604))+(((-1.0)*x606))+new_r00);
9164 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
9165 vinfos[0].jointtype = 1;
9166 vinfos[0].foffset = j0;
9167 vinfos[0].indices[0] = _ij0[0];
9168 vinfos[0].indices[1] = _ij0[1];
9169 vinfos[0].maxsolutions = _nj0;
9170 vinfos[1].jointtype = 1;
9171 vinfos[1].foffset = j1;
9172 vinfos[1].indices[0] = _ij1[0];
9173 vinfos[1].indices[1] = _ij1[1];
9174 vinfos[1].maxsolutions = _nj1;
9175 vinfos[2].jointtype = 1;
9176 vinfos[2].foffset = j2;
9177 vinfos[2].indices[0] = _ij2[0];
9178 vinfos[2].indices[1] = _ij2[1];
9179 vinfos[2].maxsolutions = _nj2;
9180 vinfos[3].jointtype = 1;
9181 vinfos[3].foffset = j3;
9182 vinfos[3].indices[0] = _ij3[0];
9183 vinfos[3].indices[1] = _ij3[1];
9184 vinfos[3].maxsolutions = _nj3;
9185 vinfos[4].jointtype = 1;
9186 vinfos[4].foffset = j4;
9187 vinfos[4].indices[0] = _ij4[0];
9188 vinfos[4].indices[1] = _ij4[1];
9189 vinfos[4].maxsolutions = _nj4;
9190 vinfos[5].jointtype = 1;
9191 vinfos[5].foffset = j5;
9192 vinfos[5].indices[0] = _ij5[0];
9193 vinfos[5].indices[1] = _ij5[1];
9194 vinfos[5].maxsolutions = _nj5;
9195 std::vector<int> vfree(0);
9208 IkReal j3array[1], cj3array[1], sj3array[1];
9209 bool j3valid[1]={
false};
9211 IkReal x609=((1.0)*new_r11);
9220 j3array[0]=((-1.5707963267949)+(x610.
value)+(((1.5707963267949)*(x611.
value))));
9221 sj3array[0]=
IKsin(j3array[0]);
9222 cj3array[0]=
IKcos(j3array[0]);
9223 if( j3array[0] >
IKPI )
9227 else if( j3array[0] < -
IKPI )
9228 { j3array[0]+=
IK2PI;
9231 for(
int ij3 = 0; ij3 < 1; ++ij3)
9237 _ij3[0] = ij3; _ij3[1] = -1;
9238 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
9242 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
9245 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
9248 IkReal x612=
IKcos(j3);
9249 IkReal x613=
IKsin(j3);
9250 IkReal x614=((1.0)*gconst8);
9251 IkReal x615=(gconst7*x612);
9252 IkReal x616=(gconst7*x613);
9253 IkReal x617=((1.0)*x613);
9254 IkReal x618=(x613*x614);
9255 evalcond[0]=(gconst7+((new_r11*x613))+((new_r01*x612)));
9256 evalcond[1]=(((gconst8*x612))+x616+new_r11);
9257 evalcond[2]=((((-1.0)*x618))+x615+new_r01);
9258 evalcond[3]=(gconst7+((new_r10*x612))+(((-1.0)*new_r00*x617)));
9259 evalcond[4]=(gconst8+((new_r11*x612))+(((-1.0)*new_r01*x617)));
9260 evalcond[5]=((((-1.0)*x618))+x615+new_r10);
9261 evalcond[6]=(((new_r10*x613))+(((-1.0)*x614))+((new_r00*x612)));
9262 evalcond[7]=((((-1.0)*x612*x614))+(((-1.0)*x616))+new_r00);
9270 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
9271 vinfos[0].jointtype = 1;
9272 vinfos[0].foffset = j0;
9273 vinfos[0].indices[0] = _ij0[0];
9274 vinfos[0].indices[1] = _ij0[1];
9275 vinfos[0].maxsolutions = _nj0;
9276 vinfos[1].jointtype = 1;
9277 vinfos[1].foffset = j1;
9278 vinfos[1].indices[0] = _ij1[0];
9279 vinfos[1].indices[1] = _ij1[1];
9280 vinfos[1].maxsolutions = _nj1;
9281 vinfos[2].jointtype = 1;
9282 vinfos[2].foffset = j2;
9283 vinfos[2].indices[0] = _ij2[0];
9284 vinfos[2].indices[1] = _ij2[1];
9285 vinfos[2].maxsolutions = _nj2;
9286 vinfos[3].jointtype = 1;
9287 vinfos[3].foffset = j3;
9288 vinfos[3].indices[0] = _ij3[0];
9289 vinfos[3].indices[1] = _ij3[1];
9290 vinfos[3].maxsolutions = _nj3;
9291 vinfos[4].jointtype = 1;
9292 vinfos[4].foffset = j4;
9293 vinfos[4].indices[0] = _ij4[0];
9294 vinfos[4].indices[1] = _ij4[1];
9295 vinfos[4].maxsolutions = _nj4;
9296 vinfos[5].jointtype = 1;
9297 vinfos[5].foffset = j5;
9298 vinfos[5].indices[0] = _ij5[0];
9299 vinfos[5].indices[1] = _ij5[1];
9300 vinfos[5].maxsolutions = _nj5;
9301 std::vector<int> vfree(0);
9314 IkReal j3array[1], cj3array[1], sj3array[1];
9315 bool j3valid[1]={
false};
9317 IkReal x619=((1.0)*gconst7);
9326 j3array[0]=((-1.5707963267949)+(x620.
value)+(((1.5707963267949)*(x621.
value))));
9327 sj3array[0]=
IKsin(j3array[0]);
9328 cj3array[0]=
IKcos(j3array[0]);
9329 if( j3array[0] >
IKPI )
9333 else if( j3array[0] < -
IKPI )
9334 { j3array[0]+=
IK2PI;
9337 for(
int ij3 = 0; ij3 < 1; ++ij3)
9343 _ij3[0] = ij3; _ij3[1] = -1;
9344 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
9348 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
9351 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
9354 IkReal x622=
IKcos(j3);
9355 IkReal x623=
IKsin(j3);
9356 IkReal x624=((1.0)*gconst8);
9357 IkReal x625=(gconst7*x622);
9358 IkReal x626=(gconst7*x623);
9359 IkReal x627=((1.0)*x623);
9360 IkReal x628=(x623*x624);
9361 evalcond[0]=(gconst7+((new_r01*x622))+((new_r11*x623)));
9362 evalcond[1]=(x626+((gconst8*x622))+new_r11);
9363 evalcond[2]=((((-1.0)*x628))+x625+new_r01);
9364 evalcond[3]=((((-1.0)*new_r00*x627))+gconst7+((new_r10*x622)));
9365 evalcond[4]=((((-1.0)*new_r01*x627))+gconst8+((new_r11*x622)));
9366 evalcond[5]=((((-1.0)*x628))+x625+new_r10);
9367 evalcond[6]=((((-1.0)*x624))+((new_r00*x622))+((new_r10*x623)));
9368 evalcond[7]=((((-1.0)*x622*x624))+(((-1.0)*x626))+new_r00);
9376 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
9377 vinfos[0].jointtype = 1;
9378 vinfos[0].foffset = j0;
9379 vinfos[0].indices[0] = _ij0[0];
9380 vinfos[0].indices[1] = _ij0[1];
9381 vinfos[0].maxsolutions = _nj0;
9382 vinfos[1].jointtype = 1;
9383 vinfos[1].foffset = j1;
9384 vinfos[1].indices[0] = _ij1[0];
9385 vinfos[1].indices[1] = _ij1[1];
9386 vinfos[1].maxsolutions = _nj1;
9387 vinfos[2].jointtype = 1;
9388 vinfos[2].foffset = j2;
9389 vinfos[2].indices[0] = _ij2[0];
9390 vinfos[2].indices[1] = _ij2[1];
9391 vinfos[2].maxsolutions = _nj2;
9392 vinfos[3].jointtype = 1;
9393 vinfos[3].foffset = j3;
9394 vinfos[3].indices[0] = _ij3[0];
9395 vinfos[3].indices[1] = _ij3[1];
9396 vinfos[3].maxsolutions = _nj3;
9397 vinfos[4].jointtype = 1;
9398 vinfos[4].foffset = j4;
9399 vinfos[4].indices[0] = _ij4[0];
9400 vinfos[4].indices[1] = _ij4[1];
9401 vinfos[4].maxsolutions = _nj4;
9402 vinfos[5].jointtype = 1;
9403 vinfos[5].foffset = j5;
9404 vinfos[5].indices[0] = _ij5[0];
9405 vinfos[5].indices[1] = _ij5[1];
9406 vinfos[5].maxsolutions = _nj5;
9407 std::vector<int> vfree(0);
9419 if( bgotonextstatement )
9421 bool bgotonextstatement =
true;
9424 IkReal x630 = ((new_r01*new_r01)+(new_r11*new_r11));
9428 IkReal x629=
pow(x630,-0.5);
9433 IkReal gconst9=((3.14159265358979)+(((-1.0)*(x631.
value))));
9434 IkReal gconst10=((1.0)*new_r01*x629);
9435 IkReal gconst11=((-1.0)*new_r11*x629);
9440 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-3.14159265358979)+(x632.
value)+j5)))), 6.28318530717959)));
9441 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
9443 bgotonextstatement=
false;
9450 IkReal x633=((1.0)*(x635.
value));
9454 j4=3.14159265358979;
9457 j5=((3.14159265)+(((-1.0)*x633)));
9458 IkReal gconst9=((3.14159265358979)+(((-1.0)*x633)));
9459 IkReal gconst10=((1.0)*new_r01*x634);
9460 IkReal gconst11=((-1.0)*new_r11*x634);
9461 IkReal x636=new_r01*new_r01;
9462 IkReal x637=(((new_r10*new_r11))+((new_r00*new_r01)));
9464 IkReal x639=((1.0)*new_r01*x638);
9466 j3eval[1]=((
IKabs(((((-1.0)*new_r00*x639))+(((-1.0)*new_r11*x639)))))+(
IKabs((((x636*x638))+(((-1.0)*new_r10*x639))))));
9468 if(
IKabs(j3eval[0]) < 0.0000010000000000 ||
IKabs(j3eval[1]) < 0.0000010000000000 ||
IKabs(j3eval[2]) < 0.0000010000000000 )
9476 IkReal x640=((1.0)*(x642.
value));
9480 j4=3.14159265358979;
9483 j5=((3.14159265)+(((-1.0)*x640)));
9484 IkReal gconst9=((3.14159265358979)+(((-1.0)*x640)));
9485 IkReal gconst10=((1.0)*new_r01*x641);
9486 IkReal gconst11=((-1.0)*new_r11*x641);
9487 IkReal x643=((new_r01*new_r01)+(new_r11*new_r11));
9490 if(
IKabs(j3eval[0]) < 0.0000010000000000 ||
IKabs(j3eval[1]) < 0.0000010000000000 )
9498 IkReal x644=((1.0)*(x646.
value));
9502 j4=3.14159265358979;
9505 j5=((3.14159265)+(((-1.0)*x644)));
9506 IkReal gconst9=((3.14159265358979)+(((-1.0)*x644)));
9507 IkReal gconst10=((1.0)*new_r01*x645);
9508 IkReal gconst11=((-1.0)*new_r11*x645);
9509 j3eval[0]=((new_r01*new_r01)+(new_r11*new_r11));
9510 if(
IKabs(j3eval[0]) < 0.0000010000000000 )
9514 bool bgotonextstatement =
true;
9517 evalcond[0]=((gconst10*gconst10)+(gconst11*gconst11));
9518 evalcond[1]=new_r01;
9519 evalcond[2]=new_r00;
9520 evalcond[3]=new_r11;
9521 evalcond[4]=new_r10;
9522 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 &&
IKabs(evalcond[2]) < 0.0000050000000000 &&
IKabs(evalcond[3]) < 0.0000050000000000 &&
IKabs(evalcond[4]) < 0.0000050000000000 )
9524 bgotonextstatement=
false;
9526 IkReal j3array[4], cj3array[4], sj3array[4];
9527 bool j3valid[4]={
false};
9530 sj3array[0]=
IKsin(j3array[0]);
9531 cj3array[0]=
IKcos(j3array[0]);
9532 j3array[1]=1.5707963267949;
9533 sj3array[1]=
IKsin(j3array[1]);
9534 cj3array[1]=
IKcos(j3array[1]);
9535 j3array[2]=3.14159265358979;
9536 sj3array[2]=
IKsin(j3array[2]);
9537 cj3array[2]=
IKcos(j3array[2]);
9538 j3array[3]=-1.5707963267949;
9539 sj3array[3]=
IKsin(j3array[3]);
9540 cj3array[3]=
IKcos(j3array[3]);
9541 if( j3array[0] >
IKPI )
9545 else if( j3array[0] < -
IKPI )
9546 { j3array[0]+=
IK2PI;
9549 if( j3array[1] >
IKPI )
9553 else if( j3array[1] < -
IKPI )
9554 { j3array[1]+=
IK2PI;
9557 if( j3array[2] >
IKPI )
9561 else if( j3array[2] < -
IKPI )
9562 { j3array[2]+=
IK2PI;
9565 if( j3array[3] >
IKPI )
9569 else if( j3array[3] < -
IKPI )
9570 { j3array[3]+=
IK2PI;
9573 for(
int ij3 = 0; ij3 < 4; ++ij3)
9579 _ij3[0] = ij3; _ij3[1] = -1;
9580 for(
int iij3 = ij3+1; iij3 < 4; ++iij3)
9584 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
9587 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
9590 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
9591 vinfos[0].jointtype = 1;
9592 vinfos[0].foffset = j0;
9593 vinfos[0].indices[0] = _ij0[0];
9594 vinfos[0].indices[1] = _ij0[1];
9595 vinfos[0].maxsolutions = _nj0;
9596 vinfos[1].jointtype = 1;
9597 vinfos[1].foffset = j1;
9598 vinfos[1].indices[0] = _ij1[0];
9599 vinfos[1].indices[1] = _ij1[1];
9600 vinfos[1].maxsolutions = _nj1;
9601 vinfos[2].jointtype = 1;
9602 vinfos[2].foffset = j2;
9603 vinfos[2].indices[0] = _ij2[0];
9604 vinfos[2].indices[1] = _ij2[1];
9605 vinfos[2].maxsolutions = _nj2;
9606 vinfos[3].jointtype = 1;
9607 vinfos[3].foffset = j3;
9608 vinfos[3].indices[0] = _ij3[0];
9609 vinfos[3].indices[1] = _ij3[1];
9610 vinfos[3].maxsolutions = _nj3;
9611 vinfos[4].jointtype = 1;
9612 vinfos[4].foffset = j4;
9613 vinfos[4].indices[0] = _ij4[0];
9614 vinfos[4].indices[1] = _ij4[1];
9615 vinfos[4].maxsolutions = _nj4;
9616 vinfos[5].jointtype = 1;
9617 vinfos[5].foffset = j5;
9618 vinfos[5].indices[0] = _ij5[0];
9619 vinfos[5].indices[1] = _ij5[1];
9620 vinfos[5].maxsolutions = _nj5;
9621 std::vector<int> vfree(0);
9629 if( bgotonextstatement )
9631 bool bgotonextstatement =
true;
9634 evalcond[0]=((
IKabs(new_r11))+(
IKabs(new_r00)));
9635 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
9637 bgotonextstatement=
false;
9644 IkReal x647=((1.0)*(x648.
value));
9647 j4=3.14159265358979;
9650 j5=((3.14159265)+(((-1.0)*x647)));
9653 IkReal gconst9=((3.14159265358979)+(((-1.0)*x647)));
9654 IkReal x649 = new_r01*new_r01;
9658 IkReal gconst10=((1.0)*new_r01*(
pow(x649,-0.5)));
9661 if(
IKabs(j3eval[0]) < 0.0000010000000000 )
9664 IkReal j3array[2], cj3array[2], sj3array[2];
9665 bool j3valid[2]={
false};
9671 cj3array[0]=((-1.0)*new_r01*(x650.
value));
9674 j3valid[0] = j3valid[1] =
true;
9675 j3array[0] =
IKacos(cj3array[0]);
9676 sj3array[0] =
IKsin(j3array[0]);
9677 cj3array[1] = cj3array[0];
9678 j3array[1] = -j3array[0];
9679 sj3array[1] = -sj3array[0];
9681 else if( isnan(cj3array[0]) )
9685 cj3array[0] = 1; sj3array[0] = 0; j3array[0] = 0;
9687 for(
int ij3 = 0; ij3 < 2; ++ij3)
9693 _ij3[0] = ij3; _ij3[1] = -1;
9694 for(
int iij3 = ij3+1; iij3 < 2; ++iij3)
9698 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
9701 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
9704 IkReal x651=
IKsin(j3);
9705 IkReal x652=
IKcos(j3);
9706 IkReal x653=((-1.0)*x651);
9707 evalcond[0]=(new_r10*x651);
9708 evalcond[1]=(gconst10*x653);
9709 evalcond[2]=(new_r01*x653);
9710 evalcond[3]=(gconst10+((new_r01*x652)));
9711 evalcond[4]=(gconst10+((new_r10*x652)));
9712 evalcond[5]=(((gconst10*x652))+new_r10);
9720 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
9721 vinfos[0].jointtype = 1;
9722 vinfos[0].foffset = j0;
9723 vinfos[0].indices[0] = _ij0[0];
9724 vinfos[0].indices[1] = _ij0[1];
9725 vinfos[0].maxsolutions = _nj0;
9726 vinfos[1].jointtype = 1;
9727 vinfos[1].foffset = j1;
9728 vinfos[1].indices[0] = _ij1[0];
9729 vinfos[1].indices[1] = _ij1[1];
9730 vinfos[1].maxsolutions = _nj1;
9731 vinfos[2].jointtype = 1;
9732 vinfos[2].foffset = j2;
9733 vinfos[2].indices[0] = _ij2[0];
9734 vinfos[2].indices[1] = _ij2[1];
9735 vinfos[2].maxsolutions = _nj2;
9736 vinfos[3].jointtype = 1;
9737 vinfos[3].foffset = j3;
9738 vinfos[3].indices[0] = _ij3[0];
9739 vinfos[3].indices[1] = _ij3[1];
9740 vinfos[3].maxsolutions = _nj3;
9741 vinfos[4].jointtype = 1;
9742 vinfos[4].foffset = j4;
9743 vinfos[4].indices[0] = _ij4[0];
9744 vinfos[4].indices[1] = _ij4[1];
9745 vinfos[4].maxsolutions = _nj4;
9746 vinfos[5].jointtype = 1;
9747 vinfos[5].foffset = j5;
9748 vinfos[5].indices[0] = _ij5[0];
9749 vinfos[5].indices[1] = _ij5[1];
9750 vinfos[5].maxsolutions = _nj5;
9751 std::vector<int> vfree(0);
9760 IkReal j3array[2], cj3array[2], sj3array[2];
9761 bool j3valid[2]={
false};
9767 cj3array[0]=((-1.0)*gconst10*(x654.
value));
9770 j3valid[0] = j3valid[1] =
true;
9771 j3array[0] =
IKacos(cj3array[0]);
9772 sj3array[0] =
IKsin(j3array[0]);
9773 cj3array[1] = cj3array[0];
9774 j3array[1] = -j3array[0];
9775 sj3array[1] = -sj3array[0];
9777 else if( isnan(cj3array[0]) )
9781 cj3array[0] = 1; sj3array[0] = 0; j3array[0] = 0;
9783 for(
int ij3 = 0; ij3 < 2; ++ij3)
9789 _ij3[0] = ij3; _ij3[1] = -1;
9790 for(
int iij3 = ij3+1; iij3 < 2; ++iij3)
9794 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
9797 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
9800 IkReal x655=
IKsin(j3);
9801 IkReal x656=
IKcos(j3);
9802 IkReal x657=(gconst10*x656);
9803 IkReal x658=((-1.0)*x655);
9804 evalcond[0]=(new_r10*x655);
9805 evalcond[1]=(gconst10*x658);
9806 evalcond[2]=(new_r01*x658);
9807 evalcond[3]=(x657+new_r01);
9808 evalcond[4]=(gconst10+((new_r10*x656)));
9809 evalcond[5]=(x657+new_r10);
9817 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
9818 vinfos[0].jointtype = 1;
9819 vinfos[0].foffset = j0;
9820 vinfos[0].indices[0] = _ij0[0];
9821 vinfos[0].indices[1] = _ij0[1];
9822 vinfos[0].maxsolutions = _nj0;
9823 vinfos[1].jointtype = 1;
9824 vinfos[1].foffset = j1;
9825 vinfos[1].indices[0] = _ij1[0];
9826 vinfos[1].indices[1] = _ij1[1];
9827 vinfos[1].maxsolutions = _nj1;
9828 vinfos[2].jointtype = 1;
9829 vinfos[2].foffset = j2;
9830 vinfos[2].indices[0] = _ij2[0];
9831 vinfos[2].indices[1] = _ij2[1];
9832 vinfos[2].maxsolutions = _nj2;
9833 vinfos[3].jointtype = 1;
9834 vinfos[3].foffset = j3;
9835 vinfos[3].indices[0] = _ij3[0];
9836 vinfos[3].indices[1] = _ij3[1];
9837 vinfos[3].maxsolutions = _nj3;
9838 vinfos[4].jointtype = 1;
9839 vinfos[4].foffset = j4;
9840 vinfos[4].indices[0] = _ij4[0];
9841 vinfos[4].indices[1] = _ij4[1];
9842 vinfos[4].maxsolutions = _nj4;
9843 vinfos[5].jointtype = 1;
9844 vinfos[5].foffset = j5;
9845 vinfos[5].indices[0] = _ij5[0];
9846 vinfos[5].indices[1] = _ij5[1];
9847 vinfos[5].maxsolutions = _nj5;
9848 std::vector<int> vfree(0);
9860 if( bgotonextstatement )
9862 bool bgotonextstatement =
true;
9865 evalcond[0]=((
IKabs(new_r10))+(
IKabs(new_r00)));
9866 evalcond[1]=gconst10;
9867 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 )
9869 bgotonextstatement=
false;
9876 IkReal x659=((1.0)*(x660.
value));
9879 j4=3.14159265358979;
9882 j5=((3.14159265)+(((-1.0)*x659)));
9887 IkReal gconst9=((3.14159265358979)+(((-1.0)*x659)));
9888 IkReal gconst10=((1.0)*new_r01);
9889 IkReal gconst11=((-1.0)*new_r11);
9894 if(
IKabs(j3eval[0]) < 0.0000010000000000 ||
IKabs(j3eval[1]) < 0.0000010000000000 ||
IKabs(j3eval[2]) < 0.0000010000000000 ||
IKabs(j3eval[3]) < 0.0000010000000000 )
9902 IkReal x661=((1.0)*(x662.
value));
9905 j4=3.14159265358979;
9908 j5=((3.14159265)+(((-1.0)*x661)));
9913 IkReal gconst9=((3.14159265358979)+(((-1.0)*x661)));
9914 IkReal gconst10=((1.0)*new_r01);
9915 IkReal gconst11=((-1.0)*new_r11);
9918 j3eval[2]=((
IKabs(((-1.0)+(new_r01*new_r01))))+(
IKabs(((1.0)*new_r01*new_r11))));
9919 if(
IKabs(j3eval[0]) < 0.0000010000000000 ||
IKabs(j3eval[1]) < 0.0000010000000000 ||
IKabs(j3eval[2]) < 0.0000010000000000 )
9927 IkReal x663=((1.0)*(x664.
value));
9930 j4=3.14159265358979;
9933 j5=((3.14159265)+(((-1.0)*x663)));
9938 IkReal gconst9=((3.14159265358979)+(((-1.0)*x663)));
9939 IkReal gconst10=((1.0)*new_r01);
9940 IkReal gconst11=((-1.0)*new_r11);
9943 j3eval[2]=((
IKabs(((2.0)*new_r01*new_r11)))+(
IKabs(((1.0)+(((-2.0)*(new_r01*new_r01)))))));
9944 if(
IKabs(j3eval[0]) < 0.0000010000000000 ||
IKabs(j3eval[1]) < 0.0000010000000000 ||
IKabs(j3eval[2]) < 0.0000010000000000 )
9951 IkReal j3array[1], cj3array[1], sj3array[1];
9952 bool j3valid[1]={
false};
9954 IkReal x665=((1.0)*new_r11);
9963 j3array[0]=((-1.5707963267949)+(x666.
value)+(((1.5707963267949)*(x667.
value))));
9964 sj3array[0]=
IKsin(j3array[0]);
9965 cj3array[0]=
IKcos(j3array[0]);
9966 if( j3array[0] >
IKPI )
9970 else if( j3array[0] < -
IKPI )
9971 { j3array[0]+=
IK2PI;
9974 for(
int ij3 = 0; ij3 < 1; ++ij3)
9980 _ij3[0] = ij3; _ij3[1] = -1;
9981 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
9985 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
9988 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
9991 IkReal x668=
IKcos(j3);
9992 IkReal x669=
IKsin(j3);
9993 IkReal x670=(gconst10*x668);
9994 IkReal x671=(gconst10*x669);
9995 IkReal x672=(gconst11*x668);
9996 IkReal x673=((1.0)*x669);
9997 IkReal x674=(gconst11*x673);
9998 evalcond[0]=(gconst10+((new_r11*x669))+((new_r01*x668)));
9999 evalcond[1]=(x672+x671+new_r11);
10000 evalcond[2]=(x670+(((-1.0)*x674)));
10001 evalcond[3]=(x670+new_r01+(((-1.0)*x674)));
10002 evalcond[4]=((((-1.0)*x671))+(((-1.0)*x672)));
10003 evalcond[5]=((((-1.0)*new_r01*x673))+gconst11+((new_r11*x668)));
10011 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
10012 vinfos[0].jointtype = 1;
10013 vinfos[0].foffset = j0;
10014 vinfos[0].indices[0] = _ij0[0];
10015 vinfos[0].indices[1] = _ij0[1];
10016 vinfos[0].maxsolutions = _nj0;
10017 vinfos[1].jointtype = 1;
10018 vinfos[1].foffset = j1;
10019 vinfos[1].indices[0] = _ij1[0];
10020 vinfos[1].indices[1] = _ij1[1];
10021 vinfos[1].maxsolutions = _nj1;
10022 vinfos[2].jointtype = 1;
10023 vinfos[2].foffset = j2;
10024 vinfos[2].indices[0] = _ij2[0];
10025 vinfos[2].indices[1] = _ij2[1];
10026 vinfos[2].maxsolutions = _nj2;
10027 vinfos[3].jointtype = 1;
10028 vinfos[3].foffset = j3;
10029 vinfos[3].indices[0] = _ij3[0];
10030 vinfos[3].indices[1] = _ij3[1];
10031 vinfos[3].maxsolutions = _nj3;
10032 vinfos[4].jointtype = 1;
10033 vinfos[4].foffset = j4;
10034 vinfos[4].indices[0] = _ij4[0];
10035 vinfos[4].indices[1] = _ij4[1];
10036 vinfos[4].maxsolutions = _nj4;
10037 vinfos[5].jointtype = 1;
10038 vinfos[5].foffset = j5;
10039 vinfos[5].indices[0] = _ij5[0];
10040 vinfos[5].indices[1] = _ij5[1];
10041 vinfos[5].maxsolutions = _nj5;
10042 std::vector<int> vfree(0);
10055 IkReal j3array[1], cj3array[1], sj3array[1];
10056 bool j3valid[1]={
false};
10066 j3array[0]=((-1.5707963267949)+(((1.5707963267949)*(x675.
value)))+(x676.
value));
10067 sj3array[0]=
IKsin(j3array[0]);
10068 cj3array[0]=
IKcos(j3array[0]);
10069 if( j3array[0] >
IKPI )
10073 else if( j3array[0] < -
IKPI )
10074 { j3array[0]+=
IK2PI;
10077 for(
int ij3 = 0; ij3 < 1; ++ij3)
10079 if( !j3valid[ij3] )
10083 _ij3[0] = ij3; _ij3[1] = -1;
10084 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
10088 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
10091 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
10093 IkReal evalcond[6];
10094 IkReal x677=
IKcos(j3);
10095 IkReal x678=
IKsin(j3);
10096 IkReal x679=(gconst10*x677);
10097 IkReal x680=(gconst10*x678);
10098 IkReal x681=(gconst11*x677);
10099 IkReal x682=((1.0)*x678);
10100 IkReal x683=(gconst11*x682);
10101 evalcond[0]=(((new_r11*x678))+((new_r01*x677))+gconst10);
10102 evalcond[1]=(x681+x680+new_r11);
10103 evalcond[2]=((((-1.0)*x683))+x679);
10104 evalcond[3]=((((-1.0)*x683))+x679+new_r01);
10105 evalcond[4]=((((-1.0)*x681))+(((-1.0)*x680)));
10106 evalcond[5]=(((new_r11*x677))+(((-1.0)*new_r01*x682))+gconst11);
10114 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
10115 vinfos[0].jointtype = 1;
10116 vinfos[0].foffset = j0;
10117 vinfos[0].indices[0] = _ij0[0];
10118 vinfos[0].indices[1] = _ij0[1];
10119 vinfos[0].maxsolutions = _nj0;
10120 vinfos[1].jointtype = 1;
10121 vinfos[1].foffset = j1;
10122 vinfos[1].indices[0] = _ij1[0];
10123 vinfos[1].indices[1] = _ij1[1];
10124 vinfos[1].maxsolutions = _nj1;
10125 vinfos[2].jointtype = 1;
10126 vinfos[2].foffset = j2;
10127 vinfos[2].indices[0] = _ij2[0];
10128 vinfos[2].indices[1] = _ij2[1];
10129 vinfos[2].maxsolutions = _nj2;
10130 vinfos[3].jointtype = 1;
10131 vinfos[3].foffset = j3;
10132 vinfos[3].indices[0] = _ij3[0];
10133 vinfos[3].indices[1] = _ij3[1];
10134 vinfos[3].maxsolutions = _nj3;
10135 vinfos[4].jointtype = 1;
10136 vinfos[4].foffset = j4;
10137 vinfos[4].indices[0] = _ij4[0];
10138 vinfos[4].indices[1] = _ij4[1];
10139 vinfos[4].maxsolutions = _nj4;
10140 vinfos[5].jointtype = 1;
10141 vinfos[5].foffset = j5;
10142 vinfos[5].indices[0] = _ij5[0];
10143 vinfos[5].indices[1] = _ij5[1];
10144 vinfos[5].maxsolutions = _nj5;
10145 std::vector<int> vfree(0);
10158 IkReal j3array[1], cj3array[1], sj3array[1];
10159 bool j3valid[1]={
false};
10169 j3array[0]=((-1.5707963267949)+(((1.5707963267949)*(x684.
value)))+(x685.
value));
10170 sj3array[0]=
IKsin(j3array[0]);
10171 cj3array[0]=
IKcos(j3array[0]);
10172 if( j3array[0] >
IKPI )
10176 else if( j3array[0] < -
IKPI )
10177 { j3array[0]+=
IK2PI;
10180 for(
int ij3 = 0; ij3 < 1; ++ij3)
10182 if( !j3valid[ij3] )
10186 _ij3[0] = ij3; _ij3[1] = -1;
10187 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
10191 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
10194 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
10196 IkReal evalcond[6];
10197 IkReal x686=
IKcos(j3);
10198 IkReal x687=
IKsin(j3);
10199 IkReal x688=(gconst10*x686);
10200 IkReal x689=(gconst10*x687);
10201 IkReal x690=(gconst11*x686);
10202 IkReal x691=((1.0)*x687);
10203 IkReal x692=(gconst11*x691);
10204 evalcond[0]=(gconst10+((new_r01*x686))+((new_r11*x687)));
10205 evalcond[1]=(x689+x690+new_r11);
10206 evalcond[2]=(x688+(((-1.0)*x692)));
10207 evalcond[3]=(x688+(((-1.0)*x692))+new_r01);
10208 evalcond[4]=((((-1.0)*x689))+(((-1.0)*x690)));
10209 evalcond[5]=((((-1.0)*new_r01*x691))+gconst11+((new_r11*x686)));
10217 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
10218 vinfos[0].jointtype = 1;
10219 vinfos[0].foffset = j0;
10220 vinfos[0].indices[0] = _ij0[0];
10221 vinfos[0].indices[1] = _ij0[1];
10222 vinfos[0].maxsolutions = _nj0;
10223 vinfos[1].jointtype = 1;
10224 vinfos[1].foffset = j1;
10225 vinfos[1].indices[0] = _ij1[0];
10226 vinfos[1].indices[1] = _ij1[1];
10227 vinfos[1].maxsolutions = _nj1;
10228 vinfos[2].jointtype = 1;
10229 vinfos[2].foffset = j2;
10230 vinfos[2].indices[0] = _ij2[0];
10231 vinfos[2].indices[1] = _ij2[1];
10232 vinfos[2].maxsolutions = _nj2;
10233 vinfos[3].jointtype = 1;
10234 vinfos[3].foffset = j3;
10235 vinfos[3].indices[0] = _ij3[0];
10236 vinfos[3].indices[1] = _ij3[1];
10237 vinfos[3].maxsolutions = _nj3;
10238 vinfos[4].jointtype = 1;
10239 vinfos[4].foffset = j4;
10240 vinfos[4].indices[0] = _ij4[0];
10241 vinfos[4].indices[1] = _ij4[1];
10242 vinfos[4].maxsolutions = _nj4;
10243 vinfos[5].jointtype = 1;
10244 vinfos[5].foffset = j5;
10245 vinfos[5].indices[0] = _ij5[0];
10246 vinfos[5].indices[1] = _ij5[1];
10247 vinfos[5].maxsolutions = _nj5;
10248 std::vector<int> vfree(0);
10260 if( bgotonextstatement )
10262 bool bgotonextstatement =
true;
10265 evalcond[0]=((
IKabs(new_r10))+(
IKabs(new_r01)));
10266 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
10268 bgotonextstatement=
false;
10270 IkReal j3array[2], cj3array[2], sj3array[2];
10271 bool j3valid[2]={
false};
10277 cj3array[0]=(new_r00*(x693.
value));
10280 j3valid[0] = j3valid[1] =
true;
10281 j3array[0] =
IKacos(cj3array[0]);
10282 sj3array[0] =
IKsin(j3array[0]);
10283 cj3array[1] = cj3array[0];
10284 j3array[1] = -j3array[0];
10285 sj3array[1] = -sj3array[0];
10287 else if( isnan(cj3array[0]) )
10291 cj3array[0] = 1; sj3array[0] = 0; j3array[0] = 0;
10293 for(
int ij3 = 0; ij3 < 2; ++ij3)
10295 if( !j3valid[ij3] )
10299 _ij3[0] = ij3; _ij3[1] = -1;
10300 for(
int iij3 = ij3+1; iij3 < 2; ++iij3)
10304 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
10307 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
10309 IkReal evalcond[6];
10310 IkReal x694=
IKsin(j3);
10311 IkReal x695=
IKcos(j3);
10312 IkReal x696=((-1.0)*x694);
10313 evalcond[0]=(new_r11*x694);
10314 evalcond[1]=(gconst11*x696);
10315 evalcond[2]=(new_r00*x696);
10316 evalcond[3]=(((gconst11*x695))+new_r11);
10317 evalcond[4]=(gconst11+((new_r11*x695)));
10318 evalcond[5]=(((new_r00*x695))+(((-1.0)*gconst11)));
10326 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
10327 vinfos[0].jointtype = 1;
10328 vinfos[0].foffset = j0;
10329 vinfos[0].indices[0] = _ij0[0];
10330 vinfos[0].indices[1] = _ij0[1];
10331 vinfos[0].maxsolutions = _nj0;
10332 vinfos[1].jointtype = 1;
10333 vinfos[1].foffset = j1;
10334 vinfos[1].indices[0] = _ij1[0];
10335 vinfos[1].indices[1] = _ij1[1];
10336 vinfos[1].maxsolutions = _nj1;
10337 vinfos[2].jointtype = 1;
10338 vinfos[2].foffset = j2;
10339 vinfos[2].indices[0] = _ij2[0];
10340 vinfos[2].indices[1] = _ij2[1];
10341 vinfos[2].maxsolutions = _nj2;
10342 vinfos[3].jointtype = 1;
10343 vinfos[3].foffset = j3;
10344 vinfos[3].indices[0] = _ij3[0];
10345 vinfos[3].indices[1] = _ij3[1];
10346 vinfos[3].maxsolutions = _nj3;
10347 vinfos[4].jointtype = 1;
10348 vinfos[4].foffset = j4;
10349 vinfos[4].indices[0] = _ij4[0];
10350 vinfos[4].indices[1] = _ij4[1];
10351 vinfos[4].maxsolutions = _nj4;
10352 vinfos[5].jointtype = 1;
10353 vinfos[5].foffset = j5;
10354 vinfos[5].indices[0] = _ij5[0];
10355 vinfos[5].indices[1] = _ij5[1];
10356 vinfos[5].maxsolutions = _nj5;
10357 std::vector<int> vfree(0);
10365 if( bgotonextstatement )
10367 bool bgotonextstatement =
true;
10370 evalcond[0]=((
IKabs(new_r00))+(
IKabs(new_r01)));
10371 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
10373 bgotonextstatement=
false;
10380 IkReal x697=((1.0)*(x698.
value));
10383 j4=3.14159265358979;
10386 j5=((3.14159265)+(((-1.0)*x697)));
10391 IkReal gconst9=((3.14159265358979)+(((-1.0)*x697)));
10393 IkReal x699 = ((1.0)+(((-1.0)*(new_r10*new_r10))));
10394 if(
IKabs(x699)==0){
10397 IkReal gconst11=((-1.0)*new_r11*(
pow(x699,-0.5)));
10398 j3eval[0]=((
IKabs(new_r11))+(
IKabs(new_r10)));
10399 if(
IKabs(j3eval[0]) < 0.0000010000000000 )
10407 IkReal x700=((1.0)*(x701.
value));
10410 j4=3.14159265358979;
10413 j5=((3.14159265)+(((-1.0)*x700)));
10418 IkReal gconst9=((3.14159265358979)+(((-1.0)*x700)));
10420 IkReal x702 = ((1.0)+(((-1.0)*(new_r10*new_r10))));
10421 if(
IKabs(x702)==0){
10424 IkReal gconst11=((-1.0)*new_r11*(
pow(x702,-0.5)));
10426 if(
IKabs(j3eval[0]) < 0.0000010000000000 )
10434 IkReal x703=((1.0)*(x704.
value));
10437 j4=3.14159265358979;
10440 j5=((3.14159265)+(((-1.0)*x703)));
10445 IkReal gconst9=((3.14159265358979)+(((-1.0)*x703)));
10447 IkReal x705 = ((1.0)+(((-1.0)*(new_r10*new_r10))));
10448 if(
IKabs(x705)==0){
10451 IkReal gconst11=((-1.0)*new_r11*(
pow(x705,-0.5)));
10453 if(
IKabs(j3eval[0]) < 0.0000010000000000 )
10460 IkReal j3array[1], cj3array[1], sj3array[1];
10461 bool j3valid[1]={
false};
10474 sj3array[0]=
IKsin(j3array[0]);
10475 cj3array[0]=
IKcos(j3array[0]);
10476 if( j3array[0] >
IKPI )
10480 else if( j3array[0] < -
IKPI )
10481 { j3array[0]+=
IK2PI;
10484 for(
int ij3 = 0; ij3 < 1; ++ij3)
10486 if( !j3valid[ij3] )
10490 _ij3[0] = ij3; _ij3[1] = -1;
10491 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
10495 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
10498 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
10500 IkReal evalcond[8];
10501 IkReal x708=
IKsin(j3);
10502 IkReal x709=
IKcos(j3);
10503 IkReal x710=(gconst11*x709);
10504 IkReal x711=(gconst11*x708);
10505 evalcond[0]=(new_r11*x708);
10506 evalcond[1]=(new_r10*x709);
10507 evalcond[2]=((-1.0)*x711);
10508 evalcond[3]=((-1.0)*x710);
10509 evalcond[4]=(x710+new_r11);
10510 evalcond[5]=(gconst11+((new_r11*x709)));
10511 evalcond[6]=((((-1.0)*x711))+new_r10);
10512 evalcond[7]=((((-1.0)*gconst11))+((new_r10*x708)));
10520 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
10521 vinfos[0].jointtype = 1;
10522 vinfos[0].foffset = j0;
10523 vinfos[0].indices[0] = _ij0[0];
10524 vinfos[0].indices[1] = _ij0[1];
10525 vinfos[0].maxsolutions = _nj0;
10526 vinfos[1].jointtype = 1;
10527 vinfos[1].foffset = j1;
10528 vinfos[1].indices[0] = _ij1[0];
10529 vinfos[1].indices[1] = _ij1[1];
10530 vinfos[1].maxsolutions = _nj1;
10531 vinfos[2].jointtype = 1;
10532 vinfos[2].foffset = j2;
10533 vinfos[2].indices[0] = _ij2[0];
10534 vinfos[2].indices[1] = _ij2[1];
10535 vinfos[2].maxsolutions = _nj2;
10536 vinfos[3].jointtype = 1;
10537 vinfos[3].foffset = j3;
10538 vinfos[3].indices[0] = _ij3[0];
10539 vinfos[3].indices[1] = _ij3[1];
10540 vinfos[3].maxsolutions = _nj3;
10541 vinfos[4].jointtype = 1;
10542 vinfos[4].foffset = j4;
10543 vinfos[4].indices[0] = _ij4[0];
10544 vinfos[4].indices[1] = _ij4[1];
10545 vinfos[4].maxsolutions = _nj4;
10546 vinfos[5].jointtype = 1;
10547 vinfos[5].foffset = j5;
10548 vinfos[5].indices[0] = _ij5[0];
10549 vinfos[5].indices[1] = _ij5[1];
10550 vinfos[5].maxsolutions = _nj5;
10551 std::vector<int> vfree(0);
10564 IkReal j3array[1], cj3array[1], sj3array[1];
10565 bool j3valid[1]={
false};
10578 sj3array[0]=
IKsin(j3array[0]);
10579 cj3array[0]=
IKcos(j3array[0]);
10580 if( j3array[0] >
IKPI )
10584 else if( j3array[0] < -
IKPI )
10585 { j3array[0]+=
IK2PI;
10588 for(
int ij3 = 0; ij3 < 1; ++ij3)
10590 if( !j3valid[ij3] )
10594 _ij3[0] = ij3; _ij3[1] = -1;
10595 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
10599 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
10602 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
10604 IkReal evalcond[8];
10605 IkReal x714=
IKsin(j3);
10606 IkReal x715=
IKcos(j3);
10607 IkReal x716=(gconst11*x715);
10608 IkReal x717=(gconst11*x714);
10609 evalcond[0]=(new_r11*x714);
10610 evalcond[1]=(new_r10*x715);
10611 evalcond[2]=((-1.0)*x717);
10612 evalcond[3]=((-1.0)*x716);
10613 evalcond[4]=(x716+new_r11);
10614 evalcond[5]=(gconst11+((new_r11*x715)));
10615 evalcond[6]=((((-1.0)*x717))+new_r10);
10616 evalcond[7]=((((-1.0)*gconst11))+((new_r10*x714)));
10624 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
10625 vinfos[0].jointtype = 1;
10626 vinfos[0].foffset = j0;
10627 vinfos[0].indices[0] = _ij0[0];
10628 vinfos[0].indices[1] = _ij0[1];
10629 vinfos[0].maxsolutions = _nj0;
10630 vinfos[1].jointtype = 1;
10631 vinfos[1].foffset = j1;
10632 vinfos[1].indices[0] = _ij1[0];
10633 vinfos[1].indices[1] = _ij1[1];
10634 vinfos[1].maxsolutions = _nj1;
10635 vinfos[2].jointtype = 1;
10636 vinfos[2].foffset = j2;
10637 vinfos[2].indices[0] = _ij2[0];
10638 vinfos[2].indices[1] = _ij2[1];
10639 vinfos[2].maxsolutions = _nj2;
10640 vinfos[3].jointtype = 1;
10641 vinfos[3].foffset = j3;
10642 vinfos[3].indices[0] = _ij3[0];
10643 vinfos[3].indices[1] = _ij3[1];
10644 vinfos[3].maxsolutions = _nj3;
10645 vinfos[4].jointtype = 1;
10646 vinfos[4].foffset = j4;
10647 vinfos[4].indices[0] = _ij4[0];
10648 vinfos[4].indices[1] = _ij4[1];
10649 vinfos[4].maxsolutions = _nj4;
10650 vinfos[5].jointtype = 1;
10651 vinfos[5].foffset = j5;
10652 vinfos[5].indices[0] = _ij5[0];
10653 vinfos[5].indices[1] = _ij5[1];
10654 vinfos[5].maxsolutions = _nj5;
10655 std::vector<int> vfree(0);
10668 IkReal j3array[1], cj3array[1], sj3array[1];
10669 bool j3valid[1]={
false};
10679 j3array[0]=((-1.5707963267949)+(((1.5707963267949)*(x718.
value)))+(x719.
value));
10680 sj3array[0]=
IKsin(j3array[0]);
10681 cj3array[0]=
IKcos(j3array[0]);
10682 if( j3array[0] >
IKPI )
10686 else if( j3array[0] < -
IKPI )
10687 { j3array[0]+=
IK2PI;
10690 for(
int ij3 = 0; ij3 < 1; ++ij3)
10692 if( !j3valid[ij3] )
10696 _ij3[0] = ij3; _ij3[1] = -1;
10697 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
10701 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
10704 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
10706 IkReal evalcond[8];
10707 IkReal x720=
IKsin(j3);
10708 IkReal x721=
IKcos(j3);
10709 IkReal x722=(gconst11*x721);
10710 IkReal x723=(gconst11*x720);
10711 evalcond[0]=(new_r11*x720);
10712 evalcond[1]=(new_r10*x721);
10713 evalcond[2]=((-1.0)*x723);
10714 evalcond[3]=((-1.0)*x722);
10715 evalcond[4]=(x722+new_r11);
10716 evalcond[5]=(gconst11+((new_r11*x721)));
10717 evalcond[6]=((((-1.0)*x723))+new_r10);
10718 evalcond[7]=((((-1.0)*gconst11))+((new_r10*x720)));
10726 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
10727 vinfos[0].jointtype = 1;
10728 vinfos[0].foffset = j0;
10729 vinfos[0].indices[0] = _ij0[0];
10730 vinfos[0].indices[1] = _ij0[1];
10731 vinfos[0].maxsolutions = _nj0;
10732 vinfos[1].jointtype = 1;
10733 vinfos[1].foffset = j1;
10734 vinfos[1].indices[0] = _ij1[0];
10735 vinfos[1].indices[1] = _ij1[1];
10736 vinfos[1].maxsolutions = _nj1;
10737 vinfos[2].jointtype = 1;
10738 vinfos[2].foffset = j2;
10739 vinfos[2].indices[0] = _ij2[0];
10740 vinfos[2].indices[1] = _ij2[1];
10741 vinfos[2].maxsolutions = _nj2;
10742 vinfos[3].jointtype = 1;
10743 vinfos[3].foffset = j3;
10744 vinfos[3].indices[0] = _ij3[0];
10745 vinfos[3].indices[1] = _ij3[1];
10746 vinfos[3].maxsolutions = _nj3;
10747 vinfos[4].jointtype = 1;
10748 vinfos[4].foffset = j4;
10749 vinfos[4].indices[0] = _ij4[0];
10750 vinfos[4].indices[1] = _ij4[1];
10751 vinfos[4].maxsolutions = _nj4;
10752 vinfos[5].jointtype = 1;
10753 vinfos[5].foffset = j5;
10754 vinfos[5].indices[0] = _ij5[0];
10755 vinfos[5].indices[1] = _ij5[1];
10756 vinfos[5].maxsolutions = _nj5;
10757 std::vector<int> vfree(0);
10769 if( bgotonextstatement )
10771 bool bgotonextstatement =
true;
10774 evalcond[0]=
IKabs(new_r01);
10775 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
10777 bgotonextstatement=
false;
10784 IkReal x724=((1.0)*(x725.
value));
10787 j4=3.14159265358979;
10790 j5=((3.14159265)+(((-1.0)*x724)));
10792 IkReal gconst9=((3.14159265358979)+(((-1.0)*x724)));
10794 IkReal x726 = new_r11*new_r11;
10795 if(
IKabs(x726)==0){
10798 IkReal gconst11=((-1.0)*new_r11*(
pow(x726,-0.5)));
10799 j3eval[0]=((
IKabs(new_r10))+(
IKabs(new_r00)));
10800 if(
IKabs(j3eval[0]) < 0.0000010000000000 )
10808 IkReal x727=((1.0)*(x728.
value));
10811 j4=3.14159265358979;
10814 j5=((3.14159265)+(((-1.0)*x727)));
10816 IkReal gconst9=((3.14159265358979)+(((-1.0)*x727)));
10818 IkReal x729 = new_r11*new_r11;
10819 if(
IKabs(x729)==0){
10822 IkReal gconst11=((-1.0)*new_r11*(
pow(x729,-0.5)));
10823 j3eval[0]=((
IKabs(new_r11))+(
IKabs(new_r10)));
10824 if(
IKabs(j3eval[0]) < 0.0000010000000000 )
10832 IkReal x730=((1.0)*(x731.
value));
10835 j4=3.14159265358979;
10838 j5=((3.14159265)+(((-1.0)*x730)));
10840 IkReal gconst9=((3.14159265358979)+(((-1.0)*x730)));
10842 IkReal x732 = new_r11*new_r11;
10843 if(
IKabs(x732)==0){
10846 IkReal gconst11=((-1.0)*new_r11*(
pow(x732,-0.5)));
10848 if(
IKabs(j3eval[0]) < 0.0000010000000000 )
10855 IkReal j3array[1], cj3array[1], sj3array[1];
10856 bool j3valid[1]={
false};
10869 sj3array[0]=
IKsin(j3array[0]);
10870 cj3array[0]=
IKcos(j3array[0]);
10871 if( j3array[0] >
IKPI )
10875 else if( j3array[0] < -
IKPI )
10876 { j3array[0]+=
IK2PI;
10879 for(
int ij3 = 0; ij3 < 1; ++ij3)
10881 if( !j3valid[ij3] )
10885 _ij3[0] = ij3; _ij3[1] = -1;
10886 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
10890 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
10893 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
10895 IkReal evalcond[8];
10896 IkReal x735=
IKsin(j3);
10897 IkReal x736=
IKcos(j3);
10898 IkReal x737=(gconst11*x736);
10899 IkReal x738=((1.0)*x735);
10900 evalcond[0]=(new_r11*x735);
10901 evalcond[1]=((-1.0)*gconst11*x735);
10902 evalcond[2]=(x737+new_r11);
10903 evalcond[3]=(gconst11+((new_r11*x736)));
10904 evalcond[4]=((((-1.0)*x737))+new_r00);
10905 evalcond[5]=((((-1.0)*gconst11*x738))+new_r10);
10906 evalcond[6]=((((-1.0)*new_r00*x738))+((new_r10*x736)));
10907 evalcond[7]=(((new_r00*x736))+(((-1.0)*gconst11))+((new_r10*x735)));
10915 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
10916 vinfos[0].jointtype = 1;
10917 vinfos[0].foffset = j0;
10918 vinfos[0].indices[0] = _ij0[0];
10919 vinfos[0].indices[1] = _ij0[1];
10920 vinfos[0].maxsolutions = _nj0;
10921 vinfos[1].jointtype = 1;
10922 vinfos[1].foffset = j1;
10923 vinfos[1].indices[0] = _ij1[0];
10924 vinfos[1].indices[1] = _ij1[1];
10925 vinfos[1].maxsolutions = _nj1;
10926 vinfos[2].jointtype = 1;
10927 vinfos[2].foffset = j2;
10928 vinfos[2].indices[0] = _ij2[0];
10929 vinfos[2].indices[1] = _ij2[1];
10930 vinfos[2].maxsolutions = _nj2;
10931 vinfos[3].jointtype = 1;
10932 vinfos[3].foffset = j3;
10933 vinfos[3].indices[0] = _ij3[0];
10934 vinfos[3].indices[1] = _ij3[1];
10935 vinfos[3].maxsolutions = _nj3;
10936 vinfos[4].jointtype = 1;
10937 vinfos[4].foffset = j4;
10938 vinfos[4].indices[0] = _ij4[0];
10939 vinfos[4].indices[1] = _ij4[1];
10940 vinfos[4].maxsolutions = _nj4;
10941 vinfos[5].jointtype = 1;
10942 vinfos[5].foffset = j5;
10943 vinfos[5].indices[0] = _ij5[0];
10944 vinfos[5].indices[1] = _ij5[1];
10945 vinfos[5].maxsolutions = _nj5;
10946 std::vector<int> vfree(0);
10959 IkReal j3array[1], cj3array[1], sj3array[1];
10960 bool j3valid[1]={
false};
10970 j3array[0]=((-1.5707963267949)+(((1.5707963267949)*(x739.
value)))+(x740.
value));
10971 sj3array[0]=
IKsin(j3array[0]);
10972 cj3array[0]=
IKcos(j3array[0]);
10973 if( j3array[0] >
IKPI )
10977 else if( j3array[0] < -
IKPI )
10978 { j3array[0]+=
IK2PI;
10981 for(
int ij3 = 0; ij3 < 1; ++ij3)
10983 if( !j3valid[ij3] )
10987 _ij3[0] = ij3; _ij3[1] = -1;
10988 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
10992 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
10995 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
10997 IkReal evalcond[8];
10998 IkReal x741=
IKsin(j3);
10999 IkReal x742=
IKcos(j3);
11000 IkReal x743=(gconst11*x742);
11001 IkReal x744=((1.0)*x741);
11002 evalcond[0]=(new_r11*x741);
11003 evalcond[1]=((-1.0)*gconst11*x741);
11004 evalcond[2]=(x743+new_r11);
11005 evalcond[3]=(gconst11+((new_r11*x742)));
11006 evalcond[4]=((((-1.0)*x743))+new_r00);
11007 evalcond[5]=((((-1.0)*gconst11*x744))+new_r10);
11008 evalcond[6]=((((-1.0)*new_r00*x744))+((new_r10*x742)));
11009 evalcond[7]=(((new_r10*x741))+((new_r00*x742))+(((-1.0)*gconst11)));
11017 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
11018 vinfos[0].jointtype = 1;
11019 vinfos[0].foffset = j0;
11020 vinfos[0].indices[0] = _ij0[0];
11021 vinfos[0].indices[1] = _ij0[1];
11022 vinfos[0].maxsolutions = _nj0;
11023 vinfos[1].jointtype = 1;
11024 vinfos[1].foffset = j1;
11025 vinfos[1].indices[0] = _ij1[0];
11026 vinfos[1].indices[1] = _ij1[1];
11027 vinfos[1].maxsolutions = _nj1;
11028 vinfos[2].jointtype = 1;
11029 vinfos[2].foffset = j2;
11030 vinfos[2].indices[0] = _ij2[0];
11031 vinfos[2].indices[1] = _ij2[1];
11032 vinfos[2].maxsolutions = _nj2;
11033 vinfos[3].jointtype = 1;
11034 vinfos[3].foffset = j3;
11035 vinfos[3].indices[0] = _ij3[0];
11036 vinfos[3].indices[1] = _ij3[1];
11037 vinfos[3].maxsolutions = _nj3;
11038 vinfos[4].jointtype = 1;
11039 vinfos[4].foffset = j4;
11040 vinfos[4].indices[0] = _ij4[0];
11041 vinfos[4].indices[1] = _ij4[1];
11042 vinfos[4].maxsolutions = _nj4;
11043 vinfos[5].jointtype = 1;
11044 vinfos[5].foffset = j5;
11045 vinfos[5].indices[0] = _ij5[0];
11046 vinfos[5].indices[1] = _ij5[1];
11047 vinfos[5].maxsolutions = _nj5;
11048 std::vector<int> vfree(0);
11061 IkReal j3array[1], cj3array[1], sj3array[1];
11062 bool j3valid[1]={
false};
11072 j3array[0]=((-1.5707963267949)+(((1.5707963267949)*(x745.
value)))+(x746.
value));
11073 sj3array[0]=
IKsin(j3array[0]);
11074 cj3array[0]=
IKcos(j3array[0]);
11075 if( j3array[0] >
IKPI )
11079 else if( j3array[0] < -
IKPI )
11080 { j3array[0]+=
IK2PI;
11083 for(
int ij3 = 0; ij3 < 1; ++ij3)
11085 if( !j3valid[ij3] )
11089 _ij3[0] = ij3; _ij3[1] = -1;
11090 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
11094 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
11097 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
11099 IkReal evalcond[8];
11100 IkReal x747=
IKsin(j3);
11101 IkReal x748=
IKcos(j3);
11102 IkReal x749=(gconst11*x748);
11103 IkReal x750=((1.0)*x747);
11104 evalcond[0]=(new_r11*x747);
11105 evalcond[1]=((-1.0)*gconst11*x747);
11106 evalcond[2]=(x749+new_r11);
11107 evalcond[3]=(gconst11+((new_r11*x748)));
11108 evalcond[4]=((((-1.0)*x749))+new_r00);
11109 evalcond[5]=((((-1.0)*gconst11*x750))+new_r10);
11110 evalcond[6]=((((-1.0)*new_r00*x750))+((new_r10*x748)));
11111 evalcond[7]=(((new_r10*x747))+((new_r00*x748))+(((-1.0)*gconst11)));
11119 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
11120 vinfos[0].jointtype = 1;
11121 vinfos[0].foffset = j0;
11122 vinfos[0].indices[0] = _ij0[0];
11123 vinfos[0].indices[1] = _ij0[1];
11124 vinfos[0].maxsolutions = _nj0;
11125 vinfos[1].jointtype = 1;
11126 vinfos[1].foffset = j1;
11127 vinfos[1].indices[0] = _ij1[0];
11128 vinfos[1].indices[1] = _ij1[1];
11129 vinfos[1].maxsolutions = _nj1;
11130 vinfos[2].jointtype = 1;
11131 vinfos[2].foffset = j2;
11132 vinfos[2].indices[0] = _ij2[0];
11133 vinfos[2].indices[1] = _ij2[1];
11134 vinfos[2].maxsolutions = _nj2;
11135 vinfos[3].jointtype = 1;
11136 vinfos[3].foffset = j3;
11137 vinfos[3].indices[0] = _ij3[0];
11138 vinfos[3].indices[1] = _ij3[1];
11139 vinfos[3].maxsolutions = _nj3;
11140 vinfos[4].jointtype = 1;
11141 vinfos[4].foffset = j4;
11142 vinfos[4].indices[0] = _ij4[0];
11143 vinfos[4].indices[1] = _ij4[1];
11144 vinfos[4].maxsolutions = _nj4;
11145 vinfos[5].jointtype = 1;
11146 vinfos[5].foffset = j5;
11147 vinfos[5].indices[0] = _ij5[0];
11148 vinfos[5].indices[1] = _ij5[1];
11149 vinfos[5].maxsolutions = _nj5;
11150 std::vector<int> vfree(0);
11162 if( bgotonextstatement )
11164 bool bgotonextstatement =
true;
11169 bgotonextstatement=
false;
11174 if( bgotonextstatement )
11188 IkReal j3array[1], cj3array[1], sj3array[1];
11189 bool j3valid[1]={
false};
11191 IkReal x751=((1.0)*new_r11);
11200 j3array[0]=((-1.5707963267949)+(x752.
value)+(((1.5707963267949)*(x753.
value))));
11201 sj3array[0]=
IKsin(j3array[0]);
11202 cj3array[0]=
IKcos(j3array[0]);
11203 if( j3array[0] >
IKPI )
11207 else if( j3array[0] < -
IKPI )
11208 { j3array[0]+=
IK2PI;
11211 for(
int ij3 = 0; ij3 < 1; ++ij3)
11213 if( !j3valid[ij3] )
11217 _ij3[0] = ij3; _ij3[1] = -1;
11218 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
11222 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
11225 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
11227 IkReal evalcond[8];
11228 IkReal x754=
IKcos(j3);
11229 IkReal x755=
IKsin(j3);
11230 IkReal x756=(gconst10*x754);
11231 IkReal x757=(gconst11*x754);
11232 IkReal x758=(gconst10*x755);
11233 IkReal x759=((1.0)*x755);
11234 IkReal x760=(gconst11*x759);
11235 evalcond[0]=(gconst10+((new_r11*x755))+((new_r01*x754)));
11236 evalcond[1]=(x757+x758+new_r11);
11237 evalcond[2]=((((-1.0)*x760))+x756+new_r01);
11238 evalcond[3]=((((-1.0)*new_r00*x759))+gconst10+((new_r10*x754)));
11239 evalcond[4]=((((-1.0)*new_r01*x759))+gconst11+((new_r11*x754)));
11240 evalcond[5]=((((-1.0)*x760))+x756+new_r10);
11241 evalcond[6]=(((new_r00*x754))+((new_r10*x755))+(((-1.0)*gconst11)));
11242 evalcond[7]=((((-1.0)*x758))+(((-1.0)*x757))+new_r00);
11250 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
11251 vinfos[0].jointtype = 1;
11252 vinfos[0].foffset = j0;
11253 vinfos[0].indices[0] = _ij0[0];
11254 vinfos[0].indices[1] = _ij0[1];
11255 vinfos[0].maxsolutions = _nj0;
11256 vinfos[1].jointtype = 1;
11257 vinfos[1].foffset = j1;
11258 vinfos[1].indices[0] = _ij1[0];
11259 vinfos[1].indices[1] = _ij1[1];
11260 vinfos[1].maxsolutions = _nj1;
11261 vinfos[2].jointtype = 1;
11262 vinfos[2].foffset = j2;
11263 vinfos[2].indices[0] = _ij2[0];
11264 vinfos[2].indices[1] = _ij2[1];
11265 vinfos[2].maxsolutions = _nj2;
11266 vinfos[3].jointtype = 1;
11267 vinfos[3].foffset = j3;
11268 vinfos[3].indices[0] = _ij3[0];
11269 vinfos[3].indices[1] = _ij3[1];
11270 vinfos[3].maxsolutions = _nj3;
11271 vinfos[4].jointtype = 1;
11272 vinfos[4].foffset = j4;
11273 vinfos[4].indices[0] = _ij4[0];
11274 vinfos[4].indices[1] = _ij4[1];
11275 vinfos[4].maxsolutions = _nj4;
11276 vinfos[5].jointtype = 1;
11277 vinfos[5].foffset = j5;
11278 vinfos[5].indices[0] = _ij5[0];
11279 vinfos[5].indices[1] = _ij5[1];
11280 vinfos[5].maxsolutions = _nj5;
11281 std::vector<int> vfree(0);
11294 IkReal j3array[1], cj3array[1], sj3array[1];
11295 bool j3valid[1]={
false};
11297 IkReal x761=((1.0)*new_r11);
11306 j3array[0]=((-1.5707963267949)+(((1.5707963267949)*(x762.
value)))+(x763.
value));
11307 sj3array[0]=
IKsin(j3array[0]);
11308 cj3array[0]=
IKcos(j3array[0]);
11309 if( j3array[0] >
IKPI )
11313 else if( j3array[0] < -
IKPI )
11314 { j3array[0]+=
IK2PI;
11317 for(
int ij3 = 0; ij3 < 1; ++ij3)
11319 if( !j3valid[ij3] )
11323 _ij3[0] = ij3; _ij3[1] = -1;
11324 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
11328 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
11331 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
11333 IkReal evalcond[8];
11334 IkReal x764=
IKcos(j3);
11335 IkReal x765=
IKsin(j3);
11336 IkReal x766=(gconst10*x764);
11337 IkReal x767=(gconst11*x764);
11338 IkReal x768=(gconst10*x765);
11339 IkReal x769=((1.0)*x765);
11340 IkReal x770=(gconst11*x769);
11341 evalcond[0]=(((new_r11*x765))+gconst10+((new_r01*x764)));
11342 evalcond[1]=(x768+x767+new_r11);
11343 evalcond[2]=(x766+(((-1.0)*x770))+new_r01);
11344 evalcond[3]=(((new_r10*x764))+(((-1.0)*new_r00*x769))+gconst10);
11345 evalcond[4]=(((new_r11*x764))+gconst11+(((-1.0)*new_r01*x769)));
11346 evalcond[5]=(x766+(((-1.0)*x770))+new_r10);
11347 evalcond[6]=(((new_r10*x765))+((new_r00*x764))+(((-1.0)*gconst11)));
11348 evalcond[7]=((((-1.0)*x767))+(((-1.0)*x768))+new_r00);
11356 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
11357 vinfos[0].jointtype = 1;
11358 vinfos[0].foffset = j0;
11359 vinfos[0].indices[0] = _ij0[0];
11360 vinfos[0].indices[1] = _ij0[1];
11361 vinfos[0].maxsolutions = _nj0;
11362 vinfos[1].jointtype = 1;
11363 vinfos[1].foffset = j1;
11364 vinfos[1].indices[0] = _ij1[0];
11365 vinfos[1].indices[1] = _ij1[1];
11366 vinfos[1].maxsolutions = _nj1;
11367 vinfos[2].jointtype = 1;
11368 vinfos[2].foffset = j2;
11369 vinfos[2].indices[0] = _ij2[0];
11370 vinfos[2].indices[1] = _ij2[1];
11371 vinfos[2].maxsolutions = _nj2;
11372 vinfos[3].jointtype = 1;
11373 vinfos[3].foffset = j3;
11374 vinfos[3].indices[0] = _ij3[0];
11375 vinfos[3].indices[1] = _ij3[1];
11376 vinfos[3].maxsolutions = _nj3;
11377 vinfos[4].jointtype = 1;
11378 vinfos[4].foffset = j4;
11379 vinfos[4].indices[0] = _ij4[0];
11380 vinfos[4].indices[1] = _ij4[1];
11381 vinfos[4].maxsolutions = _nj4;
11382 vinfos[5].jointtype = 1;
11383 vinfos[5].foffset = j5;
11384 vinfos[5].indices[0] = _ij5[0];
11385 vinfos[5].indices[1] = _ij5[1];
11386 vinfos[5].maxsolutions = _nj5;
11387 std::vector<int> vfree(0);
11400 IkReal j3array[1], cj3array[1], sj3array[1];
11401 bool j3valid[1]={
false};
11403 IkReal x771=((1.0)*gconst10);
11412 j3array[0]=((-1.5707963267949)+(x772.
value)+(((1.5707963267949)*(x773.
value))));
11413 sj3array[0]=
IKsin(j3array[0]);
11414 cj3array[0]=
IKcos(j3array[0]);
11415 if( j3array[0] >
IKPI )
11419 else if( j3array[0] < -
IKPI )
11420 { j3array[0]+=
IK2PI;
11423 for(
int ij3 = 0; ij3 < 1; ++ij3)
11425 if( !j3valid[ij3] )
11429 _ij3[0] = ij3; _ij3[1] = -1;
11430 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
11434 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
11437 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
11439 IkReal evalcond[8];
11440 IkReal x774=
IKcos(j3);
11441 IkReal x775=
IKsin(j3);
11442 IkReal x776=(gconst10*x774);
11443 IkReal x777=(gconst11*x774);
11444 IkReal x778=(gconst10*x775);
11445 IkReal x779=((1.0)*x775);
11446 IkReal x780=(gconst11*x779);
11447 evalcond[0]=(gconst10+((new_r11*x775))+((new_r01*x774)));
11448 evalcond[1]=(x777+x778+new_r11);
11449 evalcond[2]=((((-1.0)*x780))+x776+new_r01);
11450 evalcond[3]=((((-1.0)*new_r00*x779))+gconst10+((new_r10*x774)));
11451 evalcond[4]=((((-1.0)*new_r01*x779))+gconst11+((new_r11*x774)));
11452 evalcond[5]=((((-1.0)*x780))+x776+new_r10);
11453 evalcond[6]=(((new_r00*x774))+((new_r10*x775))+(((-1.0)*gconst11)));
11454 evalcond[7]=(new_r00+(((-1.0)*x778))+(((-1.0)*x777)));
11462 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
11463 vinfos[0].jointtype = 1;
11464 vinfos[0].foffset = j0;
11465 vinfos[0].indices[0] = _ij0[0];
11466 vinfos[0].indices[1] = _ij0[1];
11467 vinfos[0].maxsolutions = _nj0;
11468 vinfos[1].jointtype = 1;
11469 vinfos[1].foffset = j1;
11470 vinfos[1].indices[0] = _ij1[0];
11471 vinfos[1].indices[1] = _ij1[1];
11472 vinfos[1].maxsolutions = _nj1;
11473 vinfos[2].jointtype = 1;
11474 vinfos[2].foffset = j2;
11475 vinfos[2].indices[0] = _ij2[0];
11476 vinfos[2].indices[1] = _ij2[1];
11477 vinfos[2].maxsolutions = _nj2;
11478 vinfos[3].jointtype = 1;
11479 vinfos[3].foffset = j3;
11480 vinfos[3].indices[0] = _ij3[0];
11481 vinfos[3].indices[1] = _ij3[1];
11482 vinfos[3].maxsolutions = _nj3;
11483 vinfos[4].jointtype = 1;
11484 vinfos[4].foffset = j4;
11485 vinfos[4].indices[0] = _ij4[0];
11486 vinfos[4].indices[1] = _ij4[1];
11487 vinfos[4].maxsolutions = _nj4;
11488 vinfos[5].jointtype = 1;
11489 vinfos[5].foffset = j5;
11490 vinfos[5].indices[0] = _ij5[0];
11491 vinfos[5].indices[1] = _ij5[1];
11492 vinfos[5].maxsolutions = _nj5;
11493 std::vector<int> vfree(0);
11505 if( bgotonextstatement )
11507 bool bgotonextstatement =
true;
11510 evalcond[0]=((
IKabs(new_r11))+(
IKabs(new_r01)));
11511 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
11513 bgotonextstatement=
false;
11518 j4=3.14159265358979;
11523 j3eval[0]=((
IKabs(new_r10))+(
IKabs(new_r00)));
11524 if(
IKabs(j3eval[0]) < 0.0000010000000000 )
11531 IkReal j3array[2], cj3array[2], sj3array[2];
11532 bool j3valid[2]={
false};
11538 IkReal x781=x782.
value;
11539 j3array[0]=((-1.0)*x781);
11540 sj3array[0]=
IKsin(j3array[0]);
11541 cj3array[0]=
IKcos(j3array[0]);
11542 j3array[1]=((3.14159265358979)+(((-1.0)*x781)));
11543 sj3array[1]=
IKsin(j3array[1]);
11544 cj3array[1]=
IKcos(j3array[1]);
11545 if( j3array[0] >
IKPI )
11549 else if( j3array[0] < -
IKPI )
11550 { j3array[0]+=
IK2PI;
11553 if( j3array[1] >
IKPI )
11557 else if( j3array[1] < -
IKPI )
11558 { j3array[1]+=
IK2PI;
11561 for(
int ij3 = 0; ij3 < 2; ++ij3)
11563 if( !j3valid[ij3] )
11567 _ij3[0] = ij3; _ij3[1] = -1;
11568 for(
int iij3 = ij3+1; iij3 < 2; ++iij3)
11572 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
11575 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
11577 IkReal evalcond[1];
11578 evalcond[0]=((((-1.0)*new_r00*(
IKsin(j3))))+((new_r10*(
IKcos(j3)))));
11586 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
11587 vinfos[0].jointtype = 1;
11588 vinfos[0].foffset = j0;
11589 vinfos[0].indices[0] = _ij0[0];
11590 vinfos[0].indices[1] = _ij0[1];
11591 vinfos[0].maxsolutions = _nj0;
11592 vinfos[1].jointtype = 1;
11593 vinfos[1].foffset = j1;
11594 vinfos[1].indices[0] = _ij1[0];
11595 vinfos[1].indices[1] = _ij1[1];
11596 vinfos[1].maxsolutions = _nj1;
11597 vinfos[2].jointtype = 1;
11598 vinfos[2].foffset = j2;
11599 vinfos[2].indices[0] = _ij2[0];
11600 vinfos[2].indices[1] = _ij2[1];
11601 vinfos[2].maxsolutions = _nj2;
11602 vinfos[3].jointtype = 1;
11603 vinfos[3].foffset = j3;
11604 vinfos[3].indices[0] = _ij3[0];
11605 vinfos[3].indices[1] = _ij3[1];
11606 vinfos[3].maxsolutions = _nj3;
11607 vinfos[4].jointtype = 1;
11608 vinfos[4].foffset = j4;
11609 vinfos[4].indices[0] = _ij4[0];
11610 vinfos[4].indices[1] = _ij4[1];
11611 vinfos[4].maxsolutions = _nj4;
11612 vinfos[5].jointtype = 1;
11613 vinfos[5].foffset = j5;
11614 vinfos[5].indices[0] = _ij5[0];
11615 vinfos[5].indices[1] = _ij5[1];
11616 vinfos[5].maxsolutions = _nj5;
11617 std::vector<int> vfree(0);
11629 if( bgotonextstatement )
11631 bool bgotonextstatement =
true;
11636 bgotonextstatement=
false;
11641 if( bgotonextstatement )
11655 IkReal j3array[1], cj3array[1], sj3array[1];
11656 bool j3valid[1]={
false};
11658 IkReal x783=((1.0)*sj5);
11667 j3array[0]=((-1.5707963267949)+(x784.
value)+(((1.5707963267949)*(x785.
value))));
11668 sj3array[0]=
IKsin(j3array[0]);
11669 cj3array[0]=
IKcos(j3array[0]);
11670 if( j3array[0] >
IKPI )
11674 else if( j3array[0] < -
IKPI )
11675 { j3array[0]+=
IK2PI;
11678 for(
int ij3 = 0; ij3 < 1; ++ij3)
11680 if( !j3valid[ij3] )
11684 _ij3[0] = ij3; _ij3[1] = -1;
11685 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
11689 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
11692 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
11694 IkReal evalcond[8];
11695 IkReal x786=
IKsin(j3);
11696 IkReal x787=
IKcos(j3);
11697 IkReal x788=((1.0)*cj5);
11698 IkReal x789=(sj5*x787);
11699 IkReal x790=(sj5*x786);
11700 IkReal x791=((1.0)*x786);
11701 IkReal x792=(x786*x788);
11702 evalcond[0]=(sj5+((new_r11*x786))+((new_r01*x787)));
11703 evalcond[1]=(((cj5*x787))+x790+new_r11);
11704 evalcond[2]=((((-1.0)*x792))+x789+new_r01);
11705 evalcond[3]=(sj5+((new_r10*x787))+(((-1.0)*new_r00*x791)));
11706 evalcond[4]=((((-1.0)*new_r01*x791))+cj5+((new_r11*x787)));
11707 evalcond[5]=((((-1.0)*x792))+x789+new_r10);
11708 evalcond[6]=(((new_r10*x786))+(((-1.0)*x788))+((new_r00*x787)));
11709 evalcond[7]=((((-1.0)*x787*x788))+(((-1.0)*x790))+new_r00);
11717 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
11718 vinfos[0].jointtype = 1;
11719 vinfos[0].foffset = j0;
11720 vinfos[0].indices[0] = _ij0[0];
11721 vinfos[0].indices[1] = _ij0[1];
11722 vinfos[0].maxsolutions = _nj0;
11723 vinfos[1].jointtype = 1;
11724 vinfos[1].foffset = j1;
11725 vinfos[1].indices[0] = _ij1[0];
11726 vinfos[1].indices[1] = _ij1[1];
11727 vinfos[1].maxsolutions = _nj1;
11728 vinfos[2].jointtype = 1;
11729 vinfos[2].foffset = j2;
11730 vinfos[2].indices[0] = _ij2[0];
11731 vinfos[2].indices[1] = _ij2[1];
11732 vinfos[2].maxsolutions = _nj2;
11733 vinfos[3].jointtype = 1;
11734 vinfos[3].foffset = j3;
11735 vinfos[3].indices[0] = _ij3[0];
11736 vinfos[3].indices[1] = _ij3[1];
11737 vinfos[3].maxsolutions = _nj3;
11738 vinfos[4].jointtype = 1;
11739 vinfos[4].foffset = j4;
11740 vinfos[4].indices[0] = _ij4[0];
11741 vinfos[4].indices[1] = _ij4[1];
11742 vinfos[4].maxsolutions = _nj4;
11743 vinfos[5].jointtype = 1;
11744 vinfos[5].foffset = j5;
11745 vinfos[5].indices[0] = _ij5[0];
11746 vinfos[5].indices[1] = _ij5[1];
11747 vinfos[5].maxsolutions = _nj5;
11748 std::vector<int> vfree(0);
11761 IkReal j3array[1], cj3array[1], sj3array[1];
11762 bool j3valid[1]={
false};
11764 IkReal x793=((1.0)*sj5);
11773 j3array[0]=((-1.5707963267949)+(x794.
value)+(((1.5707963267949)*(x795.
value))));
11774 sj3array[0]=
IKsin(j3array[0]);
11775 cj3array[0]=
IKcos(j3array[0]);
11776 if( j3array[0] >
IKPI )
11780 else if( j3array[0] < -
IKPI )
11781 { j3array[0]+=
IK2PI;
11784 for(
int ij3 = 0; ij3 < 1; ++ij3)
11786 if( !j3valid[ij3] )
11790 _ij3[0] = ij3; _ij3[1] = -1;
11791 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
11795 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
11798 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
11800 IkReal evalcond[8];
11801 IkReal x796=
IKsin(j3);
11802 IkReal x797=
IKcos(j3);
11803 IkReal x798=((1.0)*cj5);
11804 IkReal x799=(sj5*x797);
11805 IkReal x800=(sj5*x796);
11806 IkReal x801=((1.0)*x796);
11807 IkReal x802=(x796*x798);
11808 evalcond[0]=(sj5+((new_r11*x796))+((new_r01*x797)));
11809 evalcond[1]=(((cj5*x797))+new_r11+x800);
11810 evalcond[2]=(x799+new_r01+(((-1.0)*x802)));
11811 evalcond[3]=(sj5+((new_r10*x797))+(((-1.0)*new_r00*x801)));
11812 evalcond[4]=((((-1.0)*new_r01*x801))+cj5+((new_r11*x797)));
11813 evalcond[5]=(x799+new_r10+(((-1.0)*x802)));
11814 evalcond[6]=((((-1.0)*x798))+((new_r10*x796))+((new_r00*x797)));
11815 evalcond[7]=((((-1.0)*x800))+(((-1.0)*x797*x798))+new_r00);
11823 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
11824 vinfos[0].jointtype = 1;
11825 vinfos[0].foffset = j0;
11826 vinfos[0].indices[0] = _ij0[0];
11827 vinfos[0].indices[1] = _ij0[1];
11828 vinfos[0].maxsolutions = _nj0;
11829 vinfos[1].jointtype = 1;
11830 vinfos[1].foffset = j1;
11831 vinfos[1].indices[0] = _ij1[0];
11832 vinfos[1].indices[1] = _ij1[1];
11833 vinfos[1].maxsolutions = _nj1;
11834 vinfos[2].jointtype = 1;
11835 vinfos[2].foffset = j2;
11836 vinfos[2].indices[0] = _ij2[0];
11837 vinfos[2].indices[1] = _ij2[1];
11838 vinfos[2].maxsolutions = _nj2;
11839 vinfos[3].jointtype = 1;
11840 vinfos[3].foffset = j3;
11841 vinfos[3].indices[0] = _ij3[0];
11842 vinfos[3].indices[1] = _ij3[1];
11843 vinfos[3].maxsolutions = _nj3;
11844 vinfos[4].jointtype = 1;
11845 vinfos[4].foffset = j4;
11846 vinfos[4].indices[0] = _ij4[0];
11847 vinfos[4].indices[1] = _ij4[1];
11848 vinfos[4].maxsolutions = _nj4;
11849 vinfos[5].jointtype = 1;
11850 vinfos[5].foffset = j5;
11851 vinfos[5].indices[0] = _ij5[0];
11852 vinfos[5].indices[1] = _ij5[1];
11853 vinfos[5].maxsolutions = _nj5;
11854 std::vector<int> vfree(0);
11867 IkReal j3array[1], cj3array[1], sj3array[1];
11868 bool j3valid[1]={
false};
11878 j3array[0]=((-1.5707963267949)+(x803.
value)+(((1.5707963267949)*(x804.
value))));
11879 sj3array[0]=
IKsin(j3array[0]);
11880 cj3array[0]=
IKcos(j3array[0]);
11881 if( j3array[0] >
IKPI )
11885 else if( j3array[0] < -
IKPI )
11886 { j3array[0]+=
IK2PI;
11889 for(
int ij3 = 0; ij3 < 1; ++ij3)
11891 if( !j3valid[ij3] )
11895 _ij3[0] = ij3; _ij3[1] = -1;
11896 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
11900 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
11903 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
11905 IkReal evalcond[8];
11906 IkReal x805=
IKsin(j3);
11907 IkReal x806=
IKcos(j3);
11908 IkReal x807=((1.0)*cj5);
11909 IkReal x808=(sj5*x806);
11910 IkReal x809=(sj5*x805);
11911 IkReal x810=((1.0)*x805);
11912 IkReal x811=(x805*x807);
11913 evalcond[0]=(sj5+((new_r11*x805))+((new_r01*x806)));
11914 evalcond[1]=(((cj5*x806))+new_r11+x809);
11915 evalcond[2]=((((-1.0)*x811))+new_r01+x808);
11916 evalcond[3]=(sj5+(((-1.0)*new_r00*x810))+((new_r10*x806)));
11917 evalcond[4]=(cj5+(((-1.0)*new_r01*x810))+((new_r11*x806)));
11918 evalcond[5]=((((-1.0)*x811))+new_r10+x808);
11919 evalcond[6]=(((new_r00*x806))+((new_r10*x805))+(((-1.0)*x807)));
11920 evalcond[7]=((((-1.0)*x809))+(((-1.0)*x806*x807))+new_r00);
11928 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
11929 vinfos[0].jointtype = 1;
11930 vinfos[0].foffset = j0;
11931 vinfos[0].indices[0] = _ij0[0];
11932 vinfos[0].indices[1] = _ij0[1];
11933 vinfos[0].maxsolutions = _nj0;
11934 vinfos[1].jointtype = 1;
11935 vinfos[1].foffset = j1;
11936 vinfos[1].indices[0] = _ij1[0];
11937 vinfos[1].indices[1] = _ij1[1];
11938 vinfos[1].maxsolutions = _nj1;
11939 vinfos[2].jointtype = 1;
11940 vinfos[2].foffset = j2;
11941 vinfos[2].indices[0] = _ij2[0];
11942 vinfos[2].indices[1] = _ij2[1];
11943 vinfos[2].maxsolutions = _nj2;
11944 vinfos[3].jointtype = 1;
11945 vinfos[3].foffset = j3;
11946 vinfos[3].indices[0] = _ij3[0];
11947 vinfos[3].indices[1] = _ij3[1];
11948 vinfos[3].maxsolutions = _nj3;
11949 vinfos[4].jointtype = 1;
11950 vinfos[4].foffset = j4;
11951 vinfos[4].indices[0] = _ij4[0];
11952 vinfos[4].indices[1] = _ij4[1];
11953 vinfos[4].maxsolutions = _nj4;
11954 vinfos[5].jointtype = 1;
11955 vinfos[5].foffset = j5;
11956 vinfos[5].indices[0] = _ij5[0];
11957 vinfos[5].indices[1] = _ij5[1];
11958 vinfos[5].maxsolutions = _nj5;
11959 std::vector<int> vfree(0);
11971 if( bgotonextstatement )
11973 bool bgotonextstatement =
true;
11976 evalcond[0]=((
IKabs(new_r12))+(
IKabs(new_r02)));
11977 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
11979 bgotonextstatement=
false;
11986 j3eval[0]=((
IKabs(new_r11))+(
IKabs(new_r01)));
11987 if(
IKabs(j3eval[0]) < 0.0000010000000000 )
11995 j3eval[0]=((
IKabs(new_r10))+(
IKabs(new_r00)));
11996 if(
IKabs(j3eval[0]) < 0.0000010000000000 )
12004 j3eval[0]=((
IKabs((new_r10*new_r22)))+(
IKabs((new_r00*new_r22))));
12005 if(
IKabs(j3eval[0]) < 0.0000010000000000 )
12012 IkReal j3array[2], cj3array[2], sj3array[2];
12013 bool j3valid[2]={
false};
12019 IkReal x812=x813.
value;
12020 j3array[0]=((-1.0)*x812);
12021 sj3array[0]=
IKsin(j3array[0]);
12022 cj3array[0]=
IKcos(j3array[0]);
12023 j3array[1]=((3.14159265358979)+(((-1.0)*x812)));
12024 sj3array[1]=
IKsin(j3array[1]);
12025 cj3array[1]=
IKcos(j3array[1]);
12026 if( j3array[0] >
IKPI )
12030 else if( j3array[0] < -
IKPI )
12031 { j3array[0]+=
IK2PI;
12034 if( j3array[1] >
IKPI )
12038 else if( j3array[1] < -
IKPI )
12039 { j3array[1]+=
IK2PI;
12042 for(
int ij3 = 0; ij3 < 2; ++ij3)
12044 if( !j3valid[ij3] )
12048 _ij3[0] = ij3; _ij3[1] = -1;
12049 for(
int iij3 = ij3+1; iij3 < 2; ++iij3)
12053 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
12056 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
12058 IkReal evalcond[5];
12059 IkReal x814=
IKsin(j3);
12060 IkReal x815=
IKcos(j3);
12061 IkReal x816=(new_r11*x815);
12062 IkReal x817=((1.0)*x814);
12063 evalcond[0]=(((new_r11*x814))+((new_r01*x815)));
12064 evalcond[1]=(((new_r00*x815))+((new_r10*x814)));
12065 evalcond[2]=(((new_r10*x815))+(((-1.0)*new_r00*x817)));
12066 evalcond[3]=((((-1.0)*new_r01*x817))+x816);
12067 evalcond[4]=(((new_r22*x816))+(((-1.0)*new_r01*new_r22*x817)));
12075 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
12076 vinfos[0].jointtype = 1;
12077 vinfos[0].foffset = j0;
12078 vinfos[0].indices[0] = _ij0[0];
12079 vinfos[0].indices[1] = _ij0[1];
12080 vinfos[0].maxsolutions = _nj0;
12081 vinfos[1].jointtype = 1;
12082 vinfos[1].foffset = j1;
12083 vinfos[1].indices[0] = _ij1[0];
12084 vinfos[1].indices[1] = _ij1[1];
12085 vinfos[1].maxsolutions = _nj1;
12086 vinfos[2].jointtype = 1;
12087 vinfos[2].foffset = j2;
12088 vinfos[2].indices[0] = _ij2[0];
12089 vinfos[2].indices[1] = _ij2[1];
12090 vinfos[2].maxsolutions = _nj2;
12091 vinfos[3].jointtype = 1;
12092 vinfos[3].foffset = j3;
12093 vinfos[3].indices[0] = _ij3[0];
12094 vinfos[3].indices[1] = _ij3[1];
12095 vinfos[3].maxsolutions = _nj3;
12096 vinfos[4].jointtype = 1;
12097 vinfos[4].foffset = j4;
12098 vinfos[4].indices[0] = _ij4[0];
12099 vinfos[4].indices[1] = _ij4[1];
12100 vinfos[4].maxsolutions = _nj4;
12101 vinfos[5].jointtype = 1;
12102 vinfos[5].foffset = j5;
12103 vinfos[5].indices[0] = _ij5[0];
12104 vinfos[5].indices[1] = _ij5[1];
12105 vinfos[5].maxsolutions = _nj5;
12106 std::vector<int> vfree(0);
12119 IkReal j3array[2], cj3array[2], sj3array[2];
12120 bool j3valid[2]={
false};
12126 IkReal x818=x819.
value;
12127 j3array[0]=((-1.0)*x818);
12128 sj3array[0]=
IKsin(j3array[0]);
12129 cj3array[0]=
IKcos(j3array[0]);
12130 j3array[1]=((3.14159265358979)+(((-1.0)*x818)));
12131 sj3array[1]=
IKsin(j3array[1]);
12132 cj3array[1]=
IKcos(j3array[1]);
12133 if( j3array[0] >
IKPI )
12137 else if( j3array[0] < -
IKPI )
12138 { j3array[0]+=
IK2PI;
12141 if( j3array[1] >
IKPI )
12145 else if( j3array[1] < -
IKPI )
12146 { j3array[1]+=
IK2PI;
12149 for(
int ij3 = 0; ij3 < 2; ++ij3)
12151 if( !j3valid[ij3] )
12155 _ij3[0] = ij3; _ij3[1] = -1;
12156 for(
int iij3 = ij3+1; iij3 < 2; ++iij3)
12160 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
12163 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
12165 IkReal evalcond[5];
12166 IkReal x820=
IKcos(j3);
12167 IkReal x821=
IKsin(j3);
12168 IkReal x822=(new_r11*x820);
12169 IkReal x823=(new_r10*x820);
12170 IkReal x824=((1.0)*x821);
12171 evalcond[0]=(((new_r01*x820))+((new_r11*x821)));
12172 evalcond[1]=((((-1.0)*new_r00*x824))+x823);
12173 evalcond[2]=((((-1.0)*new_r01*x824))+x822);
12174 evalcond[3]=((((-1.0)*new_r00*new_r22*x824))+((new_r22*x823)));
12175 evalcond[4]=(((new_r22*x822))+(((-1.0)*new_r01*new_r22*x824)));
12183 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
12184 vinfos[0].jointtype = 1;
12185 vinfos[0].foffset = j0;
12186 vinfos[0].indices[0] = _ij0[0];
12187 vinfos[0].indices[1] = _ij0[1];
12188 vinfos[0].maxsolutions = _nj0;
12189 vinfos[1].jointtype = 1;
12190 vinfos[1].foffset = j1;
12191 vinfos[1].indices[0] = _ij1[0];
12192 vinfos[1].indices[1] = _ij1[1];
12193 vinfos[1].maxsolutions = _nj1;
12194 vinfos[2].jointtype = 1;
12195 vinfos[2].foffset = j2;
12196 vinfos[2].indices[0] = _ij2[0];
12197 vinfos[2].indices[1] = _ij2[1];
12198 vinfos[2].maxsolutions = _nj2;
12199 vinfos[3].jointtype = 1;
12200 vinfos[3].foffset = j3;
12201 vinfos[3].indices[0] = _ij3[0];
12202 vinfos[3].indices[1] = _ij3[1];
12203 vinfos[3].maxsolutions = _nj3;
12204 vinfos[4].jointtype = 1;
12205 vinfos[4].foffset = j4;
12206 vinfos[4].indices[0] = _ij4[0];
12207 vinfos[4].indices[1] = _ij4[1];
12208 vinfos[4].maxsolutions = _nj4;
12209 vinfos[5].jointtype = 1;
12210 vinfos[5].foffset = j5;
12211 vinfos[5].indices[0] = _ij5[0];
12212 vinfos[5].indices[1] = _ij5[1];
12213 vinfos[5].maxsolutions = _nj5;
12214 std::vector<int> vfree(0);
12227 IkReal j3array[2], cj3array[2], sj3array[2];
12228 bool j3valid[2]={
false};
12234 IkReal x825=x826.
value;
12235 j3array[0]=((-1.0)*x825);
12236 sj3array[0]=
IKsin(j3array[0]);
12237 cj3array[0]=
IKcos(j3array[0]);
12238 j3array[1]=((3.14159265358979)+(((-1.0)*x825)));
12239 sj3array[1]=
IKsin(j3array[1]);
12240 cj3array[1]=
IKcos(j3array[1]);
12241 if( j3array[0] >
IKPI )
12245 else if( j3array[0] < -
IKPI )
12246 { j3array[0]+=
IK2PI;
12249 if( j3array[1] >
IKPI )
12253 else if( j3array[1] < -
IKPI )
12254 { j3array[1]+=
IK2PI;
12257 for(
int ij3 = 0; ij3 < 2; ++ij3)
12259 if( !j3valid[ij3] )
12263 _ij3[0] = ij3; _ij3[1] = -1;
12264 for(
int iij3 = ij3+1; iij3 < 2; ++iij3)
12268 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
12271 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
12273 IkReal evalcond[5];
12274 IkReal x827=
IKcos(j3);
12275 IkReal x828=
IKsin(j3);
12276 IkReal x829=(new_r11*x827);
12277 IkReal x830=(new_r10*x827);
12278 IkReal x831=((1.0)*x828);
12279 evalcond[0]=(((new_r10*x828))+((new_r00*x827)));
12280 evalcond[1]=(x830+(((-1.0)*new_r00*x831)));
12281 evalcond[2]=((((-1.0)*new_r01*x831))+x829);
12282 evalcond[3]=((((-1.0)*new_r00*new_r22*x831))+((new_r22*x830)));
12283 evalcond[4]=(((new_r22*x829))+(((-1.0)*new_r01*new_r22*x831)));
12291 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
12292 vinfos[0].jointtype = 1;
12293 vinfos[0].foffset = j0;
12294 vinfos[0].indices[0] = _ij0[0];
12295 vinfos[0].indices[1] = _ij0[1];
12296 vinfos[0].maxsolutions = _nj0;
12297 vinfos[1].jointtype = 1;
12298 vinfos[1].foffset = j1;
12299 vinfos[1].indices[0] = _ij1[0];
12300 vinfos[1].indices[1] = _ij1[1];
12301 vinfos[1].maxsolutions = _nj1;
12302 vinfos[2].jointtype = 1;
12303 vinfos[2].foffset = j2;
12304 vinfos[2].indices[0] = _ij2[0];
12305 vinfos[2].indices[1] = _ij2[1];
12306 vinfos[2].maxsolutions = _nj2;
12307 vinfos[3].jointtype = 1;
12308 vinfos[3].foffset = j3;
12309 vinfos[3].indices[0] = _ij3[0];
12310 vinfos[3].indices[1] = _ij3[1];
12311 vinfos[3].maxsolutions = _nj3;
12312 vinfos[4].jointtype = 1;
12313 vinfos[4].foffset = j4;
12314 vinfos[4].indices[0] = _ij4[0];
12315 vinfos[4].indices[1] = _ij4[1];
12316 vinfos[4].maxsolutions = _nj4;
12317 vinfos[5].jointtype = 1;
12318 vinfos[5].foffset = j5;
12319 vinfos[5].indices[0] = _ij5[0];
12320 vinfos[5].indices[1] = _ij5[1];
12321 vinfos[5].maxsolutions = _nj5;
12322 std::vector<int> vfree(0);
12334 if( bgotonextstatement )
12336 bool bgotonextstatement =
true;
12341 bgotonextstatement=
false;
12346 if( bgotonextstatement )
12357 IkReal j3array[1], cj3array[1], sj3array[1];
12358 bool j3valid[1]={
false};
12364 IkReal x832=x833.
value;
12371 j3array[0]=
IKatan2((x832*(x834.
value)*((((new_r01*new_r12))+(((-1.0)*sj4*sj5))))), ((-1.0)*new_r12*x832));
12372 sj3array[0]=
IKsin(j3array[0]);
12373 cj3array[0]=
IKcos(j3array[0]);
12374 if( j3array[0] >
IKPI )
12378 else if( j3array[0] < -
IKPI )
12379 { j3array[0]+=
IK2PI;
12382 for(
int ij3 = 0; ij3 < 1; ++ij3)
12384 if( !j3valid[ij3] )
12388 _ij3[0] = ij3; _ij3[1] = -1;
12389 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
12393 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
12396 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
12398 IkReal evalcond[18];
12399 IkReal x835=
IKsin(j3);
12400 IkReal x836=
IKcos(j3);
12401 IkReal x837=((1.0)*cj5);
12402 IkReal x838=((1.0)*cj4);
12403 IkReal x839=(new_r11*x836);
12404 IkReal x840=(sj5*x836);
12405 IkReal x841=(cj4*x836);
12406 IkReal x842=(sj4*x836);
12407 IkReal x843=(new_r00*x835);
12408 IkReal x844=(cj4*x835);
12409 IkReal x845=(new_r01*x835);
12410 IkReal x846=(new_r02*x835);
12411 IkReal x847=((1.0)*sj4*x835);
12412 evalcond[0]=(new_r12+x842);
12413 evalcond[1]=((((-1.0)*x847))+new_r02);
12414 evalcond[2]=(((new_r12*x835))+((new_r02*x836)));
12415 evalcond[3]=(((new_r11*x835))+sj5+((new_r01*x836)));
12416 evalcond[4]=(sj4+((new_r12*x836))+(((-1.0)*x846)));
12417 evalcond[5]=(((cj5*x844))+new_r01+x840);
12418 evalcond[6]=(((new_r00*x836))+(((-1.0)*x837))+((new_r10*x835)));
12419 evalcond[7]=((((-1.0)*x836*x837))+((sj5*x844))+new_r00);
12420 evalcond[8]=((((-1.0)*x837*x841))+((sj5*x835))+new_r11);
12421 evalcond[9]=((((-1.0)*x835*x837))+(((-1.0)*x838*x840))+new_r10);
12422 evalcond[10]=((((-1.0)*x843))+(((-1.0)*sj5*x838))+((new_r10*x836)));
12423 evalcond[11]=((((-1.0)*cj4*x837))+(((-1.0)*x845))+x839);
12424 evalcond[12]=(((new_r12*x841))+((new_r22*sj4))+(((-1.0)*x838*x846)));
12425 evalcond[13]=(((new_r10*x842))+(((-1.0)*sj4*x843))+(((-1.0)*new_r20*x838)));
12426 evalcond[14]=(((sj4*x839))+(((-1.0)*sj4*x845))+(((-1.0)*new_r21*x838)));
12427 evalcond[15]=((1.0)+(((-1.0)*new_r22*x838))+((new_r12*x842))+(((-1.0)*sj4*x846)));
12428 evalcond[16]=(((new_r10*x841))+(((-1.0)*sj5))+((new_r20*sj4))+(((-1.0)*x838*x843)));
12429 evalcond[17]=(((cj4*x839))+(((-1.0)*x837))+(((-1.0)*x838*x845))+((new_r21*sj4)));
12437 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
12438 vinfos[0].jointtype = 1;
12439 vinfos[0].foffset = j0;
12440 vinfos[0].indices[0] = _ij0[0];
12441 vinfos[0].indices[1] = _ij0[1];
12442 vinfos[0].maxsolutions = _nj0;
12443 vinfos[1].jointtype = 1;
12444 vinfos[1].foffset = j1;
12445 vinfos[1].indices[0] = _ij1[0];
12446 vinfos[1].indices[1] = _ij1[1];
12447 vinfos[1].maxsolutions = _nj1;
12448 vinfos[2].jointtype = 1;
12449 vinfos[2].foffset = j2;
12450 vinfos[2].indices[0] = _ij2[0];
12451 vinfos[2].indices[1] = _ij2[1];
12452 vinfos[2].maxsolutions = _nj2;
12453 vinfos[3].jointtype = 1;
12454 vinfos[3].foffset = j3;
12455 vinfos[3].indices[0] = _ij3[0];
12456 vinfos[3].indices[1] = _ij3[1];
12457 vinfos[3].maxsolutions = _nj3;
12458 vinfos[4].jointtype = 1;
12459 vinfos[4].foffset = j4;
12460 vinfos[4].indices[0] = _ij4[0];
12461 vinfos[4].indices[1] = _ij4[1];
12462 vinfos[4].maxsolutions = _nj4;
12463 vinfos[5].jointtype = 1;
12464 vinfos[5].foffset = j5;
12465 vinfos[5].indices[0] = _ij5[0];
12466 vinfos[5].indices[1] = _ij5[1];
12467 vinfos[5].maxsolutions = _nj5;
12468 std::vector<int> vfree(0);
12481 IkReal j3array[1], cj3array[1], sj3array[1];
12482 bool j3valid[1]={
false};
12492 j3array[0]=((-1.5707963267949)+(((1.5707963267949)*(x848.
value)))+(x849.
value));
12493 sj3array[0]=
IKsin(j3array[0]);
12494 cj3array[0]=
IKcos(j3array[0]);
12495 if( j3array[0] >
IKPI )
12499 else if( j3array[0] < -
IKPI )
12500 { j3array[0]+=
IK2PI;
12503 for(
int ij3 = 0; ij3 < 1; ++ij3)
12505 if( !j3valid[ij3] )
12509 _ij3[0] = ij3; _ij3[1] = -1;
12510 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
12514 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
12517 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
12519 IkReal evalcond[18];
12520 IkReal x850=
IKsin(j3);
12521 IkReal x851=
IKcos(j3);
12522 IkReal x852=((1.0)*cj5);
12523 IkReal x853=((1.0)*cj4);
12524 IkReal x854=(new_r11*x851);
12525 IkReal x855=(sj5*x851);
12526 IkReal x856=(cj4*x851);
12527 IkReal x857=(sj4*x851);
12528 IkReal x858=(new_r00*x850);
12529 IkReal x859=(cj4*x850);
12530 IkReal x860=(new_r01*x850);
12531 IkReal x861=(new_r02*x850);
12532 IkReal x862=((1.0)*sj4*x850);
12533 evalcond[0]=(new_r12+x857);
12534 evalcond[1]=((((-1.0)*x862))+new_r02);
12535 evalcond[2]=(((new_r12*x850))+((new_r02*x851)));
12536 evalcond[3]=(sj5+((new_r11*x850))+((new_r01*x851)));
12537 evalcond[4]=(sj4+(((-1.0)*x861))+((new_r12*x851)));
12538 evalcond[5]=(new_r01+x855+((cj5*x859)));
12539 evalcond[6]=((((-1.0)*x852))+((new_r10*x850))+((new_r00*x851)));
12540 evalcond[7]=(((sj5*x859))+new_r00+(((-1.0)*x851*x852)));
12541 evalcond[8]=(((sj5*x850))+(((-1.0)*x852*x856))+new_r11);
12542 evalcond[9]=((((-1.0)*x853*x855))+(((-1.0)*x850*x852))+new_r10);
12543 evalcond[10]=((((-1.0)*x858))+(((-1.0)*sj5*x853))+((new_r10*x851)));
12544 evalcond[11]=((((-1.0)*x860))+x854+(((-1.0)*cj4*x852)));
12545 evalcond[12]=((((-1.0)*x853*x861))+((new_r22*sj4))+((new_r12*x856)));
12546 evalcond[13]=((((-1.0)*sj4*x858))+(((-1.0)*new_r20*x853))+((new_r10*x857)));
12547 evalcond[14]=((((-1.0)*new_r21*x853))+((sj4*x854))+(((-1.0)*sj4*x860)));
12548 evalcond[15]=((1.0)+((new_r12*x857))+(((-1.0)*new_r22*x853))+(((-1.0)*sj4*x861)));
12549 evalcond[16]=((((-1.0)*sj5))+(((-1.0)*x853*x858))+((new_r20*sj4))+((new_r10*x856)));
12550 evalcond[17]=((((-1.0)*x852))+(((-1.0)*x853*x860))+((new_r21*sj4))+((cj4*x854)));
12558 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
12559 vinfos[0].jointtype = 1;
12560 vinfos[0].foffset = j0;
12561 vinfos[0].indices[0] = _ij0[0];
12562 vinfos[0].indices[1] = _ij0[1];
12563 vinfos[0].maxsolutions = _nj0;
12564 vinfos[1].jointtype = 1;
12565 vinfos[1].foffset = j1;
12566 vinfos[1].indices[0] = _ij1[0];
12567 vinfos[1].indices[1] = _ij1[1];
12568 vinfos[1].maxsolutions = _nj1;
12569 vinfos[2].jointtype = 1;
12570 vinfos[2].foffset = j2;
12571 vinfos[2].indices[0] = _ij2[0];
12572 vinfos[2].indices[1] = _ij2[1];
12573 vinfos[2].maxsolutions = _nj2;
12574 vinfos[3].jointtype = 1;
12575 vinfos[3].foffset = j3;
12576 vinfos[3].indices[0] = _ij3[0];
12577 vinfos[3].indices[1] = _ij3[1];
12578 vinfos[3].maxsolutions = _nj3;
12579 vinfos[4].jointtype = 1;
12580 vinfos[4].foffset = j4;
12581 vinfos[4].indices[0] = _ij4[0];
12582 vinfos[4].indices[1] = _ij4[1];
12583 vinfos[4].maxsolutions = _nj4;
12584 vinfos[5].jointtype = 1;
12585 vinfos[5].foffset = j5;
12586 vinfos[5].indices[0] = _ij5[0];
12587 vinfos[5].indices[1] = _ij5[1];
12588 vinfos[5].maxsolutions = _nj5;
12589 std::vector<int> vfree(0);
12607 }
static inline void polyroots3(IkReal rawcoeffs[3+1], IkReal rawroots[3],
int& numroots)
12609 using std::complex;
12610 if( rawcoeffs[0] == 0 ) {
12612 polyroots2(&rawcoeffs[1], &rawroots[0], numroots);
12616 const IkReal tol = 128.0*std::numeric_limits<IkReal>::epsilon();
12617 const IkReal tolsqrt =
sqrt(std::numeric_limits<IkReal>::epsilon());
12618 complex<IkReal> coeffs[3];
12619 const int maxsteps = 110;
12620 for(
int i = 0; i < 3; ++i) {
12621 coeffs[i] = complex<IkReal>(rawcoeffs[i+1]/rawcoeffs[0]);
12623 complex<IkReal> roots[3];
12625 roots[0] = complex<IkReal>(1,0);
12626 roots[1] = complex<IkReal>(0.4,0.9);
12629 for(
int i = 2; i < 3; ++i) {
12630 roots[i] = roots[i-1]*roots[1];
12634 bool changed =
false;
12635 for(
int i = 0; i < 3; ++i) {
12636 if ( err[i] >= tol ) {
12639 complex<IkReal>
x = roots[i] + coeffs[0];
12640 for(
int j = 1; j < 3; ++j) {
12641 x = roots[i] * x + coeffs[j];
12643 for(
int j = 0; j < 3; ++j) {
12645 if( roots[i] != roots[j] ) {
12646 x /= (roots[i] - roots[j]);
12660 bool visited[3] = {
false};
12661 for(
int i = 0; i < 3; ++i) {
12662 if( !visited[i] ) {
12665 complex<IkReal> newroot=roots[i];
12667 for(
int j = i+1; j < 3; ++j) {
12669 if(
abs(real(roots[i])-real(roots[j])) < tolsqrt &&
abs(imag(roots[i])-imag(roots[j])) < 0.002 ) {
12670 newroot += roots[j];
12679 if(
IKabs(imag(newroot)) < tolsqrt ) {
12680 rawroots[numroots++] = real(newroot);
12685 static inline void polyroots2(IkReal rawcoeffs[2+1], IkReal rawroots[2],
int& numroots) {
12686 IkReal det = rawcoeffs[1]*rawcoeffs[1]-4*rawcoeffs[0]*rawcoeffs[2];
12690 else if( det == 0 ) {
12691 rawroots[0] = -0.5*rawcoeffs[1]/rawcoeffs[0];
12696 rawroots[0] = (-rawcoeffs[1]+det)/(2*rawcoeffs[0]);
12697 rawroots[1] = (-rawcoeffs[1]-det)/(2*rawcoeffs[0]);
12701 static inline void polyroots4(IkReal rawcoeffs[4+1], IkReal rawroots[4],
int& numroots)
12703 using std::complex;
12704 if( rawcoeffs[0] == 0 ) {
12706 polyroots3(&rawcoeffs[1], &rawroots[0], numroots);
12710 const IkReal tol = 128.0*std::numeric_limits<IkReal>::epsilon();
12711 const IkReal tolsqrt =
sqrt(std::numeric_limits<IkReal>::epsilon());
12712 complex<IkReal> coeffs[4];
12713 const int maxsteps = 110;
12714 for(
int i = 0; i < 4; ++i) {
12715 coeffs[i] = complex<IkReal>(rawcoeffs[i+1]/rawcoeffs[0]);
12717 complex<IkReal> roots[4];
12719 roots[0] = complex<IkReal>(1,0);
12720 roots[1] = complex<IkReal>(0.4,0.9);
12723 for(
int i = 2; i < 4; ++i) {
12724 roots[i] = roots[i-1]*roots[1];
12728 bool changed =
false;
12729 for(
int i = 0; i < 4; ++i) {
12730 if ( err[i] >= tol ) {
12733 complex<IkReal>
x = roots[i] + coeffs[0];
12734 for(
int j = 1; j < 4; ++j) {
12735 x = roots[i] * x + coeffs[j];
12737 for(
int j = 0; j < 4; ++j) {
12739 if( roots[i] != roots[j] ) {
12740 x /= (roots[i] - roots[j]);
12754 bool visited[4] = {
false};
12755 for(
int i = 0; i < 4; ++i) {
12756 if( !visited[i] ) {
12759 complex<IkReal> newroot=roots[i];
12761 for(
int j = i+1; j < 4; ++j) {
12763 if(
abs(real(roots[i])-real(roots[j])) < tolsqrt &&
abs(imag(roots[i])-imag(roots[j])) < 0.002 ) {
12764 newroot += roots[j];
12773 if(
IKabs(imag(newroot)) < tolsqrt ) {
12774 rawroots[numroots++] = real(newroot);
12786 return solver.
ComputeIk(eetrans,eerot,pfree,solutions);
12791 return solver.
ComputeIk(eetrans,eerot,pfree,solutions);
12794 IKFAST_API
const char*
GetKinematicsHash() {
return "<robot:GenericRobot - rs080n (ca1c438b655ffad7bc13162d3719a526)>"; }
12798 #ifdef IKFAST_NAMESPACE 12802 #ifndef IKFAST_NO_MAIN 12804 #include <stdlib.h> 12805 #ifdef IKFAST_NAMESPACE 12806 using namespace IKFAST_NAMESPACE;
12811 printf(
"\nUsage: ./ik r00 r01 r02 t0 r10 r11 r12 t1 r20 r21 r22 t2 free0 ...\n\n" 12812 "Returns the ik solutions given the transformation of the end effector specified by\n" 12813 "a 3x3 rotation R (rXX), and a 3x1 translation (tX).\n" 12820 IkReal eerot[9],eetrans[3];
12821 eerot[0] = atof(argv[1]); eerot[1] = atof(argv[2]); eerot[2] = atof(argv[3]); eetrans[0] = atof(argv[4]);
12822 eerot[3] = atof(argv[5]); eerot[4] = atof(argv[6]); eerot[5] = atof(argv[7]); eetrans[1] = atof(argv[8]);
12823 eerot[6] = atof(argv[9]); eerot[7] = atof(argv[10]); eerot[8] = atof(argv[11]); eetrans[2] = atof(argv[12]);
12824 for(std::size_t i = 0; i < vfree.size(); ++i)
12825 vfree[i] = atof(argv[13+i]);
12826 bool bSuccess =
ComputeIk(eetrans, eerot, vfree.size() > 0 ? &vfree[0] : NULL, solutions);
12829 fprintf(stderr,
"Failed to get ik solution\n");
12833 printf(
"Found %d ik solutions:\n", (
int)solutions.
GetNumSolutions());
12837 printf(
"sol%d (free=%d): ", (
int)i, (
int)sol.
GetFree().size());
12838 std::vector<IkReal> vsolfree(sol.
GetFree().size());
12839 sol.
GetSolution(&solvalues[0],vsolfree.size()>0?&vsolfree[0]:NULL);
12840 for( std::size_t j = 0; j < solvalues.size(); ++j)
12841 printf(
"%.15f, ", solvalues[j]);
virtual const IkSolutionBase< T > & GetSolution(size_t index) const
returns the solution pointer
CheckValue< T > IKPowWithIntegerCheck(T f, int n)
#define IKFAST_SINCOS_THRESH
IKFAST_API void ComputeFk(const IkReal *j, IkReal *eetrans, IkReal *eerot)
INLINE Rall1d< T, V, S > log(const Rall1d< T, V, S > &arg)
float IKfmod(float x, float y)
virtual size_t GetNumSolutions() const
returns the number of solutions stored
IKFAST_API const char * GetKinematicsHash()
#define IKFAST_EVALCOND_THRESH
void dgetrf_(const int *m, const int *n, double *a, const int *lda, int *ipiv, int *info)
The discrete solutions are returned in this structure.
#define IKFAST_ATAN2_MAGTHRESH
IKFAST_API int * GetFreeParameters()
virtual const std::vector< int > & GetFree() const =0
Gets the indices of the configuration space that have to be preset before a full solution can be retu...
void rotationfunction0(IkSolutionListBase< IkReal > &solutions)
CheckValue< T > IKatan2WithCheck(T fy, T fx, T epsilon)
float IKatan2(float fy, float fx)
void dgeev_(const char *jobvl, const char *jobvr, const int *n, double *a, const int *lda, double *wr, double *wi, double *vl, const int *ldvl, double *vr, const int *ldvr, double *work, const int *lwork, int *info)
IKFAST_API int GetNumJoints()
virtual size_t AddSolution(const std::vector< IkSingleDOFSolutionBase< T > > &vinfos, const std::vector< int > &vfree)=0
add one solution and return its index for later retrieval
INLINE Rall1d< T, V, S > atan(const Rall1d< T, V, S > &x)
static void polyroots3(IkReal rawcoeffs[3+1], IkReal rawroots[3], int &numroots)
#define IKFAST_SOLUTION_THRESH
INLINE Rall1d< T, V, S > asin(const Rall1d< T, V, S > &x)
void dgesv_(const int *n, const int *nrhs, double *a, const int *lda, int *ipiv, double *b, const int *ldb, int *info)
virtual void Clear()=0
clears all current solutions, note that any memory addresses returned from GetSolution will be invali...
IKFAST_API int GetNumFreeParameters()
void dgetri_(const int *n, const double *a, const int *lda, int *ipiv, double *work, const int *lwork, int *info)
#define IKFAST_COMPILE_ASSERT(x)
INLINE Rall1d< T, V, S > sqrt(const Rall1d< T, V, S > &arg)
virtual void GetSolution(T *solution, const T *freevalues) const =0
gets a concrete solution
bool ComputeIk(const IkReal *eetrans, const IkReal *eerot, const IkReal *pfree, IkSolutionListBase< IkReal > &solutions)
INLINE Rall1d< T, V, S > pow(const Rall1d< T, V, S > &arg, double m)
static void polyroots4(IkReal rawcoeffs[4+1], IkReal rawroots[4], int &numroots)
INLINE Rall1d< T, V, S > acos(const Rall1d< T, V, S > &x)
INLINE Rall1d< T, V, S > abs(const Rall1d< T, V, S > &x)
Default implementation of IkSolutionListBase.
INLINE Rall1d< T, V, S > atan2(const Rall1d< T, V, S > &y, const Rall1d< T, V, S > &x)
void dgetrs_(const char *trans, const int *n, const int *nrhs, double *a, const int *lda, int *ipiv, double *b, const int *ldb, int *info)
IKFAST_API int GetIkRealSize()
int main(int argc, char **argv)
#define IKFAST_VERSION
Header file for all ikfast c++ files/shared objects.
IKFAST_API const char * GetIkFastVersion()
INLINE Rall1d< T, V, S > cos(const Rall1d< T, V, S > &arg)
void zgetrf_(const int *m, const int *n, std::complex< double > *a, const int *lda, int *ipiv, int *info)
INLINE Rall1d< T, V, S > tan(const Rall1d< T, V, S > &arg)
static void polyroots2(IkReal rawcoeffs[2+1], IkReal rawroots[2], int &numroots)
IKFAST_API int GetIkType()
float IKatan2Simple(float fy, float fx)
manages all the solutions
INLINE Rall1d< T, V, S > sin(const Rall1d< T, V, S > &arg)
virtual size_t GetNumSolutions() const =0
returns the number of solutions stored
IKFAST_API bool ComputeIk2(const IkReal *eetrans, const IkReal *eerot, const IkReal *pfree, IkSolutionListBase< IkReal > &solutions, void *pOpenRAVEManip)
IKFAST_API bool ComputeIk(const IkReal *eetrans, const IkReal *eerot, const IkReal *pfree, IkSolutionListBase< IkReal > &solutions)