1 #define IKFAST_HAS_LIBRARY 26 #define IKFAST_COMPILE_ASSERT(x) extern int __dummy[(int)x] 41 #ifndef __PRETTY_FUNCTION__ 42 #define __PRETTY_FUNCTION__ __FUNCDNAME__ 46 #ifndef __PRETTY_FUNCTION__ 47 #define __PRETTY_FUNCTION__ __func__ 50 #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()); } } 55 #define IKFAST_ALIGNED16(x) __declspec(align(16)) x 57 #define IKFAST_ALIGNED16(x) x __attribute((aligned(16))) 60 #define IK2PI ((IkReal)6.28318530717959) 61 #define IKPI ((IkReal)3.14159265358979) 62 #define IKPI_2 ((IkReal)1.57079632679490) 78 void dgetrf_ (
const int* m,
const int* n,
double* a,
const int* lda,
int* ipiv,
int* info);
79 void zgetrf_ (
const int* m,
const int* n, std::complex<double>* a,
const int* lda,
int* ipiv,
int* info);
80 void dgetri_(
const int* n,
const double* a,
const int* lda,
int* ipiv,
double* work,
const int* lwork,
int* info);
81 void dgesv_ (
const int* n,
const int* nrhs,
double* a,
const int* lda,
int* ipiv,
double* b,
const int* ldb,
int* info);
82 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);
83 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);
88 #ifdef IKFAST_NAMESPACE 89 namespace IKFAST_NAMESPACE {
92 inline float IKabs(
float f) {
return fabsf(f); }
93 inline double IKabs(
double f) {
return fabs(f); }
95 inline float IKsqr(
float f) {
return f*f; }
96 inline double IKsqr(
double f) {
return f*f; }
98 inline float IKlog(
float f) {
return logf(f); }
99 inline double IKlog(
double f) {
return log(f); }
102 #ifndef IKFAST_SINCOS_THRESH 103 #define IKFAST_SINCOS_THRESH ((IkReal)1e-7) 107 #ifndef IKFAST_ATAN2_MAGTHRESH 108 #define IKFAST_ATAN2_MAGTHRESH ((IkReal)1e-7) 112 #ifndef IKFAST_SOLUTION_THRESH 113 #define IKFAST_SOLUTION_THRESH ((IkReal)1e-6) 117 #ifndef IKFAST_EVALCOND_THRESH 118 #define IKFAST_EVALCOND_THRESH ((IkReal)0.00001) 125 if( f <= -1 )
return float(-
IKPI_2);
126 else if( f >= 1 )
return float(
IKPI_2);
132 if( f <= -1 )
return -
IKPI_2;
133 else if( f >= 1 )
return IKPI_2;
158 if( f <= -1 )
return float(
IKPI);
159 else if( f >= 1 )
return float(0);
165 if( f <= -1 )
return IKPI;
166 else if( f >= 1 )
return 0;
169 inline float IKsin(
float f) {
return sinf(f); }
171 inline float IKcos(
float f) {
return cosf(f); }
173 inline float IKtan(
float f) {
return tanf(f); }
175 inline float IKsqrt(
float f) {
if( f <= 0.0f )
return 0.0f;
return sqrtf(f); }
176 inline double IKsqrt(
double f) {
if( f <= 0.0 )
return 0.0;
return sqrt(f); }
178 return atan2f(fy,fx);
185 else if( isnan(fx) ) {
188 return atan2f(fy,fx);
198 else if( isnan(fx) ) {
204 template <
typename T>
211 template <
typename T>
217 if( !isnan(fy) && !isnan(fx) ) {
246 template <
typename T>
265 ret.
value = (T)1.0e30;
269 ret.
value = T(1.0)/f;
274 int num = n > 0 ? n : -n;
278 else if( num == 3 ) {
300 IKFAST_API
void ComputeFk(
const IkReal* j, IkReal* eetrans, IkReal* eerot) {
301 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,x43,x44,x45;
337 x35=((((-1.0)*x33))+x25);
339 x37=(((x0*x26))+(((-1.0)*x17*x25)));
340 x38=(x17*(((((-1.0)*x23))+(((-1.0)*x27)))));
341 x39=(x15*(((((-1.0)*x23))+(((-1.0)*x27)))));
342 x40=(x11*(((((-1.0)*x34))+((x26*x5)))));
345 x43=((((-1.0)*x17*x6))+(((-1.0)*x13*x39)));
346 x44=(((x10*x36))+((x11*((x27+x23)))));
347 x45=(((x10*(((((-1.0)*x31))+(((1.0)*x13*x38))))))+(((-1.0)*x11*x37)));
348 eerot[0]=(((x9*(((((-1.0)*x29))+((x28*x38))))))+((x45*x8)));
349 eerot[1]=(((x8*((x41+x29))))+((x45*x9)));
350 eerot[2]=(((x10*x37))+((x11*(((((-1.0)*x31))+((x38*x7)))))));
351 IkReal x46=((1.0)*x25);
352 eetrans[0]=(((x10*((((x21*x26))+(((-1.0)*x21*x46))))))+((x18*x26))+(((0.025)*x0))+((x11*((((x22*x38))+(((-1.0)*x20*x6))))))+((x0*x19))+(((-1.0)*x18*x46))+((x16*x27))+((x16*x23)));
353 eerot[3]=(((x8*((x40+((x10*(((((-1.0)*x42))+(((-1.0)*x24))))))))))+((x9*(((((-1.0)*x32))+((x39*x6)))))));
354 eerot[4]=(((x8*((((x28*x39))+x32))))+((x9*((((x10*x43))+x40)))));
355 eerot[5]=(((x11*x43))+((x10*(((((-1.0)*x15*x26))+x34)))));
356 IkReal x47=((1.0)*x26);
357 IkReal x48=((1.0)*x14);
358 eetrans[1]=((((-1.0)*x23*x48))+(((-1.0)*x19*x5))+(((-0.025)*x5))+(((-1.0)*x27*x48))+((x11*(((((-1.0)*x21*x6))+(((-1.0)*x22*x39))))))+((x12*x25))+(((-1.0)*x12*x47))+((x10*(((((-1.0)*x20*x47))+((x20*x25)))))));
359 eerot[6]=(((x6*x9*(((((-1.0)*x25))+x33))))+((x44*x8)));
360 eerot[7]=(((x44*x9))+((x35*x6*x8)));
361 eerot[8]=(((x10*(((((-1.0)*x23))+(((-1.0)*x27))))))+((x30*x35)));
362 eetrans[2]=((0.4)+((x10*(((((-0.08)*x23))+(((-0.08)*x27))))))+((x30*(((((-0.08)*x26))+(((0.08)*x25))))))+(((-0.035)*x25))+(((-0.455)*x3))+(((-0.42)*x23))+(((-0.42)*x27))+(((0.035)*x26)));
375 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;
376 unsigned char _ij0[2], _nj0,_ij1[2], _nj1,_ij2[2], _nj2,_ij3[2], _nj3,_ij4[2], _nj4,_ij5[2],
_nj5;
381 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;
382 for(
int dummyiter = 0; dummyiter < 1; ++dummyiter) {
393 px = eetrans[0]; py = eetrans[1]; pz = eetrans[2];
395 new_r00=((-1.0)*r00);
397 new_r02=((-1.0)*r02);
398 new_px=((((-0.08)*r02))+px);
400 new_r11=((-1.0)*r11);
402 new_py=((((-1.0)*py))+(((0.08)*r12)));
404 new_r21=((-1.0)*r21);
406 new_pz=((0.4)+(((-1.0)*pz))+(((0.08)*r22)));
407 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;
408 IkReal x49=((1.0)*px);
409 IkReal x50=((1.0)*pz);
410 IkReal x51=((1.0)*py);
411 pp=((px*px)+(py*py)+(pz*pz));
412 npx=(((px*r00))+((py*r10))+((pz*r20)));
413 npy=(((px*r01))+((py*r11))+((pz*r21)));
414 npz=(((px*r02))+((py*r12))+((pz*r22)));
415 rxp0_0=((((-1.0)*r20*x51))+((pz*r10)));
416 rxp0_1=(((px*r20))+(((-1.0)*r00*x50)));
417 rxp0_2=((((-1.0)*r10*x49))+((py*r00)));
418 rxp1_0=((((-1.0)*r21*x51))+((pz*r11)));
419 rxp1_1=(((px*r21))+(((-1.0)*r01*x50)));
420 rxp1_2=((((-1.0)*r11*x49))+((py*r01)));
421 rxp2_0=(((pz*r12))+(((-1.0)*r22*x51)));
422 rxp2_1=(((px*r22))+(((-1.0)*r02*x50)));
423 rxp2_2=((((-1.0)*r12*x49))+((py*r02)));
427 if(
IKabs(j0eval[0]) < 0.0000010000000000 )
434 IkReal j0array[2], cj0array[2], sj0array[2];
435 bool j0valid[2]={
false};
441 IkReal x52=x53.
value;
442 j0array[0]=((-1.0)*x52);
443 sj0array[0]=
IKsin(j0array[0]);
444 cj0array[0]=
IKcos(j0array[0]);
445 j0array[1]=((3.14159265358979)+(((-1.0)*x52)));
446 sj0array[1]=
IKsin(j0array[1]);
447 cj0array[1]=
IKcos(j0array[1]);
448 if( j0array[0] >
IKPI )
452 else if( j0array[0] < -
IKPI )
456 if( j0array[1] >
IKPI )
460 else if( j0array[1] < -
IKPI )
464 for(
int ij0 = 0; ij0 < 2; ++ij0)
470 _ij0[0] = ij0; _ij0[1] = -1;
471 for(
int iij0 = ij0+1; iij0 < 2; ++iij0)
475 j0valid[iij0]=
false; _ij0[1] = iij0;
break;
478 j0 = j0array[ij0]; cj0 = cj0array[ij0]; sj0 = sj0array[ij0];
481 IkReal j2array[2], cj2array[2], sj2array[2];
482 bool j2valid[2]={
false};
484 if( (((1.00130425120353)+(((0.130369670100063)*py*sj0))+(((0.130369670100063)*cj0*px))+(((-2.60739340200126)*pp)))) < -1-
IKFAST_SINCOS_THRESH || (((1.00130425120353)+(((0.130369670100063)*py*sj0))+(((0.130369670100063)*cj0*px))+(((-2.60739340200126)*pp)))) > 1+
IKFAST_SINCOS_THRESH )
486 IkReal x54=
IKasin(((1.00130425120353)+(((0.130369670100063)*py*sj0))+(((0.130369670100063)*cj0*px))+(((-2.60739340200126)*pp))));
487 j2array[0]=((-1.48765509490646)+(((-1.0)*x54)));
488 sj2array[0]=
IKsin(j2array[0]);
489 cj2array[0]=
IKcos(j2array[0]);
490 j2array[1]=((1.65393755868334)+x54);
491 sj2array[1]=
IKsin(j2array[1]);
492 cj2array[1]=
IKcos(j2array[1]);
493 if( j2array[0] >
IKPI )
497 else if( j2array[0] < -
IKPI )
501 if( j2array[1] >
IKPI )
505 else if( j2array[1] < -
IKPI )
509 for(
int ij2 = 0; ij2 < 2; ++ij2)
515 _ij2[0] = ij2; _ij2[1] = -1;
516 for(
int iij2 = ij2+1; iij2 < 2; ++iij2)
520 j2valid[iij2]=
false; _ij2[1] = iij2;
break;
523 j2 = j2array[ij2]; cj2 = cj2array[ij2]; sj2 = sj2array[ij2];
529 IkReal x57=((40.0)*cj2);
531 IkReal x59=((480.0)*sj2);
532 IkReal x60=((0.42)*sj2);
533 IkReal x61=(cj2*sj2);
535 IkReal x63=((0.035)*cj2);
537 j1eval[0]=((((-12.0)*sj2))+(((-1.0)*x56*x57))+cj2+((x58*x59))+(((480.0)*x62))+(((520.0)*pz))+((x56*x59))+(((-1.0)*x57*x58))+(((40.0)*x64)));
538 j1eval[1]=
IKsign(((((-1.0)*x56*x63))+(((0.42)*x62))+(((0.035)*x64))+(((0.455)*pz))+((x58*x60))+(((-1.0)*x58*x63))+((x56*x60))+(((-0.0105)*sj2))+(((0.000875)*cj2))));
539 j1eval[2]=((
IKabs(((-0.1764)+(pz*pz)+(((0.0294)*x61))+(((0.175175)*x55)))))+(
IKabs(((0.0147)+(((0.1911)*sj2))+(((0.175175)*x61))+(((-0.0294)*x55))+((pz*x56))+((pz*x58))+(((-0.015925)*cj2))+(((-0.025)*pz))))));
540 if(
IKabs(j1eval[0]) < 0.0000010000000000 ||
IKabs(j1eval[1]) < 0.0000010000000000 ||
IKabs(j1eval[2]) < 0.0000010000000000 )
545 IkReal x66=((0.035)*sj2);
547 IkReal x68=((0.42)*cj2);
548 IkReal x69=((40.0)*sj2);
551 IkReal x72=((480.0)*cj2);
552 j1eval[0]=((13.0)+(((12.0)*cj2))+sj2+(((-1.0)*x67*x69))+(((-40.0)*x70))+(((-1.0)*x67*x72))+(((-1.0)*x65*x69))+(((480.0)*x71))+(((-520.0)*x65))+(((-520.0)*x67))+(((-1.0)*x65*x72)));
553 j1eval[1]=
IKsign(((0.011375)+(((-1.0)*x66*x67))+(((-1.0)*x67*x68))+(((-0.035)*x70))+(((0.42)*x71))+(((0.0105)*cj2))+(((0.000875)*sj2))+(((-1.0)*x65*x66))+(((-1.0)*x65*x68))+(((-0.455)*x67))+(((-0.455)*x65))));
554 if(
IKabs(j1eval[0]) < 0.0000010000000000 ||
IKabs(j1eval[1]) < 0.0000010000000000 )
564 IkReal x79=((1600.0)*x74);
565 IkReal x80=(x73*x75);
566 j1eval[0]=((-1.0)+(((-1.0)*x79))+(((-1600.0)*x80))+(((-3200.0)*x77*x78))+(((80.0)*x77))+(((80.0)*x78))+((x73*x79))+(((-1600.0)*x76)));
567 j1eval[1]=
IKsign(((-0.000625)+(((-2.0)*x77*x78))+(((-1.0)*x80))+(((-1.0)*x74))+(((-1.0)*x76))+(((0.05)*x77))+(((0.05)*x78))+((x73*x74))));
568 if(
IKabs(j1eval[0]) < 0.0000010000000000 ||
IKabs(j1eval[1]) < 0.0000010000000000 )
575 IkReal j1array[1], cj1array[1], sj1array[1];
576 bool j1valid[1]={
false};
582 IkReal x85=((0.42)*cj2);
583 IkReal x86=((0.035)*sj2);
584 IkReal x87=((0.42)*sj2);
585 IkReal x88=((0.035)*cj2);
586 CheckValue<IkReal> x89 =
IKatan2WithCheck(IkReal((((x84*x87))+(((-1.0)*x83*x88))+(((-0.455)*pz))+(((-1.0)*x84*x88))+((x83*x87))+(((-0.0105)*sj2))+(((-1.0)*pz*x86))+(((-1.0)*pz*x85))+(((0.000875)*cj2)))),IkReal(((0.011375)+(((-1.0)*x83*x85))+(((-1.0)*x83*x86))+(((-0.455)*x84))+(((-0.455)*x83))+((pz*x88))+(((-1.0)*x84*x86))+(((-1.0)*x84*x85))+(((0.0105)*cj2))+(((0.000875)*sj2))+(((-1.0)*pz*x87)))),
IKFAST_ATAN2_MAGTHRESH);
594 j1array[0]=((-1.5707963267949)+(x89.
value)+(((1.5707963267949)*(x90.
value))));
595 sj1array[0]=
IKsin(j1array[0]);
596 cj1array[0]=
IKcos(j1array[0]);
597 if( j1array[0] >
IKPI )
601 else if( j1array[0] < -
IKPI )
605 for(
int ij1 = 0; ij1 < 1; ++ij1)
611 _ij1[0] = ij1; _ij1[1] = -1;
612 for(
int iij1 = ij1+1; iij1 < 1; ++iij1)
616 j1valid[iij1]=
false; _ij1[1] = iij1;
break;
619 j1 = j1array[ij1]; cj1 = cj1array[ij1]; sj1 = sj1array[ij1];
622 IkReal x91=
IKsin(j1);
623 IkReal x92=
IKcos(j1);
625 IkReal x94=((0.035)*sj2);
627 IkReal x96=((0.42)*sj2);
628 IkReal x97=((1.0)*pz);
629 IkReal x98=((0.035)*cj2);
630 IkReal x99=((0.42)*x91);
631 IkReal x100=((1.0)*x92);
632 IkReal x101=((0.91)*x92);
633 IkReal x102=(cj2*x92);
634 evalcond[0]=((((-0.025)*x91))+x96+(((-1.0)*x92*x97))+(((-1.0)*x98))+((x91*x93))+((x91*x95)));
635 evalcond[1]=((0.455)+(((0.025)*x92))+(((-1.0)*x91*x97))+x94+(((0.42)*cj2))+(((-1.0)*x100*x95))+(((-1.0)*x100*x93)));
636 evalcond[2]=((((0.455)*x91))+((x92*x96))+((cj2*x99))+(((-1.0)*x92*x98))+(((-1.0)*x97))+((x91*x94)));
637 evalcond[3]=((-0.030025)+(((0.05)*x95))+(((0.05)*x93))+((x101*x95))+((x101*x93))+(((-0.02275)*x92))+(((-1.0)*pp))+(((0.91)*pz*x91)));
638 evalcond[4]=((0.025)+(((0.455)*x92))+((x92*x94))+(((-1.0)*x91*x96))+(((-1.0)*x95))+(((-1.0)*x93))+(((0.42)*x102))+((x91*x98)));
645 rotationfunction0(solutions);
656 IkReal j1array[1], cj1array[1], sj1array[1];
657 bool j1valid[1]={
false};
660 IkReal x606=(py*sj0);
661 IkReal x607=(cj0*px);
662 IkReal x608=((0.42)*cj2);
663 IkReal x609=(cj2*sj2);
664 IkReal x610=((0.035)*sj2);
665 IkReal x611=((1.0)*pz);
666 CheckValue<IkReal> x612=
IKPowWithIntegerCheck(
IKsign(((0.011375)+(((-0.035)*cj2*pz))+(((0.42)*pz*sj2))+(((-0.455)*x606))+(((-0.455)*x607))+(((-1.0)*x606*x610))+(((-1.0)*x607*x610))+(((0.0105)*cj2))+(((0.000875)*sj2))+(((-1.0)*x606*x608))+(((-1.0)*x607*x608)))),-1);
670 CheckValue<IkReal> x613 =
IKatan2WithCheck(IkReal(((0.0147)+(((0.1911)*sj2))+(((0.025)*pz))+(((-1.0)*x606*x611))+(((-1.0)*x607*x611))+(((0.175175)*x609))+(((-0.015925)*cj2))+(((-0.0294)*x605)))),IkReal(((-0.20825)+(((-0.3822)*cj2))+(((-0.03185)*sj2))+(pz*pz)+(((-0.175175)*x605))+(((-0.0294)*x609)))),
IKFAST_ATAN2_MAGTHRESH);
674 j1array[0]=((-1.5707963267949)+(((1.5707963267949)*(x612.
value)))+(x613.
value));
675 sj1array[0]=
IKsin(j1array[0]);
676 cj1array[0]=
IKcos(j1array[0]);
677 if( j1array[0] >
IKPI )
681 else if( j1array[0] < -
IKPI )
685 for(
int ij1 = 0; ij1 < 1; ++ij1)
691 _ij1[0] = ij1; _ij1[1] = -1;
692 for(
int iij1 = ij1+1; iij1 < 1; ++iij1)
696 j1valid[iij1]=
false; _ij1[1] = iij1;
break;
699 j1 = j1array[ij1]; cj1 = cj1array[ij1]; sj1 = sj1array[ij1];
702 IkReal x614=
IKsin(j1);
703 IkReal x615=
IKcos(j1);
704 IkReal x616=(cj0*px);
705 IkReal x617=((0.035)*sj2);
706 IkReal x618=(py*sj0);
707 IkReal x619=((0.42)*sj2);
708 IkReal x620=((1.0)*pz);
709 IkReal x621=((0.035)*cj2);
710 IkReal x622=((0.42)*x614);
711 IkReal x623=((1.0)*x615);
712 IkReal x624=((0.91)*x615);
713 IkReal x625=(cj2*x615);
714 evalcond[0]=((((-1.0)*x621))+(((-0.025)*x614))+((x614*x618))+((x614*x616))+x619+(((-1.0)*x615*x620)));
715 evalcond[1]=((0.455)+(((0.025)*x615))+(((-1.0)*x614*x620))+x617+(((0.42)*cj2))+(((-1.0)*x618*x623))+(((-1.0)*x616*x623)));
716 evalcond[2]=((((0.455)*x614))+(((-1.0)*x620))+((x614*x617))+((x615*x619))+(((-1.0)*x615*x621))+((cj2*x622)));
717 evalcond[3]=((-0.030025)+(((-0.02275)*x615))+((x616*x624))+((x618*x624))+(((-1.0)*pp))+(((0.05)*x618))+(((0.05)*x616))+(((0.91)*pz*x614)));
718 evalcond[4]=((0.025)+(((0.42)*x625))+(((-1.0)*x614*x619))+((x614*x621))+(((0.455)*x615))+(((-1.0)*x616))+(((-1.0)*x618))+((x615*x617)));
725 rotationfunction0(solutions);
736 IkReal j1array[1], cj1array[1], sj1array[1];
737 bool j1valid[1]={
false};
740 IkReal x627=(py*sj0);
741 IkReal x628=((0.42)*sj2);
742 IkReal x629=(cj0*px);
743 IkReal x630=((0.035)*cj2);
744 IkReal x631=(cj2*sj2);
753 j1array[0]=((-1.5707963267949)+(x632.
value)+(((1.5707963267949)*(x633.
value))));
754 sj1array[0]=
IKsin(j1array[0]);
755 cj1array[0]=
IKcos(j1array[0]);
756 if( j1array[0] >
IKPI )
760 else if( j1array[0] < -
IKPI )
764 for(
int ij1 = 0; ij1 < 1; ++ij1)
770 _ij1[0] = ij1; _ij1[1] = -1;
771 for(
int iij1 = ij1+1; iij1 < 1; ++iij1)
775 j1valid[iij1]=
false; _ij1[1] = iij1;
break;
778 j1 = j1array[ij1]; cj1 = cj1array[ij1]; sj1 = sj1array[ij1];
781 IkReal x634=
IKsin(j1);
782 IkReal x635=
IKcos(j1);
783 IkReal x636=(cj0*px);
784 IkReal x637=((0.035)*sj2);
785 IkReal x638=(py*sj0);
786 IkReal x639=((0.42)*sj2);
787 IkReal x640=((1.0)*pz);
788 IkReal x641=((0.035)*cj2);
789 IkReal x642=((0.42)*x634);
790 IkReal x643=((1.0)*x635);
791 IkReal x644=((0.91)*x635);
792 IkReal x645=(cj2*x635);
793 evalcond[0]=(((x634*x636))+((x634*x638))+(((-0.025)*x634))+(((-1.0)*x641))+(((-1.0)*x635*x640))+x639);
794 evalcond[1]=((0.455)+(((0.025)*x635))+x637+(((-1.0)*x636*x643))+(((0.42)*cj2))+(((-1.0)*x634*x640))+(((-1.0)*x638*x643)));
795 evalcond[2]=(((x634*x637))+((x635*x639))+(((-1.0)*x640))+(((-1.0)*x635*x641))+((cj2*x642))+(((0.455)*x634)));
796 evalcond[3]=((-0.030025)+((x638*x644))+(((0.05)*x636))+(((0.05)*x638))+((x636*x644))+(((0.91)*pz*x634))+(((-1.0)*pp))+(((-0.02275)*x635)));
797 evalcond[4]=((0.025)+((x635*x637))+(((-1.0)*x634*x639))+((x634*x641))+(((0.42)*x645))+(((0.455)*x635))+(((-1.0)*x638))+(((-1.0)*x636)));
804 rotationfunction0(solutions);
823 for(
int rotationiter = 0; rotationiter < 1; ++rotationiter) {
824 IkReal x103=((1.0)*cj0);
825 IkReal x104=(r11*sj0);
826 IkReal x105=(r10*sj0);
827 IkReal x106=((1.0)*cj2);
828 IkReal x107=(cj1*sj2);
829 IkReal x108=(r12*sj0);
830 IkReal x109=(((cj2*sj1))+x107);
831 IkReal x110=((((-1.0)*cj1*x106))+((sj1*sj2)));
832 IkReal x111=(sj0*x110);
833 IkReal x112=(cj0*x109);
834 IkReal x113=(cj0*x110);
835 IkReal x114=((((-1.0)*x107))+(((-1.0)*sj1*x106)));
836 new_r00=(((r20*x110))+((r00*x112))+((x105*x109)));
837 new_r01=(((r21*x110))+((r01*x112))+((x104*x109)));
838 new_r02=(((r22*x110))+((r02*x112))+((x108*x109)));
839 new_r10=(((r00*sj0))+(((-1.0)*r10*x103)));
840 new_r11=((((-1.0)*r11*x103))+((r01*sj0)));
841 new_r12=((((-1.0)*r12*x103))+((r02*sj0)));
842 new_r20=(((r20*x114))+((r00*x113))+((x105*x110)));
843 new_r21=(((r21*x114))+((r01*x113))+((x104*x110)));
844 new_r22=(((r22*x114))+((r02*x113))+((x108*x110)));
846 IkReal j4array[2], cj4array[2], sj4array[2];
847 bool j4valid[2]={
false};
852 j4valid[0] = j4valid[1] =
true;
853 j4array[0] =
IKacos(cj4array[0]);
854 sj4array[0] =
IKsin(j4array[0]);
855 cj4array[1] = cj4array[0];
856 j4array[1] = -j4array[0];
857 sj4array[1] = -sj4array[0];
859 else if( isnan(cj4array[0]) )
863 cj4array[0] = 1; sj4array[0] = 0; j4array[0] = 0;
865 for(
int ij4 = 0; ij4 < 2; ++ij4)
871 _ij4[0] = ij4; _ij4[1] = -1;
872 for(
int iij4 = ij4+1; iij4 < 2; ++iij4)
876 j4valid[iij4]=
false; _ij4[1] = iij4;
break;
879 j4 = j4array[ij4]; cj4 = cj4array[ij4]; sj4 = sj4array[ij4];
885 j3eval[2]=((
IKabs(new_r12))+(
IKabs(new_r02)));
886 if(
IKabs(j3eval[0]) < 0.0000010000000000 ||
IKabs(j3eval[1]) < 0.0000010000000000 ||
IKabs(j3eval[2]) < 0.0000010000000000 )
892 j5eval[2]=((
IKabs(new_r20))+(
IKabs(new_r21)));
893 if(
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000 ||
IKabs(j5eval[2]) < 0.0000010000000000 )
899 if(
IKabs(j3eval[0]) < 0.0000010000000000 ||
IKabs(j3eval[1]) < 0.0000010000000000 )
903 bool bgotonextstatement =
true;
906 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(j4))), 6.28318530717959)));
911 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 )
913 bgotonextstatement=
false;
919 j3=
IKatan2(((-1.0)*new_r01), new_r00);
921 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
922 vinfos[0].jointtype = 1;
923 vinfos[0].foffset = j0;
924 vinfos[0].indices[0] = _ij0[0];
925 vinfos[0].indices[1] = _ij0[1];
926 vinfos[0].maxsolutions = _nj0;
927 vinfos[1].jointtype = 1;
928 vinfos[1].foffset = j1;
929 vinfos[1].indices[0] = _ij1[0];
930 vinfos[1].indices[1] = _ij1[1];
931 vinfos[1].maxsolutions = _nj1;
932 vinfos[2].jointtype = 1;
933 vinfos[2].foffset = j2;
934 vinfos[2].indices[0] = _ij2[0];
935 vinfos[2].indices[1] = _ij2[1];
936 vinfos[2].maxsolutions = _nj2;
937 vinfos[3].jointtype = 1;
938 vinfos[3].foffset = j3;
939 vinfos[3].fmul = j3mul;
940 vinfos[3].freeind = 0;
941 vinfos[3].maxsolutions = 0;
942 vinfos[4].jointtype = 1;
943 vinfos[4].foffset = j4;
944 vinfos[4].indices[0] = _ij4[0];
945 vinfos[4].indices[1] = _ij4[1];
946 vinfos[4].maxsolutions = _nj4;
947 vinfos[5].jointtype = 1;
948 vinfos[5].foffset = j5;
949 vinfos[5].fmul = j5mul;
950 vinfos[5].freeind = 0;
951 vinfos[5].maxsolutions = 0;
952 std::vector<int> vfree(1);
959 if( bgotonextstatement )
961 bool bgotonextstatement =
true;
964 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-3.14159265358979)+j4)))), 6.28318530717959)));
969 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 )
971 bgotonextstatement=
false;
977 j3=
IKatan2(((-1.0)*new_r01), ((-1.0)*new_r00));
979 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
980 vinfos[0].jointtype = 1;
981 vinfos[0].foffset = j0;
982 vinfos[0].indices[0] = _ij0[0];
983 vinfos[0].indices[1] = _ij0[1];
984 vinfos[0].maxsolutions = _nj0;
985 vinfos[1].jointtype = 1;
986 vinfos[1].foffset = j1;
987 vinfos[1].indices[0] = _ij1[0];
988 vinfos[1].indices[1] = _ij1[1];
989 vinfos[1].maxsolutions = _nj1;
990 vinfos[2].jointtype = 1;
991 vinfos[2].foffset = j2;
992 vinfos[2].indices[0] = _ij2[0];
993 vinfos[2].indices[1] = _ij2[1];
994 vinfos[2].maxsolutions = _nj2;
995 vinfos[3].jointtype = 1;
996 vinfos[3].foffset = j3;
997 vinfos[3].fmul = j3mul;
998 vinfos[3].freeind = 0;
999 vinfos[3].maxsolutions = 0;
1000 vinfos[4].jointtype = 1;
1001 vinfos[4].foffset = j4;
1002 vinfos[4].indices[0] = _ij4[0];
1003 vinfos[4].indices[1] = _ij4[1];
1004 vinfos[4].maxsolutions = _nj4;
1005 vinfos[5].jointtype = 1;
1006 vinfos[5].foffset = j5;
1007 vinfos[5].fmul = j5mul;
1008 vinfos[5].freeind = 0;
1009 vinfos[5].maxsolutions = 0;
1010 std::vector<int> vfree(1);
1017 if( bgotonextstatement )
1019 bool bgotonextstatement =
true;
1022 evalcond[0]=((
IKabs(new_r12))+(
IKabs(new_r02)));
1023 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
1025 bgotonextstatement=
false;
1032 IkReal x115=new_r22*new_r22;
1033 IkReal x116=((16.0)*new_r10);
1034 IkReal x117=((16.0)*new_r01);
1035 IkReal x118=((16.0)*new_r22);
1036 IkReal x119=((8.0)*new_r11);
1037 IkReal x120=((8.0)*new_r00);
1038 IkReal x121=(x115*x116);
1039 IkReal x122=(x115*x117);
1040 j3eval[0]=((
IKabs((((new_r11*x118))+(((16.0)*new_r00))+(((-32.0)*new_r00*x115)))))+(
IKabs(((((-1.0)*x121))+x116)))+(
IKabs(((((-1.0)*new_r22*x120))+((x115*x119)))))+(
IKabs(((((-1.0)*x122))+x117)))+(
IKabs(((((-1.0)*x116))+x121)))+(
IKabs(((((-1.0)*x117))+x122)))+(
IKabs((((new_r22*x119))+(((-1.0)*x120)))))+(
IKabs(((((32.0)*new_r11))+(((-1.0)*new_r00*x118))+(((-16.0)*new_r11*x115))))));
1041 if(
IKabs(j3eval[0]) < 0.0000000100000000 )
1047 IkReal op[4+1], zeror[4];
1049 IkReal j3evalpoly[1];
1050 IkReal x123=new_r22*new_r22;
1051 IkReal x124=((16.0)*new_r10);
1052 IkReal x125=(new_r11*new_r22);
1053 IkReal x126=(x123*x124);
1054 IkReal x127=((((-8.0)*new_r00))+(((8.0)*x125)));
1056 op[1]=((((-1.0)*x126))+x124);
1057 op[2]=((((16.0)*x125))+(((16.0)*new_r00))+(((-32.0)*new_r00*x123)));
1058 op[3]=((((-1.0)*x124))+x126);
1060 polyroots4(op,zeror,numroots);
1061 IkReal j3array[4], cj3array[4], sj3array[4], tempj3array[1];
1062 int numsolutions = 0;
1063 for(
int ij3 = 0; ij3 < numroots; ++ij3)
1065 IkReal htj3 = zeror[ij3];
1066 tempj3array[0]=((2.0)*(
atan(htj3)));
1067 for(
int kj3 = 0; kj3 < 1; ++kj3)
1069 j3array[numsolutions] = tempj3array[kj3];
1070 if( j3array[numsolutions] >
IKPI )
1072 j3array[numsolutions]-=
IK2PI;
1074 else if( j3array[numsolutions] < -
IKPI )
1076 j3array[numsolutions]+=
IK2PI;
1078 sj3array[numsolutions] =
IKsin(j3array[numsolutions]);
1079 cj3array[numsolutions] =
IKcos(j3array[numsolutions]);
1083 bool j3valid[4]={
true,
true,
true,
true};
1085 for(
int ij3 = 0; ij3 < numsolutions; ++ij3)
1091 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
1094 IkReal x128=new_r22*new_r22;
1095 IkReal x129=((16.0)*new_r01);
1096 IkReal x130=(new_r00*new_r22);
1097 IkReal x131=((8.0)*x130);
1098 IkReal x132=(new_r11*x128);
1099 IkReal x133=((8.0)*x132);
1100 IkReal x134=(x128*x129);
1101 j3evalpoly[0]=((((htj3*htj3*htj3*htj3)*((x133+(((-1.0)*x131))))))+(((htj3*htj3)*(((((32.0)*new_r11))+(((-16.0)*x130))+(((-16.0)*x132))))))+x133+(((-1.0)*x131))+(((htj3*htj3*htj3)*(((((-1.0)*x129))+x134))))+((htj3*((x129+(((-1.0)*x134)))))));
1102 if(
IKabs(j3evalpoly[0]) > 0.0000001000000000 )
1106 _ij3[0] = ij3; _ij3[1] = -1;
1107 for(
int iij3 = ij3+1; iij3 < numsolutions; ++iij3)
1111 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
1120 IkReal x135=cj3*cj3;
1121 IkReal x136=(cj3*new_r22);
1122 IkReal x137=((-1.0)+(((-1.0)*x135*(new_r22*new_r22)))+x135);
1124 j5eval[1]=((
IKabs((((new_r01*sj3))+(((-1.0)*new_r00*x136)))))+(
IKabs((((new_r01*x136))+((new_r00*sj3))))));
1126 if(
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000 ||
IKabs(j5eval[2]) < 0.0000010000000000 )
1135 if(
IKabs(j5eval[0]) < 0.0000010000000000 )
1143 IkReal x138=new_r22*new_r22;
1144 j5eval[0]=(((cj3*x138))+(((-1.0)*cj3)));
1145 j5eval[1]=((((-1.0)*sj3))+((sj3*x138)));
1146 if(
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000 )
1150 bool bgotonextstatement =
true;
1153 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-1.5707963267949)+j3)))), 6.28318530717959)));
1154 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
1156 bgotonextstatement=
false;
1158 IkReal j5array[1], cj5array[1], sj5array[1];
1159 bool j5valid[1]={
false};
1163 j5array[0]=
IKatan2(((-1.0)*new_r00), ((-1.0)*new_r01));
1164 sj5array[0]=
IKsin(j5array[0]);
1165 cj5array[0]=
IKcos(j5array[0]);
1166 if( j5array[0] >
IKPI )
1170 else if( j5array[0] < -
IKPI )
1171 { j5array[0]+=
IK2PI;
1174 for(
int ij5 = 0; ij5 < 1; ++ij5)
1180 _ij5[0] = ij5; _ij5[1] = -1;
1181 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
1185 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
1188 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
1191 IkReal x139=
IKsin(j5);
1192 IkReal x140=
IKcos(j5);
1194 evalcond[1]=((-1.0)*x139);
1195 evalcond[2]=((((-1.0)*x139))+(((-1.0)*new_r00)));
1196 evalcond[3]=((((-1.0)*x140))+(((-1.0)*new_r01)));
1204 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
1205 vinfos[0].jointtype = 1;
1206 vinfos[0].foffset = j0;
1207 vinfos[0].indices[0] = _ij0[0];
1208 vinfos[0].indices[1] = _ij0[1];
1209 vinfos[0].maxsolutions = _nj0;
1210 vinfos[1].jointtype = 1;
1211 vinfos[1].foffset = j1;
1212 vinfos[1].indices[0] = _ij1[0];
1213 vinfos[1].indices[1] = _ij1[1];
1214 vinfos[1].maxsolutions = _nj1;
1215 vinfos[2].jointtype = 1;
1216 vinfos[2].foffset = j2;
1217 vinfos[2].indices[0] = _ij2[0];
1218 vinfos[2].indices[1] = _ij2[1];
1219 vinfos[2].maxsolutions = _nj2;
1220 vinfos[3].jointtype = 1;
1221 vinfos[3].foffset = j3;
1222 vinfos[3].indices[0] = _ij3[0];
1223 vinfos[3].indices[1] = _ij3[1];
1224 vinfos[3].maxsolutions = _nj3;
1225 vinfos[4].jointtype = 1;
1226 vinfos[4].foffset = j4;
1227 vinfos[4].indices[0] = _ij4[0];
1228 vinfos[4].indices[1] = _ij4[1];
1229 vinfos[4].maxsolutions = _nj4;
1230 vinfos[5].jointtype = 1;
1231 vinfos[5].foffset = j5;
1232 vinfos[5].indices[0] = _ij5[0];
1233 vinfos[5].indices[1] = _ij5[1];
1234 vinfos[5].maxsolutions = _nj5;
1235 std::vector<int> vfree(0);
1243 if( bgotonextstatement )
1245 bool bgotonextstatement =
true;
1248 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((1.5707963267949)+j3)))), 6.28318530717959)));
1249 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
1251 bgotonextstatement=
false;
1253 IkReal j5array[1], cj5array[1], sj5array[1];
1254 bool j5valid[1]={
false};
1258 j5array[0]=
IKatan2(new_r00, new_r01);
1259 sj5array[0]=
IKsin(j5array[0]);
1260 cj5array[0]=
IKcos(j5array[0]);
1261 if( j5array[0] >
IKPI )
1265 else if( j5array[0] < -
IKPI )
1266 { j5array[0]+=
IK2PI;
1269 for(
int ij5 = 0; ij5 < 1; ++ij5)
1275 _ij5[0] = ij5; _ij5[1] = -1;
1276 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
1280 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
1283 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
1286 IkReal x141=
IKsin(j5);
1287 IkReal x142=
IKcos(j5);
1289 evalcond[1]=((-1.0)*x141);
1290 evalcond[2]=((((-1.0)*x141))+new_r00);
1291 evalcond[3]=((((-1.0)*x142))+new_r01);
1299 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
1300 vinfos[0].jointtype = 1;
1301 vinfos[0].foffset = j0;
1302 vinfos[0].indices[0] = _ij0[0];
1303 vinfos[0].indices[1] = _ij0[1];
1304 vinfos[0].maxsolutions = _nj0;
1305 vinfos[1].jointtype = 1;
1306 vinfos[1].foffset = j1;
1307 vinfos[1].indices[0] = _ij1[0];
1308 vinfos[1].indices[1] = _ij1[1];
1309 vinfos[1].maxsolutions = _nj1;
1310 vinfos[2].jointtype = 1;
1311 vinfos[2].foffset = j2;
1312 vinfos[2].indices[0] = _ij2[0];
1313 vinfos[2].indices[1] = _ij2[1];
1314 vinfos[2].maxsolutions = _nj2;
1315 vinfos[3].jointtype = 1;
1316 vinfos[3].foffset = j3;
1317 vinfos[3].indices[0] = _ij3[0];
1318 vinfos[3].indices[1] = _ij3[1];
1319 vinfos[3].maxsolutions = _nj3;
1320 vinfos[4].jointtype = 1;
1321 vinfos[4].foffset = j4;
1322 vinfos[4].indices[0] = _ij4[0];
1323 vinfos[4].indices[1] = _ij4[1];
1324 vinfos[4].maxsolutions = _nj4;
1325 vinfos[5].jointtype = 1;
1326 vinfos[5].foffset = j5;
1327 vinfos[5].indices[0] = _ij5[0];
1328 vinfos[5].indices[1] = _ij5[1];
1329 vinfos[5].maxsolutions = _nj5;
1330 std::vector<int> vfree(0);
1338 if( bgotonextstatement )
1340 bool bgotonextstatement =
true;
1343 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(j3))), 6.28318530717959)));
1344 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
1346 bgotonextstatement=
false;
1348 IkReal j5array[1], cj5array[1], sj5array[1];
1349 bool j5valid[1]={
false};
1353 j5array[0]=
IKatan2(new_r10, new_r11);
1354 sj5array[0]=
IKsin(j5array[0]);
1355 cj5array[0]=
IKcos(j5array[0]);
1356 if( j5array[0] >
IKPI )
1360 else if( j5array[0] < -
IKPI )
1361 { j5array[0]+=
IK2PI;
1364 for(
int ij5 = 0; ij5 < 1; ++ij5)
1370 _ij5[0] = ij5; _ij5[1] = -1;
1371 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
1375 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
1378 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
1381 IkReal x143=
IKsin(j5);
1382 IkReal x144=
IKcos(j5);
1384 evalcond[1]=((-1.0)*x143);
1385 evalcond[2]=((((-1.0)*x143))+new_r10);
1386 evalcond[3]=((((-1.0)*x144))+new_r11);
1394 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
1395 vinfos[0].jointtype = 1;
1396 vinfos[0].foffset = j0;
1397 vinfos[0].indices[0] = _ij0[0];
1398 vinfos[0].indices[1] = _ij0[1];
1399 vinfos[0].maxsolutions = _nj0;
1400 vinfos[1].jointtype = 1;
1401 vinfos[1].foffset = j1;
1402 vinfos[1].indices[0] = _ij1[0];
1403 vinfos[1].indices[1] = _ij1[1];
1404 vinfos[1].maxsolutions = _nj1;
1405 vinfos[2].jointtype = 1;
1406 vinfos[2].foffset = j2;
1407 vinfos[2].indices[0] = _ij2[0];
1408 vinfos[2].indices[1] = _ij2[1];
1409 vinfos[2].maxsolutions = _nj2;
1410 vinfos[3].jointtype = 1;
1411 vinfos[3].foffset = j3;
1412 vinfos[3].indices[0] = _ij3[0];
1413 vinfos[3].indices[1] = _ij3[1];
1414 vinfos[3].maxsolutions = _nj3;
1415 vinfos[4].jointtype = 1;
1416 vinfos[4].foffset = j4;
1417 vinfos[4].indices[0] = _ij4[0];
1418 vinfos[4].indices[1] = _ij4[1];
1419 vinfos[4].maxsolutions = _nj4;
1420 vinfos[5].jointtype = 1;
1421 vinfos[5].foffset = j5;
1422 vinfos[5].indices[0] = _ij5[0];
1423 vinfos[5].indices[1] = _ij5[1];
1424 vinfos[5].maxsolutions = _nj5;
1425 std::vector<int> vfree(0);
1433 if( bgotonextstatement )
1435 bool bgotonextstatement =
true;
1438 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-3.14159265358979)+j3)))), 6.28318530717959)));
1439 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
1441 bgotonextstatement=
false;
1443 IkReal j5array[1], cj5array[1], sj5array[1];
1444 bool j5valid[1]={
false};
1448 j5array[0]=
IKatan2(((-1.0)*new_r10), ((-1.0)*new_r11));
1449 sj5array[0]=
IKsin(j5array[0]);
1450 cj5array[0]=
IKcos(j5array[0]);
1451 if( j5array[0] >
IKPI )
1455 else if( j5array[0] < -
IKPI )
1456 { j5array[0]+=
IK2PI;
1459 for(
int ij5 = 0; ij5 < 1; ++ij5)
1465 _ij5[0] = ij5; _ij5[1] = -1;
1466 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
1470 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
1473 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
1476 IkReal x145=
IKsin(j5);
1477 IkReal x146=
IKcos(j5);
1479 evalcond[1]=((-1.0)*x145);
1480 evalcond[2]=((((-1.0)*x145))+(((-1.0)*new_r10)));
1481 evalcond[3]=((((-1.0)*x146))+(((-1.0)*new_r11)));
1489 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
1490 vinfos[0].jointtype = 1;
1491 vinfos[0].foffset = j0;
1492 vinfos[0].indices[0] = _ij0[0];
1493 vinfos[0].indices[1] = _ij0[1];
1494 vinfos[0].maxsolutions = _nj0;
1495 vinfos[1].jointtype = 1;
1496 vinfos[1].foffset = j1;
1497 vinfos[1].indices[0] = _ij1[0];
1498 vinfos[1].indices[1] = _ij1[1];
1499 vinfos[1].maxsolutions = _nj1;
1500 vinfos[2].jointtype = 1;
1501 vinfos[2].foffset = j2;
1502 vinfos[2].indices[0] = _ij2[0];
1503 vinfos[2].indices[1] = _ij2[1];
1504 vinfos[2].maxsolutions = _nj2;
1505 vinfos[3].jointtype = 1;
1506 vinfos[3].foffset = j3;
1507 vinfos[3].indices[0] = _ij3[0];
1508 vinfos[3].indices[1] = _ij3[1];
1509 vinfos[3].maxsolutions = _nj3;
1510 vinfos[4].jointtype = 1;
1511 vinfos[4].foffset = j4;
1512 vinfos[4].indices[0] = _ij4[0];
1513 vinfos[4].indices[1] = _ij4[1];
1514 vinfos[4].maxsolutions = _nj4;
1515 vinfos[5].jointtype = 1;
1516 vinfos[5].foffset = j5;
1517 vinfos[5].indices[0] = _ij5[0];
1518 vinfos[5].indices[1] = _ij5[1];
1519 vinfos[5].maxsolutions = _nj5;
1520 std::vector<int> vfree(0);
1528 if( bgotonextstatement )
1530 bool bgotonextstatement =
true;
1537 if((x147.
value) < -0.00001)
1540 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-1.0)+(
IKsign(sj3)))))+(
IKabs((cj3+(((-1.0)*gconst6)))))), 6.28318530717959)));
1541 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
1543 bgotonextstatement=
false;
1550 if((((1.0)+(((-1.0)*(gconst6*gconst6))))) < -0.00001)
1552 sj3=
IKsqrt(((1.0)+(((-1.0)*(gconst6*gconst6)))));
1561 if((x148.
value) < -0.00001)
1564 j5eval[0]=((
IKabs(new_r11))+(
IKabs(new_r10)));
1565 if(
IKabs(j5eval[0]) < 0.0000010000000000 )
1568 IkReal j5array[1], cj5array[1], sj5array[1];
1569 bool j5valid[1]={
false};
1571 if((((1.0)+(((-1.0)*(gconst6*gconst6))))) < -0.00001)
1579 j5array[0]=
IKatan2((((gconst6*new_r10))+(((-1.0)*new_r00*(
IKsqrt(((1.0)+(((-1.0)*(gconst6*gconst6))))))))), (new_r11*(x149.
value)));
1580 sj5array[0]=
IKsin(j5array[0]);
1581 cj5array[0]=
IKcos(j5array[0]);
1582 if( j5array[0] >
IKPI )
1586 else if( j5array[0] < -
IKPI )
1587 { j5array[0]+=
IK2PI;
1590 for(
int ij5 = 0; ij5 < 1; ++ij5)
1596 _ij5[0] = ij5; _ij5[1] = -1;
1597 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
1601 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
1604 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
1607 IkReal x150=
IKcos(j5);
1608 IkReal x151=
IKsin(j5);
1609 IkReal x152=((1.0)*x151);
1610 IkReal x153=((1.0)*x150);
1611 if((((1.0)+(((-1.0)*(gconst6*gconst6))))) < -0.00001)
1613 IkReal x154=
IKsqrt(((1.0)+(((-1.0)*(gconst6*gconst6)))));
1614 IkReal x155=((1.0)*x154);
1616 evalcond[1]=((-1.0)*x151);
1617 evalcond[2]=((((-1.0)*gconst6*x153))+new_r11);
1618 evalcond[3]=((((-1.0)*gconst6*x152))+new_r10);
1619 evalcond[4]=(((x150*x154))+new_r01);
1620 evalcond[5]=(((x151*x154))+new_r00);
1621 evalcond[6]=((((-1.0)*x152))+((gconst6*new_r10))+(((-1.0)*new_r00*x155)));
1622 evalcond[7]=((((-1.0)*x153))+((gconst6*new_r11))+(((-1.0)*new_r01*x155)));
1630 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
1631 vinfos[0].jointtype = 1;
1632 vinfos[0].foffset = j0;
1633 vinfos[0].indices[0] = _ij0[0];
1634 vinfos[0].indices[1] = _ij0[1];
1635 vinfos[0].maxsolutions = _nj0;
1636 vinfos[1].jointtype = 1;
1637 vinfos[1].foffset = j1;
1638 vinfos[1].indices[0] = _ij1[0];
1639 vinfos[1].indices[1] = _ij1[1];
1640 vinfos[1].maxsolutions = _nj1;
1641 vinfos[2].jointtype = 1;
1642 vinfos[2].foffset = j2;
1643 vinfos[2].indices[0] = _ij2[0];
1644 vinfos[2].indices[1] = _ij2[1];
1645 vinfos[2].maxsolutions = _nj2;
1646 vinfos[3].jointtype = 1;
1647 vinfos[3].foffset = j3;
1648 vinfos[3].indices[0] = _ij3[0];
1649 vinfos[3].indices[1] = _ij3[1];
1650 vinfos[3].maxsolutions = _nj3;
1651 vinfos[4].jointtype = 1;
1652 vinfos[4].foffset = j4;
1653 vinfos[4].indices[0] = _ij4[0];
1654 vinfos[4].indices[1] = _ij4[1];
1655 vinfos[4].maxsolutions = _nj4;
1656 vinfos[5].jointtype = 1;
1657 vinfos[5].foffset = j5;
1658 vinfos[5].indices[0] = _ij5[0];
1659 vinfos[5].indices[1] = _ij5[1];
1660 vinfos[5].maxsolutions = _nj5;
1661 std::vector<int> vfree(0);
1670 IkReal j5array[1], cj5array[1], sj5array[1];
1671 bool j5valid[1]={
false};
1681 j5array[0]=((-1.5707963267949)+(x156.
value)+(((1.5707963267949)*(x157.
value))));
1682 sj5array[0]=
IKsin(j5array[0]);
1683 cj5array[0]=
IKcos(j5array[0]);
1684 if( j5array[0] >
IKPI )
1688 else if( j5array[0] < -
IKPI )
1689 { j5array[0]+=
IK2PI;
1692 for(
int ij5 = 0; ij5 < 1; ++ij5)
1698 _ij5[0] = ij5; _ij5[1] = -1;
1699 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
1703 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
1706 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
1709 IkReal x158=
IKcos(j5);
1710 IkReal x159=
IKsin(j5);
1711 IkReal x160=((1.0)*x159);
1712 IkReal x161=((1.0)*x158);
1713 if((((1.0)+(((-1.0)*(gconst6*gconst6))))) < -0.00001)
1715 IkReal x162=
IKsqrt(((1.0)+(((-1.0)*(gconst6*gconst6)))));
1716 IkReal x163=((1.0)*x162);
1718 evalcond[1]=((-1.0)*x159);
1719 evalcond[2]=((((-1.0)*gconst6*x161))+new_r11);
1720 evalcond[3]=((((-1.0)*gconst6*x160))+new_r10);
1721 evalcond[4]=(new_r01+((x158*x162)));
1722 evalcond[5]=(new_r00+((x159*x162)));
1723 evalcond[6]=((((-1.0)*new_r00*x163))+(((-1.0)*x160))+((gconst6*new_r10)));
1724 evalcond[7]=((((-1.0)*x161))+((gconst6*new_r11))+(((-1.0)*new_r01*x163)));
1732 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
1733 vinfos[0].jointtype = 1;
1734 vinfos[0].foffset = j0;
1735 vinfos[0].indices[0] = _ij0[0];
1736 vinfos[0].indices[1] = _ij0[1];
1737 vinfos[0].maxsolutions = _nj0;
1738 vinfos[1].jointtype = 1;
1739 vinfos[1].foffset = j1;
1740 vinfos[1].indices[0] = _ij1[0];
1741 vinfos[1].indices[1] = _ij1[1];
1742 vinfos[1].maxsolutions = _nj1;
1743 vinfos[2].jointtype = 1;
1744 vinfos[2].foffset = j2;
1745 vinfos[2].indices[0] = _ij2[0];
1746 vinfos[2].indices[1] = _ij2[1];
1747 vinfos[2].maxsolutions = _nj2;
1748 vinfos[3].jointtype = 1;
1749 vinfos[3].foffset = j3;
1750 vinfos[3].indices[0] = _ij3[0];
1751 vinfos[3].indices[1] = _ij3[1];
1752 vinfos[3].maxsolutions = _nj3;
1753 vinfos[4].jointtype = 1;
1754 vinfos[4].foffset = j4;
1755 vinfos[4].indices[0] = _ij4[0];
1756 vinfos[4].indices[1] = _ij4[1];
1757 vinfos[4].maxsolutions = _nj4;
1758 vinfos[5].jointtype = 1;
1759 vinfos[5].foffset = j5;
1760 vinfos[5].indices[0] = _ij5[0];
1761 vinfos[5].indices[1] = _ij5[1];
1762 vinfos[5].maxsolutions = _nj5;
1763 std::vector<int> vfree(0);
1775 if( bgotonextstatement )
1777 bool bgotonextstatement =
true;
1784 if((x164.
value) < -0.00001)
1787 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs((cj3+(((-1.0)*gconst6)))))+(
IKabs(((1.0)+(
IKsign(sj3)))))), 6.28318530717959)));
1788 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
1790 bgotonextstatement=
false;
1797 if((((1.0)+(((-1.0)*(gconst6*gconst6))))) < -0.00001)
1799 sj3=((-1.0)*(
IKsqrt(((1.0)+(((-1.0)*(gconst6*gconst6)))))));
1803 j3=((-1.0)*(
IKacos(gconst6)));
1808 if((x165.
value) < -0.00001)
1811 j5eval[0]=((
IKabs(new_r11))+(
IKabs(new_r10)));
1812 if(
IKabs(j5eval[0]) < 0.0000010000000000 )
1815 IkReal j5array[1], cj5array[1], sj5array[1];
1816 bool j5valid[1]={
false};
1818 if((((1.0)+(((-1.0)*(gconst6*gconst6))))) < -0.00001)
1826 j5array[0]=
IKatan2((((new_r00*(
IKsqrt(((1.0)+(((-1.0)*(gconst6*gconst6))))))))+((gconst6*new_r10))), (new_r11*(x166.
value)));
1827 sj5array[0]=
IKsin(j5array[0]);
1828 cj5array[0]=
IKcos(j5array[0]);
1829 if( j5array[0] >
IKPI )
1833 else if( j5array[0] < -
IKPI )
1834 { j5array[0]+=
IK2PI;
1837 for(
int ij5 = 0; ij5 < 1; ++ij5)
1843 _ij5[0] = ij5; _ij5[1] = -1;
1844 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
1848 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
1851 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
1854 IkReal x167=
IKcos(j5);
1855 IkReal x168=
IKsin(j5);
1856 IkReal x169=((1.0)*x167);
1857 IkReal x170=((1.0)*x168);
1858 if((((1.0)+(((-1.0)*(gconst6*gconst6))))) < -0.00001)
1860 IkReal x171=
IKsqrt(((1.0)+(((-1.0)*(gconst6*gconst6)))));
1861 IkReal x172=((1.0)*x171);
1863 evalcond[1]=((-1.0)*x168);
1864 evalcond[2]=((((-1.0)*gconst6*x169))+new_r11);
1865 evalcond[3]=((((-1.0)*gconst6*x170))+new_r10);
1866 evalcond[4]=(new_r01+(((-1.0)*x169*x171)));
1867 evalcond[5]=((((-1.0)*x170*x171))+new_r00);
1868 evalcond[6]=(((new_r00*x171))+(((-1.0)*x170))+((gconst6*new_r10)));
1869 evalcond[7]=(((new_r01*x171))+(((-1.0)*x169))+((gconst6*new_r11)));
1877 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
1878 vinfos[0].jointtype = 1;
1879 vinfos[0].foffset = j0;
1880 vinfos[0].indices[0] = _ij0[0];
1881 vinfos[0].indices[1] = _ij0[1];
1882 vinfos[0].maxsolutions = _nj0;
1883 vinfos[1].jointtype = 1;
1884 vinfos[1].foffset = j1;
1885 vinfos[1].indices[0] = _ij1[0];
1886 vinfos[1].indices[1] = _ij1[1];
1887 vinfos[1].maxsolutions = _nj1;
1888 vinfos[2].jointtype = 1;
1889 vinfos[2].foffset = j2;
1890 vinfos[2].indices[0] = _ij2[0];
1891 vinfos[2].indices[1] = _ij2[1];
1892 vinfos[2].maxsolutions = _nj2;
1893 vinfos[3].jointtype = 1;
1894 vinfos[3].foffset = j3;
1895 vinfos[3].indices[0] = _ij3[0];
1896 vinfos[3].indices[1] = _ij3[1];
1897 vinfos[3].maxsolutions = _nj3;
1898 vinfos[4].jointtype = 1;
1899 vinfos[4].foffset = j4;
1900 vinfos[4].indices[0] = _ij4[0];
1901 vinfos[4].indices[1] = _ij4[1];
1902 vinfos[4].maxsolutions = _nj4;
1903 vinfos[5].jointtype = 1;
1904 vinfos[5].foffset = j5;
1905 vinfos[5].indices[0] = _ij5[0];
1906 vinfos[5].indices[1] = _ij5[1];
1907 vinfos[5].maxsolutions = _nj5;
1908 std::vector<int> vfree(0);
1917 IkReal j5array[1], cj5array[1], sj5array[1];
1918 bool j5valid[1]={
false};
1928 j5array[0]=((-1.5707963267949)+(x173.
value)+(((1.5707963267949)*(x174.
value))));
1929 sj5array[0]=
IKsin(j5array[0]);
1930 cj5array[0]=
IKcos(j5array[0]);
1931 if( j5array[0] >
IKPI )
1935 else if( j5array[0] < -
IKPI )
1936 { j5array[0]+=
IK2PI;
1939 for(
int ij5 = 0; ij5 < 1; ++ij5)
1945 _ij5[0] = ij5; _ij5[1] = -1;
1946 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
1950 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
1953 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
1956 IkReal x175=
IKcos(j5);
1957 IkReal x176=
IKsin(j5);
1958 IkReal x177=((1.0)*x175);
1959 IkReal x178=((1.0)*x176);
1960 if((((1.0)+(((-1.0)*(gconst6*gconst6))))) < -0.00001)
1962 IkReal x179=
IKsqrt(((1.0)+(((-1.0)*(gconst6*gconst6)))));
1963 IkReal x180=((1.0)*x179);
1965 evalcond[1]=((-1.0)*x176);
1966 evalcond[2]=((((-1.0)*gconst6*x177))+new_r11);
1967 evalcond[3]=((((-1.0)*gconst6*x178))+new_r10);
1968 evalcond[4]=((((-1.0)*x177*x179))+new_r01);
1969 evalcond[5]=((((-1.0)*x178*x179))+new_r00);
1970 evalcond[6]=(((new_r00*x179))+(((-1.0)*x178))+((gconst6*new_r10)));
1971 evalcond[7]=(((new_r01*x179))+(((-1.0)*x177))+((gconst6*new_r11)));
1979 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
1980 vinfos[0].jointtype = 1;
1981 vinfos[0].foffset = j0;
1982 vinfos[0].indices[0] = _ij0[0];
1983 vinfos[0].indices[1] = _ij0[1];
1984 vinfos[0].maxsolutions = _nj0;
1985 vinfos[1].jointtype = 1;
1986 vinfos[1].foffset = j1;
1987 vinfos[1].indices[0] = _ij1[0];
1988 vinfos[1].indices[1] = _ij1[1];
1989 vinfos[1].maxsolutions = _nj1;
1990 vinfos[2].jointtype = 1;
1991 vinfos[2].foffset = j2;
1992 vinfos[2].indices[0] = _ij2[0];
1993 vinfos[2].indices[1] = _ij2[1];
1994 vinfos[2].maxsolutions = _nj2;
1995 vinfos[3].jointtype = 1;
1996 vinfos[3].foffset = j3;
1997 vinfos[3].indices[0] = _ij3[0];
1998 vinfos[3].indices[1] = _ij3[1];
1999 vinfos[3].maxsolutions = _nj3;
2000 vinfos[4].jointtype = 1;
2001 vinfos[4].foffset = j4;
2002 vinfos[4].indices[0] = _ij4[0];
2003 vinfos[4].indices[1] = _ij4[1];
2004 vinfos[4].maxsolutions = _nj4;
2005 vinfos[5].jointtype = 1;
2006 vinfos[5].foffset = j5;
2007 vinfos[5].indices[0] = _ij5[0];
2008 vinfos[5].indices[1] = _ij5[1];
2009 vinfos[5].maxsolutions = _nj5;
2010 std::vector<int> vfree(0);
2022 if( bgotonextstatement )
2024 bool bgotonextstatement =
true;
2031 if((x181.
value) < -0.00001)
2034 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-1.0)+(
IKsign(sj3)))))+(
IKabs((cj3+(((-1.0)*gconst7)))))), 6.28318530717959)));
2035 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
2037 bgotonextstatement=
false;
2044 if((((1.0)+(((-1.0)*(gconst7*gconst7))))) < -0.00001)
2046 sj3=
IKsqrt(((1.0)+(((-1.0)*(gconst7*gconst7)))));
2055 if((x182.
value) < -0.00001)
2058 j5eval[0]=((
IKabs(new_r11))+(
IKabs(new_r10)));
2059 if(
IKabs(j5eval[0]) < 0.0000010000000000 )
2062 IkReal j5array[1], cj5array[1], sj5array[1];
2063 bool j5valid[1]={
false};
2065 if((((1.0)+(((-1.0)*(gconst7*gconst7))))) < -0.00001)
2073 j5array[0]=
IKatan2(((((-1.0)*new_r00*(
IKsqrt(((1.0)+(((-1.0)*(gconst7*gconst7))))))))+((gconst7*new_r10))), (new_r11*(x183.
value)));
2074 sj5array[0]=
IKsin(j5array[0]);
2075 cj5array[0]=
IKcos(j5array[0]);
2076 if( j5array[0] >
IKPI )
2080 else if( j5array[0] < -
IKPI )
2081 { j5array[0]+=
IK2PI;
2084 for(
int ij5 = 0; ij5 < 1; ++ij5)
2090 _ij5[0] = ij5; _ij5[1] = -1;
2091 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
2095 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
2098 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
2101 IkReal x184=
IKcos(j5);
2102 IkReal x185=
IKsin(j5);
2103 IkReal x186=((1.0)*x185);
2104 IkReal x187=((1.0)*x184);
2105 if((((1.0)+(((-1.0)*(gconst7*gconst7))))) < -0.00001)
2107 IkReal x188=
IKsqrt(((1.0)+(((-1.0)*(gconst7*gconst7)))));
2108 IkReal x189=((1.0)*x188);
2110 evalcond[1]=((-1.0)*x185);
2111 evalcond[2]=(new_r11+(((-1.0)*gconst7*x187)));
2112 evalcond[3]=(new_r10+(((-1.0)*gconst7*x186)));
2113 evalcond[4]=(((x184*x188))+new_r01);
2114 evalcond[5]=(((x185*x188))+new_r00);
2115 evalcond[6]=((((-1.0)*x186))+(((-1.0)*new_r00*x189))+((gconst7*new_r10)));
2116 evalcond[7]=((((-1.0)*x187))+(((-1.0)*new_r01*x189))+((gconst7*new_r11)));
2124 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
2125 vinfos[0].jointtype = 1;
2126 vinfos[0].foffset = j0;
2127 vinfos[0].indices[0] = _ij0[0];
2128 vinfos[0].indices[1] = _ij0[1];
2129 vinfos[0].maxsolutions = _nj0;
2130 vinfos[1].jointtype = 1;
2131 vinfos[1].foffset = j1;
2132 vinfos[1].indices[0] = _ij1[0];
2133 vinfos[1].indices[1] = _ij1[1];
2134 vinfos[1].maxsolutions = _nj1;
2135 vinfos[2].jointtype = 1;
2136 vinfos[2].foffset = j2;
2137 vinfos[2].indices[0] = _ij2[0];
2138 vinfos[2].indices[1] = _ij2[1];
2139 vinfos[2].maxsolutions = _nj2;
2140 vinfos[3].jointtype = 1;
2141 vinfos[3].foffset = j3;
2142 vinfos[3].indices[0] = _ij3[0];
2143 vinfos[3].indices[1] = _ij3[1];
2144 vinfos[3].maxsolutions = _nj3;
2145 vinfos[4].jointtype = 1;
2146 vinfos[4].foffset = j4;
2147 vinfos[4].indices[0] = _ij4[0];
2148 vinfos[4].indices[1] = _ij4[1];
2149 vinfos[4].maxsolutions = _nj4;
2150 vinfos[5].jointtype = 1;
2151 vinfos[5].foffset = j5;
2152 vinfos[5].indices[0] = _ij5[0];
2153 vinfos[5].indices[1] = _ij5[1];
2154 vinfos[5].maxsolutions = _nj5;
2155 std::vector<int> vfree(0);
2164 IkReal j5array[1], cj5array[1], sj5array[1];
2165 bool j5valid[1]={
false};
2175 j5array[0]=((-1.5707963267949)+(((1.5707963267949)*(x190.
value)))+(x191.
value));
2176 sj5array[0]=
IKsin(j5array[0]);
2177 cj5array[0]=
IKcos(j5array[0]);
2178 if( j5array[0] >
IKPI )
2182 else if( j5array[0] < -
IKPI )
2183 { j5array[0]+=
IK2PI;
2186 for(
int ij5 = 0; ij5 < 1; ++ij5)
2192 _ij5[0] = ij5; _ij5[1] = -1;
2193 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
2197 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
2200 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
2203 IkReal x192=
IKcos(j5);
2204 IkReal x193=
IKsin(j5);
2205 IkReal x194=((1.0)*x193);
2206 IkReal x195=((1.0)*x192);
2207 if((((1.0)+(((-1.0)*(gconst7*gconst7))))) < -0.00001)
2209 IkReal x196=
IKsqrt(((1.0)+(((-1.0)*(gconst7*gconst7)))));
2210 IkReal x197=((1.0)*x196);
2212 evalcond[1]=((-1.0)*x193);
2213 evalcond[2]=(new_r11+(((-1.0)*gconst7*x195)));
2214 evalcond[3]=(new_r10+(((-1.0)*gconst7*x194)));
2215 evalcond[4]=(((x192*x196))+new_r01);
2216 evalcond[5]=(((x193*x196))+new_r00);
2217 evalcond[6]=((((-1.0)*x194))+(((-1.0)*new_r00*x197))+((gconst7*new_r10)));
2218 evalcond[7]=((((-1.0)*x195))+(((-1.0)*new_r01*x197))+((gconst7*new_r11)));
2226 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
2227 vinfos[0].jointtype = 1;
2228 vinfos[0].foffset = j0;
2229 vinfos[0].indices[0] = _ij0[0];
2230 vinfos[0].indices[1] = _ij0[1];
2231 vinfos[0].maxsolutions = _nj0;
2232 vinfos[1].jointtype = 1;
2233 vinfos[1].foffset = j1;
2234 vinfos[1].indices[0] = _ij1[0];
2235 vinfos[1].indices[1] = _ij1[1];
2236 vinfos[1].maxsolutions = _nj1;
2237 vinfos[2].jointtype = 1;
2238 vinfos[2].foffset = j2;
2239 vinfos[2].indices[0] = _ij2[0];
2240 vinfos[2].indices[1] = _ij2[1];
2241 vinfos[2].maxsolutions = _nj2;
2242 vinfos[3].jointtype = 1;
2243 vinfos[3].foffset = j3;
2244 vinfos[3].indices[0] = _ij3[0];
2245 vinfos[3].indices[1] = _ij3[1];
2246 vinfos[3].maxsolutions = _nj3;
2247 vinfos[4].jointtype = 1;
2248 vinfos[4].foffset = j4;
2249 vinfos[4].indices[0] = _ij4[0];
2250 vinfos[4].indices[1] = _ij4[1];
2251 vinfos[4].maxsolutions = _nj4;
2252 vinfos[5].jointtype = 1;
2253 vinfos[5].foffset = j5;
2254 vinfos[5].indices[0] = _ij5[0];
2255 vinfos[5].indices[1] = _ij5[1];
2256 vinfos[5].maxsolutions = _nj5;
2257 std::vector<int> vfree(0);
2269 if( bgotonextstatement )
2271 bool bgotonextstatement =
true;
2278 if((x198.
value) < -0.00001)
2281 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs((cj3+(((-1.0)*gconst7)))))+(
IKabs(((1.0)+(
IKsign(sj3)))))), 6.28318530717959)));
2282 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
2284 bgotonextstatement=
false;
2291 if((((1.0)+(((-1.0)*(gconst7*gconst7))))) < -0.00001)
2293 sj3=((-1.0)*(
IKsqrt(((1.0)+(((-1.0)*(gconst7*gconst7)))))));
2297 j3=((-1.0)*(
IKacos(gconst7)));
2302 if((x199.
value) < -0.00001)
2305 j5eval[0]=((
IKabs(new_r11))+(
IKabs(new_r10)));
2306 if(
IKabs(j5eval[0]) < 0.0000010000000000 )
2309 IkReal j5array[1], cj5array[1], sj5array[1];
2310 bool j5valid[1]={
false};
2312 if((((1.0)+(((-1.0)*(gconst7*gconst7))))) < -0.00001)
2320 j5array[0]=
IKatan2((((gconst7*new_r10))+((new_r00*(
IKsqrt(((1.0)+(((-1.0)*(gconst7*gconst7))))))))), (new_r11*(x200.
value)));
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];
2348 IkReal x201=
IKcos(j5);
2349 IkReal x202=
IKsin(j5);
2350 IkReal x203=((1.0)*x202);
2351 IkReal x204=((1.0)*x201);
2352 if((((1.0)+(((-1.0)*(gconst7*gconst7))))) < -0.00001)
2354 IkReal x205=
IKsqrt(((1.0)+(((-1.0)*(gconst7*gconst7)))));
2356 evalcond[1]=((-1.0)*x202);
2357 evalcond[2]=(new_r11+(((-1.0)*gconst7*x204)));
2358 evalcond[3]=(new_r10+(((-1.0)*gconst7*x203)));
2359 evalcond[4]=((((-1.0)*x204*x205))+new_r01);
2360 evalcond[5]=((((-1.0)*x203*x205))+new_r00);
2361 evalcond[6]=(((new_r00*x205))+(((-1.0)*x203))+((gconst7*new_r10)));
2362 evalcond[7]=(((new_r01*x205))+(((-1.0)*x204))+((gconst7*new_r11)));
2370 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
2371 vinfos[0].jointtype = 1;
2372 vinfos[0].foffset = j0;
2373 vinfos[0].indices[0] = _ij0[0];
2374 vinfos[0].indices[1] = _ij0[1];
2375 vinfos[0].maxsolutions = _nj0;
2376 vinfos[1].jointtype = 1;
2377 vinfos[1].foffset = j1;
2378 vinfos[1].indices[0] = _ij1[0];
2379 vinfos[1].indices[1] = _ij1[1];
2380 vinfos[1].maxsolutions = _nj1;
2381 vinfos[2].jointtype = 1;
2382 vinfos[2].foffset = j2;
2383 vinfos[2].indices[0] = _ij2[0];
2384 vinfos[2].indices[1] = _ij2[1];
2385 vinfos[2].maxsolutions = _nj2;
2386 vinfos[3].jointtype = 1;
2387 vinfos[3].foffset = j3;
2388 vinfos[3].indices[0] = _ij3[0];
2389 vinfos[3].indices[1] = _ij3[1];
2390 vinfos[3].maxsolutions = _nj3;
2391 vinfos[4].jointtype = 1;
2392 vinfos[4].foffset = j4;
2393 vinfos[4].indices[0] = _ij4[0];
2394 vinfos[4].indices[1] = _ij4[1];
2395 vinfos[4].maxsolutions = _nj4;
2396 vinfos[5].jointtype = 1;
2397 vinfos[5].foffset = j5;
2398 vinfos[5].indices[0] = _ij5[0];
2399 vinfos[5].indices[1] = _ij5[1];
2400 vinfos[5].maxsolutions = _nj5;
2401 std::vector<int> vfree(0);
2410 IkReal j5array[1], cj5array[1], sj5array[1];
2411 bool j5valid[1]={
false};
2421 j5array[0]=((-1.5707963267949)+(((1.5707963267949)*(x206.
value)))+(x207.
value));
2422 sj5array[0]=
IKsin(j5array[0]);
2423 cj5array[0]=
IKcos(j5array[0]);
2424 if( j5array[0] >
IKPI )
2428 else if( j5array[0] < -
IKPI )
2429 { j5array[0]+=
IK2PI;
2432 for(
int ij5 = 0; ij5 < 1; ++ij5)
2438 _ij5[0] = ij5; _ij5[1] = -1;
2439 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
2443 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
2446 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
2449 IkReal x208=
IKcos(j5);
2450 IkReal x209=
IKsin(j5);
2451 IkReal x210=((1.0)*x209);
2452 IkReal x211=((1.0)*x208);
2453 if((((1.0)+(((-1.0)*(gconst7*gconst7))))) < -0.00001)
2455 IkReal x212=
IKsqrt(((1.0)+(((-1.0)*(gconst7*gconst7)))));
2457 evalcond[1]=((-1.0)*x209);
2458 evalcond[2]=((((-1.0)*gconst7*x211))+new_r11);
2459 evalcond[3]=((((-1.0)*gconst7*x210))+new_r10);
2460 evalcond[4]=((((-1.0)*x211*x212))+new_r01);
2461 evalcond[5]=((((-1.0)*x210*x212))+new_r00);
2462 evalcond[6]=(((new_r00*x212))+(((-1.0)*x210))+((gconst7*new_r10)));
2463 evalcond[7]=(((new_r01*x212))+(((-1.0)*x211))+((gconst7*new_r11)));
2471 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
2472 vinfos[0].jointtype = 1;
2473 vinfos[0].foffset = j0;
2474 vinfos[0].indices[0] = _ij0[0];
2475 vinfos[0].indices[1] = _ij0[1];
2476 vinfos[0].maxsolutions = _nj0;
2477 vinfos[1].jointtype = 1;
2478 vinfos[1].foffset = j1;
2479 vinfos[1].indices[0] = _ij1[0];
2480 vinfos[1].indices[1] = _ij1[1];
2481 vinfos[1].maxsolutions = _nj1;
2482 vinfos[2].jointtype = 1;
2483 vinfos[2].foffset = j2;
2484 vinfos[2].indices[0] = _ij2[0];
2485 vinfos[2].indices[1] = _ij2[1];
2486 vinfos[2].maxsolutions = _nj2;
2487 vinfos[3].jointtype = 1;
2488 vinfos[3].foffset = j3;
2489 vinfos[3].indices[0] = _ij3[0];
2490 vinfos[3].indices[1] = _ij3[1];
2491 vinfos[3].maxsolutions = _nj3;
2492 vinfos[4].jointtype = 1;
2493 vinfos[4].foffset = j4;
2494 vinfos[4].indices[0] = _ij4[0];
2495 vinfos[4].indices[1] = _ij4[1];
2496 vinfos[4].maxsolutions = _nj4;
2497 vinfos[5].jointtype = 1;
2498 vinfos[5].foffset = j5;
2499 vinfos[5].indices[0] = _ij5[0];
2500 vinfos[5].indices[1] = _ij5[1];
2501 vinfos[5].maxsolutions = _nj5;
2502 std::vector<int> vfree(0);
2514 if( bgotonextstatement )
2516 bool bgotonextstatement =
true;
2521 bgotonextstatement=
false;
2526 if( bgotonextstatement )
2542 IkReal j5array[1], cj5array[1], sj5array[1];
2543 bool j5valid[1]={
false};
2545 IkReal x213=new_r22*new_r22;
2556 j5array[0]=
IKatan2(((x214.
value)*(((((-1.0)*new_r01*new_r22))+(((-1.0)*new_r10))))), ((x215.
value)*((((new_r10*new_r22))+new_r01))));
2557 sj5array[0]=
IKsin(j5array[0]);
2558 cj5array[0]=
IKcos(j5array[0]);
2559 if( j5array[0] >
IKPI )
2563 else if( j5array[0] < -
IKPI )
2564 { j5array[0]+=
IK2PI;
2567 for(
int ij5 = 0; ij5 < 1; ++ij5)
2573 _ij5[0] = ij5; _ij5[1] = -1;
2574 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
2578 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
2581 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
2583 IkReal evalcond[10];
2584 IkReal x216=
IKsin(j5);
2585 IkReal x217=
IKcos(j5);
2586 IkReal x218=((1.0)*sj3);
2587 IkReal x219=((1.0)*x216);
2588 IkReal x220=((1.0)*cj3*new_r22);
2589 IkReal x221=(sj3*x216);
2590 IkReal x222=((1.0)*x217);
2591 IkReal x223=(new_r22*x216);
2592 evalcond[0]=(((new_r11*sj3))+x223+((cj3*new_r01)));
2593 evalcond[1]=(((cj3*new_r10))+(((-1.0)*x219))+(((-1.0)*new_r00*x218)));
2594 evalcond[2]=((((-1.0)*new_r01*x218))+((cj3*new_r11))+(((-1.0)*x222)));
2595 evalcond[3]=(((cj3*x223))+((sj3*x217))+new_r01);
2596 evalcond[4]=(((new_r10*sj3))+((cj3*new_r00))+(((-1.0)*new_r22*x222)));
2597 evalcond[5]=(x221+(((-1.0)*x217*x220))+new_r00);
2598 evalcond[6]=(((new_r22*x221))+(((-1.0)*cj3*x222))+new_r11);
2599 evalcond[7]=(x217+(((-1.0)*new_r00*x220))+(((-1.0)*new_r10*new_r22*x218)));
2600 evalcond[8]=((((-1.0)*cj3*x219))+new_r10+(((-1.0)*new_r22*x217*x218)));
2601 evalcond[9]=((((-1.0)*new_r01*x220))+(((-1.0)*new_r11*new_r22*x218))+(((-1.0)*x219)));
2609 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
2610 vinfos[0].jointtype = 1;
2611 vinfos[0].foffset = j0;
2612 vinfos[0].indices[0] = _ij0[0];
2613 vinfos[0].indices[1] = _ij0[1];
2614 vinfos[0].maxsolutions = _nj0;
2615 vinfos[1].jointtype = 1;
2616 vinfos[1].foffset = j1;
2617 vinfos[1].indices[0] = _ij1[0];
2618 vinfos[1].indices[1] = _ij1[1];
2619 vinfos[1].maxsolutions = _nj1;
2620 vinfos[2].jointtype = 1;
2621 vinfos[2].foffset = j2;
2622 vinfos[2].indices[0] = _ij2[0];
2623 vinfos[2].indices[1] = _ij2[1];
2624 vinfos[2].maxsolutions = _nj2;
2625 vinfos[3].jointtype = 1;
2626 vinfos[3].foffset = j3;
2627 vinfos[3].indices[0] = _ij3[0];
2628 vinfos[3].indices[1] = _ij3[1];
2629 vinfos[3].maxsolutions = _nj3;
2630 vinfos[4].jointtype = 1;
2631 vinfos[4].foffset = j4;
2632 vinfos[4].indices[0] = _ij4[0];
2633 vinfos[4].indices[1] = _ij4[1];
2634 vinfos[4].maxsolutions = _nj4;
2635 vinfos[5].jointtype = 1;
2636 vinfos[5].foffset = j5;
2637 vinfos[5].indices[0] = _ij5[0];
2638 vinfos[5].indices[1] = _ij5[1];
2639 vinfos[5].maxsolutions = _nj5;
2640 std::vector<int> vfree(0);
2653 IkReal j5array[1], cj5array[1], sj5array[1];
2654 bool j5valid[1]={
false};
2656 IkReal x224=((1.0)*new_r01);
2663 j5array[0]=
IKatan2(((x225.
value)*(((((-1.0)*cj3*x224))+(((-1.0)*new_r11*sj3))))), ((((-1.0)*sj3*x224))+((cj3*new_r11))));
2664 sj5array[0]=
IKsin(j5array[0]);
2665 cj5array[0]=
IKcos(j5array[0]);
2666 if( j5array[0] >
IKPI )
2670 else if( j5array[0] < -
IKPI )
2671 { j5array[0]+=
IK2PI;
2674 for(
int ij5 = 0; ij5 < 1; ++ij5)
2680 _ij5[0] = ij5; _ij5[1] = -1;
2681 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
2685 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
2688 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
2690 IkReal evalcond[10];
2691 IkReal x226=
IKsin(j5);
2692 IkReal x227=
IKcos(j5);
2693 IkReal x228=((1.0)*sj3);
2694 IkReal x229=((1.0)*x226);
2695 IkReal x230=((1.0)*cj3*new_r22);
2696 IkReal x231=(sj3*x226);
2697 IkReal x232=((1.0)*x227);
2698 IkReal x233=(new_r22*x226);
2699 evalcond[0]=(((new_r11*sj3))+x233+((cj3*new_r01)));
2700 evalcond[1]=(((cj3*new_r10))+(((-1.0)*x229))+(((-1.0)*new_r00*x228)));
2701 evalcond[2]=((((-1.0)*new_r01*x228))+(((-1.0)*x232))+((cj3*new_r11)));
2702 evalcond[3]=(((cj3*x233))+((sj3*x227))+new_r01);
2703 evalcond[4]=((((-1.0)*new_r22*x232))+((new_r10*sj3))+((cj3*new_r00)));
2704 evalcond[5]=((((-1.0)*x227*x230))+x231+new_r00);
2705 evalcond[6]=(((new_r22*x231))+(((-1.0)*cj3*x232))+new_r11);
2706 evalcond[7]=(x227+(((-1.0)*new_r10*new_r22*x228))+(((-1.0)*new_r00*x230)));
2707 evalcond[8]=((((-1.0)*new_r22*x227*x228))+(((-1.0)*cj3*x229))+new_r10);
2708 evalcond[9]=((((-1.0)*new_r11*new_r22*x228))+(((-1.0)*new_r01*x230))+(((-1.0)*x229)));
2716 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
2717 vinfos[0].jointtype = 1;
2718 vinfos[0].foffset = j0;
2719 vinfos[0].indices[0] = _ij0[0];
2720 vinfos[0].indices[1] = _ij0[1];
2721 vinfos[0].maxsolutions = _nj0;
2722 vinfos[1].jointtype = 1;
2723 vinfos[1].foffset = j1;
2724 vinfos[1].indices[0] = _ij1[0];
2725 vinfos[1].indices[1] = _ij1[1];
2726 vinfos[1].maxsolutions = _nj1;
2727 vinfos[2].jointtype = 1;
2728 vinfos[2].foffset = j2;
2729 vinfos[2].indices[0] = _ij2[0];
2730 vinfos[2].indices[1] = _ij2[1];
2731 vinfos[2].maxsolutions = _nj2;
2732 vinfos[3].jointtype = 1;
2733 vinfos[3].foffset = j3;
2734 vinfos[3].indices[0] = _ij3[0];
2735 vinfos[3].indices[1] = _ij3[1];
2736 vinfos[3].maxsolutions = _nj3;
2737 vinfos[4].jointtype = 1;
2738 vinfos[4].foffset = j4;
2739 vinfos[4].indices[0] = _ij4[0];
2740 vinfos[4].indices[1] = _ij4[1];
2741 vinfos[4].maxsolutions = _nj4;
2742 vinfos[5].jointtype = 1;
2743 vinfos[5].foffset = j5;
2744 vinfos[5].indices[0] = _ij5[0];
2745 vinfos[5].indices[1] = _ij5[1];
2746 vinfos[5].maxsolutions = _nj5;
2747 std::vector<int> vfree(0);
2760 IkReal j5array[1], cj5array[1], sj5array[1];
2761 bool j5valid[1]={
false};
2763 IkReal x234=cj3*cj3;
2764 IkReal x235=(cj3*new_r22);
2773 j5array[0]=((-1.5707963267949)+(x236.
value)+(((1.5707963267949)*(x237.
value))));
2774 sj5array[0]=
IKsin(j5array[0]);
2775 cj5array[0]=
IKcos(j5array[0]);
2776 if( j5array[0] >
IKPI )
2780 else if( j5array[0] < -
IKPI )
2781 { j5array[0]+=
IK2PI;
2784 for(
int ij5 = 0; ij5 < 1; ++ij5)
2790 _ij5[0] = ij5; _ij5[1] = -1;
2791 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
2795 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
2798 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
2800 IkReal evalcond[10];
2801 IkReal x238=
IKsin(j5);
2802 IkReal x239=
IKcos(j5);
2803 IkReal x240=((1.0)*sj3);
2804 IkReal x241=((1.0)*x238);
2805 IkReal x242=((1.0)*cj3*new_r22);
2806 IkReal x243=(sj3*x238);
2807 IkReal x244=((1.0)*x239);
2808 IkReal x245=(new_r22*x238);
2809 evalcond[0]=(((new_r11*sj3))+x245+((cj3*new_r01)));
2810 evalcond[1]=((((-1.0)*new_r00*x240))+((cj3*new_r10))+(((-1.0)*x241)));
2811 evalcond[2]=((((-1.0)*new_r01*x240))+((cj3*new_r11))+(((-1.0)*x244)));
2812 evalcond[3]=(new_r01+((cj3*x245))+((sj3*x239)));
2813 evalcond[4]=(((new_r10*sj3))+(((-1.0)*new_r22*x244))+((cj3*new_r00)));
2814 evalcond[5]=(x243+new_r00+(((-1.0)*x239*x242)));
2815 evalcond[6]=(((new_r22*x243))+(((-1.0)*cj3*x244))+new_r11);
2816 evalcond[7]=((((-1.0)*new_r10*new_r22*x240))+(((-1.0)*new_r00*x242))+x239);
2817 evalcond[8]=((((-1.0)*cj3*x241))+(((-1.0)*new_r22*x239*x240))+new_r10);
2818 evalcond[9]=((((-1.0)*new_r11*new_r22*x240))+(((-1.0)*new_r01*x242))+(((-1.0)*x241)));
2826 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
2827 vinfos[0].jointtype = 1;
2828 vinfos[0].foffset = j0;
2829 vinfos[0].indices[0] = _ij0[0];
2830 vinfos[0].indices[1] = _ij0[1];
2831 vinfos[0].maxsolutions = _nj0;
2832 vinfos[1].jointtype = 1;
2833 vinfos[1].foffset = j1;
2834 vinfos[1].indices[0] = _ij1[0];
2835 vinfos[1].indices[1] = _ij1[1];
2836 vinfos[1].maxsolutions = _nj1;
2837 vinfos[2].jointtype = 1;
2838 vinfos[2].foffset = j2;
2839 vinfos[2].indices[0] = _ij2[0];
2840 vinfos[2].indices[1] = _ij2[1];
2841 vinfos[2].maxsolutions = _nj2;
2842 vinfos[3].jointtype = 1;
2843 vinfos[3].foffset = j3;
2844 vinfos[3].indices[0] = _ij3[0];
2845 vinfos[3].indices[1] = _ij3[1];
2846 vinfos[3].maxsolutions = _nj3;
2847 vinfos[4].jointtype = 1;
2848 vinfos[4].foffset = j4;
2849 vinfos[4].indices[0] = _ij4[0];
2850 vinfos[4].indices[1] = _ij4[1];
2851 vinfos[4].maxsolutions = _nj4;
2852 vinfos[5].jointtype = 1;
2853 vinfos[5].foffset = j5;
2854 vinfos[5].indices[0] = _ij5[0];
2855 vinfos[5].indices[1] = _ij5[1];
2856 vinfos[5].maxsolutions = _nj5;
2857 std::vector<int> vfree(0);
2874 if( bgotonextstatement )
2876 bool bgotonextstatement =
true;
2881 bgotonextstatement=
false;
2886 if( bgotonextstatement )
2897 IkReal j3array[1], cj3array[1], sj3array[1];
2898 bool j3valid[1]={
false};
2904 IkReal x246=x247.
value;
2911 j3array[0]=
IKatan2((x246*(x248.
value)*(((1.0)+(((-1.0)*(cj4*cj4)))+(((-1.0)*(new_r02*new_r02)))))), (new_r02*x246));
2912 sj3array[0]=
IKsin(j3array[0]);
2913 cj3array[0]=
IKcos(j3array[0]);
2914 if( j3array[0] >
IKPI )
2918 else if( j3array[0] < -
IKPI )
2919 { j3array[0]+=
IK2PI;
2922 for(
int ij3 = 0; ij3 < 1; ++ij3)
2928 _ij3[0] = ij3; _ij3[1] = -1;
2929 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
2933 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
2936 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
2939 IkReal x249=
IKcos(j3);
2940 IkReal x250=
IKsin(j3);
2941 IkReal x251=((1.0)*sj4);
2942 IkReal x252=((1.0)*cj4);
2943 IkReal x253=(new_r12*x250);
2944 IkReal x254=(new_r02*x249);
2945 evalcond[0]=((((-1.0)*x249*x251))+new_r02);
2946 evalcond[1]=((((-1.0)*x250*x251))+new_r12);
2947 evalcond[2]=(((new_r12*x249))+(((-1.0)*new_r02*x250)));
2948 evalcond[3]=(x254+x253+(((-1.0)*x251)));
2949 evalcond[4]=((((-1.0)*x252*x254))+(((-1.0)*x252*x253))+((new_r22*sj4)));
2950 evalcond[5]=((((-1.0)*new_r10*x250*x251))+(((-1.0)*new_r00*x249*x251))+(((-1.0)*new_r20*x252)));
2951 evalcond[6]=((((-1.0)*new_r21*x252))+(((-1.0)*new_r01*x249*x251))+(((-1.0)*new_r11*x250*x251)));
2952 evalcond[7]=((1.0)+(((-1.0)*x251*x253))+(((-1.0)*x251*x254))+(((-1.0)*new_r22*x252)));
2963 j5eval[2]=((
IKabs(new_r20))+(
IKabs(new_r21)));
2964 if(
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000 ||
IKabs(j5eval[2]) < 0.0000010000000000 )
2970 if(
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000 )
2977 if(
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000 ||
IKabs(j5eval[2]) < 0.0000010000000000 )
2981 bool bgotonextstatement =
true;
2984 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-1.5707963267949)+j3)))), 6.28318530717959)));
2985 evalcond[1]=new_r02;
2986 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 )
2988 bgotonextstatement=
false;
2996 j5eval[2]=((
IKabs(new_r20))+(
IKabs(new_r21)));
2997 if(
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000 ||
IKabs(j5eval[2]) < 0.0000010000000000 )
3006 j5eval[2]=((
IKabs(new_r11))+(
IKabs(new_r10)));
3007 if(
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000 ||
IKabs(j5eval[2]) < 0.0000010000000000 )
3015 if(
IKabs(j5eval[0]) < 0.0000010000000000 )
3019 bool bgotonextstatement =
true;
3022 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(j4))), 6.28318530717959)));
3023 evalcond[1]=new_r20;
3024 evalcond[2]=new_r12;
3025 evalcond[3]=new_r21;
3026 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 &&
IKabs(evalcond[2]) < 0.0000050000000000 &&
IKabs(evalcond[3]) < 0.0000050000000000 )
3028 bgotonextstatement=
false;
3030 IkReal j5array[1], cj5array[1], sj5array[1];
3031 bool j5valid[1]={
false};
3035 j5array[0]=
IKatan2(((-1.0)*new_r11), new_r10);
3036 sj5array[0]=
IKsin(j5array[0]);
3037 cj5array[0]=
IKcos(j5array[0]);
3038 if( j5array[0] >
IKPI )
3042 else if( j5array[0] < -
IKPI )
3043 { j5array[0]+=
IK2PI;
3046 for(
int ij5 = 0; ij5 < 1; ++ij5)
3052 _ij5[0] = ij5; _ij5[1] = -1;
3053 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
3057 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
3060 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
3063 IkReal x255=
IKsin(j5);
3064 IkReal x256=((1.0)*(
IKcos(j5)));
3065 evalcond[0]=(x255+new_r11);
3066 evalcond[1]=(new_r10+(((-1.0)*x256)));
3067 evalcond[2]=((((-1.0)*new_r00))+(((-1.0)*x255)));
3068 evalcond[3]=((((-1.0)*new_r01))+(((-1.0)*x256)));
3076 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
3077 vinfos[0].jointtype = 1;
3078 vinfos[0].foffset = j0;
3079 vinfos[0].indices[0] = _ij0[0];
3080 vinfos[0].indices[1] = _ij0[1];
3081 vinfos[0].maxsolutions = _nj0;
3082 vinfos[1].jointtype = 1;
3083 vinfos[1].foffset = j1;
3084 vinfos[1].indices[0] = _ij1[0];
3085 vinfos[1].indices[1] = _ij1[1];
3086 vinfos[1].maxsolutions = _nj1;
3087 vinfos[2].jointtype = 1;
3088 vinfos[2].foffset = j2;
3089 vinfos[2].indices[0] = _ij2[0];
3090 vinfos[2].indices[1] = _ij2[1];
3091 vinfos[2].maxsolutions = _nj2;
3092 vinfos[3].jointtype = 1;
3093 vinfos[3].foffset = j3;
3094 vinfos[3].indices[0] = _ij3[0];
3095 vinfos[3].indices[1] = _ij3[1];
3096 vinfos[3].maxsolutions = _nj3;
3097 vinfos[4].jointtype = 1;
3098 vinfos[4].foffset = j4;
3099 vinfos[4].indices[0] = _ij4[0];
3100 vinfos[4].indices[1] = _ij4[1];
3101 vinfos[4].maxsolutions = _nj4;
3102 vinfos[5].jointtype = 1;
3103 vinfos[5].foffset = j5;
3104 vinfos[5].indices[0] = _ij5[0];
3105 vinfos[5].indices[1] = _ij5[1];
3106 vinfos[5].maxsolutions = _nj5;
3107 std::vector<int> vfree(0);
3115 if( bgotonextstatement )
3117 bool bgotonextstatement =
true;
3120 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-3.14159265358979)+j4)))), 6.28318530717959)));
3121 evalcond[1]=new_r20;
3122 evalcond[2]=new_r12;
3123 evalcond[3]=new_r21;
3124 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 &&
IKabs(evalcond[2]) < 0.0000050000000000 &&
IKabs(evalcond[3]) < 0.0000050000000000 )
3126 bgotonextstatement=
false;
3128 IkReal j5array[1], cj5array[1], sj5array[1];
3129 bool j5valid[1]={
false};
3133 j5array[0]=
IKatan2(new_r11, ((-1.0)*new_r10));
3134 sj5array[0]=
IKsin(j5array[0]);
3135 cj5array[0]=
IKcos(j5array[0]);
3136 if( j5array[0] >
IKPI )
3140 else if( j5array[0] < -
IKPI )
3141 { j5array[0]+=
IK2PI;
3144 for(
int ij5 = 0; ij5 < 1; ++ij5)
3150 _ij5[0] = ij5; _ij5[1] = -1;
3151 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
3155 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
3158 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
3161 IkReal x257=
IKcos(j5);
3162 IkReal x258=((1.0)*(
IKsin(j5)));
3163 evalcond[0]=(x257+new_r10);
3164 evalcond[1]=(new_r11+(((-1.0)*x258)));
3165 evalcond[2]=((((-1.0)*new_r00))+(((-1.0)*x258)));
3166 evalcond[3]=((((-1.0)*new_r01))+(((-1.0)*x257)));
3174 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
3175 vinfos[0].jointtype = 1;
3176 vinfos[0].foffset = j0;
3177 vinfos[0].indices[0] = _ij0[0];
3178 vinfos[0].indices[1] = _ij0[1];
3179 vinfos[0].maxsolutions = _nj0;
3180 vinfos[1].jointtype = 1;
3181 vinfos[1].foffset = j1;
3182 vinfos[1].indices[0] = _ij1[0];
3183 vinfos[1].indices[1] = _ij1[1];
3184 vinfos[1].maxsolutions = _nj1;
3185 vinfos[2].jointtype = 1;
3186 vinfos[2].foffset = j2;
3187 vinfos[2].indices[0] = _ij2[0];
3188 vinfos[2].indices[1] = _ij2[1];
3189 vinfos[2].maxsolutions = _nj2;
3190 vinfos[3].jointtype = 1;
3191 vinfos[3].foffset = j3;
3192 vinfos[3].indices[0] = _ij3[0];
3193 vinfos[3].indices[1] = _ij3[1];
3194 vinfos[3].maxsolutions = _nj3;
3195 vinfos[4].jointtype = 1;
3196 vinfos[4].foffset = j4;
3197 vinfos[4].indices[0] = _ij4[0];
3198 vinfos[4].indices[1] = _ij4[1];
3199 vinfos[4].maxsolutions = _nj4;
3200 vinfos[5].jointtype = 1;
3201 vinfos[5].foffset = j5;
3202 vinfos[5].indices[0] = _ij5[0];
3203 vinfos[5].indices[1] = _ij5[1];
3204 vinfos[5].maxsolutions = _nj5;
3205 std::vector<int> vfree(0);
3213 if( bgotonextstatement )
3215 bool bgotonextstatement =
true;
3218 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-1.5707963267949)+j4)))), 6.28318530717959)));
3219 evalcond[1]=new_r22;
3220 evalcond[2]=new_r11;
3221 evalcond[3]=new_r10;
3222 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 &&
IKabs(evalcond[2]) < 0.0000050000000000 &&
IKabs(evalcond[3]) < 0.0000050000000000 )
3224 bgotonextstatement=
false;
3226 IkReal j5array[1], cj5array[1], sj5array[1];
3227 bool j5valid[1]={
false};
3231 j5array[0]=
IKatan2(new_r21, ((-1.0)*new_r20));
3232 sj5array[0]=
IKsin(j5array[0]);
3233 cj5array[0]=
IKcos(j5array[0]);
3234 if( j5array[0] >
IKPI )
3238 else if( j5array[0] < -
IKPI )
3239 { j5array[0]+=
IK2PI;
3242 for(
int ij5 = 0; ij5 < 1; ++ij5)
3248 _ij5[0] = ij5; _ij5[1] = -1;
3249 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
3253 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
3256 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
3259 IkReal x259=
IKcos(j5);
3260 IkReal x260=((1.0)*(
IKsin(j5)));
3261 evalcond[0]=(x259+new_r20);
3262 evalcond[1]=(new_r21+(((-1.0)*x260)));
3263 evalcond[2]=((((-1.0)*new_r00))+(((-1.0)*x260)));
3264 evalcond[3]=((((-1.0)*new_r01))+(((-1.0)*x259)));
3272 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
3273 vinfos[0].jointtype = 1;
3274 vinfos[0].foffset = j0;
3275 vinfos[0].indices[0] = _ij0[0];
3276 vinfos[0].indices[1] = _ij0[1];
3277 vinfos[0].maxsolutions = _nj0;
3278 vinfos[1].jointtype = 1;
3279 vinfos[1].foffset = j1;
3280 vinfos[1].indices[0] = _ij1[0];
3281 vinfos[1].indices[1] = _ij1[1];
3282 vinfos[1].maxsolutions = _nj1;
3283 vinfos[2].jointtype = 1;
3284 vinfos[2].foffset = j2;
3285 vinfos[2].indices[0] = _ij2[0];
3286 vinfos[2].indices[1] = _ij2[1];
3287 vinfos[2].maxsolutions = _nj2;
3288 vinfos[3].jointtype = 1;
3289 vinfos[3].foffset = j3;
3290 vinfos[3].indices[0] = _ij3[0];
3291 vinfos[3].indices[1] = _ij3[1];
3292 vinfos[3].maxsolutions = _nj3;
3293 vinfos[4].jointtype = 1;
3294 vinfos[4].foffset = j4;
3295 vinfos[4].indices[0] = _ij4[0];
3296 vinfos[4].indices[1] = _ij4[1];
3297 vinfos[4].maxsolutions = _nj4;
3298 vinfos[5].jointtype = 1;
3299 vinfos[5].foffset = j5;
3300 vinfos[5].indices[0] = _ij5[0];
3301 vinfos[5].indices[1] = _ij5[1];
3302 vinfos[5].maxsolutions = _nj5;
3303 std::vector<int> vfree(0);
3311 if( bgotonextstatement )
3313 bool bgotonextstatement =
true;
3316 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((1.5707963267949)+j4)))), 6.28318530717959)));
3317 evalcond[1]=new_r22;
3318 evalcond[2]=new_r11;
3319 evalcond[3]=new_r10;
3320 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 &&
IKabs(evalcond[2]) < 0.0000050000000000 &&
IKabs(evalcond[3]) < 0.0000050000000000 )
3322 bgotonextstatement=
false;
3324 IkReal j5array[1], cj5array[1], sj5array[1];
3325 bool j5valid[1]={
false};
3329 j5array[0]=
IKatan2(((-1.0)*new_r21), new_r20);
3330 sj5array[0]=
IKsin(j5array[0]);
3331 cj5array[0]=
IKcos(j5array[0]);
3332 if( j5array[0] >
IKPI )
3336 else if( j5array[0] < -
IKPI )
3337 { j5array[0]+=
IK2PI;
3340 for(
int ij5 = 0; ij5 < 1; ++ij5)
3346 _ij5[0] = ij5; _ij5[1] = -1;
3347 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
3351 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
3354 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
3357 IkReal x261=
IKsin(j5);
3358 IkReal x262=((1.0)*(
IKcos(j5)));
3359 evalcond[0]=(x261+new_r21);
3360 evalcond[1]=(new_r20+(((-1.0)*x262)));
3361 evalcond[2]=((((-1.0)*x261))+(((-1.0)*new_r00)));
3362 evalcond[3]=((((-1.0)*new_r01))+(((-1.0)*x262)));
3370 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
3371 vinfos[0].jointtype = 1;
3372 vinfos[0].foffset = j0;
3373 vinfos[0].indices[0] = _ij0[0];
3374 vinfos[0].indices[1] = _ij0[1];
3375 vinfos[0].maxsolutions = _nj0;
3376 vinfos[1].jointtype = 1;
3377 vinfos[1].foffset = j1;
3378 vinfos[1].indices[0] = _ij1[0];
3379 vinfos[1].indices[1] = _ij1[1];
3380 vinfos[1].maxsolutions = _nj1;
3381 vinfos[2].jointtype = 1;
3382 vinfos[2].foffset = j2;
3383 vinfos[2].indices[0] = _ij2[0];
3384 vinfos[2].indices[1] = _ij2[1];
3385 vinfos[2].maxsolutions = _nj2;
3386 vinfos[3].jointtype = 1;
3387 vinfos[3].foffset = j3;
3388 vinfos[3].indices[0] = _ij3[0];
3389 vinfos[3].indices[1] = _ij3[1];
3390 vinfos[3].maxsolutions = _nj3;
3391 vinfos[4].jointtype = 1;
3392 vinfos[4].foffset = j4;
3393 vinfos[4].indices[0] = _ij4[0];
3394 vinfos[4].indices[1] = _ij4[1];
3395 vinfos[4].maxsolutions = _nj4;
3396 vinfos[5].jointtype = 1;
3397 vinfos[5].foffset = j5;
3398 vinfos[5].indices[0] = _ij5[0];
3399 vinfos[5].indices[1] = _ij5[1];
3400 vinfos[5].maxsolutions = _nj5;
3401 std::vector<int> vfree(0);
3409 if( bgotonextstatement )
3411 bool bgotonextstatement =
true;
3414 evalcond[0]=((
IKabs(new_r20))+(
IKabs(new_r21)));
3415 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
3417 bgotonextstatement=
false;
3419 IkReal j5array[1], cj5array[1], sj5array[1];
3420 bool j5valid[1]={
false};
3424 j5array[0]=
IKatan2(((-1.0)*new_r00), ((-1.0)*new_r01));
3425 sj5array[0]=
IKsin(j5array[0]);
3426 cj5array[0]=
IKcos(j5array[0]);
3427 if( j5array[0] >
IKPI )
3431 else if( j5array[0] < -
IKPI )
3432 { j5array[0]+=
IK2PI;
3435 for(
int ij5 = 0; ij5 < 1; ++ij5)
3441 _ij5[0] = ij5; _ij5[1] = -1;
3442 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
3446 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
3449 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
3452 IkReal x263=
IKsin(j5);
3453 IkReal x264=
IKcos(j5);
3455 evalcond[1]=(new_r22*x263);
3456 evalcond[2]=((-1.0)*x263);
3457 evalcond[3]=((-1.0)*new_r22*x264);
3458 evalcond[4]=((((-1.0)*x263))+(((-1.0)*new_r00)));
3459 evalcond[5]=((((-1.0)*x264))+(((-1.0)*new_r01)));
3467 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
3468 vinfos[0].jointtype = 1;
3469 vinfos[0].foffset = j0;
3470 vinfos[0].indices[0] = _ij0[0];
3471 vinfos[0].indices[1] = _ij0[1];
3472 vinfos[0].maxsolutions = _nj0;
3473 vinfos[1].jointtype = 1;
3474 vinfos[1].foffset = j1;
3475 vinfos[1].indices[0] = _ij1[0];
3476 vinfos[1].indices[1] = _ij1[1];
3477 vinfos[1].maxsolutions = _nj1;
3478 vinfos[2].jointtype = 1;
3479 vinfos[2].foffset = j2;
3480 vinfos[2].indices[0] = _ij2[0];
3481 vinfos[2].indices[1] = _ij2[1];
3482 vinfos[2].maxsolutions = _nj2;
3483 vinfos[3].jointtype = 1;
3484 vinfos[3].foffset = j3;
3485 vinfos[3].indices[0] = _ij3[0];
3486 vinfos[3].indices[1] = _ij3[1];
3487 vinfos[3].maxsolutions = _nj3;
3488 vinfos[4].jointtype = 1;
3489 vinfos[4].foffset = j4;
3490 vinfos[4].indices[0] = _ij4[0];
3491 vinfos[4].indices[1] = _ij4[1];
3492 vinfos[4].maxsolutions = _nj4;
3493 vinfos[5].jointtype = 1;
3494 vinfos[5].foffset = j5;
3495 vinfos[5].indices[0] = _ij5[0];
3496 vinfos[5].indices[1] = _ij5[1];
3497 vinfos[5].maxsolutions = _nj5;
3498 std::vector<int> vfree(0);
3506 if( bgotonextstatement )
3508 bool bgotonextstatement =
true;
3513 bgotonextstatement=
false;
3518 if( bgotonextstatement )
3531 IkReal j5array[1], cj5array[1], sj5array[1];
3532 bool j5valid[1]={
false};
3540 j5array[0]=
IKatan2(((-1.0)*new_r00), ((-1.0)*new_r20*(x265.
value)));
3541 sj5array[0]=
IKsin(j5array[0]);
3542 cj5array[0]=
IKcos(j5array[0]);
3543 if( j5array[0] >
IKPI )
3547 else if( j5array[0] < -
IKPI )
3548 { j5array[0]+=
IK2PI;
3551 for(
int ij5 = 0; ij5 < 1; ++ij5)
3557 _ij5[0] = ij5; _ij5[1] = -1;
3558 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
3562 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
3565 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
3568 IkReal x266=
IKsin(j5);
3569 IkReal x267=
IKcos(j5);
3570 IkReal x268=((1.0)*cj4);
3571 IkReal x269=((1.0)*x266);
3572 evalcond[0]=(new_r20+((sj4*x267)));
3573 evalcond[1]=(((cj4*x266))+new_r11);
3574 evalcond[2]=((((-1.0)*sj4*x269))+new_r21);
3575 evalcond[3]=((((-1.0)*x267*x268))+new_r10);
3576 evalcond[4]=((((-1.0)*new_r00))+(((-1.0)*x269)));
3577 evalcond[5]=((((-1.0)*x267))+(((-1.0)*new_r01)));
3578 evalcond[6]=(((new_r20*sj4))+x267+(((-1.0)*new_r10*x268)));
3579 evalcond[7]=((((-1.0)*new_r11*x268))+((new_r21*sj4))+(((-1.0)*x269)));
3587 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
3588 vinfos[0].jointtype = 1;
3589 vinfos[0].foffset = j0;
3590 vinfos[0].indices[0] = _ij0[0];
3591 vinfos[0].indices[1] = _ij0[1];
3592 vinfos[0].maxsolutions = _nj0;
3593 vinfos[1].jointtype = 1;
3594 vinfos[1].foffset = j1;
3595 vinfos[1].indices[0] = _ij1[0];
3596 vinfos[1].indices[1] = _ij1[1];
3597 vinfos[1].maxsolutions = _nj1;
3598 vinfos[2].jointtype = 1;
3599 vinfos[2].foffset = j2;
3600 vinfos[2].indices[0] = _ij2[0];
3601 vinfos[2].indices[1] = _ij2[1];
3602 vinfos[2].maxsolutions = _nj2;
3603 vinfos[3].jointtype = 1;
3604 vinfos[3].foffset = j3;
3605 vinfos[3].indices[0] = _ij3[0];
3606 vinfos[3].indices[1] = _ij3[1];
3607 vinfos[3].maxsolutions = _nj3;
3608 vinfos[4].jointtype = 1;
3609 vinfos[4].foffset = j4;
3610 vinfos[4].indices[0] = _ij4[0];
3611 vinfos[4].indices[1] = _ij4[1];
3612 vinfos[4].maxsolutions = _nj4;
3613 vinfos[5].jointtype = 1;
3614 vinfos[5].foffset = j5;
3615 vinfos[5].indices[0] = _ij5[0];
3616 vinfos[5].indices[1] = _ij5[1];
3617 vinfos[5].maxsolutions = _nj5;
3618 std::vector<int> vfree(0);
3631 IkReal j5array[1], cj5array[1], sj5array[1];
3632 bool j5valid[1]={
false};
3642 j5array[0]=((-1.5707963267949)+(((1.5707963267949)*(x270.
value)))+(x271.
value));
3643 sj5array[0]=
IKsin(j5array[0]);
3644 cj5array[0]=
IKcos(j5array[0]);
3645 if( j5array[0] >
IKPI )
3649 else if( j5array[0] < -
IKPI )
3650 { j5array[0]+=
IK2PI;
3653 for(
int ij5 = 0; ij5 < 1; ++ij5)
3659 _ij5[0] = ij5; _ij5[1] = -1;
3660 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
3664 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
3667 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
3670 IkReal x272=
IKsin(j5);
3671 IkReal x273=
IKcos(j5);
3672 IkReal x274=((1.0)*cj4);
3673 IkReal x275=((1.0)*x272);
3674 evalcond[0]=(new_r20+((sj4*x273)));
3675 evalcond[1]=(((cj4*x272))+new_r11);
3676 evalcond[2]=((((-1.0)*sj4*x275))+new_r21);
3677 evalcond[3]=((((-1.0)*x273*x274))+new_r10);
3678 evalcond[4]=((((-1.0)*x275))+(((-1.0)*new_r00)));
3679 evalcond[5]=((((-1.0)*x273))+(((-1.0)*new_r01)));
3680 evalcond[6]=(((new_r20*sj4))+x273+(((-1.0)*new_r10*x274)));
3681 evalcond[7]=((((-1.0)*new_r11*x274))+(((-1.0)*x275))+((new_r21*sj4)));
3689 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
3690 vinfos[0].jointtype = 1;
3691 vinfos[0].foffset = j0;
3692 vinfos[0].indices[0] = _ij0[0];
3693 vinfos[0].indices[1] = _ij0[1];
3694 vinfos[0].maxsolutions = _nj0;
3695 vinfos[1].jointtype = 1;
3696 vinfos[1].foffset = j1;
3697 vinfos[1].indices[0] = _ij1[0];
3698 vinfos[1].indices[1] = _ij1[1];
3699 vinfos[1].maxsolutions = _nj1;
3700 vinfos[2].jointtype = 1;
3701 vinfos[2].foffset = j2;
3702 vinfos[2].indices[0] = _ij2[0];
3703 vinfos[2].indices[1] = _ij2[1];
3704 vinfos[2].maxsolutions = _nj2;
3705 vinfos[3].jointtype = 1;
3706 vinfos[3].foffset = j3;
3707 vinfos[3].indices[0] = _ij3[0];
3708 vinfos[3].indices[1] = _ij3[1];
3709 vinfos[3].maxsolutions = _nj3;
3710 vinfos[4].jointtype = 1;
3711 vinfos[4].foffset = j4;
3712 vinfos[4].indices[0] = _ij4[0];
3713 vinfos[4].indices[1] = _ij4[1];
3714 vinfos[4].maxsolutions = _nj4;
3715 vinfos[5].jointtype = 1;
3716 vinfos[5].foffset = j5;
3717 vinfos[5].indices[0] = _ij5[0];
3718 vinfos[5].indices[1] = _ij5[1];
3719 vinfos[5].maxsolutions = _nj5;
3720 std::vector<int> vfree(0);
3733 IkReal j5array[1], cj5array[1], sj5array[1];
3734 bool j5valid[1]={
false};
3744 j5array[0]=((-1.5707963267949)+(((1.5707963267949)*(x276.
value)))+(x277.
value));
3745 sj5array[0]=
IKsin(j5array[0]);
3746 cj5array[0]=
IKcos(j5array[0]);
3747 if( j5array[0] >
IKPI )
3751 else if( j5array[0] < -
IKPI )
3752 { j5array[0]+=
IK2PI;
3755 for(
int ij5 = 0; ij5 < 1; ++ij5)
3761 _ij5[0] = ij5; _ij5[1] = -1;
3762 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
3766 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
3769 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
3772 IkReal x278=
IKsin(j5);
3773 IkReal x279=
IKcos(j5);
3774 IkReal x280=((1.0)*cj4);
3775 IkReal x281=((1.0)*x278);
3776 evalcond[0]=(new_r20+((sj4*x279)));
3777 evalcond[1]=(((cj4*x278))+new_r11);
3778 evalcond[2]=((((-1.0)*sj4*x281))+new_r21);
3779 evalcond[3]=(new_r10+(((-1.0)*x279*x280)));
3780 evalcond[4]=((((-1.0)*x281))+(((-1.0)*new_r00)));
3781 evalcond[5]=((((-1.0)*x279))+(((-1.0)*new_r01)));
3782 evalcond[6]=(((new_r20*sj4))+x279+(((-1.0)*new_r10*x280)));
3783 evalcond[7]=((((-1.0)*new_r11*x280))+(((-1.0)*x281))+((new_r21*sj4)));
3791 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
3792 vinfos[0].jointtype = 1;
3793 vinfos[0].foffset = j0;
3794 vinfos[0].indices[0] = _ij0[0];
3795 vinfos[0].indices[1] = _ij0[1];
3796 vinfos[0].maxsolutions = _nj0;
3797 vinfos[1].jointtype = 1;
3798 vinfos[1].foffset = j1;
3799 vinfos[1].indices[0] = _ij1[0];
3800 vinfos[1].indices[1] = _ij1[1];
3801 vinfos[1].maxsolutions = _nj1;
3802 vinfos[2].jointtype = 1;
3803 vinfos[2].foffset = j2;
3804 vinfos[2].indices[0] = _ij2[0];
3805 vinfos[2].indices[1] = _ij2[1];
3806 vinfos[2].maxsolutions = _nj2;
3807 vinfos[3].jointtype = 1;
3808 vinfos[3].foffset = j3;
3809 vinfos[3].indices[0] = _ij3[0];
3810 vinfos[3].indices[1] = _ij3[1];
3811 vinfos[3].maxsolutions = _nj3;
3812 vinfos[4].jointtype = 1;
3813 vinfos[4].foffset = j4;
3814 vinfos[4].indices[0] = _ij4[0];
3815 vinfos[4].indices[1] = _ij4[1];
3816 vinfos[4].maxsolutions = _nj4;
3817 vinfos[5].jointtype = 1;
3818 vinfos[5].foffset = j5;
3819 vinfos[5].indices[0] = _ij5[0];
3820 vinfos[5].indices[1] = _ij5[1];
3821 vinfos[5].maxsolutions = _nj5;
3822 std::vector<int> vfree(0);
3834 if( bgotonextstatement )
3836 bool bgotonextstatement =
true;
3839 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((1.5707963267949)+j3)))), 6.28318530717959)));
3840 evalcond[1]=new_r02;
3841 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 )
3843 bgotonextstatement=
false;
3845 IkReal j5array[1], cj5array[1], sj5array[1];
3846 bool j5valid[1]={
false};
3850 j5array[0]=
IKatan2(new_r00, new_r01);
3851 sj5array[0]=
IKsin(j5array[0]);
3852 cj5array[0]=
IKcos(j5array[0]);
3853 if( j5array[0] >
IKPI )
3857 else if( j5array[0] < -
IKPI )
3858 { j5array[0]+=
IK2PI;
3861 for(
int ij5 = 0; ij5 < 1; ++ij5)
3867 _ij5[0] = ij5; _ij5[1] = -1;
3868 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
3872 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
3875 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
3878 IkReal x282=
IKcos(j5);
3879 IkReal x283=
IKsin(j5);
3880 IkReal x284=((1.0)*x283);
3881 IkReal x285=((1.0)*x282);
3882 evalcond[0]=(new_r20+((sj4*x282)));
3883 evalcond[1]=((((-1.0)*x284))+new_r00);
3884 evalcond[2]=((((-1.0)*x285))+new_r01);
3885 evalcond[3]=((((-1.0)*sj4*x284))+new_r21);
3886 evalcond[4]=((((-1.0)*new_r11))+((cj4*x283)));
3887 evalcond[5]=((((-1.0)*cj4*x285))+(((-1.0)*new_r10)));
3888 evalcond[6]=(((new_r20*sj4))+((cj4*new_r10))+x282);
3889 evalcond[7]=(((cj4*new_r11))+(((-1.0)*x284))+((new_r21*sj4)));
3897 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
3898 vinfos[0].jointtype = 1;
3899 vinfos[0].foffset = j0;
3900 vinfos[0].indices[0] = _ij0[0];
3901 vinfos[0].indices[1] = _ij0[1];
3902 vinfos[0].maxsolutions = _nj0;
3903 vinfos[1].jointtype = 1;
3904 vinfos[1].foffset = j1;
3905 vinfos[1].indices[0] = _ij1[0];
3906 vinfos[1].indices[1] = _ij1[1];
3907 vinfos[1].maxsolutions = _nj1;
3908 vinfos[2].jointtype = 1;
3909 vinfos[2].foffset = j2;
3910 vinfos[2].indices[0] = _ij2[0];
3911 vinfos[2].indices[1] = _ij2[1];
3912 vinfos[2].maxsolutions = _nj2;
3913 vinfos[3].jointtype = 1;
3914 vinfos[3].foffset = j3;
3915 vinfos[3].indices[0] = _ij3[0];
3916 vinfos[3].indices[1] = _ij3[1];
3917 vinfos[3].maxsolutions = _nj3;
3918 vinfos[4].jointtype = 1;
3919 vinfos[4].foffset = j4;
3920 vinfos[4].indices[0] = _ij4[0];
3921 vinfos[4].indices[1] = _ij4[1];
3922 vinfos[4].maxsolutions = _nj4;
3923 vinfos[5].jointtype = 1;
3924 vinfos[5].foffset = j5;
3925 vinfos[5].indices[0] = _ij5[0];
3926 vinfos[5].indices[1] = _ij5[1];
3927 vinfos[5].maxsolutions = _nj5;
3928 std::vector<int> vfree(0);
3936 if( bgotonextstatement )
3938 bool bgotonextstatement =
true;
3941 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-1.5707963267949)+j4)))), 6.28318530717959)));
3942 evalcond[1]=new_r22;
3943 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 )
3945 bgotonextstatement=
false;
3947 IkReal j5array[1], cj5array[1], sj5array[1];
3948 bool j5valid[1]={
false};
3952 j5array[0]=
IKatan2(new_r21, ((-1.0)*new_r20));
3953 sj5array[0]=
IKsin(j5array[0]);
3954 cj5array[0]=
IKcos(j5array[0]);
3955 if( j5array[0] >
IKPI )
3959 else if( j5array[0] < -
IKPI )
3960 { j5array[0]+=
IK2PI;
3963 for(
int ij5 = 0; ij5 < 1; ++ij5)
3969 _ij5[0] = ij5; _ij5[1] = -1;
3970 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
3974 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
3977 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
3980 IkReal x286=
IKcos(j5);
3981 IkReal x287=
IKsin(j5);
3982 IkReal x288=((1.0)*sj3);
3983 IkReal x289=((1.0)*x287);
3984 IkReal x290=((1.0)*x286);
3985 evalcond[0]=(x286+new_r20);
3986 evalcond[1]=((((-1.0)*x289))+new_r21);
3987 evalcond[2]=(((sj3*x286))+new_r01);
3988 evalcond[3]=(((sj3*x287))+new_r00);
3989 evalcond[4]=((((-1.0)*cj3*x290))+new_r11);
3990 evalcond[5]=((((-1.0)*new_r02*x289))+new_r10);
3991 evalcond[6]=((((-1.0)*new_r00*x288))+((cj3*new_r10))+(((-1.0)*x289)));
3992 evalcond[7]=((((-1.0)*x290))+(((-1.0)*new_r01*x288))+((cj3*new_r11)));
4000 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
4001 vinfos[0].jointtype = 1;
4002 vinfos[0].foffset = j0;
4003 vinfos[0].indices[0] = _ij0[0];
4004 vinfos[0].indices[1] = _ij0[1];
4005 vinfos[0].maxsolutions = _nj0;
4006 vinfos[1].jointtype = 1;
4007 vinfos[1].foffset = j1;
4008 vinfos[1].indices[0] = _ij1[0];
4009 vinfos[1].indices[1] = _ij1[1];
4010 vinfos[1].maxsolutions = _nj1;
4011 vinfos[2].jointtype = 1;
4012 vinfos[2].foffset = j2;
4013 vinfos[2].indices[0] = _ij2[0];
4014 vinfos[2].indices[1] = _ij2[1];
4015 vinfos[2].maxsolutions = _nj2;
4016 vinfos[3].jointtype = 1;
4017 vinfos[3].foffset = j3;
4018 vinfos[3].indices[0] = _ij3[0];
4019 vinfos[3].indices[1] = _ij3[1];
4020 vinfos[3].maxsolutions = _nj3;
4021 vinfos[4].jointtype = 1;
4022 vinfos[4].foffset = j4;
4023 vinfos[4].indices[0] = _ij4[0];
4024 vinfos[4].indices[1] = _ij4[1];
4025 vinfos[4].maxsolutions = _nj4;
4026 vinfos[5].jointtype = 1;
4027 vinfos[5].foffset = j5;
4028 vinfos[5].indices[0] = _ij5[0];
4029 vinfos[5].indices[1] = _ij5[1];
4030 vinfos[5].maxsolutions = _nj5;
4031 std::vector<int> vfree(0);
4039 if( bgotonextstatement )
4041 bool bgotonextstatement =
true;
4044 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((1.5707963267949)+j4)))), 6.28318530717959)));
4045 evalcond[1]=new_r22;
4046 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 )
4048 bgotonextstatement=
false;
4050 IkReal j5array[1], cj5array[1], sj5array[1];
4051 bool j5valid[1]={
false};
4055 j5array[0]=
IKatan2(((-1.0)*new_r21), new_r20);
4056 sj5array[0]=
IKsin(j5array[0]);
4057 cj5array[0]=
IKcos(j5array[0]);
4058 if( j5array[0] >
IKPI )
4062 else if( j5array[0] < -
IKPI )
4063 { j5array[0]+=
IK2PI;
4066 for(
int ij5 = 0; ij5 < 1; ++ij5)
4072 _ij5[0] = ij5; _ij5[1] = -1;
4073 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
4077 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
4080 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
4083 IkReal x291=
IKcos(j5);
4084 IkReal x292=
IKsin(j5);
4085 IkReal x293=((1.0)*sj3);
4086 IkReal x294=((1.0)*x291);
4087 evalcond[0]=(x292+new_r21);
4088 evalcond[1]=((((-1.0)*x294))+new_r20);
4089 evalcond[2]=(new_r01+((sj3*x291)));
4090 evalcond[3]=(new_r00+((sj3*x292)));
4091 evalcond[4]=(((new_r02*x292))+new_r10);
4092 evalcond[5]=((((-1.0)*cj3*x294))+new_r11);
4093 evalcond[6]=((((-1.0)*x292))+((cj3*new_r10))+(((-1.0)*new_r00*x293)));
4094 evalcond[7]=((((-1.0)*new_r01*x293))+(((-1.0)*x294))+((cj3*new_r11)));
4102 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
4103 vinfos[0].jointtype = 1;
4104 vinfos[0].foffset = j0;
4105 vinfos[0].indices[0] = _ij0[0];
4106 vinfos[0].indices[1] = _ij0[1];
4107 vinfos[0].maxsolutions = _nj0;
4108 vinfos[1].jointtype = 1;
4109 vinfos[1].foffset = j1;
4110 vinfos[1].indices[0] = _ij1[0];
4111 vinfos[1].indices[1] = _ij1[1];
4112 vinfos[1].maxsolutions = _nj1;
4113 vinfos[2].jointtype = 1;
4114 vinfos[2].foffset = j2;
4115 vinfos[2].indices[0] = _ij2[0];
4116 vinfos[2].indices[1] = _ij2[1];
4117 vinfos[2].maxsolutions = _nj2;
4118 vinfos[3].jointtype = 1;
4119 vinfos[3].foffset = j3;
4120 vinfos[3].indices[0] = _ij3[0];
4121 vinfos[3].indices[1] = _ij3[1];
4122 vinfos[3].maxsolutions = _nj3;
4123 vinfos[4].jointtype = 1;
4124 vinfos[4].foffset = j4;
4125 vinfos[4].indices[0] = _ij4[0];
4126 vinfos[4].indices[1] = _ij4[1];
4127 vinfos[4].maxsolutions = _nj4;
4128 vinfos[5].jointtype = 1;
4129 vinfos[5].foffset = j5;
4130 vinfos[5].indices[0] = _ij5[0];
4131 vinfos[5].indices[1] = _ij5[1];
4132 vinfos[5].maxsolutions = _nj5;
4133 std::vector<int> vfree(0);
4141 if( bgotonextstatement )
4143 bool bgotonextstatement =
true;
4146 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(j4))), 6.28318530717959)));
4147 evalcond[1]=new_r20;
4148 evalcond[2]=new_r02;
4149 evalcond[3]=new_r12;
4150 evalcond[4]=new_r21;
4151 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 )
4153 bgotonextstatement=
false;
4155 IkReal j5array[1], cj5array[1], sj5array[1];
4156 bool j5valid[1]={
false};
4158 IkReal x295=((1.0)*new_r01);
4161 j5array[0]=
IKatan2(((((-1.0)*cj3*x295))+(((-1.0)*new_r00*sj3))), ((((-1.0)*sj3*x295))+((cj3*new_r00))));
4162 sj5array[0]=
IKsin(j5array[0]);
4163 cj5array[0]=
IKcos(j5array[0]);
4164 if( j5array[0] >
IKPI )
4168 else if( j5array[0] < -
IKPI )
4169 { j5array[0]+=
IK2PI;
4172 for(
int ij5 = 0; ij5 < 1; ++ij5)
4178 _ij5[0] = ij5; _ij5[1] = -1;
4179 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
4183 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
4186 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
4189 IkReal x296=
IKsin(j5);
4190 IkReal x297=
IKcos(j5);
4191 IkReal x298=((1.0)*sj3);
4192 IkReal x299=((1.0)*x297);
4193 IkReal x300=(sj3*x296);
4194 IkReal x301=((1.0)*x296);
4195 IkReal x302=(cj3*x299);
4196 evalcond[0]=(((new_r11*sj3))+x296+((cj3*new_r01)));
4197 evalcond[1]=(((cj3*x296))+new_r01+((sj3*x297)));
4198 evalcond[2]=(((new_r10*sj3))+(((-1.0)*x299))+((cj3*new_r00)));
4199 evalcond[3]=(((cj3*new_r10))+(((-1.0)*new_r00*x298))+(((-1.0)*x301)));
4200 evalcond[4]=((((-1.0)*new_r01*x298))+(((-1.0)*x299))+((cj3*new_r11)));
4201 evalcond[5]=(x300+new_r00+(((-1.0)*x302)));
4202 evalcond[6]=(x300+new_r11+(((-1.0)*x302)));
4203 evalcond[7]=((((-1.0)*cj3*x301))+(((-1.0)*x297*x298))+new_r10);
4211 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
4212 vinfos[0].jointtype = 1;
4213 vinfos[0].foffset = j0;
4214 vinfos[0].indices[0] = _ij0[0];
4215 vinfos[0].indices[1] = _ij0[1];
4216 vinfos[0].maxsolutions = _nj0;
4217 vinfos[1].jointtype = 1;
4218 vinfos[1].foffset = j1;
4219 vinfos[1].indices[0] = _ij1[0];
4220 vinfos[1].indices[1] = _ij1[1];
4221 vinfos[1].maxsolutions = _nj1;
4222 vinfos[2].jointtype = 1;
4223 vinfos[2].foffset = j2;
4224 vinfos[2].indices[0] = _ij2[0];
4225 vinfos[2].indices[1] = _ij2[1];
4226 vinfos[2].maxsolutions = _nj2;
4227 vinfos[3].jointtype = 1;
4228 vinfos[3].foffset = j3;
4229 vinfos[3].indices[0] = _ij3[0];
4230 vinfos[3].indices[1] = _ij3[1];
4231 vinfos[3].maxsolutions = _nj3;
4232 vinfos[4].jointtype = 1;
4233 vinfos[4].foffset = j4;
4234 vinfos[4].indices[0] = _ij4[0];
4235 vinfos[4].indices[1] = _ij4[1];
4236 vinfos[4].maxsolutions = _nj4;
4237 vinfos[5].jointtype = 1;
4238 vinfos[5].foffset = j5;
4239 vinfos[5].indices[0] = _ij5[0];
4240 vinfos[5].indices[1] = _ij5[1];
4241 vinfos[5].maxsolutions = _nj5;
4242 std::vector<int> vfree(0);
4250 if( bgotonextstatement )
4252 bool bgotonextstatement =
true;
4255 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-3.14159265358979)+j4)))), 6.28318530717959)));
4256 evalcond[1]=new_r20;
4257 evalcond[2]=new_r02;
4258 evalcond[3]=new_r12;
4259 evalcond[4]=new_r21;
4260 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 )
4262 bgotonextstatement=
false;
4264 IkReal j5array[1], cj5array[1], sj5array[1];
4265 bool j5valid[1]={
false};
4267 IkReal x303=((1.0)*sj3);
4270 j5array[0]=
IKatan2((((cj3*new_r01))+(((-1.0)*new_r00*x303))), ((((-1.0)*cj3*new_r00))+(((-1.0)*new_r01*x303))));
4271 sj5array[0]=
IKsin(j5array[0]);
4272 cj5array[0]=
IKcos(j5array[0]);
4273 if( j5array[0] >
IKPI )
4277 else if( j5array[0] < -
IKPI )
4278 { j5array[0]+=
IK2PI;
4281 for(
int ij5 = 0; ij5 < 1; ++ij5)
4287 _ij5[0] = ij5; _ij5[1] = -1;
4288 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
4292 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
4295 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
4298 IkReal x304=
IKsin(j5);
4299 IkReal x305=
IKcos(j5);
4300 IkReal x306=((1.0)*sj3);
4301 IkReal x307=((1.0)*x304);
4302 IkReal x308=(sj3*x305);
4303 IkReal x309=((1.0)*x305);
4304 IkReal x310=(cj3*x307);
4305 evalcond[0]=(((new_r10*sj3))+x305+((cj3*new_r00)));
4306 evalcond[1]=(((new_r11*sj3))+((cj3*new_r01))+(((-1.0)*x307)));
4307 evalcond[2]=(((sj3*x304))+((cj3*x305))+new_r00);
4308 evalcond[3]=(((cj3*new_r10))+(((-1.0)*new_r00*x306))+(((-1.0)*x307)));
4309 evalcond[4]=((((-1.0)*new_r01*x306))+((cj3*new_r11))+(((-1.0)*x309)));
4310 evalcond[5]=(x308+(((-1.0)*x310))+new_r01);
4311 evalcond[6]=(x308+(((-1.0)*x310))+new_r10);
4312 evalcond[7]=((((-1.0)*cj3*x309))+(((-1.0)*x304*x306))+new_r11);
4320 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
4321 vinfos[0].jointtype = 1;
4322 vinfos[0].foffset = j0;
4323 vinfos[0].indices[0] = _ij0[0];
4324 vinfos[0].indices[1] = _ij0[1];
4325 vinfos[0].maxsolutions = _nj0;
4326 vinfos[1].jointtype = 1;
4327 vinfos[1].foffset = j1;
4328 vinfos[1].indices[0] = _ij1[0];
4329 vinfos[1].indices[1] = _ij1[1];
4330 vinfos[1].maxsolutions = _nj1;
4331 vinfos[2].jointtype = 1;
4332 vinfos[2].foffset = j2;
4333 vinfos[2].indices[0] = _ij2[0];
4334 vinfos[2].indices[1] = _ij2[1];
4335 vinfos[2].maxsolutions = _nj2;
4336 vinfos[3].jointtype = 1;
4337 vinfos[3].foffset = j3;
4338 vinfos[3].indices[0] = _ij3[0];
4339 vinfos[3].indices[1] = _ij3[1];
4340 vinfos[3].maxsolutions = _nj3;
4341 vinfos[4].jointtype = 1;
4342 vinfos[4].foffset = j4;
4343 vinfos[4].indices[0] = _ij4[0];
4344 vinfos[4].indices[1] = _ij4[1];
4345 vinfos[4].maxsolutions = _nj4;
4346 vinfos[5].jointtype = 1;
4347 vinfos[5].foffset = j5;
4348 vinfos[5].indices[0] = _ij5[0];
4349 vinfos[5].indices[1] = _ij5[1];
4350 vinfos[5].maxsolutions = _nj5;
4351 std::vector<int> vfree(0);
4359 if( bgotonextstatement )
4361 bool bgotonextstatement =
true;
4364 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(j3))), 6.28318530717959)));
4365 evalcond[1]=new_r12;
4366 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 )
4368 bgotonextstatement=
false;
4370 IkReal j5array[1], cj5array[1], sj5array[1];
4371 bool j5valid[1]={
false};
4375 j5array[0]=
IKatan2(new_r10, new_r11);
4376 sj5array[0]=
IKsin(j5array[0]);
4377 cj5array[0]=
IKcos(j5array[0]);
4378 if( j5array[0] >
IKPI )
4382 else if( j5array[0] < -
IKPI )
4383 { j5array[0]+=
IK2PI;
4386 for(
int ij5 = 0; ij5 < 1; ++ij5)
4392 _ij5[0] = ij5; _ij5[1] = -1;
4393 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
4397 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
4400 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
4403 IkReal x311=
IKcos(j5);
4404 IkReal x312=
IKsin(j5);
4405 IkReal x313=((1.0)*cj4);
4406 IkReal x314=((1.0)*x312);
4407 evalcond[0]=(((new_r02*x311))+new_r20);
4408 evalcond[1]=((((-1.0)*x314))+new_r10);
4409 evalcond[2]=((((-1.0)*x311))+new_r11);
4410 evalcond[3]=(((cj4*x312))+new_r01);
4411 evalcond[4]=((((-1.0)*new_r02*x314))+new_r21);
4412 evalcond[5]=(new_r00+(((-1.0)*x311*x313)));
4413 evalcond[6]=((((-1.0)*new_r00*x313))+((new_r20*sj4))+x311);
4414 evalcond[7]=((((-1.0)*x314))+((new_r21*sj4))+(((-1.0)*new_r01*x313)));
4422 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
4423 vinfos[0].jointtype = 1;
4424 vinfos[0].foffset = j0;
4425 vinfos[0].indices[0] = _ij0[0];
4426 vinfos[0].indices[1] = _ij0[1];
4427 vinfos[0].maxsolutions = _nj0;
4428 vinfos[1].jointtype = 1;
4429 vinfos[1].foffset = j1;
4430 vinfos[1].indices[0] = _ij1[0];
4431 vinfos[1].indices[1] = _ij1[1];
4432 vinfos[1].maxsolutions = _nj1;
4433 vinfos[2].jointtype = 1;
4434 vinfos[2].foffset = j2;
4435 vinfos[2].indices[0] = _ij2[0];
4436 vinfos[2].indices[1] = _ij2[1];
4437 vinfos[2].maxsolutions = _nj2;
4438 vinfos[3].jointtype = 1;
4439 vinfos[3].foffset = j3;
4440 vinfos[3].indices[0] = _ij3[0];
4441 vinfos[3].indices[1] = _ij3[1];
4442 vinfos[3].maxsolutions = _nj3;
4443 vinfos[4].jointtype = 1;
4444 vinfos[4].foffset = j4;
4445 vinfos[4].indices[0] = _ij4[0];
4446 vinfos[4].indices[1] = _ij4[1];
4447 vinfos[4].maxsolutions = _nj4;
4448 vinfos[5].jointtype = 1;
4449 vinfos[5].foffset = j5;
4450 vinfos[5].indices[0] = _ij5[0];
4451 vinfos[5].indices[1] = _ij5[1];
4452 vinfos[5].maxsolutions = _nj5;
4453 std::vector<int> vfree(0);
4461 if( bgotonextstatement )
4463 bool bgotonextstatement =
true;
4466 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-3.14159265358979)+j3)))), 6.28318530717959)));
4467 evalcond[1]=new_r12;
4468 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 )
4470 bgotonextstatement=
false;
4475 j3=3.14159265358979;
4477 j5eval[1]=
IKsign(new_r02);
4478 j5eval[2]=((
IKabs(new_r20))+(
IKabs(new_r21)));
4479 if(
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000 ||
IKabs(j5eval[2]) < 0.0000010000000000 )
4485 j3=3.14159265358979;
4487 if(
IKabs(j5eval[0]) < 0.0000010000000000 )
4493 j3=3.14159265358979;
4496 if(
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000 )
4500 bool bgotonextstatement =
true;
4503 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-1.5707963267949)+j4)))), 6.28318530717959)));
4504 evalcond[1]=new_r22;
4505 evalcond[2]=new_r01;
4506 evalcond[3]=new_r00;
4507 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 &&
IKabs(evalcond[2]) < 0.0000050000000000 &&
IKabs(evalcond[3]) < 0.0000050000000000 )
4509 bgotonextstatement=
false;
4511 IkReal j5array[1], cj5array[1], sj5array[1];
4512 bool j5valid[1]={
false};
4516 j5array[0]=
IKatan2(new_r21, ((-1.0)*new_r20));
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];
4544 IkReal x315=
IKcos(j5);
4545 IkReal x316=((1.0)*(
IKsin(j5)));
4546 evalcond[0]=(x315+new_r20);
4547 evalcond[1]=((((-1.0)*x316))+new_r21);
4548 evalcond[2]=((((-1.0)*x316))+(((-1.0)*new_r10)));
4549 evalcond[3]=((((-1.0)*new_r11))+(((-1.0)*x315)));
4557 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
4558 vinfos[0].jointtype = 1;
4559 vinfos[0].foffset = j0;
4560 vinfos[0].indices[0] = _ij0[0];
4561 vinfos[0].indices[1] = _ij0[1];
4562 vinfos[0].maxsolutions = _nj0;
4563 vinfos[1].jointtype = 1;
4564 vinfos[1].foffset = j1;
4565 vinfos[1].indices[0] = _ij1[0];
4566 vinfos[1].indices[1] = _ij1[1];
4567 vinfos[1].maxsolutions = _nj1;
4568 vinfos[2].jointtype = 1;
4569 vinfos[2].foffset = j2;
4570 vinfos[2].indices[0] = _ij2[0];
4571 vinfos[2].indices[1] = _ij2[1];
4572 vinfos[2].maxsolutions = _nj2;
4573 vinfos[3].jointtype = 1;
4574 vinfos[3].foffset = j3;
4575 vinfos[3].indices[0] = _ij3[0];
4576 vinfos[3].indices[1] = _ij3[1];
4577 vinfos[3].maxsolutions = _nj3;
4578 vinfos[4].jointtype = 1;
4579 vinfos[4].foffset = j4;
4580 vinfos[4].indices[0] = _ij4[0];
4581 vinfos[4].indices[1] = _ij4[1];
4582 vinfos[4].maxsolutions = _nj4;
4583 vinfos[5].jointtype = 1;
4584 vinfos[5].foffset = j5;
4585 vinfos[5].indices[0] = _ij5[0];
4586 vinfos[5].indices[1] = _ij5[1];
4587 vinfos[5].maxsolutions = _nj5;
4588 std::vector<int> vfree(0);
4596 if( bgotonextstatement )
4598 bool bgotonextstatement =
true;
4601 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((1.5707963267949)+j4)))), 6.28318530717959)));
4602 evalcond[1]=new_r22;
4603 evalcond[2]=new_r01;
4604 evalcond[3]=new_r00;
4605 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 &&
IKabs(evalcond[2]) < 0.0000050000000000 &&
IKabs(evalcond[3]) < 0.0000050000000000 )
4607 bgotonextstatement=
false;
4609 IkReal j5array[1], cj5array[1], sj5array[1];
4610 bool j5valid[1]={
false};
4614 j5array[0]=
IKatan2(((-1.0)*new_r21), new_r20);
4615 sj5array[0]=
IKsin(j5array[0]);
4616 cj5array[0]=
IKcos(j5array[0]);
4617 if( j5array[0] >
IKPI )
4621 else if( j5array[0] < -
IKPI )
4622 { j5array[0]+=
IK2PI;
4625 for(
int ij5 = 0; ij5 < 1; ++ij5)
4631 _ij5[0] = ij5; _ij5[1] = -1;
4632 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
4636 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
4639 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
4642 IkReal x317=
IKsin(j5);
4643 IkReal x318=((1.0)*(
IKcos(j5)));
4644 evalcond[0]=(x317+new_r21);
4645 evalcond[1]=((((-1.0)*x318))+new_r20);
4646 evalcond[2]=((((-1.0)*new_r10))+(((-1.0)*x317)));
4647 evalcond[3]=((((-1.0)*x318))+(((-1.0)*new_r11)));
4655 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
4656 vinfos[0].jointtype = 1;
4657 vinfos[0].foffset = j0;
4658 vinfos[0].indices[0] = _ij0[0];
4659 vinfos[0].indices[1] = _ij0[1];
4660 vinfos[0].maxsolutions = _nj0;
4661 vinfos[1].jointtype = 1;
4662 vinfos[1].foffset = j1;
4663 vinfos[1].indices[0] = _ij1[0];
4664 vinfos[1].indices[1] = _ij1[1];
4665 vinfos[1].maxsolutions = _nj1;
4666 vinfos[2].jointtype = 1;
4667 vinfos[2].foffset = j2;
4668 vinfos[2].indices[0] = _ij2[0];
4669 vinfos[2].indices[1] = _ij2[1];
4670 vinfos[2].maxsolutions = _nj2;
4671 vinfos[3].jointtype = 1;
4672 vinfos[3].foffset = j3;
4673 vinfos[3].indices[0] = _ij3[0];
4674 vinfos[3].indices[1] = _ij3[1];
4675 vinfos[3].maxsolutions = _nj3;
4676 vinfos[4].jointtype = 1;
4677 vinfos[4].foffset = j4;
4678 vinfos[4].indices[0] = _ij4[0];
4679 vinfos[4].indices[1] = _ij4[1];
4680 vinfos[4].maxsolutions = _nj4;
4681 vinfos[5].jointtype = 1;
4682 vinfos[5].foffset = j5;
4683 vinfos[5].indices[0] = _ij5[0];
4684 vinfos[5].indices[1] = _ij5[1];
4685 vinfos[5].maxsolutions = _nj5;
4686 std::vector<int> vfree(0);
4694 if( bgotonextstatement )
4696 bool bgotonextstatement =
true;
4699 evalcond[0]=
IKabs(new_r02);
4700 evalcond[1]=new_r20;
4701 evalcond[2]=new_r21;
4702 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 &&
IKabs(evalcond[2]) < 0.0000050000000000 )
4704 bgotonextstatement=
false;
4706 IkReal j5array[1], cj5array[1], sj5array[1];
4707 bool j5valid[1]={
false};
4711 j5array[0]=
IKatan2(((-1.0)*new_r10), ((-1.0)*cj4*new_r00));
4712 sj5array[0]=
IKsin(j5array[0]);
4713 cj5array[0]=
IKcos(j5array[0]);
4714 if( j5array[0] >
IKPI )
4718 else if( j5array[0] < -
IKPI )
4719 { j5array[0]+=
IK2PI;
4722 for(
int ij5 = 0; ij5 < 1; ++ij5)
4728 _ij5[0] = ij5; _ij5[1] = -1;
4729 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
4733 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
4736 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
4739 IkReal x319=
IKcos(j5);
4740 IkReal x320=
IKsin(j5);
4741 IkReal x321=((1.0)*x320);
4742 IkReal x322=((1.0)*x319);
4743 evalcond[0]=(((cj4*new_r00))+x319);
4744 evalcond[1]=((((-1.0)*x321))+(((-1.0)*new_r10)));
4745 evalcond[2]=((((-1.0)*x322))+(((-1.0)*new_r11)));
4746 evalcond[3]=(((cj4*x320))+(((-1.0)*new_r01)));
4747 evalcond[4]=(((cj4*new_r01))+(((-1.0)*x321)));
4748 evalcond[5]=((((-1.0)*new_r00))+(((-1.0)*cj4*x322)));
4756 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
4757 vinfos[0].jointtype = 1;
4758 vinfos[0].foffset = j0;
4759 vinfos[0].indices[0] = _ij0[0];
4760 vinfos[0].indices[1] = _ij0[1];
4761 vinfos[0].maxsolutions = _nj0;
4762 vinfos[1].jointtype = 1;
4763 vinfos[1].foffset = j1;
4764 vinfos[1].indices[0] = _ij1[0];
4765 vinfos[1].indices[1] = _ij1[1];
4766 vinfos[1].maxsolutions = _nj1;
4767 vinfos[2].jointtype = 1;
4768 vinfos[2].foffset = j2;
4769 vinfos[2].indices[0] = _ij2[0];
4770 vinfos[2].indices[1] = _ij2[1];
4771 vinfos[2].maxsolutions = _nj2;
4772 vinfos[3].jointtype = 1;
4773 vinfos[3].foffset = j3;
4774 vinfos[3].indices[0] = _ij3[0];
4775 vinfos[3].indices[1] = _ij3[1];
4776 vinfos[3].maxsolutions = _nj3;
4777 vinfos[4].jointtype = 1;
4778 vinfos[4].foffset = j4;
4779 vinfos[4].indices[0] = _ij4[0];
4780 vinfos[4].indices[1] = _ij4[1];
4781 vinfos[4].maxsolutions = _nj4;
4782 vinfos[5].jointtype = 1;
4783 vinfos[5].foffset = j5;
4784 vinfos[5].indices[0] = _ij5[0];
4785 vinfos[5].indices[1] = _ij5[1];
4786 vinfos[5].maxsolutions = _nj5;
4787 std::vector<int> vfree(0);
4795 if( bgotonextstatement )
4797 bool bgotonextstatement =
true;
4800 evalcond[0]=((
IKabs(new_r20))+(
IKabs(new_r21)));
4801 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
4803 bgotonextstatement=
false;
4805 IkReal j5array[1], cj5array[1], sj5array[1];
4806 bool j5valid[1]={
false};
4810 j5array[0]=
IKatan2(((-1.0)*new_r10), ((-1.0)*new_r11));
4811 sj5array[0]=
IKsin(j5array[0]);
4812 cj5array[0]=
IKcos(j5array[0]);
4813 if( j5array[0] >
IKPI )
4817 else if( j5array[0] < -
IKPI )
4818 { j5array[0]+=
IK2PI;
4821 for(
int ij5 = 0; ij5 < 1; ++ij5)
4827 _ij5[0] = ij5; _ij5[1] = -1;
4828 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
4832 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
4835 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
4838 IkReal x323=
IKsin(j5);
4839 IkReal x324=
IKcos(j5);
4841 evalcond[1]=(new_r22*x323);
4842 evalcond[2]=((-1.0)*x323);
4843 evalcond[3]=((-1.0)*new_r22*x324);
4844 evalcond[4]=((((-1.0)*x323))+(((-1.0)*new_r10)));
4845 evalcond[5]=((((-1.0)*x324))+(((-1.0)*new_r11)));
4853 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
4854 vinfos[0].jointtype = 1;
4855 vinfos[0].foffset = j0;
4856 vinfos[0].indices[0] = _ij0[0];
4857 vinfos[0].indices[1] = _ij0[1];
4858 vinfos[0].maxsolutions = _nj0;
4859 vinfos[1].jointtype = 1;
4860 vinfos[1].foffset = j1;
4861 vinfos[1].indices[0] = _ij1[0];
4862 vinfos[1].indices[1] = _ij1[1];
4863 vinfos[1].maxsolutions = _nj1;
4864 vinfos[2].jointtype = 1;
4865 vinfos[2].foffset = j2;
4866 vinfos[2].indices[0] = _ij2[0];
4867 vinfos[2].indices[1] = _ij2[1];
4868 vinfos[2].maxsolutions = _nj2;
4869 vinfos[3].jointtype = 1;
4870 vinfos[3].foffset = j3;
4871 vinfos[3].indices[0] = _ij3[0];
4872 vinfos[3].indices[1] = _ij3[1];
4873 vinfos[3].maxsolutions = _nj3;
4874 vinfos[4].jointtype = 1;
4875 vinfos[4].foffset = j4;
4876 vinfos[4].indices[0] = _ij4[0];
4877 vinfos[4].indices[1] = _ij4[1];
4878 vinfos[4].maxsolutions = _nj4;
4879 vinfos[5].jointtype = 1;
4880 vinfos[5].foffset = j5;
4881 vinfos[5].indices[0] = _ij5[0];
4882 vinfos[5].indices[1] = _ij5[1];
4883 vinfos[5].maxsolutions = _nj5;
4884 std::vector<int> vfree(0);
4892 if( bgotonextstatement )
4894 bool bgotonextstatement =
true;
4899 bgotonextstatement=
false;
4904 if( bgotonextstatement )
4916 IkReal j5array[1], cj5array[1], sj5array[1];
4917 bool j5valid[1]={
false};
4929 j5array[0]=
IKatan2(((-1.0)*new_r21*(x325.
value)), ((-1.0)*new_r00*(x326.
value)));
4930 sj5array[0]=
IKsin(j5array[0]);
4931 cj5array[0]=
IKcos(j5array[0]);
4932 if( j5array[0] >
IKPI )
4936 else if( j5array[0] < -
IKPI )
4937 { j5array[0]+=
IK2PI;
4940 for(
int ij5 = 0; ij5 < 1; ++ij5)
4946 _ij5[0] = ij5; _ij5[1] = -1;
4947 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
4951 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
4954 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
4957 IkReal x327=
IKsin(j5);
4958 IkReal x328=
IKcos(j5);
4959 IkReal x329=((1.0)*x327);
4960 IkReal x330=((1.0)*x328);
4961 evalcond[0]=(new_r21+((new_r02*x327)));
4962 evalcond[1]=(new_r20+(((-1.0)*new_r02*x330)));
4963 evalcond[2]=((((-1.0)*x329))+(((-1.0)*new_r10)));
4964 evalcond[3]=((((-1.0)*new_r11))+(((-1.0)*x330)));
4965 evalcond[4]=(((cj4*x327))+(((-1.0)*new_r01)));
4966 evalcond[5]=((((-1.0)*cj4*x330))+(((-1.0)*new_r00)));
4967 evalcond[6]=(((new_r20*sj4))+((cj4*new_r00))+x328);
4968 evalcond[7]=(((cj4*new_r01))+(((-1.0)*x329))+((new_r21*sj4)));
4976 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
4977 vinfos[0].jointtype = 1;
4978 vinfos[0].foffset = j0;
4979 vinfos[0].indices[0] = _ij0[0];
4980 vinfos[0].indices[1] = _ij0[1];
4981 vinfos[0].maxsolutions = _nj0;
4982 vinfos[1].jointtype = 1;
4983 vinfos[1].foffset = j1;
4984 vinfos[1].indices[0] = _ij1[0];
4985 vinfos[1].indices[1] = _ij1[1];
4986 vinfos[1].maxsolutions = _nj1;
4987 vinfos[2].jointtype = 1;
4988 vinfos[2].foffset = j2;
4989 vinfos[2].indices[0] = _ij2[0];
4990 vinfos[2].indices[1] = _ij2[1];
4991 vinfos[2].maxsolutions = _nj2;
4992 vinfos[3].jointtype = 1;
4993 vinfos[3].foffset = j3;
4994 vinfos[3].indices[0] = _ij3[0];
4995 vinfos[3].indices[1] = _ij3[1];
4996 vinfos[3].maxsolutions = _nj3;
4997 vinfos[4].jointtype = 1;
4998 vinfos[4].foffset = j4;
4999 vinfos[4].indices[0] = _ij4[0];
5000 vinfos[4].indices[1] = _ij4[1];
5001 vinfos[4].maxsolutions = _nj4;
5002 vinfos[5].jointtype = 1;
5003 vinfos[5].foffset = j5;
5004 vinfos[5].indices[0] = _ij5[0];
5005 vinfos[5].indices[1] = _ij5[1];
5006 vinfos[5].maxsolutions = _nj5;
5007 std::vector<int> vfree(0);
5020 IkReal j5array[1], cj5array[1], sj5array[1];
5021 bool j5valid[1]={
false};
5029 j5array[0]=
IKatan2(((-1.0)*new_r10), (new_r20*(x331.
value)));
5030 sj5array[0]=
IKsin(j5array[0]);
5031 cj5array[0]=
IKcos(j5array[0]);
5032 if( j5array[0] >
IKPI )
5036 else if( j5array[0] < -
IKPI )
5037 { j5array[0]+=
IK2PI;
5040 for(
int ij5 = 0; ij5 < 1; ++ij5)
5046 _ij5[0] = ij5; _ij5[1] = -1;
5047 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
5051 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
5054 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
5057 IkReal x332=
IKsin(j5);
5058 IkReal x333=
IKcos(j5);
5059 IkReal x334=((1.0)*x332);
5060 IkReal x335=((1.0)*x333);
5061 evalcond[0]=(((new_r02*x332))+new_r21);
5062 evalcond[1]=(new_r20+(((-1.0)*new_r02*x335)));
5063 evalcond[2]=((((-1.0)*new_r10))+(((-1.0)*x334)));
5064 evalcond[3]=((((-1.0)*new_r11))+(((-1.0)*x335)));
5065 evalcond[4]=(((cj4*x332))+(((-1.0)*new_r01)));
5066 evalcond[5]=((((-1.0)*cj4*x335))+(((-1.0)*new_r00)));
5067 evalcond[6]=(((new_r20*sj4))+((cj4*new_r00))+x333);
5068 evalcond[7]=(((cj4*new_r01))+(((-1.0)*x334))+((new_r21*sj4)));
5076 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
5077 vinfos[0].jointtype = 1;
5078 vinfos[0].foffset = j0;
5079 vinfos[0].indices[0] = _ij0[0];
5080 vinfos[0].indices[1] = _ij0[1];
5081 vinfos[0].maxsolutions = _nj0;
5082 vinfos[1].jointtype = 1;
5083 vinfos[1].foffset = j1;
5084 vinfos[1].indices[0] = _ij1[0];
5085 vinfos[1].indices[1] = _ij1[1];
5086 vinfos[1].maxsolutions = _nj1;
5087 vinfos[2].jointtype = 1;
5088 vinfos[2].foffset = j2;
5089 vinfos[2].indices[0] = _ij2[0];
5090 vinfos[2].indices[1] = _ij2[1];
5091 vinfos[2].maxsolutions = _nj2;
5092 vinfos[3].jointtype = 1;
5093 vinfos[3].foffset = j3;
5094 vinfos[3].indices[0] = _ij3[0];
5095 vinfos[3].indices[1] = _ij3[1];
5096 vinfos[3].maxsolutions = _nj3;
5097 vinfos[4].jointtype = 1;
5098 vinfos[4].foffset = j4;
5099 vinfos[4].indices[0] = _ij4[0];
5100 vinfos[4].indices[1] = _ij4[1];
5101 vinfos[4].maxsolutions = _nj4;
5102 vinfos[5].jointtype = 1;
5103 vinfos[5].foffset = j5;
5104 vinfos[5].indices[0] = _ij5[0];
5105 vinfos[5].indices[1] = _ij5[1];
5106 vinfos[5].maxsolutions = _nj5;
5107 std::vector<int> vfree(0);
5120 IkReal j5array[1], cj5array[1], sj5array[1];
5121 bool j5valid[1]={
false};
5131 j5array[0]=((-1.5707963267949)+(x336.
value)+(((1.5707963267949)*(x337.
value))));
5132 sj5array[0]=
IKsin(j5array[0]);
5133 cj5array[0]=
IKcos(j5array[0]);
5134 if( j5array[0] >
IKPI )
5138 else if( j5array[0] < -
IKPI )
5139 { j5array[0]+=
IK2PI;
5142 for(
int ij5 = 0; ij5 < 1; ++ij5)
5148 _ij5[0] = ij5; _ij5[1] = -1;
5149 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
5153 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
5156 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
5159 IkReal x338=
IKsin(j5);
5160 IkReal x339=
IKcos(j5);
5161 IkReal x340=((1.0)*x338);
5162 IkReal x341=((1.0)*x339);
5163 evalcond[0]=(((new_r02*x338))+new_r21);
5164 evalcond[1]=((((-1.0)*new_r02*x341))+new_r20);
5165 evalcond[2]=((((-1.0)*new_r10))+(((-1.0)*x340)));
5166 evalcond[3]=((((-1.0)*new_r11))+(((-1.0)*x341)));
5167 evalcond[4]=(((cj4*x338))+(((-1.0)*new_r01)));
5168 evalcond[5]=((((-1.0)*cj4*x341))+(((-1.0)*new_r00)));
5169 evalcond[6]=(((new_r20*sj4))+((cj4*new_r00))+x339);
5170 evalcond[7]=(((cj4*new_r01))+((new_r21*sj4))+(((-1.0)*x340)));
5178 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
5179 vinfos[0].jointtype = 1;
5180 vinfos[0].foffset = j0;
5181 vinfos[0].indices[0] = _ij0[0];
5182 vinfos[0].indices[1] = _ij0[1];
5183 vinfos[0].maxsolutions = _nj0;
5184 vinfos[1].jointtype = 1;
5185 vinfos[1].foffset = j1;
5186 vinfos[1].indices[0] = _ij1[0];
5187 vinfos[1].indices[1] = _ij1[1];
5188 vinfos[1].maxsolutions = _nj1;
5189 vinfos[2].jointtype = 1;
5190 vinfos[2].foffset = j2;
5191 vinfos[2].indices[0] = _ij2[0];
5192 vinfos[2].indices[1] = _ij2[1];
5193 vinfos[2].maxsolutions = _nj2;
5194 vinfos[3].jointtype = 1;
5195 vinfos[3].foffset = j3;
5196 vinfos[3].indices[0] = _ij3[0];
5197 vinfos[3].indices[1] = _ij3[1];
5198 vinfos[3].maxsolutions = _nj3;
5199 vinfos[4].jointtype = 1;
5200 vinfos[4].foffset = j4;
5201 vinfos[4].indices[0] = _ij4[0];
5202 vinfos[4].indices[1] = _ij4[1];
5203 vinfos[4].maxsolutions = _nj4;
5204 vinfos[5].jointtype = 1;
5205 vinfos[5].foffset = j5;
5206 vinfos[5].indices[0] = _ij5[0];
5207 vinfos[5].indices[1] = _ij5[1];
5208 vinfos[5].maxsolutions = _nj5;
5209 std::vector<int> vfree(0);
5221 if( bgotonextstatement )
5223 bool bgotonextstatement =
true;
5226 evalcond[0]=((
IKabs(new_r20))+(
IKabs(new_r21)));
5227 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
5229 bgotonextstatement=
false;
5237 if(
IKabs(j5eval[0]) < 0.0000000100000000 )
5243 IkReal op[2+1], zeror[2];
5248 polyroots2(op,zeror,numroots);
5249 IkReal j5array[2], cj5array[2], sj5array[2], tempj5array[1];
5250 int numsolutions = 0;
5251 for(
int ij5 = 0; ij5 < numroots; ++ij5)
5253 IkReal htj5 = zeror[ij5];
5254 tempj5array[0]=((2.0)*(
atan(htj5)));
5255 for(
int kj5 = 0; kj5 < 1; ++kj5)
5257 j5array[numsolutions] = tempj5array[kj5];
5258 if( j5array[numsolutions] >
IKPI )
5260 j5array[numsolutions]-=
IK2PI;
5262 else if( j5array[numsolutions] < -
IKPI )
5264 j5array[numsolutions]+=
IK2PI;
5266 sj5array[numsolutions] =
IKsin(j5array[numsolutions]);
5267 cj5array[numsolutions] =
IKcos(j5array[numsolutions]);
5271 bool j5valid[2]={
true,
true};
5273 for(
int ij5 = 0; ij5 < numsolutions; ++ij5)
5279 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
5282 _ij5[0] = ij5; _ij5[1] = -1;
5283 for(
int iij5 = ij5+1; iij5 < numsolutions; ++iij5)
5287 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
5291 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
5292 vinfos[0].jointtype = 1;
5293 vinfos[0].foffset = j0;
5294 vinfos[0].indices[0] = _ij0[0];
5295 vinfos[0].indices[1] = _ij0[1];
5296 vinfos[0].maxsolutions = _nj0;
5297 vinfos[1].jointtype = 1;
5298 vinfos[1].foffset = j1;
5299 vinfos[1].indices[0] = _ij1[0];
5300 vinfos[1].indices[1] = _ij1[1];
5301 vinfos[1].maxsolutions = _nj1;
5302 vinfos[2].jointtype = 1;
5303 vinfos[2].foffset = j2;
5304 vinfos[2].indices[0] = _ij2[0];
5305 vinfos[2].indices[1] = _ij2[1];
5306 vinfos[2].maxsolutions = _nj2;
5307 vinfos[3].jointtype = 1;
5308 vinfos[3].foffset = j3;
5309 vinfos[3].indices[0] = _ij3[0];
5310 vinfos[3].indices[1] = _ij3[1];
5311 vinfos[3].maxsolutions = _nj3;
5312 vinfos[4].jointtype = 1;
5313 vinfos[4].foffset = j4;
5314 vinfos[4].indices[0] = _ij4[0];
5315 vinfos[4].indices[1] = _ij4[1];
5316 vinfos[4].maxsolutions = _nj4;
5317 vinfos[5].jointtype = 1;
5318 vinfos[5].foffset = j5;
5319 vinfos[5].indices[0] = _ij5[0];
5320 vinfos[5].indices[1] = _ij5[1];
5321 vinfos[5].maxsolutions = _nj5;
5322 std::vector<int> vfree(0);
5333 if( bgotonextstatement )
5335 bool bgotonextstatement =
true;
5340 bgotonextstatement=
false;
5345 if( bgotonextstatement )
5362 IkReal j5array[1], cj5array[1], sj5array[1];
5363 bool j5valid[1]={
false};
5369 IkReal x342=x343.
value;
5380 j5array[0]=
IKatan2((x342*(x344.
value)*(x345.
value)*((((new_r20*sj3))+(((-1.0)*new_r01*sj4))))), ((-1.0)*new_r20*x342));
5381 sj5array[0]=
IKsin(j5array[0]);
5382 cj5array[0]=
IKcos(j5array[0]);
5383 if( j5array[0] >
IKPI )
5387 else if( j5array[0] < -
IKPI )
5388 { j5array[0]+=
IK2PI;
5391 for(
int ij5 = 0; ij5 < 1; ++ij5)
5397 _ij5[0] = ij5; _ij5[1] = -1;
5398 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
5402 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
5405 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
5407 IkReal evalcond[12];
5408 IkReal x346=
IKsin(j5);
5409 IkReal x347=
IKcos(j5);
5410 IkReal x348=(cj3*new_r00);
5411 IkReal x349=(cj3*cj4);
5412 IkReal x350=((1.0)*sj3);
5413 IkReal x351=((1.0)*x346);
5414 IkReal x352=(sj3*x346);
5415 IkReal x353=((1.0)*x347);
5416 evalcond[0]=(((sj4*x347))+new_r20);
5417 evalcond[1]=(new_r21+(((-1.0)*sj4*x351)));
5418 evalcond[2]=(((new_r11*sj3))+((cj4*x346))+((cj3*new_r01)));
5419 evalcond[3]=((((-1.0)*x351))+((cj3*new_r10))+(((-1.0)*new_r00*x350)));
5420 evalcond[4]=((((-1.0)*x353))+(((-1.0)*new_r01*x350))+((cj3*new_r11)));
5421 evalcond[5]=(((sj3*x347))+((x346*x349))+new_r01);
5422 evalcond[6]=(((new_r10*sj3))+x348+(((-1.0)*cj4*x353)));
5423 evalcond[7]=((((-1.0)*x349*x353))+x352+new_r00);
5424 evalcond[8]=((((-1.0)*cj3*x353))+((cj4*x352))+new_r11);
5425 evalcond[9]=((((-1.0)*cj3*x351))+(((-1.0)*cj4*x347*x350))+new_r10);
5426 evalcond[10]=(((new_r20*sj4))+x347+(((-1.0)*cj4*x348))+(((-1.0)*cj4*new_r10*x350)));
5427 evalcond[11]=((((-1.0)*x351))+(((-1.0)*cj4*new_r11*x350))+(((-1.0)*new_r01*x349))+((new_r21*sj4)));
5435 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
5436 vinfos[0].jointtype = 1;
5437 vinfos[0].foffset = j0;
5438 vinfos[0].indices[0] = _ij0[0];
5439 vinfos[0].indices[1] = _ij0[1];
5440 vinfos[0].maxsolutions = _nj0;
5441 vinfos[1].jointtype = 1;
5442 vinfos[1].foffset = j1;
5443 vinfos[1].indices[0] = _ij1[0];
5444 vinfos[1].indices[1] = _ij1[1];
5445 vinfos[1].maxsolutions = _nj1;
5446 vinfos[2].jointtype = 1;
5447 vinfos[2].foffset = j2;
5448 vinfos[2].indices[0] = _ij2[0];
5449 vinfos[2].indices[1] = _ij2[1];
5450 vinfos[2].maxsolutions = _nj2;
5451 vinfos[3].jointtype = 1;
5452 vinfos[3].foffset = j3;
5453 vinfos[3].indices[0] = _ij3[0];
5454 vinfos[3].indices[1] = _ij3[1];
5455 vinfos[3].maxsolutions = _nj3;
5456 vinfos[4].jointtype = 1;
5457 vinfos[4].foffset = j4;
5458 vinfos[4].indices[0] = _ij4[0];
5459 vinfos[4].indices[1] = _ij4[1];
5460 vinfos[4].maxsolutions = _nj4;
5461 vinfos[5].jointtype = 1;
5462 vinfos[5].foffset = j5;
5463 vinfos[5].indices[0] = _ij5[0];
5464 vinfos[5].indices[1] = _ij5[1];
5465 vinfos[5].maxsolutions = _nj5;
5466 std::vector<int> vfree(0);
5479 IkReal j5array[1], cj5array[1], sj5array[1];
5480 bool j5valid[1]={
false};
5486 IkReal x354=x355.
value;
5493 j5array[0]=
IKatan2((x354*(x356.
value)*(((((-1.0)*cj3*cj4*new_r20))+(((-1.0)*new_r00*sj4))))), ((-1.0)*new_r20*x354));
5494 sj5array[0]=
IKsin(j5array[0]);
5495 cj5array[0]=
IKcos(j5array[0]);
5496 if( j5array[0] >
IKPI )
5500 else if( j5array[0] < -
IKPI )
5501 { j5array[0]+=
IK2PI;
5504 for(
int ij5 = 0; ij5 < 1; ++ij5)
5510 _ij5[0] = ij5; _ij5[1] = -1;
5511 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
5515 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
5518 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
5520 IkReal evalcond[12];
5521 IkReal x357=
IKsin(j5);
5522 IkReal x358=
IKcos(j5);
5523 IkReal x359=(cj3*new_r00);
5524 IkReal x360=(cj3*cj4);
5525 IkReal x361=((1.0)*sj3);
5526 IkReal x362=((1.0)*x357);
5527 IkReal x363=(sj3*x357);
5528 IkReal x364=((1.0)*x358);
5529 evalcond[0]=(((sj4*x358))+new_r20);
5530 evalcond[1]=((((-1.0)*sj4*x362))+new_r21);
5531 evalcond[2]=(((new_r11*sj3))+((cj4*x357))+((cj3*new_r01)));
5532 evalcond[3]=((((-1.0)*new_r00*x361))+(((-1.0)*x362))+((cj3*new_r10)));
5533 evalcond[4]=((((-1.0)*x364))+((cj3*new_r11))+(((-1.0)*new_r01*x361)));
5534 evalcond[5]=(((sj3*x358))+new_r01+((x357*x360)));
5535 evalcond[6]=((((-1.0)*cj4*x364))+((new_r10*sj3))+x359);
5536 evalcond[7]=((((-1.0)*x360*x364))+x363+new_r00);
5537 evalcond[8]=(((cj4*x363))+new_r11+(((-1.0)*cj3*x364)));
5538 evalcond[9]=((((-1.0)*cj4*x358*x361))+new_r10+(((-1.0)*cj3*x362)));
5539 evalcond[10]=(((new_r20*sj4))+x358+(((-1.0)*cj4*new_r10*x361))+(((-1.0)*cj4*x359)));
5540 evalcond[11]=((((-1.0)*x362))+(((-1.0)*cj4*new_r11*x361))+((new_r21*sj4))+(((-1.0)*new_r01*x360)));
5548 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
5549 vinfos[0].jointtype = 1;
5550 vinfos[0].foffset = j0;
5551 vinfos[0].indices[0] = _ij0[0];
5552 vinfos[0].indices[1] = _ij0[1];
5553 vinfos[0].maxsolutions = _nj0;
5554 vinfos[1].jointtype = 1;
5555 vinfos[1].foffset = j1;
5556 vinfos[1].indices[0] = _ij1[0];
5557 vinfos[1].indices[1] = _ij1[1];
5558 vinfos[1].maxsolutions = _nj1;
5559 vinfos[2].jointtype = 1;
5560 vinfos[2].foffset = j2;
5561 vinfos[2].indices[0] = _ij2[0];
5562 vinfos[2].indices[1] = _ij2[1];
5563 vinfos[2].maxsolutions = _nj2;
5564 vinfos[3].jointtype = 1;
5565 vinfos[3].foffset = j3;
5566 vinfos[3].indices[0] = _ij3[0];
5567 vinfos[3].indices[1] = _ij3[1];
5568 vinfos[3].maxsolutions = _nj3;
5569 vinfos[4].jointtype = 1;
5570 vinfos[4].foffset = j4;
5571 vinfos[4].indices[0] = _ij4[0];
5572 vinfos[4].indices[1] = _ij4[1];
5573 vinfos[4].maxsolutions = _nj4;
5574 vinfos[5].jointtype = 1;
5575 vinfos[5].foffset = j5;
5576 vinfos[5].indices[0] = _ij5[0];
5577 vinfos[5].indices[1] = _ij5[1];
5578 vinfos[5].maxsolutions = _nj5;
5579 std::vector<int> vfree(0);
5592 IkReal j5array[1], cj5array[1], sj5array[1];
5593 bool j5valid[1]={
false};
5603 j5array[0]=((-1.5707963267949)+(((1.5707963267949)*(x365.
value)))+(x366.
value));
5604 sj5array[0]=
IKsin(j5array[0]);
5605 cj5array[0]=
IKcos(j5array[0]);
5606 if( j5array[0] >
IKPI )
5610 else if( j5array[0] < -
IKPI )
5611 { j5array[0]+=
IK2PI;
5614 for(
int ij5 = 0; ij5 < 1; ++ij5)
5620 _ij5[0] = ij5; _ij5[1] = -1;
5621 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
5625 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
5628 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
5630 IkReal evalcond[12];
5631 IkReal x367=
IKsin(j5);
5632 IkReal x368=
IKcos(j5);
5633 IkReal x369=(cj3*new_r00);
5634 IkReal x370=(cj3*cj4);
5635 IkReal x371=((1.0)*sj3);
5636 IkReal x372=((1.0)*x367);
5637 IkReal x373=(sj3*x367);
5638 IkReal x374=((1.0)*x368);
5639 evalcond[0]=(((sj4*x368))+new_r20);
5640 evalcond[1]=((((-1.0)*sj4*x372))+new_r21);
5641 evalcond[2]=(((new_r11*sj3))+((cj4*x367))+((cj3*new_r01)));
5642 evalcond[3]=((((-1.0)*new_r00*x371))+(((-1.0)*x372))+((cj3*new_r10)));
5643 evalcond[4]=((((-1.0)*x374))+((cj3*new_r11))+(((-1.0)*new_r01*x371)));
5644 evalcond[5]=(((x367*x370))+((sj3*x368))+new_r01);
5645 evalcond[6]=(((new_r10*sj3))+(((-1.0)*cj4*x374))+x369);
5646 evalcond[7]=((((-1.0)*x370*x374))+x373+new_r00);
5647 evalcond[8]=(((cj4*x373))+(((-1.0)*cj3*x374))+new_r11);
5648 evalcond[9]=((((-1.0)*cj4*x368*x371))+(((-1.0)*cj3*x372))+new_r10);
5649 evalcond[10]=(((new_r20*sj4))+x368+(((-1.0)*cj4*x369))+(((-1.0)*cj4*new_r10*x371)));
5650 evalcond[11]=((((-1.0)*x372))+(((-1.0)*cj4*new_r11*x371))+((new_r21*sj4))+(((-1.0)*new_r01*x370)));
5658 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
5659 vinfos[0].jointtype = 1;
5660 vinfos[0].foffset = j0;
5661 vinfos[0].indices[0] = _ij0[0];
5662 vinfos[0].indices[1] = _ij0[1];
5663 vinfos[0].maxsolutions = _nj0;
5664 vinfos[1].jointtype = 1;
5665 vinfos[1].foffset = j1;
5666 vinfos[1].indices[0] = _ij1[0];
5667 vinfos[1].indices[1] = _ij1[1];
5668 vinfos[1].maxsolutions = _nj1;
5669 vinfos[2].jointtype = 1;
5670 vinfos[2].foffset = j2;
5671 vinfos[2].indices[0] = _ij2[0];
5672 vinfos[2].indices[1] = _ij2[1];
5673 vinfos[2].maxsolutions = _nj2;
5674 vinfos[3].jointtype = 1;
5675 vinfos[3].foffset = j3;
5676 vinfos[3].indices[0] = _ij3[0];
5677 vinfos[3].indices[1] = _ij3[1];
5678 vinfos[3].maxsolutions = _nj3;
5679 vinfos[4].jointtype = 1;
5680 vinfos[4].foffset = j4;
5681 vinfos[4].indices[0] = _ij4[0];
5682 vinfos[4].indices[1] = _ij4[1];
5683 vinfos[4].maxsolutions = _nj4;
5684 vinfos[5].jointtype = 1;
5685 vinfos[5].foffset = j5;
5686 vinfos[5].indices[0] = _ij5[0];
5687 vinfos[5].indices[1] = _ij5[1];
5688 vinfos[5].maxsolutions = _nj5;
5689 std::vector<int> vfree(0);
5708 IkReal j5array[1], cj5array[1], sj5array[1];
5709 bool j5valid[1]={
false};
5719 j5array[0]=((-1.5707963267949)+(((1.5707963267949)*(x375.
value)))+(x376.
value));
5720 sj5array[0]=
IKsin(j5array[0]);
5721 cj5array[0]=
IKcos(j5array[0]);
5722 if( j5array[0] >
IKPI )
5726 else if( j5array[0] < -
IKPI )
5727 { j5array[0]+=
IK2PI;
5730 for(
int ij5 = 0; ij5 < 1; ++ij5)
5736 _ij5[0] = ij5; _ij5[1] = -1;
5737 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
5741 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
5744 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
5747 evalcond[0]=(((sj4*(
IKcos(j5))))+new_r20);
5748 evalcond[1]=((((-1.0)*sj4*(
IKsin(j5))))+new_r21);
5759 j3eval[2]=((
IKabs(new_r12))+(
IKabs(new_r02)));
5760 if(
IKabs(j3eval[0]) < 0.0000010000000000 ||
IKabs(j3eval[1]) < 0.0000010000000000 ||
IKabs(j3eval[2]) < 0.0000010000000000 )
5766 if(
IKabs(j3eval[0]) < 0.0000010000000000 ||
IKabs(j3eval[1]) < 0.0000010000000000 )
5770 bool bgotonextstatement =
true;
5773 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-1.5707963267949)+j5)))), 6.28318530717959)));
5774 evalcond[1]=new_r20;
5775 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 )
5777 bgotonextstatement=
false;
5779 IkReal j3array[1], cj3array[1], sj3array[1];
5780 bool j3valid[1]={
false};
5784 j3array[0]=
IKatan2(((-1.0)*new_r00), new_r10);
5785 sj3array[0]=
IKsin(j3array[0]);
5786 cj3array[0]=
IKcos(j3array[0]);
5787 if( j3array[0] >
IKPI )
5791 else if( j3array[0] < -
IKPI )
5792 { j3array[0]+=
IK2PI;
5795 for(
int ij3 = 0; ij3 < 1; ++ij3)
5801 _ij3[0] = ij3; _ij3[1] = -1;
5802 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
5806 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
5809 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
5811 IkReal evalcond[18];
5812 IkReal x377=
IKsin(j3);
5813 IkReal x378=
IKcos(j3);
5814 IkReal x379=((1.0)*sj4);
5815 IkReal x380=((1.0)*new_r22);
5816 IkReal x381=(new_r00*x378);
5817 IkReal x382=(new_r11*x377);
5818 IkReal x383=(new_r01*x378);
5819 IkReal x384=(new_r02*x378);
5820 IkReal x385=(new_r12*x377);
5821 IkReal x386=((1.0)*x377);
5822 IkReal x387=(new_r10*x377);
5823 IkReal x388=(x377*x380);
5824 evalcond[0]=(x377+new_r00);
5825 evalcond[1]=(new_r01+((new_r22*x378)));
5826 evalcond[2]=(new_r11+((new_r22*x377)));
5827 evalcond[3]=((((-1.0)*x378))+new_r10);
5828 evalcond[4]=((((-1.0)*x378*x379))+new_r02);
5829 evalcond[5]=((((-1.0)*x377*x379))+new_r12);
5830 evalcond[6]=(x387+x381);
5831 evalcond[7]=(((new_r12*x378))+(((-1.0)*new_r02*x386)));
5832 evalcond[8]=((((-1.0)*new_r01*x386))+((new_r11*x378)));
5833 evalcond[9]=(x382+x383+new_r22);
5834 evalcond[10]=((-1.0)+(((-1.0)*new_r00*x386))+((new_r10*x378)));
5835 evalcond[11]=((((-1.0)*x379))+x384+x385);
5836 evalcond[12]=((((-1.0)*x379*x381))+(((-1.0)*x379*x387)));
5837 evalcond[13]=((((-1.0)*x380*x387))+(((-1.0)*x380*x381)));
5838 evalcond[14]=((((-1.0)*x380*x385))+(((-1.0)*x380*x384))+((new_r22*sj4)));
5839 evalcond[15]=((((-1.0)*cj4*new_r21))+(((-1.0)*x379*x383))+(((-1.0)*x379*x382)));
5840 evalcond[16]=((-1.0)+(((-1.0)*x380*x383))+(((-1.0)*x380*x382))+(sj4*sj4));
5841 evalcond[17]=((1.0)+(((-1.0)*x379*x385))+(((-1.0)*x379*x384))+(((-1.0)*new_r22*x380)));
5849 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
5850 vinfos[0].jointtype = 1;
5851 vinfos[0].foffset = j0;
5852 vinfos[0].indices[0] = _ij0[0];
5853 vinfos[0].indices[1] = _ij0[1];
5854 vinfos[0].maxsolutions = _nj0;
5855 vinfos[1].jointtype = 1;
5856 vinfos[1].foffset = j1;
5857 vinfos[1].indices[0] = _ij1[0];
5858 vinfos[1].indices[1] = _ij1[1];
5859 vinfos[1].maxsolutions = _nj1;
5860 vinfos[2].jointtype = 1;
5861 vinfos[2].foffset = j2;
5862 vinfos[2].indices[0] = _ij2[0];
5863 vinfos[2].indices[1] = _ij2[1];
5864 vinfos[2].maxsolutions = _nj2;
5865 vinfos[3].jointtype = 1;
5866 vinfos[3].foffset = j3;
5867 vinfos[3].indices[0] = _ij3[0];
5868 vinfos[3].indices[1] = _ij3[1];
5869 vinfos[3].maxsolutions = _nj3;
5870 vinfos[4].jointtype = 1;
5871 vinfos[4].foffset = j4;
5872 vinfos[4].indices[0] = _ij4[0];
5873 vinfos[4].indices[1] = _ij4[1];
5874 vinfos[4].maxsolutions = _nj4;
5875 vinfos[5].jointtype = 1;
5876 vinfos[5].foffset = j5;
5877 vinfos[5].indices[0] = _ij5[0];
5878 vinfos[5].indices[1] = _ij5[1];
5879 vinfos[5].maxsolutions = _nj5;
5880 std::vector<int> vfree(0);
5888 if( bgotonextstatement )
5890 bool bgotonextstatement =
true;
5893 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((1.5707963267949)+j5)))), 6.28318530717959)));
5894 evalcond[1]=new_r20;
5895 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 )
5897 bgotonextstatement=
false;
5899 IkReal j3array[1], cj3array[1], sj3array[1];
5900 bool j3valid[1]={
false};
5904 j3array[0]=
IKatan2(new_r00, ((-1.0)*new_r10));
5905 sj3array[0]=
IKsin(j3array[0]);
5906 cj3array[0]=
IKcos(j3array[0]);
5907 if( j3array[0] >
IKPI )
5911 else if( j3array[0] < -
IKPI )
5912 { j3array[0]+=
IK2PI;
5915 for(
int ij3 = 0; ij3 < 1; ++ij3)
5921 _ij3[0] = ij3; _ij3[1] = -1;
5922 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
5926 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
5929 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
5931 IkReal evalcond[18];
5932 IkReal x389=
IKcos(j3);
5933 IkReal x390=
IKsin(j3);
5934 IkReal x391=(new_r22*sj4);
5935 IkReal x392=((1.0)*sj4);
5936 IkReal x393=((1.0)*new_r22);
5937 IkReal x394=(new_r00*x389);
5938 IkReal x395=(new_r11*x390);
5939 IkReal x396=(new_r01*x389);
5940 IkReal x397=(new_r02*x389);
5941 IkReal x398=(new_r12*x390);
5942 IkReal x399=((1.0)*x390);
5943 IkReal x400=(new_r10*x390);
5944 IkReal x401=(x390*x393);
5945 evalcond[0]=(x389+new_r10);
5946 evalcond[1]=((((-1.0)*x399))+new_r00);
5947 evalcond[2]=((((-1.0)*x389*x392))+new_r02);
5948 evalcond[3]=((((-1.0)*x390*x392))+new_r12);
5949 evalcond[4]=((((-1.0)*x389*x393))+new_r01);
5950 evalcond[5]=(new_r11+(((-1.0)*x401)));
5951 evalcond[6]=(x394+x400);
5952 evalcond[7]=(((new_r12*x389))+(((-1.0)*new_r02*x399)));
5953 evalcond[8]=((((-1.0)*new_r01*x399))+((new_r11*x389)));
5954 evalcond[9]=((1.0)+((new_r10*x389))+(((-1.0)*new_r00*x399)));
5955 evalcond[10]=((((-1.0)*x392))+x397+x398);
5956 evalcond[11]=((((-1.0)*x393))+x395+x396);
5957 evalcond[12]=((((-1.0)*x392*x400))+(((-1.0)*x392*x394)));
5958 evalcond[13]=((((-1.0)*x393*x400))+(((-1.0)*x393*x394)));
5959 evalcond[14]=(x391+(((-1.0)*x393*x398))+(((-1.0)*x393*x397)));
5960 evalcond[15]=(x391+(((-1.0)*x392*x395))+(((-1.0)*x392*x396)));
5961 evalcond[16]=((1.0)+(((-1.0)*new_r22*x393))+(((-1.0)*x392*x398))+(((-1.0)*x392*x397)));
5962 evalcond[17]=((1.0)+(((-1.0)*sj4*x392))+(((-1.0)*x393*x395))+(((-1.0)*x393*x396)));
5970 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
5971 vinfos[0].jointtype = 1;
5972 vinfos[0].foffset = j0;
5973 vinfos[0].indices[0] = _ij0[0];
5974 vinfos[0].indices[1] = _ij0[1];
5975 vinfos[0].maxsolutions = _nj0;
5976 vinfos[1].jointtype = 1;
5977 vinfos[1].foffset = j1;
5978 vinfos[1].indices[0] = _ij1[0];
5979 vinfos[1].indices[1] = _ij1[1];
5980 vinfos[1].maxsolutions = _nj1;
5981 vinfos[2].jointtype = 1;
5982 vinfos[2].foffset = j2;
5983 vinfos[2].indices[0] = _ij2[0];
5984 vinfos[2].indices[1] = _ij2[1];
5985 vinfos[2].maxsolutions = _nj2;
5986 vinfos[3].jointtype = 1;
5987 vinfos[3].foffset = j3;
5988 vinfos[3].indices[0] = _ij3[0];
5989 vinfos[3].indices[1] = _ij3[1];
5990 vinfos[3].maxsolutions = _nj3;
5991 vinfos[4].jointtype = 1;
5992 vinfos[4].foffset = j4;
5993 vinfos[4].indices[0] = _ij4[0];
5994 vinfos[4].indices[1] = _ij4[1];
5995 vinfos[4].maxsolutions = _nj4;
5996 vinfos[5].jointtype = 1;
5997 vinfos[5].foffset = j5;
5998 vinfos[5].indices[0] = _ij5[0];
5999 vinfos[5].indices[1] = _ij5[1];
6000 vinfos[5].maxsolutions = _nj5;
6001 std::vector<int> vfree(0);
6009 if( bgotonextstatement )
6011 bool bgotonextstatement =
true;
6014 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(j4))), 6.28318530717959)));
6015 evalcond[1]=new_r20;
6016 evalcond[2]=new_r02;
6017 evalcond[3]=new_r12;
6018 evalcond[4]=new_r21;
6019 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 )
6021 bgotonextstatement=
false;
6023 IkReal j3array[1], cj3array[1], sj3array[1];
6024 bool j3valid[1]={
false};
6026 IkReal x402=((1.0)*new_r01);
6029 j3array[0]=
IKatan2(((((-1.0)*cj5*x402))+(((-1.0)*new_r00*sj5))), ((((-1.0)*sj5*x402))+((cj5*new_r00))));
6030 sj3array[0]=
IKsin(j3array[0]);
6031 cj3array[0]=
IKcos(j3array[0]);
6032 if( j3array[0] >
IKPI )
6036 else if( j3array[0] < -
IKPI )
6037 { j3array[0]+=
IK2PI;
6040 for(
int ij3 = 0; ij3 < 1; ++ij3)
6046 _ij3[0] = ij3; _ij3[1] = -1;
6047 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
6051 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
6054 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
6057 IkReal x403=
IKcos(j3);
6058 IkReal x404=
IKsin(j3);
6059 IkReal x405=((1.0)*cj5);
6060 IkReal x406=(sj5*x404);
6061 IkReal x407=(sj5*x403);
6062 IkReal x408=((1.0)*x404);
6063 IkReal x409=(x403*x405);
6064 evalcond[0]=(sj5+((new_r11*x404))+((new_r01*x403)));
6065 evalcond[1]=(((cj5*x404))+x407+new_r01);
6066 evalcond[2]=(x406+new_r00+(((-1.0)*x409)));
6067 evalcond[3]=(x406+new_r11+(((-1.0)*x409)));
6068 evalcond[4]=(((new_r10*x404))+(((-1.0)*x405))+((new_r00*x403)));
6069 evalcond[5]=((((-1.0)*x404*x405))+new_r10+(((-1.0)*x407)));
6070 evalcond[6]=((((-1.0)*sj5))+((new_r10*x403))+(((-1.0)*new_r00*x408)));
6071 evalcond[7]=(((new_r11*x403))+(((-1.0)*new_r01*x408))+(((-1.0)*x405)));
6079 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
6080 vinfos[0].jointtype = 1;
6081 vinfos[0].foffset = j0;
6082 vinfos[0].indices[0] = _ij0[0];
6083 vinfos[0].indices[1] = _ij0[1];
6084 vinfos[0].maxsolutions = _nj0;
6085 vinfos[1].jointtype = 1;
6086 vinfos[1].foffset = j1;
6087 vinfos[1].indices[0] = _ij1[0];
6088 vinfos[1].indices[1] = _ij1[1];
6089 vinfos[1].maxsolutions = _nj1;
6090 vinfos[2].jointtype = 1;
6091 vinfos[2].foffset = j2;
6092 vinfos[2].indices[0] = _ij2[0];
6093 vinfos[2].indices[1] = _ij2[1];
6094 vinfos[2].maxsolutions = _nj2;
6095 vinfos[3].jointtype = 1;
6096 vinfos[3].foffset = j3;
6097 vinfos[3].indices[0] = _ij3[0];
6098 vinfos[3].indices[1] = _ij3[1];
6099 vinfos[3].maxsolutions = _nj3;
6100 vinfos[4].jointtype = 1;
6101 vinfos[4].foffset = j4;
6102 vinfos[4].indices[0] = _ij4[0];
6103 vinfos[4].indices[1] = _ij4[1];
6104 vinfos[4].maxsolutions = _nj4;
6105 vinfos[5].jointtype = 1;
6106 vinfos[5].foffset = j5;
6107 vinfos[5].indices[0] = _ij5[0];
6108 vinfos[5].indices[1] = _ij5[1];
6109 vinfos[5].maxsolutions = _nj5;
6110 std::vector<int> vfree(0);
6118 if( bgotonextstatement )
6120 bool bgotonextstatement =
true;
6123 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-3.14159265358979)+j4)))), 6.28318530717959)));
6124 evalcond[1]=new_r20;
6125 evalcond[2]=new_r02;
6126 evalcond[3]=new_r12;
6127 evalcond[4]=new_r21;
6128 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 )
6130 bgotonextstatement=
false;
6132 IkReal j3array[1], cj3array[1], sj3array[1];
6133 bool j3valid[1]={
false};
6135 IkReal x410=((1.0)*cj5);
6138 j3array[0]=
IKatan2(((((-1.0)*new_r00*sj5))+(((-1.0)*new_r01*x410))), (((new_r01*sj5))+(((-1.0)*new_r00*x410))));
6139 sj3array[0]=
IKsin(j3array[0]);
6140 cj3array[0]=
IKcos(j3array[0]);
6141 if( j3array[0] >
IKPI )
6145 else if( j3array[0] < -
IKPI )
6146 { j3array[0]+=
IK2PI;
6149 for(
int ij3 = 0; ij3 < 1; ++ij3)
6155 _ij3[0] = ij3; _ij3[1] = -1;
6156 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
6160 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
6163 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
6166 IkReal x411=
IKsin(j3);
6167 IkReal x412=
IKcos(j3);
6168 IkReal x413=((1.0)*sj5);
6169 IkReal x414=((1.0)*cj5);
6170 IkReal x415=(cj5*x411);
6171 IkReal x416=((1.0)*x411);
6172 IkReal x417=(x412*x413);
6173 evalcond[0]=(cj5+((new_r10*x411))+((new_r00*x412)));
6174 evalcond[1]=(((sj5*x411))+((cj5*x412))+new_r00);
6175 evalcond[2]=(x415+new_r01+(((-1.0)*x417)));
6176 evalcond[3]=(x415+new_r10+(((-1.0)*x417)));
6177 evalcond[4]=(((new_r11*x411))+(((-1.0)*x413))+((new_r01*x412)));
6178 evalcond[5]=((((-1.0)*x412*x414))+(((-1.0)*x411*x413))+new_r11);
6179 evalcond[6]=(((new_r10*x412))+(((-1.0)*new_r00*x416))+(((-1.0)*x413)));
6180 evalcond[7]=(((new_r11*x412))+(((-1.0)*x414))+(((-1.0)*new_r01*x416)));
6188 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
6189 vinfos[0].jointtype = 1;
6190 vinfos[0].foffset = j0;
6191 vinfos[0].indices[0] = _ij0[0];
6192 vinfos[0].indices[1] = _ij0[1];
6193 vinfos[0].maxsolutions = _nj0;
6194 vinfos[1].jointtype = 1;
6195 vinfos[1].foffset = j1;
6196 vinfos[1].indices[0] = _ij1[0];
6197 vinfos[1].indices[1] = _ij1[1];
6198 vinfos[1].maxsolutions = _nj1;
6199 vinfos[2].jointtype = 1;
6200 vinfos[2].foffset = j2;
6201 vinfos[2].indices[0] = _ij2[0];
6202 vinfos[2].indices[1] = _ij2[1];
6203 vinfos[2].maxsolutions = _nj2;
6204 vinfos[3].jointtype = 1;
6205 vinfos[3].foffset = j3;
6206 vinfos[3].indices[0] = _ij3[0];
6207 vinfos[3].indices[1] = _ij3[1];
6208 vinfos[3].maxsolutions = _nj3;
6209 vinfos[4].jointtype = 1;
6210 vinfos[4].foffset = j4;
6211 vinfos[4].indices[0] = _ij4[0];
6212 vinfos[4].indices[1] = _ij4[1];
6213 vinfos[4].maxsolutions = _nj4;
6214 vinfos[5].jointtype = 1;
6215 vinfos[5].foffset = j5;
6216 vinfos[5].indices[0] = _ij5[0];
6217 vinfos[5].indices[1] = _ij5[1];
6218 vinfos[5].maxsolutions = _nj5;
6219 std::vector<int> vfree(0);
6227 if( bgotonextstatement )
6229 bool bgotonextstatement =
true;
6232 evalcond[0]=((
IKabs(new_r12))+(
IKabs(new_r02)));
6233 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
6235 bgotonextstatement=
false;
6242 j3eval[0]=((
IKabs(new_r11))+(
IKabs(new_r01)));
6243 if(
IKabs(j3eval[0]) < 0.0000010000000000 )
6251 j3eval[0]=((
IKabs(new_r10))+(
IKabs(new_r00)));
6252 if(
IKabs(j3eval[0]) < 0.0000010000000000 )
6260 j3eval[0]=((
IKabs((new_r10*new_r22)))+(
IKabs((new_r00*new_r22))));
6261 if(
IKabs(j3eval[0]) < 0.0000010000000000 )
6268 IkReal j3array[2], cj3array[2], sj3array[2];
6269 bool j3valid[2]={
false};
6271 IkReal x418=((-1.0)*new_r22);
6276 IkReal x419=x420.
value;
6277 j3array[0]=((-1.0)*x419);
6278 sj3array[0]=
IKsin(j3array[0]);
6279 cj3array[0]=
IKcos(j3array[0]);
6280 j3array[1]=((3.14159265358979)+(((-1.0)*x419)));
6281 sj3array[1]=
IKsin(j3array[1]);
6282 cj3array[1]=
IKcos(j3array[1]);
6283 if( j3array[0] >
IKPI )
6287 else if( j3array[0] < -
IKPI )
6288 { j3array[0]+=
IK2PI;
6291 if( j3array[1] >
IKPI )
6295 else if( j3array[1] < -
IKPI )
6296 { j3array[1]+=
IK2PI;
6299 for(
int ij3 = 0; ij3 < 2; ++ij3)
6305 _ij3[0] = ij3; _ij3[1] = -1;
6306 for(
int iij3 = ij3+1; iij3 < 2; ++iij3)
6310 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
6313 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
6316 IkReal x421=
IKsin(j3);
6317 IkReal x422=
IKcos(j3);
6318 IkReal x423=((1.0)*new_r22);
6319 IkReal x424=(new_r11*x421);
6320 IkReal x425=(new_r01*x422);
6321 IkReal x426=((1.0)*x421);
6322 evalcond[0]=(x425+x424);
6323 evalcond[1]=(((new_r10*x421))+((new_r00*x422)));
6324 evalcond[2]=((((-1.0)*new_r00*x426))+((new_r10*x422)));
6325 evalcond[3]=(((new_r11*x422))+(((-1.0)*new_r01*x426)));
6326 evalcond[4]=((((-1.0)*x423*x424))+(((-1.0)*x423*x425)));
6334 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
6335 vinfos[0].jointtype = 1;
6336 vinfos[0].foffset = j0;
6337 vinfos[0].indices[0] = _ij0[0];
6338 vinfos[0].indices[1] = _ij0[1];
6339 vinfos[0].maxsolutions = _nj0;
6340 vinfos[1].jointtype = 1;
6341 vinfos[1].foffset = j1;
6342 vinfos[1].indices[0] = _ij1[0];
6343 vinfos[1].indices[1] = _ij1[1];
6344 vinfos[1].maxsolutions = _nj1;
6345 vinfos[2].jointtype = 1;
6346 vinfos[2].foffset = j2;
6347 vinfos[2].indices[0] = _ij2[0];
6348 vinfos[2].indices[1] = _ij2[1];
6349 vinfos[2].maxsolutions = _nj2;
6350 vinfos[3].jointtype = 1;
6351 vinfos[3].foffset = j3;
6352 vinfos[3].indices[0] = _ij3[0];
6353 vinfos[3].indices[1] = _ij3[1];
6354 vinfos[3].maxsolutions = _nj3;
6355 vinfos[4].jointtype = 1;
6356 vinfos[4].foffset = j4;
6357 vinfos[4].indices[0] = _ij4[0];
6358 vinfos[4].indices[1] = _ij4[1];
6359 vinfos[4].maxsolutions = _nj4;
6360 vinfos[5].jointtype = 1;
6361 vinfos[5].foffset = j5;
6362 vinfos[5].indices[0] = _ij5[0];
6363 vinfos[5].indices[1] = _ij5[1];
6364 vinfos[5].maxsolutions = _nj5;
6365 std::vector<int> vfree(0);
6378 IkReal j3array[2], cj3array[2], sj3array[2];
6379 bool j3valid[2]={
false};
6385 IkReal x427=x428.
value;
6386 j3array[0]=((-1.0)*x427);
6387 sj3array[0]=
IKsin(j3array[0]);
6388 cj3array[0]=
IKcos(j3array[0]);
6389 j3array[1]=((3.14159265358979)+(((-1.0)*x427)));
6390 sj3array[1]=
IKsin(j3array[1]);
6391 cj3array[1]=
IKcos(j3array[1]);
6392 if( j3array[0] >
IKPI )
6396 else if( j3array[0] < -
IKPI )
6397 { j3array[0]+=
IK2PI;
6400 if( j3array[1] >
IKPI )
6404 else if( j3array[1] < -
IKPI )
6405 { j3array[1]+=
IK2PI;
6408 for(
int ij3 = 0; ij3 < 2; ++ij3)
6414 _ij3[0] = ij3; _ij3[1] = -1;
6415 for(
int iij3 = ij3+1; iij3 < 2; ++iij3)
6419 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
6422 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
6425 IkReal x429=
IKcos(j3);
6426 IkReal x430=
IKsin(j3);
6427 IkReal x431=((1.0)*x430);
6428 IkReal x432=(new_r22*x431);
6429 IkReal x433=((1.0)*new_r22*x429);
6430 evalcond[0]=(((new_r11*x430))+((new_r01*x429)));
6431 evalcond[1]=((((-1.0)*new_r00*x431))+((new_r10*x429)));
6432 evalcond[2]=((((-1.0)*new_r01*x431))+((new_r11*x429)));
6433 evalcond[3]=((((-1.0)*new_r00*x433))+(((-1.0)*new_r10*x432)));
6434 evalcond[4]=((((-1.0)*new_r01*x433))+(((-1.0)*new_r11*x432)));
6442 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
6443 vinfos[0].jointtype = 1;
6444 vinfos[0].foffset = j0;
6445 vinfos[0].indices[0] = _ij0[0];
6446 vinfos[0].indices[1] = _ij0[1];
6447 vinfos[0].maxsolutions = _nj0;
6448 vinfos[1].jointtype = 1;
6449 vinfos[1].foffset = j1;
6450 vinfos[1].indices[0] = _ij1[0];
6451 vinfos[1].indices[1] = _ij1[1];
6452 vinfos[1].maxsolutions = _nj1;
6453 vinfos[2].jointtype = 1;
6454 vinfos[2].foffset = j2;
6455 vinfos[2].indices[0] = _ij2[0];
6456 vinfos[2].indices[1] = _ij2[1];
6457 vinfos[2].maxsolutions = _nj2;
6458 vinfos[3].jointtype = 1;
6459 vinfos[3].foffset = j3;
6460 vinfos[3].indices[0] = _ij3[0];
6461 vinfos[3].indices[1] = _ij3[1];
6462 vinfos[3].maxsolutions = _nj3;
6463 vinfos[4].jointtype = 1;
6464 vinfos[4].foffset = j4;
6465 vinfos[4].indices[0] = _ij4[0];
6466 vinfos[4].indices[1] = _ij4[1];
6467 vinfos[4].maxsolutions = _nj4;
6468 vinfos[5].jointtype = 1;
6469 vinfos[5].foffset = j5;
6470 vinfos[5].indices[0] = _ij5[0];
6471 vinfos[5].indices[1] = _ij5[1];
6472 vinfos[5].maxsolutions = _nj5;
6473 std::vector<int> vfree(0);
6486 IkReal j3array[2], cj3array[2], sj3array[2];
6487 bool j3valid[2]={
false};
6493 IkReal x434=x435.
value;
6494 j3array[0]=((-1.0)*x434);
6495 sj3array[0]=
IKsin(j3array[0]);
6496 cj3array[0]=
IKcos(j3array[0]);
6497 j3array[1]=((3.14159265358979)+(((-1.0)*x434)));
6498 sj3array[1]=
IKsin(j3array[1]);
6499 cj3array[1]=
IKcos(j3array[1]);
6500 if( j3array[0] >
IKPI )
6504 else if( j3array[0] < -
IKPI )
6505 { j3array[0]+=
IK2PI;
6508 if( j3array[1] >
IKPI )
6512 else if( j3array[1] < -
IKPI )
6513 { j3array[1]+=
IK2PI;
6516 for(
int ij3 = 0; ij3 < 2; ++ij3)
6522 _ij3[0] = ij3; _ij3[1] = -1;
6523 for(
int iij3 = ij3+1; iij3 < 2; ++iij3)
6527 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
6530 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
6533 IkReal x436=
IKcos(j3);
6534 IkReal x437=
IKsin(j3);
6535 IkReal x438=((1.0)*new_r22);
6536 IkReal x439=(new_r10*x437);
6537 IkReal x440=(new_r00*x436);
6538 IkReal x441=((1.0)*x437);
6539 evalcond[0]=(x439+x440);
6540 evalcond[1]=((((-1.0)*new_r00*x441))+((new_r10*x436)));
6541 evalcond[2]=((((-1.0)*new_r01*x441))+((new_r11*x436)));
6542 evalcond[3]=((((-1.0)*x438*x440))+(((-1.0)*x438*x439)));
6543 evalcond[4]=((((-1.0)*new_r01*x436*x438))+(((-1.0)*new_r11*x437*x438)));
6551 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
6552 vinfos[0].jointtype = 1;
6553 vinfos[0].foffset = j0;
6554 vinfos[0].indices[0] = _ij0[0];
6555 vinfos[0].indices[1] = _ij0[1];
6556 vinfos[0].maxsolutions = _nj0;
6557 vinfos[1].jointtype = 1;
6558 vinfos[1].foffset = j1;
6559 vinfos[1].indices[0] = _ij1[0];
6560 vinfos[1].indices[1] = _ij1[1];
6561 vinfos[1].maxsolutions = _nj1;
6562 vinfos[2].jointtype = 1;
6563 vinfos[2].foffset = j2;
6564 vinfos[2].indices[0] = _ij2[0];
6565 vinfos[2].indices[1] = _ij2[1];
6566 vinfos[2].maxsolutions = _nj2;
6567 vinfos[3].jointtype = 1;
6568 vinfos[3].foffset = j3;
6569 vinfos[3].indices[0] = _ij3[0];
6570 vinfos[3].indices[1] = _ij3[1];
6571 vinfos[3].maxsolutions = _nj3;
6572 vinfos[4].jointtype = 1;
6573 vinfos[4].foffset = j4;
6574 vinfos[4].indices[0] = _ij4[0];
6575 vinfos[4].indices[1] = _ij4[1];
6576 vinfos[4].maxsolutions = _nj4;
6577 vinfos[5].jointtype = 1;
6578 vinfos[5].foffset = j5;
6579 vinfos[5].indices[0] = _ij5[0];
6580 vinfos[5].indices[1] = _ij5[1];
6581 vinfos[5].maxsolutions = _nj5;
6582 std::vector<int> vfree(0);
6594 if( bgotonextstatement )
6596 bool bgotonextstatement =
true;
6601 bgotonextstatement=
false;
6606 if( bgotonextstatement )
6619 IkReal j3array[1], cj3array[1], sj3array[1];
6620 bool j3valid[1]={
false};
6626 IkReal x442=x443.
value;
6633 j3array[0]=
IKatan2((x442*(x444.
value)*(((((-1.0)*cj4*new_r02*sj5))+(((-1.0)*new_r01*sj4))))), (new_r02*x442));
6634 sj3array[0]=
IKsin(j3array[0]);
6635 cj3array[0]=
IKcos(j3array[0]);
6636 if( j3array[0] >
IKPI )
6640 else if( j3array[0] < -
IKPI )
6641 { j3array[0]+=
IK2PI;
6644 for(
int ij3 = 0; ij3 < 1; ++ij3)
6650 _ij3[0] = ij3; _ij3[1] = -1;
6651 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
6655 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
6658 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
6660 IkReal evalcond[18];
6661 IkReal x445=
IKcos(j3);
6662 IkReal x446=
IKsin(j3);
6663 IkReal x447=((1.0)*sj5);
6664 IkReal x448=((1.0)*cj4);
6665 IkReal x449=((1.0)*sj4);
6666 IkReal x450=(cj4*sj5);
6667 IkReal x451=(new_r10*x446);
6668 IkReal x452=(cj5*x445);
6669 IkReal x453=(cj5*x446);
6670 IkReal x454=(new_r11*x446);
6671 IkReal x455=(new_r01*x445);
6672 IkReal x456=(new_r02*x445);
6673 IkReal x457=(new_r12*x446);
6674 IkReal x458=(new_r00*x445);
6675 IkReal x459=((1.0)*x446);
6676 evalcond[0]=((((-1.0)*x445*x449))+new_r02);
6677 evalcond[1]=(new_r12+(((-1.0)*x446*x449)));
6678 evalcond[2]=(((new_r12*x445))+(((-1.0)*new_r02*x459)));
6679 evalcond[3]=(x453+((x445*x450))+new_r01);
6680 evalcond[4]=((((-1.0)*x449))+x456+x457);
6681 evalcond[5]=(x454+x455+x450);
6682 evalcond[6]=(((sj5*x446))+new_r00+(((-1.0)*x448*x452)));
6683 evalcond[7]=((((-1.0)*x452))+((x446*x450))+new_r11);
6684 evalcond[8]=((((-1.0)*x447))+(((-1.0)*new_r00*x459))+((new_r10*x445)));
6685 evalcond[9]=((((-1.0)*new_r01*x459))+((new_r11*x445))+(((-1.0)*cj5)));
6686 evalcond[10]=((((-1.0)*cj5*x448))+x458+x451);
6687 evalcond[11]=((((-1.0)*x445*x447))+new_r10+(((-1.0)*x448*x453)));
6688 evalcond[12]=(((new_r22*sj4))+(((-1.0)*x448*x456))+(((-1.0)*x448*x457)));
6689 evalcond[13]=((((-1.0)*new_r20*x448))+(((-1.0)*x449*x458))+(((-1.0)*x449*x451)));
6690 evalcond[14]=((((-1.0)*new_r21*x448))+(((-1.0)*x449*x454))+(((-1.0)*x449*x455)));
6691 evalcond[15]=(((new_r20*sj4))+cj5+(((-1.0)*x448*x451))+(((-1.0)*x448*x458)));
6692 evalcond[16]=((1.0)+(((-1.0)*x449*x456))+(((-1.0)*x449*x457))+(((-1.0)*new_r22*x448)));
6693 evalcond[17]=((((-1.0)*x447))+((new_r21*sj4))+(((-1.0)*x448*x454))+(((-1.0)*x448*x455)));
6701 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
6702 vinfos[0].jointtype = 1;
6703 vinfos[0].foffset = j0;
6704 vinfos[0].indices[0] = _ij0[0];
6705 vinfos[0].indices[1] = _ij0[1];
6706 vinfos[0].maxsolutions = _nj0;
6707 vinfos[1].jointtype = 1;
6708 vinfos[1].foffset = j1;
6709 vinfos[1].indices[0] = _ij1[0];
6710 vinfos[1].indices[1] = _ij1[1];
6711 vinfos[1].maxsolutions = _nj1;
6712 vinfos[2].jointtype = 1;
6713 vinfos[2].foffset = j2;
6714 vinfos[2].indices[0] = _ij2[0];
6715 vinfos[2].indices[1] = _ij2[1];
6716 vinfos[2].maxsolutions = _nj2;
6717 vinfos[3].jointtype = 1;
6718 vinfos[3].foffset = j3;
6719 vinfos[3].indices[0] = _ij3[0];
6720 vinfos[3].indices[1] = _ij3[1];
6721 vinfos[3].maxsolutions = _nj3;
6722 vinfos[4].jointtype = 1;
6723 vinfos[4].foffset = j4;
6724 vinfos[4].indices[0] = _ij4[0];
6725 vinfos[4].indices[1] = _ij4[1];
6726 vinfos[4].maxsolutions = _nj4;
6727 vinfos[5].jointtype = 1;
6728 vinfos[5].foffset = j5;
6729 vinfos[5].indices[0] = _ij5[0];
6730 vinfos[5].indices[1] = _ij5[1];
6731 vinfos[5].maxsolutions = _nj5;
6732 std::vector<int> vfree(0);
6745 IkReal j3array[1], cj3array[1], sj3array[1];
6746 bool j3valid[1]={
false};
6756 j3array[0]=((-1.5707963267949)+(((1.5707963267949)*(x460.
value)))+(x461.
value));
6757 sj3array[0]=
IKsin(j3array[0]);
6758 cj3array[0]=
IKcos(j3array[0]);
6759 if( j3array[0] >
IKPI )
6763 else if( j3array[0] < -
IKPI )
6764 { j3array[0]+=
IK2PI;
6767 for(
int ij3 = 0; ij3 < 1; ++ij3)
6773 _ij3[0] = ij3; _ij3[1] = -1;
6774 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
6778 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
6781 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
6783 IkReal evalcond[18];
6784 IkReal x462=
IKcos(j3);
6785 IkReal x463=
IKsin(j3);
6786 IkReal x464=((1.0)*sj5);
6787 IkReal x465=((1.0)*cj4);
6788 IkReal x466=((1.0)*sj4);
6789 IkReal x467=(cj4*sj5);
6790 IkReal x468=(new_r10*x463);
6791 IkReal x469=(cj5*x462);
6792 IkReal x470=(cj5*x463);
6793 IkReal x471=(new_r11*x463);
6794 IkReal x472=(new_r01*x462);
6795 IkReal x473=(new_r02*x462);
6796 IkReal x474=(new_r12*x463);
6797 IkReal x475=(new_r00*x462);
6798 IkReal x476=((1.0)*x463);
6799 evalcond[0]=((((-1.0)*x462*x466))+new_r02);
6800 evalcond[1]=((((-1.0)*x463*x466))+new_r12);
6801 evalcond[2]=(((new_r12*x462))+(((-1.0)*new_r02*x476)));
6802 evalcond[3]=(x470+new_r01+((x462*x467)));
6803 evalcond[4]=((((-1.0)*x466))+x474+x473);
6804 evalcond[5]=(x467+x471+x472);
6805 evalcond[6]=((((-1.0)*x465*x469))+new_r00+((sj5*x463)));
6806 evalcond[7]=(((x463*x467))+(((-1.0)*x469))+new_r11);
6807 evalcond[8]=(((new_r10*x462))+(((-1.0)*new_r00*x476))+(((-1.0)*x464)));
6808 evalcond[9]=(((new_r11*x462))+(((-1.0)*new_r01*x476))+(((-1.0)*cj5)));
6809 evalcond[10]=((((-1.0)*cj5*x465))+x468+x475);
6810 evalcond[11]=((((-1.0)*x462*x464))+new_r10+(((-1.0)*x465*x470)));
6811 evalcond[12]=(((new_r22*sj4))+(((-1.0)*x465*x474))+(((-1.0)*x465*x473)));
6812 evalcond[13]=((((-1.0)*x466*x468))+(((-1.0)*new_r20*x465))+(((-1.0)*x466*x475)));
6813 evalcond[14]=((((-1.0)*new_r21*x465))+(((-1.0)*x466*x472))+(((-1.0)*x466*x471)));
6814 evalcond[15]=((((-1.0)*x465*x468))+((new_r20*sj4))+cj5+(((-1.0)*x465*x475)));
6815 evalcond[16]=((1.0)+(((-1.0)*new_r22*x465))+(((-1.0)*x466*x473))+(((-1.0)*x466*x474)));
6816 evalcond[17]=((((-1.0)*x464))+((new_r21*sj4))+(((-1.0)*x465*x471))+(((-1.0)*x465*x472)));
6824 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
6825 vinfos[0].jointtype = 1;
6826 vinfos[0].foffset = j0;
6827 vinfos[0].indices[0] = _ij0[0];
6828 vinfos[0].indices[1] = _ij0[1];
6829 vinfos[0].maxsolutions = _nj0;
6830 vinfos[1].jointtype = 1;
6831 vinfos[1].foffset = j1;
6832 vinfos[1].indices[0] = _ij1[0];
6833 vinfos[1].indices[1] = _ij1[1];
6834 vinfos[1].maxsolutions = _nj1;
6835 vinfos[2].jointtype = 1;
6836 vinfos[2].foffset = j2;
6837 vinfos[2].indices[0] = _ij2[0];
6838 vinfos[2].indices[1] = _ij2[1];
6839 vinfos[2].maxsolutions = _nj2;
6840 vinfos[3].jointtype = 1;
6841 vinfos[3].foffset = j3;
6842 vinfos[3].indices[0] = _ij3[0];
6843 vinfos[3].indices[1] = _ij3[1];
6844 vinfos[3].maxsolutions = _nj3;
6845 vinfos[4].jointtype = 1;
6846 vinfos[4].foffset = j4;
6847 vinfos[4].indices[0] = _ij4[0];
6848 vinfos[4].indices[1] = _ij4[1];
6849 vinfos[4].maxsolutions = _nj4;
6850 vinfos[5].jointtype = 1;
6851 vinfos[5].foffset = j5;
6852 vinfos[5].indices[0] = _ij5[0];
6853 vinfos[5].indices[1] = _ij5[1];
6854 vinfos[5].maxsolutions = _nj5;
6855 std::vector<int> vfree(0);
6874 IkReal j3array[1], cj3array[1], sj3array[1];
6875 bool j3valid[1]={
false};
6885 j3array[0]=((-1.5707963267949)+(((1.5707963267949)*(x477.
value)))+(x478.
value));
6886 sj3array[0]=
IKsin(j3array[0]);
6887 cj3array[0]=
IKcos(j3array[0]);
6888 if( j3array[0] >
IKPI )
6892 else if( j3array[0] < -
IKPI )
6893 { j3array[0]+=
IK2PI;
6896 for(
int ij3 = 0; ij3 < 1; ++ij3)
6902 _ij3[0] = ij3; _ij3[1] = -1;
6903 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
6907 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
6910 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
6913 IkReal x479=
IKcos(j3);
6914 IkReal x480=
IKsin(j3);
6915 IkReal x481=((1.0)*sj4);
6916 IkReal x482=((1.0)*cj4);
6917 IkReal x483=(new_r12*x480);
6918 IkReal x484=(new_r02*x479);
6919 evalcond[0]=((((-1.0)*x479*x481))+new_r02);
6920 evalcond[1]=((((-1.0)*x480*x481))+new_r12);
6921 evalcond[2]=(((new_r12*x479))+(((-1.0)*new_r02*x480)));
6922 evalcond[3]=((((-1.0)*x481))+x483+x484);
6923 evalcond[4]=(((new_r22*sj4))+(((-1.0)*x482*x484))+(((-1.0)*x482*x483)));
6924 evalcond[5]=((((-1.0)*new_r10*x480*x481))+(((-1.0)*new_r20*x482))+(((-1.0)*new_r00*x479*x481)));
6925 evalcond[6]=((((-1.0)*new_r21*x482))+(((-1.0)*new_r11*x480*x481))+(((-1.0)*new_r01*x479*x481)));
6926 evalcond[7]=((1.0)+(((-1.0)*x481*x483))+(((-1.0)*x481*x484))+(((-1.0)*new_r22*x482)));
6937 j5eval[2]=((
IKabs(new_r20))+(
IKabs(new_r21)));
6938 if(
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000 ||
IKabs(j5eval[2]) < 0.0000010000000000 )
6944 if(
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000 )
6951 if(
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000 ||
IKabs(j5eval[2]) < 0.0000010000000000 )
6955 bool bgotonextstatement =
true;
6958 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-1.5707963267949)+j3)))), 6.28318530717959)));
6959 evalcond[1]=new_r02;
6960 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 )
6962 bgotonextstatement=
false;
6970 j5eval[2]=((
IKabs(new_r20))+(
IKabs(new_r21)));
6971 if(
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000 ||
IKabs(j5eval[2]) < 0.0000010000000000 )
6980 j5eval[2]=((
IKabs(new_r11))+(
IKabs(new_r10)));
6981 if(
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000 ||
IKabs(j5eval[2]) < 0.0000010000000000 )
6989 if(
IKabs(j5eval[0]) < 0.0000010000000000 )
6993 bool bgotonextstatement =
true;
6996 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(j4))), 6.28318530717959)));
6997 evalcond[1]=new_r20;
6998 evalcond[2]=new_r12;
6999 evalcond[3]=new_r21;
7000 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 &&
IKabs(evalcond[2]) < 0.0000050000000000 &&
IKabs(evalcond[3]) < 0.0000050000000000 )
7002 bgotonextstatement=
false;
7004 IkReal j5array[1], cj5array[1], sj5array[1];
7005 bool j5valid[1]={
false};
7009 j5array[0]=
IKatan2(((-1.0)*new_r11), new_r10);
7010 sj5array[0]=
IKsin(j5array[0]);
7011 cj5array[0]=
IKcos(j5array[0]);
7012 if( j5array[0] >
IKPI )
7016 else if( j5array[0] < -
IKPI )
7017 { j5array[0]+=
IK2PI;
7020 for(
int ij5 = 0; ij5 < 1; ++ij5)
7026 _ij5[0] = ij5; _ij5[1] = -1;
7027 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
7031 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
7034 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
7037 IkReal x485=
IKsin(j5);
7038 IkReal x486=((1.0)*(
IKcos(j5)));
7039 evalcond[0]=(x485+new_r11);
7040 evalcond[1]=((((-1.0)*x486))+new_r10);
7041 evalcond[2]=((((-1.0)*x485))+(((-1.0)*new_r00)));
7042 evalcond[3]=((((-1.0)*x486))+(((-1.0)*new_r01)));
7050 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
7051 vinfos[0].jointtype = 1;
7052 vinfos[0].foffset = j0;
7053 vinfos[0].indices[0] = _ij0[0];
7054 vinfos[0].indices[1] = _ij0[1];
7055 vinfos[0].maxsolutions = _nj0;
7056 vinfos[1].jointtype = 1;
7057 vinfos[1].foffset = j1;
7058 vinfos[1].indices[0] = _ij1[0];
7059 vinfos[1].indices[1] = _ij1[1];
7060 vinfos[1].maxsolutions = _nj1;
7061 vinfos[2].jointtype = 1;
7062 vinfos[2].foffset = j2;
7063 vinfos[2].indices[0] = _ij2[0];
7064 vinfos[2].indices[1] = _ij2[1];
7065 vinfos[2].maxsolutions = _nj2;
7066 vinfos[3].jointtype = 1;
7067 vinfos[3].foffset = j3;
7068 vinfos[3].indices[0] = _ij3[0];
7069 vinfos[3].indices[1] = _ij3[1];
7070 vinfos[3].maxsolutions = _nj3;
7071 vinfos[4].jointtype = 1;
7072 vinfos[4].foffset = j4;
7073 vinfos[4].indices[0] = _ij4[0];
7074 vinfos[4].indices[1] = _ij4[1];
7075 vinfos[4].maxsolutions = _nj4;
7076 vinfos[5].jointtype = 1;
7077 vinfos[5].foffset = j5;
7078 vinfos[5].indices[0] = _ij5[0];
7079 vinfos[5].indices[1] = _ij5[1];
7080 vinfos[5].maxsolutions = _nj5;
7081 std::vector<int> vfree(0);
7089 if( bgotonextstatement )
7091 bool bgotonextstatement =
true;
7094 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-3.14159265358979)+j4)))), 6.28318530717959)));
7095 evalcond[1]=new_r20;
7096 evalcond[2]=new_r12;
7097 evalcond[3]=new_r21;
7098 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 &&
IKabs(evalcond[2]) < 0.0000050000000000 &&
IKabs(evalcond[3]) < 0.0000050000000000 )
7100 bgotonextstatement=
false;
7102 IkReal j5array[1], cj5array[1], sj5array[1];
7103 bool j5valid[1]={
false};
7107 j5array[0]=
IKatan2(new_r11, ((-1.0)*new_r10));
7108 sj5array[0]=
IKsin(j5array[0]);
7109 cj5array[0]=
IKcos(j5array[0]);
7110 if( j5array[0] >
IKPI )
7114 else if( j5array[0] < -
IKPI )
7115 { j5array[0]+=
IK2PI;
7118 for(
int ij5 = 0; ij5 < 1; ++ij5)
7124 _ij5[0] = ij5; _ij5[1] = -1;
7125 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
7129 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
7132 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
7135 IkReal x487=
IKcos(j5);
7136 IkReal x488=((1.0)*(
IKsin(j5)));
7137 evalcond[0]=(x487+new_r10);
7138 evalcond[1]=((((-1.0)*x488))+new_r11);
7139 evalcond[2]=((((-1.0)*x488))+(((-1.0)*new_r00)));
7140 evalcond[3]=((((-1.0)*x487))+(((-1.0)*new_r01)));
7148 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
7149 vinfos[0].jointtype = 1;
7150 vinfos[0].foffset = j0;
7151 vinfos[0].indices[0] = _ij0[0];
7152 vinfos[0].indices[1] = _ij0[1];
7153 vinfos[0].maxsolutions = _nj0;
7154 vinfos[1].jointtype = 1;
7155 vinfos[1].foffset = j1;
7156 vinfos[1].indices[0] = _ij1[0];
7157 vinfos[1].indices[1] = _ij1[1];
7158 vinfos[1].maxsolutions = _nj1;
7159 vinfos[2].jointtype = 1;
7160 vinfos[2].foffset = j2;
7161 vinfos[2].indices[0] = _ij2[0];
7162 vinfos[2].indices[1] = _ij2[1];
7163 vinfos[2].maxsolutions = _nj2;
7164 vinfos[3].jointtype = 1;
7165 vinfos[3].foffset = j3;
7166 vinfos[3].indices[0] = _ij3[0];
7167 vinfos[3].indices[1] = _ij3[1];
7168 vinfos[3].maxsolutions = _nj3;
7169 vinfos[4].jointtype = 1;
7170 vinfos[4].foffset = j4;
7171 vinfos[4].indices[0] = _ij4[0];
7172 vinfos[4].indices[1] = _ij4[1];
7173 vinfos[4].maxsolutions = _nj4;
7174 vinfos[5].jointtype = 1;
7175 vinfos[5].foffset = j5;
7176 vinfos[5].indices[0] = _ij5[0];
7177 vinfos[5].indices[1] = _ij5[1];
7178 vinfos[5].maxsolutions = _nj5;
7179 std::vector<int> vfree(0);
7187 if( bgotonextstatement )
7189 bool bgotonextstatement =
true;
7192 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-1.5707963267949)+j4)))), 6.28318530717959)));
7193 evalcond[1]=new_r22;
7194 evalcond[2]=new_r11;
7195 evalcond[3]=new_r10;
7196 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 &&
IKabs(evalcond[2]) < 0.0000050000000000 &&
IKabs(evalcond[3]) < 0.0000050000000000 )
7198 bgotonextstatement=
false;
7200 IkReal j5array[1], cj5array[1], sj5array[1];
7201 bool j5valid[1]={
false};
7205 j5array[0]=
IKatan2(new_r21, ((-1.0)*new_r20));
7206 sj5array[0]=
IKsin(j5array[0]);
7207 cj5array[0]=
IKcos(j5array[0]);
7208 if( j5array[0] >
IKPI )
7212 else if( j5array[0] < -
IKPI )
7213 { j5array[0]+=
IK2PI;
7216 for(
int ij5 = 0; ij5 < 1; ++ij5)
7222 _ij5[0] = ij5; _ij5[1] = -1;
7223 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
7227 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
7230 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
7233 IkReal x489=
IKcos(j5);
7234 IkReal x490=((1.0)*(
IKsin(j5)));
7235 evalcond[0]=(x489+new_r20);
7236 evalcond[1]=((((-1.0)*x490))+new_r21);
7237 evalcond[2]=((((-1.0)*x490))+(((-1.0)*new_r00)));
7238 evalcond[3]=((((-1.0)*x489))+(((-1.0)*new_r01)));
7246 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
7247 vinfos[0].jointtype = 1;
7248 vinfos[0].foffset = j0;
7249 vinfos[0].indices[0] = _ij0[0];
7250 vinfos[0].indices[1] = _ij0[1];
7251 vinfos[0].maxsolutions = _nj0;
7252 vinfos[1].jointtype = 1;
7253 vinfos[1].foffset = j1;
7254 vinfos[1].indices[0] = _ij1[0];
7255 vinfos[1].indices[1] = _ij1[1];
7256 vinfos[1].maxsolutions = _nj1;
7257 vinfos[2].jointtype = 1;
7258 vinfos[2].foffset = j2;
7259 vinfos[2].indices[0] = _ij2[0];
7260 vinfos[2].indices[1] = _ij2[1];
7261 vinfos[2].maxsolutions = _nj2;
7262 vinfos[3].jointtype = 1;
7263 vinfos[3].foffset = j3;
7264 vinfos[3].indices[0] = _ij3[0];
7265 vinfos[3].indices[1] = _ij3[1];
7266 vinfos[3].maxsolutions = _nj3;
7267 vinfos[4].jointtype = 1;
7268 vinfos[4].foffset = j4;
7269 vinfos[4].indices[0] = _ij4[0];
7270 vinfos[4].indices[1] = _ij4[1];
7271 vinfos[4].maxsolutions = _nj4;
7272 vinfos[5].jointtype = 1;
7273 vinfos[5].foffset = j5;
7274 vinfos[5].indices[0] = _ij5[0];
7275 vinfos[5].indices[1] = _ij5[1];
7276 vinfos[5].maxsolutions = _nj5;
7277 std::vector<int> vfree(0);
7285 if( bgotonextstatement )
7287 bool bgotonextstatement =
true;
7290 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((1.5707963267949)+j4)))), 6.28318530717959)));
7291 evalcond[1]=new_r22;
7292 evalcond[2]=new_r11;
7293 evalcond[3]=new_r10;
7294 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 &&
IKabs(evalcond[2]) < 0.0000050000000000 &&
IKabs(evalcond[3]) < 0.0000050000000000 )
7296 bgotonextstatement=
false;
7298 IkReal j5array[1], cj5array[1], sj5array[1];
7299 bool j5valid[1]={
false};
7303 j5array[0]=
IKatan2(((-1.0)*new_r21), new_r20);
7304 sj5array[0]=
IKsin(j5array[0]);
7305 cj5array[0]=
IKcos(j5array[0]);
7306 if( j5array[0] >
IKPI )
7310 else if( j5array[0] < -
IKPI )
7311 { j5array[0]+=
IK2PI;
7314 for(
int ij5 = 0; ij5 < 1; ++ij5)
7320 _ij5[0] = ij5; _ij5[1] = -1;
7321 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
7325 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
7328 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
7331 IkReal x491=
IKsin(j5);
7332 IkReal x492=((1.0)*(
IKcos(j5)));
7333 evalcond[0]=(x491+new_r21);
7334 evalcond[1]=((((-1.0)*x492))+new_r20);
7335 evalcond[2]=((((-1.0)*x491))+(((-1.0)*new_r00)));
7336 evalcond[3]=((((-1.0)*x492))+(((-1.0)*new_r01)));
7344 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
7345 vinfos[0].jointtype = 1;
7346 vinfos[0].foffset = j0;
7347 vinfos[0].indices[0] = _ij0[0];
7348 vinfos[0].indices[1] = _ij0[1];
7349 vinfos[0].maxsolutions = _nj0;
7350 vinfos[1].jointtype = 1;
7351 vinfos[1].foffset = j1;
7352 vinfos[1].indices[0] = _ij1[0];
7353 vinfos[1].indices[1] = _ij1[1];
7354 vinfos[1].maxsolutions = _nj1;
7355 vinfos[2].jointtype = 1;
7356 vinfos[2].foffset = j2;
7357 vinfos[2].indices[0] = _ij2[0];
7358 vinfos[2].indices[1] = _ij2[1];
7359 vinfos[2].maxsolutions = _nj2;
7360 vinfos[3].jointtype = 1;
7361 vinfos[3].foffset = j3;
7362 vinfos[3].indices[0] = _ij3[0];
7363 vinfos[3].indices[1] = _ij3[1];
7364 vinfos[3].maxsolutions = _nj3;
7365 vinfos[4].jointtype = 1;
7366 vinfos[4].foffset = j4;
7367 vinfos[4].indices[0] = _ij4[0];
7368 vinfos[4].indices[1] = _ij4[1];
7369 vinfos[4].maxsolutions = _nj4;
7370 vinfos[5].jointtype = 1;
7371 vinfos[5].foffset = j5;
7372 vinfos[5].indices[0] = _ij5[0];
7373 vinfos[5].indices[1] = _ij5[1];
7374 vinfos[5].maxsolutions = _nj5;
7375 std::vector<int> vfree(0);
7383 if( bgotonextstatement )
7385 bool bgotonextstatement =
true;
7388 evalcond[0]=((
IKabs(new_r20))+(
IKabs(new_r21)));
7389 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
7391 bgotonextstatement=
false;
7393 IkReal j5array[1], cj5array[1], sj5array[1];
7394 bool j5valid[1]={
false};
7398 j5array[0]=
IKatan2(((-1.0)*new_r00), ((-1.0)*new_r01));
7399 sj5array[0]=
IKsin(j5array[0]);
7400 cj5array[0]=
IKcos(j5array[0]);
7401 if( j5array[0] >
IKPI )
7405 else if( j5array[0] < -
IKPI )
7406 { j5array[0]+=
IK2PI;
7409 for(
int ij5 = 0; ij5 < 1; ++ij5)
7415 _ij5[0] = ij5; _ij5[1] = -1;
7416 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
7420 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
7423 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
7426 IkReal x493=
IKsin(j5);
7427 IkReal x494=
IKcos(j5);
7429 evalcond[1]=(new_r22*x493);
7430 evalcond[2]=((-1.0)*x493);
7431 evalcond[3]=((-1.0)*new_r22*x494);
7432 evalcond[4]=((((-1.0)*x493))+(((-1.0)*new_r00)));
7433 evalcond[5]=((((-1.0)*x494))+(((-1.0)*new_r01)));
7441 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
7442 vinfos[0].jointtype = 1;
7443 vinfos[0].foffset = j0;
7444 vinfos[0].indices[0] = _ij0[0];
7445 vinfos[0].indices[1] = _ij0[1];
7446 vinfos[0].maxsolutions = _nj0;
7447 vinfos[1].jointtype = 1;
7448 vinfos[1].foffset = j1;
7449 vinfos[1].indices[0] = _ij1[0];
7450 vinfos[1].indices[1] = _ij1[1];
7451 vinfos[1].maxsolutions = _nj1;
7452 vinfos[2].jointtype = 1;
7453 vinfos[2].foffset = j2;
7454 vinfos[2].indices[0] = _ij2[0];
7455 vinfos[2].indices[1] = _ij2[1];
7456 vinfos[2].maxsolutions = _nj2;
7457 vinfos[3].jointtype = 1;
7458 vinfos[3].foffset = j3;
7459 vinfos[3].indices[0] = _ij3[0];
7460 vinfos[3].indices[1] = _ij3[1];
7461 vinfos[3].maxsolutions = _nj3;
7462 vinfos[4].jointtype = 1;
7463 vinfos[4].foffset = j4;
7464 vinfos[4].indices[0] = _ij4[0];
7465 vinfos[4].indices[1] = _ij4[1];
7466 vinfos[4].maxsolutions = _nj4;
7467 vinfos[5].jointtype = 1;
7468 vinfos[5].foffset = j5;
7469 vinfos[5].indices[0] = _ij5[0];
7470 vinfos[5].indices[1] = _ij5[1];
7471 vinfos[5].maxsolutions = _nj5;
7472 std::vector<int> vfree(0);
7480 if( bgotonextstatement )
7482 bool bgotonextstatement =
true;
7487 bgotonextstatement=
false;
7492 if( bgotonextstatement )
7505 IkReal j5array[1], cj5array[1], sj5array[1];
7506 bool j5valid[1]={
false};
7514 j5array[0]=
IKatan2(((-1.0)*new_r00), ((-1.0)*new_r20*(x495.
value)));
7515 sj5array[0]=
IKsin(j5array[0]);
7516 cj5array[0]=
IKcos(j5array[0]);
7517 if( j5array[0] >
IKPI )
7521 else if( j5array[0] < -
IKPI )
7522 { j5array[0]+=
IK2PI;
7525 for(
int ij5 = 0; ij5 < 1; ++ij5)
7531 _ij5[0] = ij5; _ij5[1] = -1;
7532 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
7536 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
7539 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
7542 IkReal x496=
IKsin(j5);
7543 IkReal x497=
IKcos(j5);
7544 IkReal x498=((1.0)*cj4);
7545 IkReal x499=((1.0)*x496);
7546 evalcond[0]=(((sj4*x497))+new_r20);
7547 evalcond[1]=(((cj4*x496))+new_r11);
7548 evalcond[2]=((((-1.0)*sj4*x499))+new_r21);
7549 evalcond[3]=((((-1.0)*x497*x498))+new_r10);
7550 evalcond[4]=((((-1.0)*x499))+(((-1.0)*new_r00)));
7551 evalcond[5]=((((-1.0)*x497))+(((-1.0)*new_r01)));
7552 evalcond[6]=(((new_r20*sj4))+(((-1.0)*new_r10*x498))+x497);
7553 evalcond[7]=((((-1.0)*x499))+(((-1.0)*new_r11*x498))+((new_r21*sj4)));
7561 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
7562 vinfos[0].jointtype = 1;
7563 vinfos[0].foffset = j0;
7564 vinfos[0].indices[0] = _ij0[0];
7565 vinfos[0].indices[1] = _ij0[1];
7566 vinfos[0].maxsolutions = _nj0;
7567 vinfos[1].jointtype = 1;
7568 vinfos[1].foffset = j1;
7569 vinfos[1].indices[0] = _ij1[0];
7570 vinfos[1].indices[1] = _ij1[1];
7571 vinfos[1].maxsolutions = _nj1;
7572 vinfos[2].jointtype = 1;
7573 vinfos[2].foffset = j2;
7574 vinfos[2].indices[0] = _ij2[0];
7575 vinfos[2].indices[1] = _ij2[1];
7576 vinfos[2].maxsolutions = _nj2;
7577 vinfos[3].jointtype = 1;
7578 vinfos[3].foffset = j3;
7579 vinfos[3].indices[0] = _ij3[0];
7580 vinfos[3].indices[1] = _ij3[1];
7581 vinfos[3].maxsolutions = _nj3;
7582 vinfos[4].jointtype = 1;
7583 vinfos[4].foffset = j4;
7584 vinfos[4].indices[0] = _ij4[0];
7585 vinfos[4].indices[1] = _ij4[1];
7586 vinfos[4].maxsolutions = _nj4;
7587 vinfos[5].jointtype = 1;
7588 vinfos[5].foffset = j5;
7589 vinfos[5].indices[0] = _ij5[0];
7590 vinfos[5].indices[1] = _ij5[1];
7591 vinfos[5].maxsolutions = _nj5;
7592 std::vector<int> vfree(0);
7605 IkReal j5array[1], cj5array[1], sj5array[1];
7606 bool j5valid[1]={
false};
7616 j5array[0]=((-1.5707963267949)+(((1.5707963267949)*(x500.
value)))+(x501.
value));
7617 sj5array[0]=
IKsin(j5array[0]);
7618 cj5array[0]=
IKcos(j5array[0]);
7619 if( j5array[0] >
IKPI )
7623 else if( j5array[0] < -
IKPI )
7624 { j5array[0]+=
IK2PI;
7627 for(
int ij5 = 0; ij5 < 1; ++ij5)
7633 _ij5[0] = ij5; _ij5[1] = -1;
7634 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
7638 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
7641 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
7644 IkReal x502=
IKsin(j5);
7645 IkReal x503=
IKcos(j5);
7646 IkReal x504=((1.0)*cj4);
7647 IkReal x505=((1.0)*x502);
7648 evalcond[0]=(((sj4*x503))+new_r20);
7649 evalcond[1]=(((cj4*x502))+new_r11);
7650 evalcond[2]=((((-1.0)*sj4*x505))+new_r21);
7651 evalcond[3]=((((-1.0)*x503*x504))+new_r10);
7652 evalcond[4]=((((-1.0)*x505))+(((-1.0)*new_r00)));
7653 evalcond[5]=((((-1.0)*new_r01))+(((-1.0)*x503)));
7654 evalcond[6]=(((new_r20*sj4))+x503+(((-1.0)*new_r10*x504)));
7655 evalcond[7]=((((-1.0)*x505))+(((-1.0)*new_r11*x504))+((new_r21*sj4)));
7663 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
7664 vinfos[0].jointtype = 1;
7665 vinfos[0].foffset = j0;
7666 vinfos[0].indices[0] = _ij0[0];
7667 vinfos[0].indices[1] = _ij0[1];
7668 vinfos[0].maxsolutions = _nj0;
7669 vinfos[1].jointtype = 1;
7670 vinfos[1].foffset = j1;
7671 vinfos[1].indices[0] = _ij1[0];
7672 vinfos[1].indices[1] = _ij1[1];
7673 vinfos[1].maxsolutions = _nj1;
7674 vinfos[2].jointtype = 1;
7675 vinfos[2].foffset = j2;
7676 vinfos[2].indices[0] = _ij2[0];
7677 vinfos[2].indices[1] = _ij2[1];
7678 vinfos[2].maxsolutions = _nj2;
7679 vinfos[3].jointtype = 1;
7680 vinfos[3].foffset = j3;
7681 vinfos[3].indices[0] = _ij3[0];
7682 vinfos[3].indices[1] = _ij3[1];
7683 vinfos[3].maxsolutions = _nj3;
7684 vinfos[4].jointtype = 1;
7685 vinfos[4].foffset = j4;
7686 vinfos[4].indices[0] = _ij4[0];
7687 vinfos[4].indices[1] = _ij4[1];
7688 vinfos[4].maxsolutions = _nj4;
7689 vinfos[5].jointtype = 1;
7690 vinfos[5].foffset = j5;
7691 vinfos[5].indices[0] = _ij5[0];
7692 vinfos[5].indices[1] = _ij5[1];
7693 vinfos[5].maxsolutions = _nj5;
7694 std::vector<int> vfree(0);
7707 IkReal j5array[1], cj5array[1], sj5array[1];
7708 bool j5valid[1]={
false};
7718 j5array[0]=((-1.5707963267949)+(((1.5707963267949)*(x506.
value)))+(x507.
value));
7719 sj5array[0]=
IKsin(j5array[0]);
7720 cj5array[0]=
IKcos(j5array[0]);
7721 if( j5array[0] >
IKPI )
7725 else if( j5array[0] < -
IKPI )
7726 { j5array[0]+=
IK2PI;
7729 for(
int ij5 = 0; ij5 < 1; ++ij5)
7735 _ij5[0] = ij5; _ij5[1] = -1;
7736 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
7740 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
7743 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
7746 IkReal x508=
IKsin(j5);
7747 IkReal x509=
IKcos(j5);
7748 IkReal x510=((1.0)*cj4);
7749 IkReal x511=((1.0)*x508);
7750 evalcond[0]=(((sj4*x509))+new_r20);
7751 evalcond[1]=(((cj4*x508))+new_r11);
7752 evalcond[2]=(new_r21+(((-1.0)*sj4*x511)));
7753 evalcond[3]=(new_r10+(((-1.0)*x509*x510)));
7754 evalcond[4]=((((-1.0)*new_r00))+(((-1.0)*x511)));
7755 evalcond[5]=((((-1.0)*new_r01))+(((-1.0)*x509)));
7756 evalcond[6]=(((new_r20*sj4))+(((-1.0)*new_r10*x510))+x509);
7757 evalcond[7]=((((-1.0)*new_r11*x510))+((new_r21*sj4))+(((-1.0)*x511)));
7765 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
7766 vinfos[0].jointtype = 1;
7767 vinfos[0].foffset = j0;
7768 vinfos[0].indices[0] = _ij0[0];
7769 vinfos[0].indices[1] = _ij0[1];
7770 vinfos[0].maxsolutions = _nj0;
7771 vinfos[1].jointtype = 1;
7772 vinfos[1].foffset = j1;
7773 vinfos[1].indices[0] = _ij1[0];
7774 vinfos[1].indices[1] = _ij1[1];
7775 vinfos[1].maxsolutions = _nj1;
7776 vinfos[2].jointtype = 1;
7777 vinfos[2].foffset = j2;
7778 vinfos[2].indices[0] = _ij2[0];
7779 vinfos[2].indices[1] = _ij2[1];
7780 vinfos[2].maxsolutions = _nj2;
7781 vinfos[3].jointtype = 1;
7782 vinfos[3].foffset = j3;
7783 vinfos[3].indices[0] = _ij3[0];
7784 vinfos[3].indices[1] = _ij3[1];
7785 vinfos[3].maxsolutions = _nj3;
7786 vinfos[4].jointtype = 1;
7787 vinfos[4].foffset = j4;
7788 vinfos[4].indices[0] = _ij4[0];
7789 vinfos[4].indices[1] = _ij4[1];
7790 vinfos[4].maxsolutions = _nj4;
7791 vinfos[5].jointtype = 1;
7792 vinfos[5].foffset = j5;
7793 vinfos[5].indices[0] = _ij5[0];
7794 vinfos[5].indices[1] = _ij5[1];
7795 vinfos[5].maxsolutions = _nj5;
7796 std::vector<int> vfree(0);
7808 if( bgotonextstatement )
7810 bool bgotonextstatement =
true;
7813 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((1.5707963267949)+j3)))), 6.28318530717959)));
7814 evalcond[1]=new_r02;
7815 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 )
7817 bgotonextstatement=
false;
7819 IkReal j5array[1], cj5array[1], sj5array[1];
7820 bool j5valid[1]={
false};
7824 j5array[0]=
IKatan2(new_r00, new_r01);
7825 sj5array[0]=
IKsin(j5array[0]);
7826 cj5array[0]=
IKcos(j5array[0]);
7827 if( j5array[0] >
IKPI )
7831 else if( j5array[0] < -
IKPI )
7832 { j5array[0]+=
IK2PI;
7835 for(
int ij5 = 0; ij5 < 1; ++ij5)
7841 _ij5[0] = ij5; _ij5[1] = -1;
7842 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
7846 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
7849 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
7852 IkReal x512=
IKcos(j5);
7853 IkReal x513=
IKsin(j5);
7854 IkReal x514=((1.0)*x513);
7855 IkReal x515=((1.0)*x512);
7856 evalcond[0]=(((sj4*x512))+new_r20);
7857 evalcond[1]=(new_r00+(((-1.0)*x514)));
7858 evalcond[2]=(new_r01+(((-1.0)*x515)));
7859 evalcond[3]=(new_r21+(((-1.0)*sj4*x514)));
7860 evalcond[4]=(((cj4*x513))+(((-1.0)*new_r11)));
7861 evalcond[5]=((((-1.0)*new_r10))+(((-1.0)*cj4*x515)));
7862 evalcond[6]=(((new_r20*sj4))+((cj4*new_r10))+x512);
7863 evalcond[7]=(((cj4*new_r11))+((new_r21*sj4))+(((-1.0)*x514)));
7871 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
7872 vinfos[0].jointtype = 1;
7873 vinfos[0].foffset = j0;
7874 vinfos[0].indices[0] = _ij0[0];
7875 vinfos[0].indices[1] = _ij0[1];
7876 vinfos[0].maxsolutions = _nj0;
7877 vinfos[1].jointtype = 1;
7878 vinfos[1].foffset = j1;
7879 vinfos[1].indices[0] = _ij1[0];
7880 vinfos[1].indices[1] = _ij1[1];
7881 vinfos[1].maxsolutions = _nj1;
7882 vinfos[2].jointtype = 1;
7883 vinfos[2].foffset = j2;
7884 vinfos[2].indices[0] = _ij2[0];
7885 vinfos[2].indices[1] = _ij2[1];
7886 vinfos[2].maxsolutions = _nj2;
7887 vinfos[3].jointtype = 1;
7888 vinfos[3].foffset = j3;
7889 vinfos[3].indices[0] = _ij3[0];
7890 vinfos[3].indices[1] = _ij3[1];
7891 vinfos[3].maxsolutions = _nj3;
7892 vinfos[4].jointtype = 1;
7893 vinfos[4].foffset = j4;
7894 vinfos[4].indices[0] = _ij4[0];
7895 vinfos[4].indices[1] = _ij4[1];
7896 vinfos[4].maxsolutions = _nj4;
7897 vinfos[5].jointtype = 1;
7898 vinfos[5].foffset = j5;
7899 vinfos[5].indices[0] = _ij5[0];
7900 vinfos[5].indices[1] = _ij5[1];
7901 vinfos[5].maxsolutions = _nj5;
7902 std::vector<int> vfree(0);
7910 if( bgotonextstatement )
7912 bool bgotonextstatement =
true;
7915 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-1.5707963267949)+j4)))), 6.28318530717959)));
7916 evalcond[1]=new_r22;
7917 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 )
7919 bgotonextstatement=
false;
7921 IkReal j5array[1], cj5array[1], sj5array[1];
7922 bool j5valid[1]={
false};
7926 j5array[0]=
IKatan2(new_r21, ((-1.0)*new_r20));
7927 sj5array[0]=
IKsin(j5array[0]);
7928 cj5array[0]=
IKcos(j5array[0]);
7929 if( j5array[0] >
IKPI )
7933 else if( j5array[0] < -
IKPI )
7934 { j5array[0]+=
IK2PI;
7937 for(
int ij5 = 0; ij5 < 1; ++ij5)
7943 _ij5[0] = ij5; _ij5[1] = -1;
7944 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
7948 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
7951 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
7954 IkReal x516=
IKcos(j5);
7955 IkReal x517=
IKsin(j5);
7956 IkReal x518=((1.0)*sj3);
7957 IkReal x519=((1.0)*x517);
7958 IkReal x520=((1.0)*x516);
7959 evalcond[0]=(x516+new_r20);
7960 evalcond[1]=(new_r21+(((-1.0)*x519)));
7961 evalcond[2]=(((sj3*x516))+new_r01);
7962 evalcond[3]=(((sj3*x517))+new_r00);
7963 evalcond[4]=((((-1.0)*cj3*x520))+new_r11);
7964 evalcond[5]=((((-1.0)*new_r02*x519))+new_r10);
7965 evalcond[6]=(((cj3*new_r10))+(((-1.0)*new_r00*x518))+(((-1.0)*x519)));
7966 evalcond[7]=((((-1.0)*x520))+(((-1.0)*new_r01*x518))+((cj3*new_r11)));
7974 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
7975 vinfos[0].jointtype = 1;
7976 vinfos[0].foffset = j0;
7977 vinfos[0].indices[0] = _ij0[0];
7978 vinfos[0].indices[1] = _ij0[1];
7979 vinfos[0].maxsolutions = _nj0;
7980 vinfos[1].jointtype = 1;
7981 vinfos[1].foffset = j1;
7982 vinfos[1].indices[0] = _ij1[0];
7983 vinfos[1].indices[1] = _ij1[1];
7984 vinfos[1].maxsolutions = _nj1;
7985 vinfos[2].jointtype = 1;
7986 vinfos[2].foffset = j2;
7987 vinfos[2].indices[0] = _ij2[0];
7988 vinfos[2].indices[1] = _ij2[1];
7989 vinfos[2].maxsolutions = _nj2;
7990 vinfos[3].jointtype = 1;
7991 vinfos[3].foffset = j3;
7992 vinfos[3].indices[0] = _ij3[0];
7993 vinfos[3].indices[1] = _ij3[1];
7994 vinfos[3].maxsolutions = _nj3;
7995 vinfos[4].jointtype = 1;
7996 vinfos[4].foffset = j4;
7997 vinfos[4].indices[0] = _ij4[0];
7998 vinfos[4].indices[1] = _ij4[1];
7999 vinfos[4].maxsolutions = _nj4;
8000 vinfos[5].jointtype = 1;
8001 vinfos[5].foffset = j5;
8002 vinfos[5].indices[0] = _ij5[0];
8003 vinfos[5].indices[1] = _ij5[1];
8004 vinfos[5].maxsolutions = _nj5;
8005 std::vector<int> vfree(0);
8013 if( bgotonextstatement )
8015 bool bgotonextstatement =
true;
8018 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((1.5707963267949)+j4)))), 6.28318530717959)));
8019 evalcond[1]=new_r22;
8020 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 )
8022 bgotonextstatement=
false;
8024 IkReal j5array[1], cj5array[1], sj5array[1];
8025 bool j5valid[1]={
false};
8029 j5array[0]=
IKatan2(((-1.0)*new_r21), new_r20);
8030 sj5array[0]=
IKsin(j5array[0]);
8031 cj5array[0]=
IKcos(j5array[0]);
8032 if( j5array[0] >
IKPI )
8036 else if( j5array[0] < -
IKPI )
8037 { j5array[0]+=
IK2PI;
8040 for(
int ij5 = 0; ij5 < 1; ++ij5)
8046 _ij5[0] = ij5; _ij5[1] = -1;
8047 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
8051 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
8054 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
8057 IkReal x521=
IKcos(j5);
8058 IkReal x522=
IKsin(j5);
8059 IkReal x523=((1.0)*sj3);
8060 IkReal x524=((1.0)*x521);
8061 evalcond[0]=(x522+new_r21);
8062 evalcond[1]=((((-1.0)*x524))+new_r20);
8063 evalcond[2]=(((sj3*x521))+new_r01);
8064 evalcond[3]=(((sj3*x522))+new_r00);
8065 evalcond[4]=(((new_r02*x522))+new_r10);
8066 evalcond[5]=((((-1.0)*cj3*x524))+new_r11);
8067 evalcond[6]=((((-1.0)*x522))+(((-1.0)*new_r00*x523))+((cj3*new_r10)));
8068 evalcond[7]=((((-1.0)*x524))+(((-1.0)*new_r01*x523))+((cj3*new_r11)));
8076 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
8077 vinfos[0].jointtype = 1;
8078 vinfos[0].foffset = j0;
8079 vinfos[0].indices[0] = _ij0[0];
8080 vinfos[0].indices[1] = _ij0[1];
8081 vinfos[0].maxsolutions = _nj0;
8082 vinfos[1].jointtype = 1;
8083 vinfos[1].foffset = j1;
8084 vinfos[1].indices[0] = _ij1[0];
8085 vinfos[1].indices[1] = _ij1[1];
8086 vinfos[1].maxsolutions = _nj1;
8087 vinfos[2].jointtype = 1;
8088 vinfos[2].foffset = j2;
8089 vinfos[2].indices[0] = _ij2[0];
8090 vinfos[2].indices[1] = _ij2[1];
8091 vinfos[2].maxsolutions = _nj2;
8092 vinfos[3].jointtype = 1;
8093 vinfos[3].foffset = j3;
8094 vinfos[3].indices[0] = _ij3[0];
8095 vinfos[3].indices[1] = _ij3[1];
8096 vinfos[3].maxsolutions = _nj3;
8097 vinfos[4].jointtype = 1;
8098 vinfos[4].foffset = j4;
8099 vinfos[4].indices[0] = _ij4[0];
8100 vinfos[4].indices[1] = _ij4[1];
8101 vinfos[4].maxsolutions = _nj4;
8102 vinfos[5].jointtype = 1;
8103 vinfos[5].foffset = j5;
8104 vinfos[5].indices[0] = _ij5[0];
8105 vinfos[5].indices[1] = _ij5[1];
8106 vinfos[5].maxsolutions = _nj5;
8107 std::vector<int> vfree(0);
8115 if( bgotonextstatement )
8117 bool bgotonextstatement =
true;
8120 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(j4))), 6.28318530717959)));
8121 evalcond[1]=new_r20;
8122 evalcond[2]=new_r02;
8123 evalcond[3]=new_r12;
8124 evalcond[4]=new_r21;
8125 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 )
8127 bgotonextstatement=
false;
8129 IkReal j5array[1], cj5array[1], sj5array[1];
8130 bool j5valid[1]={
false};
8132 IkReal x525=((1.0)*new_r01);
8135 j5array[0]=
IKatan2(((((-1.0)*cj3*x525))+(((-1.0)*new_r00*sj3))), ((((-1.0)*sj3*x525))+((cj3*new_r00))));
8136 sj5array[0]=
IKsin(j5array[0]);
8137 cj5array[0]=
IKcos(j5array[0]);
8138 if( j5array[0] >
IKPI )
8142 else if( j5array[0] < -
IKPI )
8143 { j5array[0]+=
IK2PI;
8146 for(
int ij5 = 0; ij5 < 1; ++ij5)
8152 _ij5[0] = ij5; _ij5[1] = -1;
8153 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
8157 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
8160 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
8163 IkReal x526=
IKsin(j5);
8164 IkReal x527=
IKcos(j5);
8165 IkReal x528=((1.0)*sj3);
8166 IkReal x529=((1.0)*x527);
8167 IkReal x530=(sj3*x526);
8168 IkReal x531=((1.0)*x526);
8169 IkReal x532=(cj3*x529);
8170 evalcond[0]=(((new_r11*sj3))+x526+((cj3*new_r01)));
8171 evalcond[1]=(((sj3*x527))+new_r01+((cj3*x526)));
8172 evalcond[2]=(((new_r10*sj3))+(((-1.0)*x529))+((cj3*new_r00)));
8173 evalcond[3]=((((-1.0)*new_r00*x528))+(((-1.0)*x531))+((cj3*new_r10)));
8174 evalcond[4]=((((-1.0)*x529))+(((-1.0)*new_r01*x528))+((cj3*new_r11)));
8175 evalcond[5]=((((-1.0)*x532))+x530+new_r00);
8176 evalcond[6]=((((-1.0)*x532))+x530+new_r11);
8177 evalcond[7]=((((-1.0)*x527*x528))+(((-1.0)*cj3*x531))+new_r10);
8185 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
8186 vinfos[0].jointtype = 1;
8187 vinfos[0].foffset = j0;
8188 vinfos[0].indices[0] = _ij0[0];
8189 vinfos[0].indices[1] = _ij0[1];
8190 vinfos[0].maxsolutions = _nj0;
8191 vinfos[1].jointtype = 1;
8192 vinfos[1].foffset = j1;
8193 vinfos[1].indices[0] = _ij1[0];
8194 vinfos[1].indices[1] = _ij1[1];
8195 vinfos[1].maxsolutions = _nj1;
8196 vinfos[2].jointtype = 1;
8197 vinfos[2].foffset = j2;
8198 vinfos[2].indices[0] = _ij2[0];
8199 vinfos[2].indices[1] = _ij2[1];
8200 vinfos[2].maxsolutions = _nj2;
8201 vinfos[3].jointtype = 1;
8202 vinfos[3].foffset = j3;
8203 vinfos[3].indices[0] = _ij3[0];
8204 vinfos[3].indices[1] = _ij3[1];
8205 vinfos[3].maxsolutions = _nj3;
8206 vinfos[4].jointtype = 1;
8207 vinfos[4].foffset = j4;
8208 vinfos[4].indices[0] = _ij4[0];
8209 vinfos[4].indices[1] = _ij4[1];
8210 vinfos[4].maxsolutions = _nj4;
8211 vinfos[5].jointtype = 1;
8212 vinfos[5].foffset = j5;
8213 vinfos[5].indices[0] = _ij5[0];
8214 vinfos[5].indices[1] = _ij5[1];
8215 vinfos[5].maxsolutions = _nj5;
8216 std::vector<int> vfree(0);
8224 if( bgotonextstatement )
8226 bool bgotonextstatement =
true;
8229 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-3.14159265358979)+j4)))), 6.28318530717959)));
8230 evalcond[1]=new_r20;
8231 evalcond[2]=new_r02;
8232 evalcond[3]=new_r12;
8233 evalcond[4]=new_r21;
8234 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 )
8236 bgotonextstatement=
false;
8238 IkReal j5array[1], cj5array[1], sj5array[1];
8239 bool j5valid[1]={
false};
8241 IkReal x533=((1.0)*sj3);
8244 j5array[0]=
IKatan2(((((-1.0)*new_r00*x533))+((cj3*new_r01))), ((((-1.0)*cj3*new_r00))+(((-1.0)*new_r01*x533))));
8245 sj5array[0]=
IKsin(j5array[0]);
8246 cj5array[0]=
IKcos(j5array[0]);
8247 if( j5array[0] >
IKPI )
8251 else if( j5array[0] < -
IKPI )
8252 { j5array[0]+=
IK2PI;
8255 for(
int ij5 = 0; ij5 < 1; ++ij5)
8261 _ij5[0] = ij5; _ij5[1] = -1;
8262 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
8266 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
8269 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
8272 IkReal x534=
IKsin(j5);
8273 IkReal x535=
IKcos(j5);
8274 IkReal x536=((1.0)*sj3);
8275 IkReal x537=((1.0)*x534);
8276 IkReal x538=(sj3*x535);
8277 IkReal x539=((1.0)*x535);
8278 IkReal x540=(cj3*x537);
8279 evalcond[0]=(((new_r10*sj3))+x535+((cj3*new_r00)));
8280 evalcond[1]=(((new_r11*sj3))+(((-1.0)*x537))+((cj3*new_r01)));
8281 evalcond[2]=(((sj3*x534))+new_r00+((cj3*x535)));
8282 evalcond[3]=((((-1.0)*new_r00*x536))+(((-1.0)*x537))+((cj3*new_r10)));
8283 evalcond[4]=((((-1.0)*x539))+(((-1.0)*new_r01*x536))+((cj3*new_r11)));
8284 evalcond[5]=((((-1.0)*x540))+x538+new_r01);
8285 evalcond[6]=((((-1.0)*x540))+x538+new_r10);
8286 evalcond[7]=((((-1.0)*x534*x536))+(((-1.0)*cj3*x539))+new_r11);
8294 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
8295 vinfos[0].jointtype = 1;
8296 vinfos[0].foffset = j0;
8297 vinfos[0].indices[0] = _ij0[0];
8298 vinfos[0].indices[1] = _ij0[1];
8299 vinfos[0].maxsolutions = _nj0;
8300 vinfos[1].jointtype = 1;
8301 vinfos[1].foffset = j1;
8302 vinfos[1].indices[0] = _ij1[0];
8303 vinfos[1].indices[1] = _ij1[1];
8304 vinfos[1].maxsolutions = _nj1;
8305 vinfos[2].jointtype = 1;
8306 vinfos[2].foffset = j2;
8307 vinfos[2].indices[0] = _ij2[0];
8308 vinfos[2].indices[1] = _ij2[1];
8309 vinfos[2].maxsolutions = _nj2;
8310 vinfos[3].jointtype = 1;
8311 vinfos[3].foffset = j3;
8312 vinfos[3].indices[0] = _ij3[0];
8313 vinfos[3].indices[1] = _ij3[1];
8314 vinfos[3].maxsolutions = _nj3;
8315 vinfos[4].jointtype = 1;
8316 vinfos[4].foffset = j4;
8317 vinfos[4].indices[0] = _ij4[0];
8318 vinfos[4].indices[1] = _ij4[1];
8319 vinfos[4].maxsolutions = _nj4;
8320 vinfos[5].jointtype = 1;
8321 vinfos[5].foffset = j5;
8322 vinfos[5].indices[0] = _ij5[0];
8323 vinfos[5].indices[1] = _ij5[1];
8324 vinfos[5].maxsolutions = _nj5;
8325 std::vector<int> vfree(0);
8333 if( bgotonextstatement )
8335 bool bgotonextstatement =
true;
8338 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(j3))), 6.28318530717959)));
8339 evalcond[1]=new_r12;
8340 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 )
8342 bgotonextstatement=
false;
8344 IkReal j5array[1], cj5array[1], sj5array[1];
8345 bool j5valid[1]={
false};
8349 j5array[0]=
IKatan2(new_r10, new_r11);
8350 sj5array[0]=
IKsin(j5array[0]);
8351 cj5array[0]=
IKcos(j5array[0]);
8352 if( j5array[0] >
IKPI )
8356 else if( j5array[0] < -
IKPI )
8357 { j5array[0]+=
IK2PI;
8360 for(
int ij5 = 0; ij5 < 1; ++ij5)
8366 _ij5[0] = ij5; _ij5[1] = -1;
8367 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
8371 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
8374 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
8377 IkReal x541=
IKcos(j5);
8378 IkReal x542=
IKsin(j5);
8379 IkReal x543=((1.0)*cj4);
8380 IkReal x544=((1.0)*x542);
8381 evalcond[0]=(((new_r02*x541))+new_r20);
8382 evalcond[1]=((((-1.0)*x544))+new_r10);
8383 evalcond[2]=((((-1.0)*x541))+new_r11);
8384 evalcond[3]=(((cj4*x542))+new_r01);
8385 evalcond[4]=(new_r21+(((-1.0)*new_r02*x544)));
8386 evalcond[5]=((((-1.0)*x541*x543))+new_r00);
8387 evalcond[6]=(((new_r20*sj4))+(((-1.0)*new_r00*x543))+x541);
8388 evalcond[7]=((((-1.0)*new_r01*x543))+(((-1.0)*x544))+((new_r21*sj4)));
8396 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
8397 vinfos[0].jointtype = 1;
8398 vinfos[0].foffset = j0;
8399 vinfos[0].indices[0] = _ij0[0];
8400 vinfos[0].indices[1] = _ij0[1];
8401 vinfos[0].maxsolutions = _nj0;
8402 vinfos[1].jointtype = 1;
8403 vinfos[1].foffset = j1;
8404 vinfos[1].indices[0] = _ij1[0];
8405 vinfos[1].indices[1] = _ij1[1];
8406 vinfos[1].maxsolutions = _nj1;
8407 vinfos[2].jointtype = 1;
8408 vinfos[2].foffset = j2;
8409 vinfos[2].indices[0] = _ij2[0];
8410 vinfos[2].indices[1] = _ij2[1];
8411 vinfos[2].maxsolutions = _nj2;
8412 vinfos[3].jointtype = 1;
8413 vinfos[3].foffset = j3;
8414 vinfos[3].indices[0] = _ij3[0];
8415 vinfos[3].indices[1] = _ij3[1];
8416 vinfos[3].maxsolutions = _nj3;
8417 vinfos[4].jointtype = 1;
8418 vinfos[4].foffset = j4;
8419 vinfos[4].indices[0] = _ij4[0];
8420 vinfos[4].indices[1] = _ij4[1];
8421 vinfos[4].maxsolutions = _nj4;
8422 vinfos[5].jointtype = 1;
8423 vinfos[5].foffset = j5;
8424 vinfos[5].indices[0] = _ij5[0];
8425 vinfos[5].indices[1] = _ij5[1];
8426 vinfos[5].maxsolutions = _nj5;
8427 std::vector<int> vfree(0);
8435 if( bgotonextstatement )
8437 bool bgotonextstatement =
true;
8440 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-3.14159265358979)+j3)))), 6.28318530717959)));
8441 evalcond[1]=new_r12;
8442 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 )
8444 bgotonextstatement=
false;
8449 j3=3.14159265358979;
8451 j5eval[1]=
IKsign(new_r02);
8452 j5eval[2]=((
IKabs(new_r20))+(
IKabs(new_r21)));
8453 if(
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000 ||
IKabs(j5eval[2]) < 0.0000010000000000 )
8459 j3=3.14159265358979;
8461 if(
IKabs(j5eval[0]) < 0.0000010000000000 )
8467 j3=3.14159265358979;
8470 if(
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000 )
8474 bool bgotonextstatement =
true;
8477 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-1.5707963267949)+j4)))), 6.28318530717959)));
8478 evalcond[1]=new_r22;
8479 evalcond[2]=new_r01;
8480 evalcond[3]=new_r00;
8481 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 &&
IKabs(evalcond[2]) < 0.0000050000000000 &&
IKabs(evalcond[3]) < 0.0000050000000000 )
8483 bgotonextstatement=
false;
8485 IkReal j5array[1], cj5array[1], sj5array[1];
8486 bool j5valid[1]={
false};
8490 j5array[0]=
IKatan2(new_r21, ((-1.0)*new_r20));
8491 sj5array[0]=
IKsin(j5array[0]);
8492 cj5array[0]=
IKcos(j5array[0]);
8493 if( j5array[0] >
IKPI )
8497 else if( j5array[0] < -
IKPI )
8498 { j5array[0]+=
IK2PI;
8501 for(
int ij5 = 0; ij5 < 1; ++ij5)
8507 _ij5[0] = ij5; _ij5[1] = -1;
8508 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
8512 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
8515 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
8518 IkReal x545=
IKcos(j5);
8519 IkReal x546=((1.0)*(
IKsin(j5)));
8520 evalcond[0]=(x545+new_r20);
8521 evalcond[1]=((((-1.0)*x546))+new_r21);
8522 evalcond[2]=((((-1.0)*x546))+(((-1.0)*new_r10)));
8523 evalcond[3]=((((-1.0)*x545))+(((-1.0)*new_r11)));
8531 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
8532 vinfos[0].jointtype = 1;
8533 vinfos[0].foffset = j0;
8534 vinfos[0].indices[0] = _ij0[0];
8535 vinfos[0].indices[1] = _ij0[1];
8536 vinfos[0].maxsolutions = _nj0;
8537 vinfos[1].jointtype = 1;
8538 vinfos[1].foffset = j1;
8539 vinfos[1].indices[0] = _ij1[0];
8540 vinfos[1].indices[1] = _ij1[1];
8541 vinfos[1].maxsolutions = _nj1;
8542 vinfos[2].jointtype = 1;
8543 vinfos[2].foffset = j2;
8544 vinfos[2].indices[0] = _ij2[0];
8545 vinfos[2].indices[1] = _ij2[1];
8546 vinfos[2].maxsolutions = _nj2;
8547 vinfos[3].jointtype = 1;
8548 vinfos[3].foffset = j3;
8549 vinfos[3].indices[0] = _ij3[0];
8550 vinfos[3].indices[1] = _ij3[1];
8551 vinfos[3].maxsolutions = _nj3;
8552 vinfos[4].jointtype = 1;
8553 vinfos[4].foffset = j4;
8554 vinfos[4].indices[0] = _ij4[0];
8555 vinfos[4].indices[1] = _ij4[1];
8556 vinfos[4].maxsolutions = _nj4;
8557 vinfos[5].jointtype = 1;
8558 vinfos[5].foffset = j5;
8559 vinfos[5].indices[0] = _ij5[0];
8560 vinfos[5].indices[1] = _ij5[1];
8561 vinfos[5].maxsolutions = _nj5;
8562 std::vector<int> vfree(0);
8570 if( bgotonextstatement )
8572 bool bgotonextstatement =
true;
8575 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((1.5707963267949)+j4)))), 6.28318530717959)));
8576 evalcond[1]=new_r22;
8577 evalcond[2]=new_r01;
8578 evalcond[3]=new_r00;
8579 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 &&
IKabs(evalcond[2]) < 0.0000050000000000 &&
IKabs(evalcond[3]) < 0.0000050000000000 )
8581 bgotonextstatement=
false;
8583 IkReal j5array[1], cj5array[1], sj5array[1];
8584 bool j5valid[1]={
false};
8588 j5array[0]=
IKatan2(((-1.0)*new_r21), new_r20);
8589 sj5array[0]=
IKsin(j5array[0]);
8590 cj5array[0]=
IKcos(j5array[0]);
8591 if( j5array[0] >
IKPI )
8595 else if( j5array[0] < -
IKPI )
8596 { j5array[0]+=
IK2PI;
8599 for(
int ij5 = 0; ij5 < 1; ++ij5)
8605 _ij5[0] = ij5; _ij5[1] = -1;
8606 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
8610 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
8613 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
8616 IkReal x547=
IKsin(j5);
8617 IkReal x548=((1.0)*(
IKcos(j5)));
8618 evalcond[0]=(x547+new_r21);
8619 evalcond[1]=((((-1.0)*x548))+new_r20);
8620 evalcond[2]=((((-1.0)*x547))+(((-1.0)*new_r10)));
8621 evalcond[3]=((((-1.0)*x548))+(((-1.0)*new_r11)));
8629 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
8630 vinfos[0].jointtype = 1;
8631 vinfos[0].foffset = j0;
8632 vinfos[0].indices[0] = _ij0[0];
8633 vinfos[0].indices[1] = _ij0[1];
8634 vinfos[0].maxsolutions = _nj0;
8635 vinfos[1].jointtype = 1;
8636 vinfos[1].foffset = j1;
8637 vinfos[1].indices[0] = _ij1[0];
8638 vinfos[1].indices[1] = _ij1[1];
8639 vinfos[1].maxsolutions = _nj1;
8640 vinfos[2].jointtype = 1;
8641 vinfos[2].foffset = j2;
8642 vinfos[2].indices[0] = _ij2[0];
8643 vinfos[2].indices[1] = _ij2[1];
8644 vinfos[2].maxsolutions = _nj2;
8645 vinfos[3].jointtype = 1;
8646 vinfos[3].foffset = j3;
8647 vinfos[3].indices[0] = _ij3[0];
8648 vinfos[3].indices[1] = _ij3[1];
8649 vinfos[3].maxsolutions = _nj3;
8650 vinfos[4].jointtype = 1;
8651 vinfos[4].foffset = j4;
8652 vinfos[4].indices[0] = _ij4[0];
8653 vinfos[4].indices[1] = _ij4[1];
8654 vinfos[4].maxsolutions = _nj4;
8655 vinfos[5].jointtype = 1;
8656 vinfos[5].foffset = j5;
8657 vinfos[5].indices[0] = _ij5[0];
8658 vinfos[5].indices[1] = _ij5[1];
8659 vinfos[5].maxsolutions = _nj5;
8660 std::vector<int> vfree(0);
8668 if( bgotonextstatement )
8670 bool bgotonextstatement =
true;
8673 evalcond[0]=
IKabs(new_r02);
8674 evalcond[1]=new_r20;
8675 evalcond[2]=new_r21;
8676 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 &&
IKabs(evalcond[2]) < 0.0000050000000000 )
8678 bgotonextstatement=
false;
8680 IkReal j5array[1], cj5array[1], sj5array[1];
8681 bool j5valid[1]={
false};
8685 j5array[0]=
IKatan2(((-1.0)*new_r10), ((-1.0)*cj4*new_r00));
8686 sj5array[0]=
IKsin(j5array[0]);
8687 cj5array[0]=
IKcos(j5array[0]);
8688 if( j5array[0] >
IKPI )
8692 else if( j5array[0] < -
IKPI )
8693 { j5array[0]+=
IK2PI;
8696 for(
int ij5 = 0; ij5 < 1; ++ij5)
8702 _ij5[0] = ij5; _ij5[1] = -1;
8703 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
8707 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
8710 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
8713 IkReal x549=
IKcos(j5);
8714 IkReal x550=
IKsin(j5);
8715 IkReal x551=((1.0)*x550);
8716 IkReal x552=((1.0)*x549);
8717 evalcond[0]=(((cj4*new_r00))+x549);
8718 evalcond[1]=((((-1.0)*x551))+(((-1.0)*new_r10)));
8719 evalcond[2]=((((-1.0)*x552))+(((-1.0)*new_r11)));
8720 evalcond[3]=(((cj4*x550))+(((-1.0)*new_r01)));
8721 evalcond[4]=(((cj4*new_r01))+(((-1.0)*x551)));
8722 evalcond[5]=((((-1.0)*new_r00))+(((-1.0)*cj4*x552)));
8730 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
8731 vinfos[0].jointtype = 1;
8732 vinfos[0].foffset = j0;
8733 vinfos[0].indices[0] = _ij0[0];
8734 vinfos[0].indices[1] = _ij0[1];
8735 vinfos[0].maxsolutions = _nj0;
8736 vinfos[1].jointtype = 1;
8737 vinfos[1].foffset = j1;
8738 vinfos[1].indices[0] = _ij1[0];
8739 vinfos[1].indices[1] = _ij1[1];
8740 vinfos[1].maxsolutions = _nj1;
8741 vinfos[2].jointtype = 1;
8742 vinfos[2].foffset = j2;
8743 vinfos[2].indices[0] = _ij2[0];
8744 vinfos[2].indices[1] = _ij2[1];
8745 vinfos[2].maxsolutions = _nj2;
8746 vinfos[3].jointtype = 1;
8747 vinfos[3].foffset = j3;
8748 vinfos[3].indices[0] = _ij3[0];
8749 vinfos[3].indices[1] = _ij3[1];
8750 vinfos[3].maxsolutions = _nj3;
8751 vinfos[4].jointtype = 1;
8752 vinfos[4].foffset = j4;
8753 vinfos[4].indices[0] = _ij4[0];
8754 vinfos[4].indices[1] = _ij4[1];
8755 vinfos[4].maxsolutions = _nj4;
8756 vinfos[5].jointtype = 1;
8757 vinfos[5].foffset = j5;
8758 vinfos[5].indices[0] = _ij5[0];
8759 vinfos[5].indices[1] = _ij5[1];
8760 vinfos[5].maxsolutions = _nj5;
8761 std::vector<int> vfree(0);
8769 if( bgotonextstatement )
8771 bool bgotonextstatement =
true;
8774 evalcond[0]=((
IKabs(new_r20))+(
IKabs(new_r21)));
8775 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
8777 bgotonextstatement=
false;
8779 IkReal j5array[1], cj5array[1], sj5array[1];
8780 bool j5valid[1]={
false};
8784 j5array[0]=
IKatan2(((-1.0)*new_r10), ((-1.0)*new_r11));
8785 sj5array[0]=
IKsin(j5array[0]);
8786 cj5array[0]=
IKcos(j5array[0]);
8787 if( j5array[0] >
IKPI )
8791 else if( j5array[0] < -
IKPI )
8792 { j5array[0]+=
IK2PI;
8795 for(
int ij5 = 0; ij5 < 1; ++ij5)
8801 _ij5[0] = ij5; _ij5[1] = -1;
8802 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
8806 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
8809 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
8812 IkReal x553=
IKsin(j5);
8813 IkReal x554=
IKcos(j5);
8815 evalcond[1]=(new_r22*x553);
8816 evalcond[2]=((-1.0)*x553);
8817 evalcond[3]=((-1.0)*new_r22*x554);
8818 evalcond[4]=((((-1.0)*x553))+(((-1.0)*new_r10)));
8819 evalcond[5]=((((-1.0)*x554))+(((-1.0)*new_r11)));
8827 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
8828 vinfos[0].jointtype = 1;
8829 vinfos[0].foffset = j0;
8830 vinfos[0].indices[0] = _ij0[0];
8831 vinfos[0].indices[1] = _ij0[1];
8832 vinfos[0].maxsolutions = _nj0;
8833 vinfos[1].jointtype = 1;
8834 vinfos[1].foffset = j1;
8835 vinfos[1].indices[0] = _ij1[0];
8836 vinfos[1].indices[1] = _ij1[1];
8837 vinfos[1].maxsolutions = _nj1;
8838 vinfos[2].jointtype = 1;
8839 vinfos[2].foffset = j2;
8840 vinfos[2].indices[0] = _ij2[0];
8841 vinfos[2].indices[1] = _ij2[1];
8842 vinfos[2].maxsolutions = _nj2;
8843 vinfos[3].jointtype = 1;
8844 vinfos[3].foffset = j3;
8845 vinfos[3].indices[0] = _ij3[0];
8846 vinfos[3].indices[1] = _ij3[1];
8847 vinfos[3].maxsolutions = _nj3;
8848 vinfos[4].jointtype = 1;
8849 vinfos[4].foffset = j4;
8850 vinfos[4].indices[0] = _ij4[0];
8851 vinfos[4].indices[1] = _ij4[1];
8852 vinfos[4].maxsolutions = _nj4;
8853 vinfos[5].jointtype = 1;
8854 vinfos[5].foffset = j5;
8855 vinfos[5].indices[0] = _ij5[0];
8856 vinfos[5].indices[1] = _ij5[1];
8857 vinfos[5].maxsolutions = _nj5;
8858 std::vector<int> vfree(0);
8866 if( bgotonextstatement )
8868 bool bgotonextstatement =
true;
8873 bgotonextstatement=
false;
8878 if( bgotonextstatement )
8890 IkReal j5array[1], cj5array[1], sj5array[1];
8891 bool j5valid[1]={
false};
8903 j5array[0]=
IKatan2(((-1.0)*new_r21*(x555.
value)), ((-1.0)*new_r00*(x556.
value)));
8904 sj5array[0]=
IKsin(j5array[0]);
8905 cj5array[0]=
IKcos(j5array[0]);
8906 if( j5array[0] >
IKPI )
8910 else if( j5array[0] < -
IKPI )
8911 { j5array[0]+=
IK2PI;
8914 for(
int ij5 = 0; ij5 < 1; ++ij5)
8920 _ij5[0] = ij5; _ij5[1] = -1;
8921 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
8925 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
8928 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
8931 IkReal x557=
IKsin(j5);
8932 IkReal x558=
IKcos(j5);
8933 IkReal x559=((1.0)*x557);
8934 IkReal x560=((1.0)*x558);
8935 evalcond[0]=(((new_r02*x557))+new_r21);
8936 evalcond[1]=((((-1.0)*new_r02*x560))+new_r20);
8937 evalcond[2]=((((-1.0)*x559))+(((-1.0)*new_r10)));
8938 evalcond[3]=((((-1.0)*new_r11))+(((-1.0)*x560)));
8939 evalcond[4]=(((cj4*x557))+(((-1.0)*new_r01)));
8940 evalcond[5]=((((-1.0)*cj4*x560))+(((-1.0)*new_r00)));
8941 evalcond[6]=(((new_r20*sj4))+((cj4*new_r00))+x558);
8942 evalcond[7]=(((cj4*new_r01))+(((-1.0)*x559))+((new_r21*sj4)));
8950 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
8951 vinfos[0].jointtype = 1;
8952 vinfos[0].foffset = j0;
8953 vinfos[0].indices[0] = _ij0[0];
8954 vinfos[0].indices[1] = _ij0[1];
8955 vinfos[0].maxsolutions = _nj0;
8956 vinfos[1].jointtype = 1;
8957 vinfos[1].foffset = j1;
8958 vinfos[1].indices[0] = _ij1[0];
8959 vinfos[1].indices[1] = _ij1[1];
8960 vinfos[1].maxsolutions = _nj1;
8961 vinfos[2].jointtype = 1;
8962 vinfos[2].foffset = j2;
8963 vinfos[2].indices[0] = _ij2[0];
8964 vinfos[2].indices[1] = _ij2[1];
8965 vinfos[2].maxsolutions = _nj2;
8966 vinfos[3].jointtype = 1;
8967 vinfos[3].foffset = j3;
8968 vinfos[3].indices[0] = _ij3[0];
8969 vinfos[3].indices[1] = _ij3[1];
8970 vinfos[3].maxsolutions = _nj3;
8971 vinfos[4].jointtype = 1;
8972 vinfos[4].foffset = j4;
8973 vinfos[4].indices[0] = _ij4[0];
8974 vinfos[4].indices[1] = _ij4[1];
8975 vinfos[4].maxsolutions = _nj4;
8976 vinfos[5].jointtype = 1;
8977 vinfos[5].foffset = j5;
8978 vinfos[5].indices[0] = _ij5[0];
8979 vinfos[5].indices[1] = _ij5[1];
8980 vinfos[5].maxsolutions = _nj5;
8981 std::vector<int> vfree(0);
8994 IkReal j5array[1], cj5array[1], sj5array[1];
8995 bool j5valid[1]={
false};
9003 j5array[0]=
IKatan2(((-1.0)*new_r10), (new_r20*(x561.
value)));
9004 sj5array[0]=
IKsin(j5array[0]);
9005 cj5array[0]=
IKcos(j5array[0]);
9006 if( j5array[0] >
IKPI )
9010 else if( j5array[0] < -
IKPI )
9011 { j5array[0]+=
IK2PI;
9014 for(
int ij5 = 0; ij5 < 1; ++ij5)
9020 _ij5[0] = ij5; _ij5[1] = -1;
9021 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
9025 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
9028 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
9031 IkReal x562=
IKsin(j5);
9032 IkReal x563=
IKcos(j5);
9033 IkReal x564=((1.0)*x562);
9034 IkReal x565=((1.0)*x563);
9035 evalcond[0]=(((new_r02*x562))+new_r21);
9036 evalcond[1]=((((-1.0)*new_r02*x565))+new_r20);
9037 evalcond[2]=((((-1.0)*new_r10))+(((-1.0)*x564)));
9038 evalcond[3]=((((-1.0)*new_r11))+(((-1.0)*x565)));
9039 evalcond[4]=((((-1.0)*new_r01))+((cj4*x562)));
9040 evalcond[5]=((((-1.0)*cj4*x565))+(((-1.0)*new_r00)));
9041 evalcond[6]=(((new_r20*sj4))+((cj4*new_r00))+x563);
9042 evalcond[7]=(((cj4*new_r01))+((new_r21*sj4))+(((-1.0)*x564)));
9050 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
9051 vinfos[0].jointtype = 1;
9052 vinfos[0].foffset = j0;
9053 vinfos[0].indices[0] = _ij0[0];
9054 vinfos[0].indices[1] = _ij0[1];
9055 vinfos[0].maxsolutions = _nj0;
9056 vinfos[1].jointtype = 1;
9057 vinfos[1].foffset = j1;
9058 vinfos[1].indices[0] = _ij1[0];
9059 vinfos[1].indices[1] = _ij1[1];
9060 vinfos[1].maxsolutions = _nj1;
9061 vinfos[2].jointtype = 1;
9062 vinfos[2].foffset = j2;
9063 vinfos[2].indices[0] = _ij2[0];
9064 vinfos[2].indices[1] = _ij2[1];
9065 vinfos[2].maxsolutions = _nj2;
9066 vinfos[3].jointtype = 1;
9067 vinfos[3].foffset = j3;
9068 vinfos[3].indices[0] = _ij3[0];
9069 vinfos[3].indices[1] = _ij3[1];
9070 vinfos[3].maxsolutions = _nj3;
9071 vinfos[4].jointtype = 1;
9072 vinfos[4].foffset = j4;
9073 vinfos[4].indices[0] = _ij4[0];
9074 vinfos[4].indices[1] = _ij4[1];
9075 vinfos[4].maxsolutions = _nj4;
9076 vinfos[5].jointtype = 1;
9077 vinfos[5].foffset = j5;
9078 vinfos[5].indices[0] = _ij5[0];
9079 vinfos[5].indices[1] = _ij5[1];
9080 vinfos[5].maxsolutions = _nj5;
9081 std::vector<int> vfree(0);
9094 IkReal j5array[1], cj5array[1], sj5array[1];
9095 bool j5valid[1]={
false};
9105 j5array[0]=((-1.5707963267949)+(x566.
value)+(((1.5707963267949)*(x567.
value))));
9106 sj5array[0]=
IKsin(j5array[0]);
9107 cj5array[0]=
IKcos(j5array[0]);
9108 if( j5array[0] >
IKPI )
9112 else if( j5array[0] < -
IKPI )
9113 { j5array[0]+=
IK2PI;
9116 for(
int ij5 = 0; ij5 < 1; ++ij5)
9122 _ij5[0] = ij5; _ij5[1] = -1;
9123 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
9127 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
9130 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
9133 IkReal x568=
IKsin(j5);
9134 IkReal x569=
IKcos(j5);
9135 IkReal x570=((1.0)*x568);
9136 IkReal x571=((1.0)*x569);
9137 evalcond[0]=(((new_r02*x568))+new_r21);
9138 evalcond[1]=((((-1.0)*new_r02*x571))+new_r20);
9139 evalcond[2]=((((-1.0)*x570))+(((-1.0)*new_r10)));
9140 evalcond[3]=((((-1.0)*x571))+(((-1.0)*new_r11)));
9141 evalcond[4]=((((-1.0)*new_r01))+((cj4*x568)));
9142 evalcond[5]=((((-1.0)*cj4*x571))+(((-1.0)*new_r00)));
9143 evalcond[6]=(((new_r20*sj4))+((cj4*new_r00))+x569);
9144 evalcond[7]=(((cj4*new_r01))+(((-1.0)*x570))+((new_r21*sj4)));
9152 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
9153 vinfos[0].jointtype = 1;
9154 vinfos[0].foffset = j0;
9155 vinfos[0].indices[0] = _ij0[0];
9156 vinfos[0].indices[1] = _ij0[1];
9157 vinfos[0].maxsolutions = _nj0;
9158 vinfos[1].jointtype = 1;
9159 vinfos[1].foffset = j1;
9160 vinfos[1].indices[0] = _ij1[0];
9161 vinfos[1].indices[1] = _ij1[1];
9162 vinfos[1].maxsolutions = _nj1;
9163 vinfos[2].jointtype = 1;
9164 vinfos[2].foffset = j2;
9165 vinfos[2].indices[0] = _ij2[0];
9166 vinfos[2].indices[1] = _ij2[1];
9167 vinfos[2].maxsolutions = _nj2;
9168 vinfos[3].jointtype = 1;
9169 vinfos[3].foffset = j3;
9170 vinfos[3].indices[0] = _ij3[0];
9171 vinfos[3].indices[1] = _ij3[1];
9172 vinfos[3].maxsolutions = _nj3;
9173 vinfos[4].jointtype = 1;
9174 vinfos[4].foffset = j4;
9175 vinfos[4].indices[0] = _ij4[0];
9176 vinfos[4].indices[1] = _ij4[1];
9177 vinfos[4].maxsolutions = _nj4;
9178 vinfos[5].jointtype = 1;
9179 vinfos[5].foffset = j5;
9180 vinfos[5].indices[0] = _ij5[0];
9181 vinfos[5].indices[1] = _ij5[1];
9182 vinfos[5].maxsolutions = _nj5;
9183 std::vector<int> vfree(0);
9195 if( bgotonextstatement )
9197 bool bgotonextstatement =
true;
9200 evalcond[0]=((
IKabs(new_r20))+(
IKabs(new_r21)));
9201 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
9203 bgotonextstatement=
false;
9211 if(
IKabs(j5eval[0]) < 0.0000000100000000 )
9217 IkReal op[2+1], zeror[2];
9222 polyroots2(op,zeror,numroots);
9223 IkReal j5array[2], cj5array[2], sj5array[2], tempj5array[1];
9224 int numsolutions = 0;
9225 for(
int ij5 = 0; ij5 < numroots; ++ij5)
9227 IkReal htj5 = zeror[ij5];
9228 tempj5array[0]=((2.0)*(
atan(htj5)));
9229 for(
int kj5 = 0; kj5 < 1; ++kj5)
9231 j5array[numsolutions] = tempj5array[kj5];
9232 if( j5array[numsolutions] >
IKPI )
9234 j5array[numsolutions]-=
IK2PI;
9236 else if( j5array[numsolutions] < -
IKPI )
9238 j5array[numsolutions]+=
IK2PI;
9240 sj5array[numsolutions] =
IKsin(j5array[numsolutions]);
9241 cj5array[numsolutions] =
IKcos(j5array[numsolutions]);
9245 bool j5valid[2]={
true,
true};
9247 for(
int ij5 = 0; ij5 < numsolutions; ++ij5)
9253 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
9256 _ij5[0] = ij5; _ij5[1] = -1;
9257 for(
int iij5 = ij5+1; iij5 < numsolutions; ++iij5)
9261 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
9265 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
9266 vinfos[0].jointtype = 1;
9267 vinfos[0].foffset = j0;
9268 vinfos[0].indices[0] = _ij0[0];
9269 vinfos[0].indices[1] = _ij0[1];
9270 vinfos[0].maxsolutions = _nj0;
9271 vinfos[1].jointtype = 1;
9272 vinfos[1].foffset = j1;
9273 vinfos[1].indices[0] = _ij1[0];
9274 vinfos[1].indices[1] = _ij1[1];
9275 vinfos[1].maxsolutions = _nj1;
9276 vinfos[2].jointtype = 1;
9277 vinfos[2].foffset = j2;
9278 vinfos[2].indices[0] = _ij2[0];
9279 vinfos[2].indices[1] = _ij2[1];
9280 vinfos[2].maxsolutions = _nj2;
9281 vinfos[3].jointtype = 1;
9282 vinfos[3].foffset = j3;
9283 vinfos[3].indices[0] = _ij3[0];
9284 vinfos[3].indices[1] = _ij3[1];
9285 vinfos[3].maxsolutions = _nj3;
9286 vinfos[4].jointtype = 1;
9287 vinfos[4].foffset = j4;
9288 vinfos[4].indices[0] = _ij4[0];
9289 vinfos[4].indices[1] = _ij4[1];
9290 vinfos[4].maxsolutions = _nj4;
9291 vinfos[5].jointtype = 1;
9292 vinfos[5].foffset = j5;
9293 vinfos[5].indices[0] = _ij5[0];
9294 vinfos[5].indices[1] = _ij5[1];
9295 vinfos[5].maxsolutions = _nj5;
9296 std::vector<int> vfree(0);
9307 if( bgotonextstatement )
9309 bool bgotonextstatement =
true;
9314 bgotonextstatement=
false;
9319 if( bgotonextstatement )
9336 IkReal j5array[1], cj5array[1], sj5array[1];
9337 bool j5valid[1]={
false};
9343 IkReal x572=x573.
value;
9354 j5array[0]=
IKatan2((x572*(x574.
value)*(x575.
value)*((((new_r20*sj3))+(((-1.0)*new_r01*sj4))))), ((-1.0)*new_r20*x572));
9355 sj5array[0]=
IKsin(j5array[0]);
9356 cj5array[0]=
IKcos(j5array[0]);
9357 if( j5array[0] >
IKPI )
9361 else if( j5array[0] < -
IKPI )
9362 { j5array[0]+=
IK2PI;
9365 for(
int ij5 = 0; ij5 < 1; ++ij5)
9371 _ij5[0] = ij5; _ij5[1] = -1;
9372 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
9376 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
9379 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
9381 IkReal evalcond[12];
9382 IkReal x576=
IKsin(j5);
9383 IkReal x577=
IKcos(j5);
9384 IkReal x578=(cj3*new_r00);
9385 IkReal x579=(cj3*cj4);
9386 IkReal x580=((1.0)*sj3);
9387 IkReal x581=((1.0)*x576);
9388 IkReal x582=(sj3*x576);
9389 IkReal x583=((1.0)*x577);
9390 evalcond[0]=(((sj4*x577))+new_r20);
9391 evalcond[1]=((((-1.0)*sj4*x581))+new_r21);
9392 evalcond[2]=(((new_r11*sj3))+((cj3*new_r01))+((cj4*x576)));
9393 evalcond[3]=(((cj3*new_r10))+(((-1.0)*x581))+(((-1.0)*new_r00*x580)));
9394 evalcond[4]=((((-1.0)*new_r01*x580))+((cj3*new_r11))+(((-1.0)*x583)));
9395 evalcond[5]=(((x576*x579))+((sj3*x577))+new_r01);
9396 evalcond[6]=(((new_r10*sj3))+(((-1.0)*cj4*x583))+x578);
9397 evalcond[7]=((((-1.0)*x579*x583))+x582+new_r00);
9398 evalcond[8]=(((cj4*x582))+new_r11+(((-1.0)*cj3*x583)));
9399 evalcond[9]=((((-1.0)*cj4*x577*x580))+new_r10+(((-1.0)*cj3*x581)));
9400 evalcond[10]=(((new_r20*sj4))+x577+(((-1.0)*cj4*x578))+(((-1.0)*cj4*new_r10*x580)));
9401 evalcond[11]=((((-1.0)*cj4*new_r11*x580))+((new_r21*sj4))+(((-1.0)*x581))+(((-1.0)*new_r01*x579)));
9409 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
9410 vinfos[0].jointtype = 1;
9411 vinfos[0].foffset = j0;
9412 vinfos[0].indices[0] = _ij0[0];
9413 vinfos[0].indices[1] = _ij0[1];
9414 vinfos[0].maxsolutions = _nj0;
9415 vinfos[1].jointtype = 1;
9416 vinfos[1].foffset = j1;
9417 vinfos[1].indices[0] = _ij1[0];
9418 vinfos[1].indices[1] = _ij1[1];
9419 vinfos[1].maxsolutions = _nj1;
9420 vinfos[2].jointtype = 1;
9421 vinfos[2].foffset = j2;
9422 vinfos[2].indices[0] = _ij2[0];
9423 vinfos[2].indices[1] = _ij2[1];
9424 vinfos[2].maxsolutions = _nj2;
9425 vinfos[3].jointtype = 1;
9426 vinfos[3].foffset = j3;
9427 vinfos[3].indices[0] = _ij3[0];
9428 vinfos[3].indices[1] = _ij3[1];
9429 vinfos[3].maxsolutions = _nj3;
9430 vinfos[4].jointtype = 1;
9431 vinfos[4].foffset = j4;
9432 vinfos[4].indices[0] = _ij4[0];
9433 vinfos[4].indices[1] = _ij4[1];
9434 vinfos[4].maxsolutions = _nj4;
9435 vinfos[5].jointtype = 1;
9436 vinfos[5].foffset = j5;
9437 vinfos[5].indices[0] = _ij5[0];
9438 vinfos[5].indices[1] = _ij5[1];
9439 vinfos[5].maxsolutions = _nj5;
9440 std::vector<int> vfree(0);
9453 IkReal j5array[1], cj5array[1], sj5array[1];
9454 bool j5valid[1]={
false};
9460 IkReal x584=x585.
value;
9467 j5array[0]=
IKatan2((x584*(x586.
value)*(((((-1.0)*cj3*cj4*new_r20))+(((-1.0)*new_r00*sj4))))), ((-1.0)*new_r20*x584));
9468 sj5array[0]=
IKsin(j5array[0]);
9469 cj5array[0]=
IKcos(j5array[0]);
9470 if( j5array[0] >
IKPI )
9474 else if( j5array[0] < -
IKPI )
9475 { j5array[0]+=
IK2PI;
9478 for(
int ij5 = 0; ij5 < 1; ++ij5)
9484 _ij5[0] = ij5; _ij5[1] = -1;
9485 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
9489 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
9492 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
9494 IkReal evalcond[12];
9495 IkReal x587=
IKsin(j5);
9496 IkReal x588=
IKcos(j5);
9497 IkReal x589=(cj3*new_r00);
9498 IkReal x590=(cj3*cj4);
9499 IkReal x591=((1.0)*sj3);
9500 IkReal x592=((1.0)*x587);
9501 IkReal x593=(sj3*x587);
9502 IkReal x594=((1.0)*x588);
9503 evalcond[0]=(((sj4*x588))+new_r20);
9504 evalcond[1]=((((-1.0)*sj4*x592))+new_r21);
9505 evalcond[2]=(((new_r11*sj3))+((cj4*x587))+((cj3*new_r01)));
9506 evalcond[3]=((((-1.0)*new_r00*x591))+(((-1.0)*x592))+((cj3*new_r10)));
9507 evalcond[4]=((((-1.0)*new_r01*x591))+(((-1.0)*x594))+((cj3*new_r11)));
9508 evalcond[5]=(((sj3*x588))+new_r01+((x587*x590)));
9509 evalcond[6]=((((-1.0)*cj4*x594))+((new_r10*sj3))+x589);
9510 evalcond[7]=((((-1.0)*x590*x594))+x593+new_r00);
9511 evalcond[8]=((((-1.0)*cj3*x594))+new_r11+((cj4*x593)));
9512 evalcond[9]=((((-1.0)*cj4*x588*x591))+(((-1.0)*cj3*x592))+new_r10);
9513 evalcond[10]=((((-1.0)*cj4*new_r10*x591))+((new_r20*sj4))+x588+(((-1.0)*cj4*x589)));
9514 evalcond[11]=((((-1.0)*cj4*new_r11*x591))+(((-1.0)*x592))+((new_r21*sj4))+(((-1.0)*new_r01*x590)));
9522 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
9523 vinfos[0].jointtype = 1;
9524 vinfos[0].foffset = j0;
9525 vinfos[0].indices[0] = _ij0[0];
9526 vinfos[0].indices[1] = _ij0[1];
9527 vinfos[0].maxsolutions = _nj0;
9528 vinfos[1].jointtype = 1;
9529 vinfos[1].foffset = j1;
9530 vinfos[1].indices[0] = _ij1[0];
9531 vinfos[1].indices[1] = _ij1[1];
9532 vinfos[1].maxsolutions = _nj1;
9533 vinfos[2].jointtype = 1;
9534 vinfos[2].foffset = j2;
9535 vinfos[2].indices[0] = _ij2[0];
9536 vinfos[2].indices[1] = _ij2[1];
9537 vinfos[2].maxsolutions = _nj2;
9538 vinfos[3].jointtype = 1;
9539 vinfos[3].foffset = j3;
9540 vinfos[3].indices[0] = _ij3[0];
9541 vinfos[3].indices[1] = _ij3[1];
9542 vinfos[3].maxsolutions = _nj3;
9543 vinfos[4].jointtype = 1;
9544 vinfos[4].foffset = j4;
9545 vinfos[4].indices[0] = _ij4[0];
9546 vinfos[4].indices[1] = _ij4[1];
9547 vinfos[4].maxsolutions = _nj4;
9548 vinfos[5].jointtype = 1;
9549 vinfos[5].foffset = j5;
9550 vinfos[5].indices[0] = _ij5[0];
9551 vinfos[5].indices[1] = _ij5[1];
9552 vinfos[5].maxsolutions = _nj5;
9553 std::vector<int> vfree(0);
9566 IkReal j5array[1], cj5array[1], sj5array[1];
9567 bool j5valid[1]={
false};
9577 j5array[0]=((-1.5707963267949)+(((1.5707963267949)*(x595.
value)))+(x596.
value));
9578 sj5array[0]=
IKsin(j5array[0]);
9579 cj5array[0]=
IKcos(j5array[0]);
9580 if( j5array[0] >
IKPI )
9584 else if( j5array[0] < -
IKPI )
9585 { j5array[0]+=
IK2PI;
9588 for(
int ij5 = 0; ij5 < 1; ++ij5)
9594 _ij5[0] = ij5; _ij5[1] = -1;
9595 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
9599 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
9602 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
9604 IkReal evalcond[12];
9605 IkReal x597=
IKsin(j5);
9606 IkReal x598=
IKcos(j5);
9607 IkReal x599=(cj3*new_r00);
9608 IkReal x600=(cj3*cj4);
9609 IkReal x601=((1.0)*sj3);
9610 IkReal x602=((1.0)*x597);
9611 IkReal x603=(sj3*x597);
9612 IkReal x604=((1.0)*x598);
9613 evalcond[0]=(((sj4*x598))+new_r20);
9614 evalcond[1]=((((-1.0)*sj4*x602))+new_r21);
9615 evalcond[2]=(((new_r11*sj3))+((cj3*new_r01))+((cj4*x597)));
9616 evalcond[3]=(((cj3*new_r10))+(((-1.0)*x602))+(((-1.0)*new_r00*x601)));
9617 evalcond[4]=(((cj3*new_r11))+(((-1.0)*x604))+(((-1.0)*new_r01*x601)));
9618 evalcond[5]=(((x597*x600))+new_r01+((sj3*x598)));
9619 evalcond[6]=(((new_r10*sj3))+x599+(((-1.0)*cj4*x604)));
9620 evalcond[7]=((((-1.0)*x600*x604))+x603+new_r00);
9621 evalcond[8]=((((-1.0)*cj3*x604))+new_r11+((cj4*x603)));
9622 evalcond[9]=((((-1.0)*cj3*x602))+(((-1.0)*cj4*x598*x601))+new_r10);
9623 evalcond[10]=(((new_r20*sj4))+(((-1.0)*cj4*new_r10*x601))+x598+(((-1.0)*cj4*x599)));
9624 evalcond[11]=((((-1.0)*new_r01*x600))+(((-1.0)*x602))+((new_r21*sj4))+(((-1.0)*cj4*new_r11*x601)));
9632 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
9633 vinfos[0].jointtype = 1;
9634 vinfos[0].foffset = j0;
9635 vinfos[0].indices[0] = _ij0[0];
9636 vinfos[0].indices[1] = _ij0[1];
9637 vinfos[0].maxsolutions = _nj0;
9638 vinfos[1].jointtype = 1;
9639 vinfos[1].foffset = j1;
9640 vinfos[1].indices[0] = _ij1[0];
9641 vinfos[1].indices[1] = _ij1[1];
9642 vinfos[1].maxsolutions = _nj1;
9643 vinfos[2].jointtype = 1;
9644 vinfos[2].foffset = j2;
9645 vinfos[2].indices[0] = _ij2[0];
9646 vinfos[2].indices[1] = _ij2[1];
9647 vinfos[2].maxsolutions = _nj2;
9648 vinfos[3].jointtype = 1;
9649 vinfos[3].foffset = j3;
9650 vinfos[3].indices[0] = _ij3[0];
9651 vinfos[3].indices[1] = _ij3[1];
9652 vinfos[3].maxsolutions = _nj3;
9653 vinfos[4].jointtype = 1;
9654 vinfos[4].foffset = j4;
9655 vinfos[4].indices[0] = _ij4[0];
9656 vinfos[4].indices[1] = _ij4[1];
9657 vinfos[4].maxsolutions = _nj4;
9658 vinfos[5].jointtype = 1;
9659 vinfos[5].foffset = j5;
9660 vinfos[5].indices[0] = _ij5[0];
9661 vinfos[5].indices[1] = _ij5[1];
9662 vinfos[5].maxsolutions = _nj5;
9663 std::vector<int> vfree(0);
9681 }
static inline void polyroots3(IkReal rawcoeffs[3+1], IkReal rawroots[3],
int& numroots)
9684 if( rawcoeffs[0] == 0 ) {
9686 polyroots2(&rawcoeffs[1], &rawroots[0], numroots);
9690 const IkReal tol = 128.0*std::numeric_limits<IkReal>::epsilon();
9691 const IkReal tolsqrt =
sqrt(std::numeric_limits<IkReal>::epsilon());
9692 complex<IkReal> coeffs[3];
9693 const int maxsteps = 110;
9694 for(
int i = 0; i < 3; ++i) {
9695 coeffs[i] = complex<IkReal>(rawcoeffs[i+1]/rawcoeffs[0]);
9697 complex<IkReal> roots[3];
9699 roots[0] = complex<IkReal>(1,0);
9700 roots[1] = complex<IkReal>(0.4,0.9);
9703 for(
int i = 2; i < 3; ++i) {
9704 roots[i] = roots[i-1]*roots[1];
9708 bool changed =
false;
9709 for(
int i = 0; i < 3; ++i) {
9710 if ( err[i] >= tol ) {
9713 complex<IkReal>
x = roots[i] + coeffs[0];
9714 for(
int j = 1; j < 3; ++j) {
9715 x = roots[i] * x + coeffs[j];
9717 for(
int j = 0; j < 3; ++j) {
9719 if( roots[i] != roots[j] ) {
9720 x /= (roots[i] - roots[j]);
9734 bool visited[3] = {
false};
9735 for(
int i = 0; i < 3; ++i) {
9739 complex<IkReal> newroot=roots[i];
9741 for(
int j = i+1; j < 3; ++j) {
9743 if(
abs(real(roots[i])-real(roots[j])) < tolsqrt &&
abs(imag(roots[i])-imag(roots[j])) < 0.002 ) {
9744 newroot += roots[j];
9753 if(
IKabs(imag(newroot)) < tolsqrt ) {
9754 rawroots[numroots++] = real(newroot);
9759 static inline void polyroots2(IkReal rawcoeffs[2+1], IkReal rawroots[2],
int& numroots) {
9760 IkReal det = rawcoeffs[1]*rawcoeffs[1]-4*rawcoeffs[0]*rawcoeffs[2];
9764 else if( det == 0 ) {
9765 rawroots[0] = -0.5*rawcoeffs[1]/rawcoeffs[0];
9770 rawroots[0] = (-rawcoeffs[1]+det)/(2*rawcoeffs[0]);
9771 rawroots[1] = (-rawcoeffs[1]-det)/(2*rawcoeffs[0]);
9775 static inline void polyroots4(IkReal rawcoeffs[4+1], IkReal rawroots[4],
int& numroots)
9778 if( rawcoeffs[0] == 0 ) {
9780 polyroots3(&rawcoeffs[1], &rawroots[0], numroots);
9784 const IkReal tol = 128.0*std::numeric_limits<IkReal>::epsilon();
9785 const IkReal tolsqrt =
sqrt(std::numeric_limits<IkReal>::epsilon());
9786 complex<IkReal> coeffs[4];
9787 const int maxsteps = 110;
9788 for(
int i = 0; i < 4; ++i) {
9789 coeffs[i] = complex<IkReal>(rawcoeffs[i+1]/rawcoeffs[0]);
9791 complex<IkReal> roots[4];
9793 roots[0] = complex<IkReal>(1,0);
9794 roots[1] = complex<IkReal>(0.4,0.9);
9797 for(
int i = 2; i < 4; ++i) {
9798 roots[i] = roots[i-1]*roots[1];
9802 bool changed =
false;
9803 for(
int i = 0; i < 4; ++i) {
9804 if ( err[i] >= tol ) {
9807 complex<IkReal>
x = roots[i] + coeffs[0];
9808 for(
int j = 1; j < 4; ++j) {
9809 x = roots[i] * x + coeffs[j];
9811 for(
int j = 0; j < 4; ++j) {
9813 if( roots[i] != roots[j] ) {
9814 x /= (roots[i] - roots[j]);
9828 bool visited[4] = {
false};
9829 for(
int i = 0; i < 4; ++i) {
9833 complex<IkReal> newroot=roots[i];
9835 for(
int j = i+1; j < 4; ++j) {
9837 if(
abs(real(roots[i])-real(roots[j])) < tolsqrt &&
abs(imag(roots[i])-imag(roots[j])) < 0.002 ) {
9838 newroot += roots[j];
9847 if(
IKabs(imag(newroot)) < tolsqrt ) {
9848 rawroots[numroots++] = real(newroot);
9860 return solver.
ComputeIk(eetrans,eerot,pfree,solutions);
9865 return solver.
ComputeIk(eetrans,eerot,pfree,solutions);
9872 #ifdef IKFAST_NAMESPACE 9876 #ifndef IKFAST_NO_MAIN 9879 #ifdef IKFAST_NAMESPACE 9880 using namespace IKFAST_NAMESPACE;
9885 printf(
"\nUsage: ./ik r00 r01 r02 t0 r10 r11 r12 t1 r20 r21 r22 t2 free0 ...\n\n" 9886 "Returns the ik solutions given the transformation of the end effector specified by\n" 9887 "a 3x3 rotation R (rXX), and a 3x1 translation (tX).\n" 9894 IkReal eerot[9],eetrans[3];
9895 eerot[0] = atof(argv[1]); eerot[1] = atof(argv[2]); eerot[2] = atof(argv[3]); eetrans[0] = atof(argv[4]);
9896 eerot[3] = atof(argv[5]); eerot[4] = atof(argv[6]); eerot[5] = atof(argv[7]); eetrans[1] = atof(argv[8]);
9897 eerot[6] = atof(argv[9]); eerot[7] = atof(argv[10]); eerot[8] = atof(argv[11]); eetrans[2] = atof(argv[12]);
9898 for(std::size_t i = 0; i < vfree.size(); ++i)
9899 vfree[i] = atof(argv[13+i]);
9900 bool bSuccess =
ComputeIk(eetrans, eerot, vfree.size() > 0 ? &vfree[0] : NULL, solutions);
9903 fprintf(stderr,
"Failed to get ik solution\n");
9911 printf(
"sol%d (free=%d): ", (
int)i, (
int)sol.
GetFree().size());
9912 std::vector<IkReal> vsolfree(sol.
GetFree().size());
9913 sol.
GetSolution(&solvalues[0],vsolfree.size()>0?&vsolfree[0]:NULL);
9914 for( std::size_t j = 0; j < solvalues.size(); ++j)
9915 printf(
"%.15f, ", solvalues[j]);
virtual const IkSolutionBase< T > & GetSolution(size_t index) const
returns the solution pointer
#define IKFAST_ATAN2_MAGTHRESH
IKFAST_API const char * GetIkFastVersion()
void zgetrf_(const int *m, const int *n, std::complex< double > *a, const int *lda, int *ipiv, int *info)
void dgetrf_(const int *m, const int *n, double *a, const int *lda, int *ipiv, int *info)
#define IKFAST_SOLUTION_THRESH
INLINE Rall1d< T, V, S > log(const Rall1d< T, V, S > &arg)
CheckValue< T > IKPowWithIntegerCheck(T f, int n)
IKFAST_API int GetIkRealSize()
virtual size_t GetNumSolutions() const
returns the number of solutions stored
IKFAST_API void ComputeFk(const IkReal *j, IkReal *eetrans, IkReal *eerot)
#define IKFAST_SINCOS_THRESH
void dgesv_(const int *n, const int *nrhs, double *a, const int *lda, int *ipiv, double *b, const int *ldb, int *info)
The discrete solutions are returned in this structure.
IKFAST_API int GetNumJoints()
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)
float IKatan2(float fy, float fx)
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)
#define IKFAST_COMPILE_ASSERT(x)
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
IKFAST_API int * GetFreeParameters()
int main(int argc, char **argv)
INLINE Rall1d< T, V, S > atan(const Rall1d< T, V, S > &x)
static void polyroots3(IkReal rawcoeffs[3+1], IkReal rawroots[3], int &numroots)
IKFAST_API int GetIkType()
IKFAST_API bool ComputeIk(const IkReal *eetrans, const IkReal *eerot, const IkReal *pfree, IkSolutionListBase< IkReal > &solutions)
INLINE Rall1d< T, V, S > asin(const Rall1d< T, V, S > &x)
virtual void Clear()=0
clears all current solutions, note that any memory addresses returned from GetSolution will be invali...
INLINE Rall1d< T, V, S > sqrt(const Rall1d< T, V, S > &arg)
float IKatan2Simple(float fy, float fx)
IKFAST_API const char * GetKinematicsHash()
IKFAST_API bool ComputeIk2(const IkReal *eetrans, const IkReal *eerot, const IkReal *pfree, IkSolutionListBase< IkReal > &solutions, void *pOpenRAVEManip)
IKFAST_API int GetNumFreeParameters()
float IKfmod(float x, float y)
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)
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)
CheckValue< T > IKatan2WithCheck(T fy, T fx, T epsilon)
void dgetri_(const int *n, const double *a, const int *lda, int *ipiv, double *work, const int *lwork, int *info)
#define IKFAST_VERSION
Header file for all ikfast c++ files/shared objects.
INLINE Rall1d< T, V, S > cos(const Rall1d< T, V, S > &arg)
INLINE Rall1d< T, V, S > tan(const Rall1d< T, V, S > &arg)
static void polyroots2(IkReal rawcoeffs[2+1], IkReal rawroots[2], int &numroots)
#define IKFAST_EVALCOND_THRESH
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)
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