1 #define IKFAST_HAS_LIBRARY 25 #define IKFAST_COMPILE_ASSERT(x) extern int __dummy[(int)x] 40 #ifndef __PRETTY_FUNCTION__ 41 #define __PRETTY_FUNCTION__ __FUNCDNAME__ 45 #ifndef __PRETTY_FUNCTION__ 46 #define __PRETTY_FUNCTION__ __func__ 49 #define IKFAST_ASSERT(b) { if( !(b) ) { std::stringstream ss; ss << "ikfast exception: " << __FILE__ << ":" << __LINE__ << ": " <<__PRETTY_FUNCTION__ << ": Assertion '" << #b << "' failed"; throw std::runtime_error(ss.str()); } } 54 #define IKFAST_ALIGNED16(x) __declspec(align(16)) x 56 #define IKFAST_ALIGNED16(x) x __attribute((aligned(16))) 59 #define IK2PI ((IkReal)6.28318530717959) 60 #define IKPI ((IkReal)3.14159265358979) 61 #define IKPI_2 ((IkReal)1.57079632679490) 77 void dgetrf_ (
const int* m,
const int* n,
double* a,
const int* lda,
int* ipiv,
int* info);
78 void zgetrf_ (
const int* m,
const int* n, std::complex<double>* a,
const int* lda,
int* ipiv,
int* info);
79 void dgetri_(
const int* n,
const double* a,
const int* lda,
int* ipiv,
double* work,
const int* lwork,
int* info);
80 void dgesv_ (
const int* n,
const int* nrhs,
double* a,
const int* lda,
int* ipiv,
double* b,
const int* ldb,
int* info);
81 void dgetrs_(
const char *trans,
const int *n,
const int *nrhs,
double *a,
const int *lda,
int *ipiv,
double *b,
const int *ldb,
int *info);
82 void dgeev_(
const char *jobvl,
const char *jobvr,
const int *n,
double *a,
const int *lda,
double *wr,
double *wi,
double *vl,
const int *ldvl,
double *vr,
const int *ldvr,
double *work,
const int *lwork,
int *info);
87 #ifdef IKFAST_NAMESPACE 88 namespace IKFAST_NAMESPACE {
91 inline float IKabs(
float f) {
return fabsf(f); }
92 inline double IKabs(
double f) {
return fabs(f); }
94 inline float IKsqr(
float f) {
return f*f; }
95 inline double IKsqr(
double f) {
return f*f; }
97 inline float IKlog(
float f) {
return logf(f); }
98 inline double IKlog(
double f) {
return log(f); }
101 #ifndef IKFAST_SINCOS_THRESH 102 #define IKFAST_SINCOS_THRESH ((IkReal)1e-7) 106 #ifndef IKFAST_ATAN2_MAGTHRESH 107 #define IKFAST_ATAN2_MAGTHRESH ((IkReal)1e-7) 111 #ifndef IKFAST_SOLUTION_THRESH 112 #define IKFAST_SOLUTION_THRESH ((IkReal)1e-6) 116 #ifndef IKFAST_EVALCOND_THRESH 117 #define IKFAST_EVALCOND_THRESH ((IkReal)0.00001) 124 if( f <= -1 )
return float(-
IKPI_2);
125 else if( f >= 1 )
return float(
IKPI_2);
131 if( f <= -1 )
return -
IKPI_2;
132 else if( f >= 1 )
return IKPI_2;
157 if( f <= -1 )
return float(
IKPI);
158 else if( f >= 1 )
return float(0);
164 if( f <= -1 )
return IKPI;
165 else if( f >= 1 )
return 0;
168 inline float IKsin(
float f) {
return sinf(f); }
170 inline float IKcos(
float f) {
return cosf(f); }
172 inline float IKtan(
float f) {
return tanf(f); }
174 inline float IKsqrt(
float f) {
if( f <= 0.0f )
return 0.0f;
return sqrtf(f); }
175 inline double IKsqrt(
double f) {
if( f <= 0.0 )
return 0.0;
return sqrt(f); }
177 return atan2f(fy,fx);
184 else if( isnan(fx) ) {
187 return atan2f(fy,fx);
197 else if( isnan(fx) ) {
203 template <
typename T>
210 template <
typename T>
216 if( !isnan(fy) && !isnan(fx) ) {
245 template <
typename T>
264 ret.
value = (T)1.0e30;
268 ret.
value = T(1.0)/f;
273 int num = n > 0 ? n : -n;
277 else if( num == 3 ) {
299 IKFAST_API
void ComputeFk(
const IkReal* j, IkReal* eetrans, IkReal* eerot) {
300 IkReal x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40,x41,x42,x43,x44;
334 x33=((((-1.0)*x30))+((x2*x24)));
335 x34=((((-1.0)*x31))+((x2*x26)));
336 x35=((((-1.0)*x17*x24))+x30);
337 x36=((((-1.0)*x16*x2*x3))+x31);
341 x40=(x37+(((-1.0)*x15*x4)));
343 x42=(((x11*(((((-1.0)*x25))+x29))))+((x1*x10*x32)));
344 x43=(((x10*x40))+((x11*(((((-1.0)*x0*x17*x6))+(((-1.0)*x18*x22)))))));
345 IkReal x45=((1.0)*x16);
346 x44=(((x10*x41))+((x11*(((((-1.0)*x22*x45))+(((-1.0)*x23*x45)))))));
347 eerot[0]=(((x8*(((((-1.0)*x28))+((x35*x5))))))+((x43*x9)));
348 eerot[1]=(((x43*x8))+((x9*((x28+(((-1.0)*x15*x35)))))));
349 eerot[2]=(((x11*x40))+((x10*((((x0*x22))+((x0*x23)))))));
350 eetrans[0]=((((-0.035)*x0*x25))+(((0.44)*x24))+((x11*((((x21*x33))+(((-1.0)*x20*x4))))))+((x19*x22))+((x19*x23))+(((0.05)*x0))+((x14*x24))+((x10*(((((0.08)*x0*x22))+((x0*x12*x6)))))));
351 eerot[3]=(((x44*x9))+((x8*((((x0*x1))+x39)))));
352 eerot[4]=(((x9*(((((-1.0)*x1*x18))+(((-1.0)*x15*x36))))))+((x44*x8)));
353 eerot[5]=(((x10*((((x22*x4))+((x23*x4))))))+((x11*x41)));
354 eetrans[1]=(((x10*(((((0.08)*x22*x4))+((x12*x4*x6))))))+(((0.44)*x26))+(((0.05)*x4))+((x14*x26))+(((-0.035)*x25*x4))+((x11*((((x0*x20))+((x21*x34))))))+((x13*x23))+((x13*x22)));
355 eerot[6]=(((x5*x8*(((((-1.0)*x22))+(((-1.0)*x17*x6))))))+((x42*x9)));
356 eerot[7]=(((x42*x8))+((x32*x5*x9)));
357 eerot[8]=(((x27*x32))+((x10*(((((-1.0)*x29))+x25)))));
358 eetrans[2]=((0.33)+((x14*x6))+((x27*(((((0.08)*x22))+((x12*x6))))))+((x10*(((((-1.0)*x12*x3))+(((0.08)*x25))))))+(((0.42)*x25))+(((0.44)*x6))+(((0.035)*x22))+(((-0.42)*x2*x3)));
371 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;
372 unsigned char _ij0[2], _nj0,_ij1[2], _nj1,_ij2[2], _nj2,_ij3[2], _nj3,_ij4[2], _nj4,_ij5[2],
_nj5;
377 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;
378 for(
int dummyiter = 0; dummyiter < 1; ++dummyiter) {
389 px = eetrans[0]; py = eetrans[1]; pz = eetrans[2];
392 new_r01=((-1.0)*r01);
393 new_r02=((-1.0)*r02);
394 new_px=((((-0.08)*r02))+px);
396 new_r11=((-1.0)*r11);
397 new_r12=((-1.0)*r12);
398 new_py=((((-0.08)*r12))+py);
400 new_r21=((-1.0)*r21);
401 new_r22=((-1.0)*r22);
402 new_pz=((-0.33)+(((-0.08)*r22))+pz);
403 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;
404 IkReal x46=((1.0)*px);
405 IkReal x47=((1.0)*pz);
406 IkReal x48=((1.0)*py);
407 pp=((px*px)+(py*py)+(pz*pz));
408 npx=(((px*r00))+((py*r10))+((pz*r20)));
409 npy=(((px*r01))+((py*r11))+((pz*r21)));
410 npz=(((px*r02))+((py*r12))+((pz*r22)));
411 rxp0_0=((((-1.0)*r20*x48))+((pz*r10)));
412 rxp0_1=(((px*r20))+(((-1.0)*r00*x47)));
413 rxp0_2=((((-1.0)*r10*x46))+((py*r00)));
414 rxp1_0=((((-1.0)*r21*x48))+((pz*r11)));
415 rxp1_1=(((px*r21))+(((-1.0)*r01*x47)));
416 rxp1_2=((((-1.0)*r11*x46))+((py*r01)));
417 rxp2_0=((((-1.0)*r22*x48))+((pz*r12)));
418 rxp2_1=((((-1.0)*r02*x47))+((px*r22)));
419 rxp2_2=((((-1.0)*r12*x46))+((py*r02)));
423 if(
IKabs(j0eval[0]) < 0.0000010000000000 )
430 IkReal j0array[2], cj0array[2], sj0array[2];
431 bool j0valid[2]={
false};
437 IkReal x49=x50.
value;
438 j0array[0]=((-1.0)*x49);
439 sj0array[0]=
IKsin(j0array[0]);
440 cj0array[0]=
IKcos(j0array[0]);
441 j0array[1]=((3.14159265358979)+(((-1.0)*x49)));
442 sj0array[1]=
IKsin(j0array[1]);
443 cj0array[1]=
IKcos(j0array[1]);
444 if( j0array[0] >
IKPI )
448 else if( j0array[0] < -
IKPI )
452 if( j0array[1] >
IKPI )
456 else if( j0array[1] < -
IKPI )
460 for(
int ij0 = 0; ij0 < 2; ++ij0)
466 _ij0[0] = ij0; _ij0[1] = -1;
467 for(
int iij0 = ij0+1; iij0 < 2; ++iij0)
471 j0valid[iij0]=
false; _ij0[1] = iij0;
break;
474 j0 = j0array[ij0]; cj0 = cj0array[ij0]; sj0 = sj0array[ij0];
477 IkReal j2array[2], cj2array[2], sj2array[2];
478 bool j2valid[2]={
false};
480 if( (((0.994186511658126)+(((-2.69628181343312)*pp))+(((0.269628181343312)*py*sj0))+(((0.269628181343312)*cj0*px)))) < -1-
IKFAST_SINCOS_THRESH || (((0.994186511658126)+(((-2.69628181343312)*pp))+(((0.269628181343312)*py*sj0))+(((0.269628181343312)*cj0*px)))) > 1+
IKFAST_SINCOS_THRESH )
482 IkReal x51=
IKasin(((0.994186511658126)+(((-2.69628181343312)*pp))+(((0.269628181343312)*py*sj0))+(((0.269628181343312)*cj0*px))));
483 j2array[0]=((-0.0831412318884412)+(((-1.0)*x51)));
484 sj2array[0]=
IKsin(j2array[0]);
485 cj2array[0]=
IKcos(j2array[0]);
486 j2array[1]=((3.05845142170135)+x51);
487 sj2array[1]=
IKsin(j2array[1]);
488 cj2array[1]=
IKcos(j2array[1]);
489 if( j2array[0] >
IKPI )
493 else if( j2array[0] < -
IKPI )
497 if( j2array[1] >
IKPI )
501 else if( j2array[1] < -
IKPI )
505 for(
int ij2 = 0; ij2 < 2; ++ij2)
511 _ij2[0] = ij2; _ij2[1] = -1;
512 for(
int iij2 = ij2+1; iij2 < 2; ++iij2)
516 j2valid[iij2]=
false; _ij2[1] = iij2;
break;
519 j2 = j2array[ij2]; cj2 = cj2array[ij2]; sj2 = sj2array[ij2];
525 IkReal x54=((240.0)*cj2);
526 IkReal x55=((20.0)*sj2);
527 IkReal x56=((0.42)*cj2);
529 IkReal x58=(cj2*sj2);
530 IkReal x59=((0.035)*sj2);
533 j1eval[0]=((((-1.0)*x53*x54))+(((12.0)*cj2))+(((-1.0)*sj2))+(((20.0)*x61))+(((251.428571428571)*pz))+(((-1.0)*x54*x57))+((x53*x55))+(((240.0)*x60))+((x55*x57)));
534 j1eval[1]=((
IKabs(((-0.001225)+(((-0.175175)*x52))+(pz*pz)+(((0.0294)*x58)))))+(
IKabs(((0.0147)+(((-0.0294)*x52))+(((-0.05)*pz))+(((-0.175175)*x58))+(((0.0154)*sj2))+(((-0.1848)*cj2))+((pz*x57))+((pz*x53))))));
535 j1eval[2]=
IKsign(((((-1.0)*x53*x56))+(((0.021)*cj2))+(((-1.0)*x56*x57))+(((0.42)*x60))+(((0.035)*x61))+((x57*x59))+(((-0.00175)*sj2))+((x53*x59))+(((0.44)*pz))));
536 if(
IKabs(j1eval[0]) < 0.0000010000000000 ||
IKabs(j1eval[1]) < 0.0000010000000000 ||
IKabs(j1eval[2]) < 0.0000010000000000 )
543 IkReal x65=((240.0)*sj2);
544 IkReal x66=((0.035)*cj2);
545 IkReal x67=((20.0)*cj2);
547 IkReal x69=((0.42)*sj2);
548 j1eval[0]=((12.5714285714286)+cj2+(((12.0)*sj2))+(((20.0)*x63))+(((-251.428571428571)*x62))+(((-251.428571428571)*x64))+(((-240.0)*x68))+(((-1.0)*x64*x67))+(((-1.0)*x64*x65))+(((-1.0)*x62*x67))+(((-1.0)*x62*x65)));
549 j1eval[1]=
IKsign(((0.022)+(((0.035)*x63))+(((-0.44)*x64))+(((-0.44)*x62))+(((-0.42)*x68))+(((-1.0)*x64*x69))+(((-1.0)*x64*x66))+(((0.00175)*cj2))+(((0.021)*sj2))+(((-1.0)*x62*x69))+(((-1.0)*x62*x66))));
550 if(
IKabs(j1eval[0]) < 0.0000010000000000 ||
IKabs(j1eval[1]) < 0.0000010000000000 )
560 IkReal x76=(x70*x71);
561 IkReal x77=(x71*x72);
562 j1eval[0]=((-1.0)+(((40.0)*x75))+(((40.0)*x74))+(((-800.0)*x74*x75))+(((400.0)*x76))+(((-400.0)*x70))+(((-400.0)*x77))+(((-400.0)*x73)));
563 j1eval[1]=
IKsign(((-0.0025)+(((-2.0)*x74*x75))+(((0.1)*x75))+(((0.1)*x74))+x76+(((-1.0)*x70))+(((-1.0)*x73))+(((-1.0)*x77))));
564 if(
IKabs(j1eval[0]) < 0.0000010000000000 ||
IKabs(j1eval[1]) < 0.0000010000000000 )
571 IkReal j1array[1], cj1array[1], sj1array[1];
572 bool j1valid[1]={
false};
577 IkReal x81=((0.035)*sj2);
579 IkReal x83=((0.035)*cj2);
580 IkReal x84=((0.42)*cj2);
581 IkReal x85=((0.42)*sj2);
582 IkReal x86=((0.42)*x82);
583 CheckValue<IkReal> x87 =
IKatan2WithCheck(IkReal(((0.022)+(((-1.0)*x82*x83))+(((-1.0)*x82*x85))+(((-1.0)*x80*x85))+(((-1.0)*x80*x83))+((pz*x84))+(((0.00175)*cj2))+(((0.021)*sj2))+(((-0.44)*x80))+(((-0.44)*x82))+(((-1.0)*pz*x81)))),IkReal(((((0.021)*cj2))+(((-1.0)*x82*x84))+(((-1.0)*x80*x84))+((x81*x82))+(((-0.00175)*sj2))+(((-0.44)*pz))+((x80*x81))+(((-1.0)*pz*x83))+(((-1.0)*pz*x85)))),
IKFAST_ATAN2_MAGTHRESH);
591 j1array[0]=((-1.5707963267949)+(x87.
value)+(((1.5707963267949)*(x88.
value))));
592 sj1array[0]=
IKsin(j1array[0]);
593 cj1array[0]=
IKcos(j1array[0]);
594 if( j1array[0] >
IKPI )
598 else if( j1array[0] < -
IKPI )
602 for(
int ij1 = 0; ij1 < 1; ++ij1)
608 _ij1[0] = ij1; _ij1[1] = -1;
609 for(
int iij1 = ij1+1; iij1 < 1; ++iij1)
613 j1valid[iij1]=
false; _ij1[1] = iij1;
break;
616 j1 = j1array[ij1]; cj1 = cj1array[ij1]; sj1 = sj1array[ij1];
619 IkReal x89=
IKcos(j1);
620 IkReal x90=
IKsin(j1);
621 IkReal x91=((0.035)*sj2);
623 IkReal x93=((0.42)*sj2);
624 IkReal x94=((0.035)*cj2);
626 IkReal x96=((0.42)*x90);
627 IkReal x97=((1.0)*x95);
628 IkReal x98=((1.0)*x89);
629 IkReal x99=(cj2*x89);
630 IkReal x100=((0.88)*x90);
631 evalcond[0]=((((0.05)*x89))+((pz*x90))+(((-1.0)*x92*x98))+(((0.42)*cj2))+(((-1.0)*x91))+(((-1.0)*x89*x97)));
632 evalcond[1]=((((-1.0)*x90*x91))+((cj2*x96))+pz+(((-0.44)*x89))+(((-1.0)*x89*x94))+(((-1.0)*x89*x93)));
633 evalcond[2]=((0.44)+(((-1.0)*pz*x98))+(((0.05)*x90))+(((-1.0)*x90*x97))+(((-1.0)*x90*x92))+x93+x94);
634 evalcond[3]=((-0.018475)+((x100*x95))+((x100*x92))+(((0.1)*x92))+(((0.1)*x95))+(((-0.044)*x90))+(((-1.0)*pp))+(((0.88)*pz*x89)));
635 evalcond[4]=((0.05)+(((0.42)*x99))+((x90*x93))+((x90*x94))+(((-1.0)*x92))+(((-1.0)*x97))+(((0.44)*x90))+(((-1.0)*x89*x91)));
642 rotationfunction0(solutions);
653 IkReal j1array[1], cj1array[1], sj1array[1];
654 bool j1valid[1]={
false};
656 IkReal x1520=cj2*cj2;
657 IkReal x1521=(cj2*sj2);
658 IkReal x1522=(cj0*px);
659 IkReal x1523=((0.42)*sj2);
660 IkReal x1524=((0.035)*cj2);
661 IkReal x1525=((1.0)*pz);
662 IkReal x1526=(py*sj0);
663 CheckValue<IkReal> x1527 =
IKatan2WithCheck(IkReal(((-0.37)+(((-0.0294)*x1521))+(((-0.3696)*sj2))+(((-0.0308)*cj2))+(pz*pz)+(((0.175175)*x1520)))),IkReal(((0.0147)+(((-0.0294)*x1520))+(((-0.175175)*x1521))+(((-1.0)*x1525*x1526))+(((0.0154)*sj2))+(((-1.0)*x1522*x1525))+(((-0.1848)*cj2))+(((0.05)*pz)))),
IKFAST_ATAN2_MAGTHRESH);
667 CheckValue<IkReal> x1528=
IKPowWithIntegerCheck(
IKsign(((0.022)+(((-1.0)*x1524*x1526))+(((-0.44)*x1522))+(((-0.44)*x1526))+(((-0.42)*cj2*pz))+(((-1.0)*x1522*x1524))+(((-1.0)*x1522*x1523))+(((0.00175)*cj2))+(((-1.0)*x1523*x1526))+(((0.035)*pz*sj2))+(((0.021)*sj2)))),-1);
671 j1array[0]=((-1.5707963267949)+(x1527.
value)+(((1.5707963267949)*(x1528.
value))));
672 sj1array[0]=
IKsin(j1array[0]);
673 cj1array[0]=
IKcos(j1array[0]);
674 if( j1array[0] >
IKPI )
678 else if( j1array[0] < -
IKPI )
682 for(
int ij1 = 0; ij1 < 1; ++ij1)
688 _ij1[0] = ij1; _ij1[1] = -1;
689 for(
int iij1 = ij1+1; iij1 < 1; ++iij1)
693 j1valid[iij1]=
false; _ij1[1] = iij1;
break;
696 j1 = j1array[ij1]; cj1 = cj1array[ij1]; sj1 = sj1array[ij1];
699 IkReal x1529=
IKcos(j1);
700 IkReal x1530=
IKsin(j1);
701 IkReal x1531=((0.035)*sj2);
702 IkReal x1532=(py*sj0);
703 IkReal x1533=((0.42)*sj2);
704 IkReal x1534=((0.035)*cj2);
705 IkReal x1535=(cj0*px);
706 IkReal x1536=((0.42)*x1530);
707 IkReal x1537=((1.0)*x1535);
708 IkReal x1538=((1.0)*x1529);
709 IkReal x1539=(cj2*x1529);
710 IkReal x1540=((0.88)*x1530);
711 evalcond[0]=((((-1.0)*x1529*x1537))+(((0.05)*x1529))+(((-1.0)*x1531))+(((-1.0)*x1532*x1538))+(((0.42)*cj2))+((pz*x1530)));
712 evalcond[1]=((((-1.0)*x1529*x1533))+(((-1.0)*x1529*x1534))+(((-1.0)*x1530*x1531))+((cj2*x1536))+(((-0.44)*x1529))+pz);
713 evalcond[2]=((0.44)+(((-1.0)*x1530*x1532))+(((0.05)*x1530))+(((-1.0)*x1530*x1537))+x1534+x1533+(((-1.0)*pz*x1538)));
714 evalcond[3]=((-0.018475)+((x1532*x1540))+(((-1.0)*pp))+(((0.1)*x1535))+(((0.1)*x1532))+(((0.88)*pz*x1529))+(((-0.044)*x1530))+((x1535*x1540)));
715 evalcond[4]=((0.05)+(((-1.0)*x1529*x1531))+(((0.44)*x1530))+(((-1.0)*x1532))+(((-1.0)*x1537))+((x1530*x1534))+((x1530*x1533))+(((0.42)*x1539)));
722 rotationfunction0(solutions);
733 IkReal j1array[1], cj1array[1], sj1array[1];
734 bool j1valid[1]={
false};
736 IkReal x1541=cj2*cj2;
737 IkReal x1542=(py*sj0);
738 IkReal x1543=((0.035)*sj2);
739 IkReal x1544=((0.42)*cj2);
740 IkReal x1545=(cj0*px);
741 IkReal x1546=(cj2*sj2);
742 CheckValue<IkReal> x1547=
IKPowWithIntegerCheck(
IKsign(((((0.021)*cj2))+(((0.42)*pz*sj2))+(((-0.00175)*sj2))+(((0.035)*cj2*pz))+((x1543*x1545))+(((-1.0)*x1542*x1544))+(((-1.0)*x1544*x1545))+((x1542*x1543))+(((0.44)*pz)))),-1);
746 CheckValue<IkReal> x1548 =
IKatan2WithCheck(IkReal(((0.0147)+(((-0.0294)*x1541))+(((-0.05)*pz))+(((-0.175175)*x1546))+(((0.0154)*sj2))+(((-0.1848)*cj2))+((pz*x1542))+((pz*x1545)))),IkReal(((-0.001225)+(((-0.175175)*x1541))+(pz*pz)+(((0.0294)*x1546)))),
IKFAST_ATAN2_MAGTHRESH);
750 j1array[0]=((-1.5707963267949)+(((1.5707963267949)*(x1547.
value)))+(x1548.
value));
751 sj1array[0]=
IKsin(j1array[0]);
752 cj1array[0]=
IKcos(j1array[0]);
753 if( j1array[0] >
IKPI )
757 else if( j1array[0] < -
IKPI )
761 for(
int ij1 = 0; ij1 < 1; ++ij1)
767 _ij1[0] = ij1; _ij1[1] = -1;
768 for(
int iij1 = ij1+1; iij1 < 1; ++iij1)
772 j1valid[iij1]=
false; _ij1[1] = iij1;
break;
775 j1 = j1array[ij1]; cj1 = cj1array[ij1]; sj1 = sj1array[ij1];
778 IkReal x1549=
IKcos(j1);
779 IkReal x1550=
IKsin(j1);
780 IkReal x1551=((0.035)*sj2);
781 IkReal x1552=(py*sj0);
782 IkReal x1553=((0.42)*sj2);
783 IkReal x1554=((0.035)*cj2);
784 IkReal x1555=(cj0*px);
785 IkReal x1556=((0.42)*x1550);
786 IkReal x1557=((1.0)*x1555);
787 IkReal x1558=((1.0)*x1549);
788 IkReal x1559=(cj2*x1549);
789 IkReal x1560=((0.88)*x1550);
790 evalcond[0]=((((-1.0)*x1549*x1557))+(((-1.0)*x1552*x1558))+(((0.05)*x1549))+((pz*x1550))+(((0.42)*cj2))+(((-1.0)*x1551)));
791 evalcond[1]=((((-1.0)*x1549*x1554))+(((-1.0)*x1549*x1553))+((cj2*x1556))+(((-0.44)*x1549))+pz+(((-1.0)*x1550*x1551)));
792 evalcond[2]=((0.44)+(((-1.0)*x1550*x1552))+(((-1.0)*pz*x1558))+(((0.05)*x1550))+x1553+x1554+(((-1.0)*x1550*x1557)));
793 evalcond[3]=((-0.018475)+((x1555*x1560))+(((0.1)*x1552))+(((0.1)*x1555))+((x1552*x1560))+(((0.88)*pz*x1549))+(((-1.0)*pp))+(((-0.044)*x1550)));
794 evalcond[4]=((0.05)+(((-1.0)*x1552))+(((-1.0)*x1549*x1551))+((x1550*x1554))+((x1550*x1553))+(((0.42)*x1559))+(((-1.0)*x1557))+(((0.44)*x1550)));
801 rotationfunction0(solutions);
820 for(
int rotationiter = 0; rotationiter < 1; ++rotationiter) {
821 IkReal x101=(r11*sj0);
822 IkReal x102=(cj0*r02);
823 IkReal x103=(sj1*sj2);
824 IkReal x104=(r10*sj0);
825 IkReal x105=((1.0)*cj1);
826 IkReal x106=((1.0)*sj0);
827 IkReal x107=(cj0*r00);
828 IkReal x108=(r12*sj0);
829 IkReal x109=(cj0*r01);
830 IkReal x110=((((-1.0)*sj2*x105))+((cj2*sj1)));
831 IkReal x111=(x103+((cj1*cj2)));
832 IkReal x112=(sj0*x110);
833 IkReal x113=(cj0*x110);
834 IkReal x114=((((-1.0)*cj2*x105))+(((-1.0)*x103)));
835 new_r00=(((r20*x111))+((x104*x110))+((x107*x110)));
836 new_r01=(((x109*x110))+((r21*x111))+((x101*x110)));
837 new_r02=(((r22*x111))+((x102*x110))+((x108*x110)));
838 new_r10=((((-1.0)*r00*x106))+((cj0*r10)));
839 new_r11=((((-1.0)*r01*x106))+((cj0*r11)));
840 new_r12=((((-1.0)*r02*x106))+((cj0*r12)));
841 new_r20=(((r20*x110))+((x104*x114))+((x107*x114)));
842 new_r21=(((x109*x114))+((r21*x110))+((x101*x114)));
843 new_r22=(((r22*x110))+((x102*x114))+((x108*x114)));
845 IkReal j4array[2], cj4array[2], sj4array[2];
846 bool j4valid[2]={
false};
851 j4valid[0] = j4valid[1] =
true;
852 j4array[0] =
IKacos(cj4array[0]);
853 sj4array[0] =
IKsin(j4array[0]);
854 cj4array[1] = cj4array[0];
855 j4array[1] = -j4array[0];
856 sj4array[1] = -sj4array[0];
858 else if( isnan(cj4array[0]) )
862 cj4array[0] = 1; sj4array[0] = 0; j4array[0] = 0;
864 for(
int ij4 = 0; ij4 < 2; ++ij4)
870 _ij4[0] = ij4; _ij4[1] = -1;
871 for(
int iij4 = ij4+1; iij4 < 2; ++iij4)
875 j4valid[iij4]=
false; _ij4[1] = iij4;
break;
878 j4 = j4array[ij4]; cj4 = cj4array[ij4]; sj4 = sj4array[ij4];
884 j5eval[2]=((
IKabs(new_r20))+(
IKabs(new_r21)));
885 if(
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000 ||
IKabs(j5eval[2]) < 0.0000010000000000 )
891 j3eval[2]=((
IKabs(new_r12))+(
IKabs(new_r02)));
892 if(
IKabs(j3eval[0]) < 0.0000010000000000 ||
IKabs(j3eval[1]) < 0.0000010000000000 ||
IKabs(j3eval[2]) < 0.0000010000000000 )
898 if(
IKabs(j3eval[0]) < 0.0000010000000000 ||
IKabs(j3eval[1]) < 0.0000010000000000 )
902 bool bgotonextstatement =
true;
905 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(j4))), 6.28318530717959)));
910 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 )
912 bgotonextstatement=
false;
918 j3=
IKatan2(((-1.0)*new_r01), new_r00);
920 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
921 vinfos[0].jointtype = 1;
922 vinfos[0].foffset = j0;
923 vinfos[0].indices[0] = _ij0[0];
924 vinfos[0].indices[1] = _ij0[1];
925 vinfos[0].maxsolutions = _nj0;
926 vinfos[1].jointtype = 1;
927 vinfos[1].foffset = j1;
928 vinfos[1].indices[0] = _ij1[0];
929 vinfos[1].indices[1] = _ij1[1];
930 vinfos[1].maxsolutions = _nj1;
931 vinfos[2].jointtype = 1;
932 vinfos[2].foffset = j2;
933 vinfos[2].indices[0] = _ij2[0];
934 vinfos[2].indices[1] = _ij2[1];
935 vinfos[2].maxsolutions = _nj2;
936 vinfos[3].jointtype = 1;
937 vinfos[3].foffset = j3;
938 vinfos[3].fmul = j3mul;
939 vinfos[3].freeind = 0;
940 vinfos[3].maxsolutions = 0;
941 vinfos[4].jointtype = 1;
942 vinfos[4].foffset = j4;
943 vinfos[4].indices[0] = _ij4[0];
944 vinfos[4].indices[1] = _ij4[1];
945 vinfos[4].maxsolutions = _nj4;
946 vinfos[5].jointtype = 1;
947 vinfos[5].foffset = j5;
948 vinfos[5].fmul = j5mul;
949 vinfos[5].freeind = 0;
950 vinfos[5].maxsolutions = 0;
951 std::vector<int> vfree(1);
958 if( bgotonextstatement )
960 bool bgotonextstatement =
true;
963 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-3.14159265358979)+j4)))), 6.28318530717959)));
968 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 )
970 bgotonextstatement=
false;
976 j3=
IKatan2(((-1.0)*new_r01), ((-1.0)*new_r00));
978 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
979 vinfos[0].jointtype = 1;
980 vinfos[0].foffset = j0;
981 vinfos[0].indices[0] = _ij0[0];
982 vinfos[0].indices[1] = _ij0[1];
983 vinfos[0].maxsolutions = _nj0;
984 vinfos[1].jointtype = 1;
985 vinfos[1].foffset = j1;
986 vinfos[1].indices[0] = _ij1[0];
987 vinfos[1].indices[1] = _ij1[1];
988 vinfos[1].maxsolutions = _nj1;
989 vinfos[2].jointtype = 1;
990 vinfos[2].foffset = j2;
991 vinfos[2].indices[0] = _ij2[0];
992 vinfos[2].indices[1] = _ij2[1];
993 vinfos[2].maxsolutions = _nj2;
994 vinfos[3].jointtype = 1;
995 vinfos[3].foffset = j3;
996 vinfos[3].fmul = j3mul;
997 vinfos[3].freeind = 0;
998 vinfos[3].maxsolutions = 0;
999 vinfos[4].jointtype = 1;
1000 vinfos[4].foffset = j4;
1001 vinfos[4].indices[0] = _ij4[0];
1002 vinfos[4].indices[1] = _ij4[1];
1003 vinfos[4].maxsolutions = _nj4;
1004 vinfos[5].jointtype = 1;
1005 vinfos[5].foffset = j5;
1006 vinfos[5].fmul = j5mul;
1007 vinfos[5].freeind = 0;
1008 vinfos[5].maxsolutions = 0;
1009 std::vector<int> vfree(1);
1016 if( bgotonextstatement )
1018 bool bgotonextstatement =
true;
1021 evalcond[0]=((
IKabs(new_r20))+(
IKabs(new_r21)));
1022 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
1024 bgotonextstatement=
false;
1031 IkReal x115=new_r22*new_r22;
1032 IkReal x116=((16.0)*new_r10);
1033 IkReal x117=((16.0)*new_r01);
1034 IkReal x118=((16.0)*new_r22);
1035 IkReal x119=((8.0)*new_r11);
1036 IkReal x120=((8.0)*new_r00);
1037 IkReal x121=(x115*x116);
1038 IkReal x122=(x115*x117);
1039 j3eval[0]=((
IKabs((((new_r11*x118))+(((16.0)*new_r00))+(((-32.0)*new_r00*x115)))))+(
IKabs((((new_r22*x120))+(((-1.0)*x115*x119)))))+(
IKabs(((((-32.0)*new_r11))+((new_r00*x118))+(((16.0)*new_r11*x115)))))+(
IKabs(((((-1.0)*x121))+x116)))+(
IKabs(((((-1.0)*x122))+x117)))+(
IKabs(((((-1.0)*x116))+x121)))+(
IKabs(((((-1.0)*x117))+x122)))+(
IKabs((((new_r22*x119))+(((-1.0)*x120))))));
1040 if(
IKabs(j3eval[0]) < 0.0000000010000000 )
1046 IkReal op[4+1], zeror[4];
1048 IkReal j3evalpoly[1];
1049 IkReal x123=new_r22*new_r22;
1050 IkReal x124=((16.0)*new_r10);
1051 IkReal x125=(new_r11*new_r22);
1052 IkReal x126=(x123*x124);
1053 IkReal x127=((((-8.0)*new_r00))+(((8.0)*x125)));
1055 op[1]=((((-1.0)*x126))+x124);
1056 op[2]=((((16.0)*x125))+(((16.0)*new_r00))+(((-32.0)*new_r00*x123)));
1057 op[3]=((((-1.0)*x124))+x126);
1059 polyroots4(op,zeror,numroots);
1060 IkReal j3array[4], cj3array[4], sj3array[4], tempj3array[1];
1061 int numsolutions = 0;
1062 for(
int ij3 = 0; ij3 < numroots; ++ij3)
1064 IkReal htj3 = zeror[ij3];
1065 tempj3array[0]=((2.0)*(
atan(htj3)));
1066 for(
int kj3 = 0; kj3 < 1; ++kj3)
1068 j3array[numsolutions] = tempj3array[kj3];
1069 if( j3array[numsolutions] >
IKPI )
1071 j3array[numsolutions]-=
IK2PI;
1073 else if( j3array[numsolutions] < -
IKPI )
1075 j3array[numsolutions]+=
IK2PI;
1077 sj3array[numsolutions] =
IKsin(j3array[numsolutions]);
1078 cj3array[numsolutions] =
IKcos(j3array[numsolutions]);
1082 bool j3valid[4]={
true,
true,
true,
true};
1084 for(
int ij3 = 0; ij3 < numsolutions; ++ij3)
1090 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
1093 IkReal x128=((16.0)*new_r01);
1094 IkReal x129=new_r22*new_r22;
1095 IkReal x130=(new_r00*new_r22);
1096 IkReal x131=((8.0)*x130);
1097 IkReal x132=(new_r11*x129);
1098 IkReal x133=(x128*x129);
1099 IkReal x134=((8.0)*x132);
1100 j3evalpoly[0]=(((htj3*(((((-1.0)*x128))+x133))))+(((htj3*htj3)*(((((16.0)*x132))+(((16.0)*x130))+(((-32.0)*new_r11))))))+x131+(((htj3*htj3*htj3)*((x128+(((-1.0)*x133))))))+(((-1.0)*x134))+(((htj3*htj3*htj3*htj3)*((x131+(((-1.0)*x134)))))));
1101 if(
IKabs(j3evalpoly[0]) > 0.0000000010000000 )
1105 _ij3[0] = ij3; _ij3[1] = -1;
1106 for(
int iij3 = ij3+1; iij3 < numsolutions; ++iij3)
1110 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
1119 IkReal x135=cj3*cj3;
1120 IkReal x136=(cj3*new_r22);
1121 IkReal x137=((-1.0)+(((-1.0)*x135*(new_r22*new_r22)))+x135);
1123 j5eval[1]=((
IKabs((((new_r01*sj3))+(((-1.0)*new_r00*x136)))))+(
IKabs((((new_r01*x136))+((new_r00*sj3))))));
1125 if(
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000 ||
IKabs(j5eval[2]) < 0.0000010000000000 )
1134 if(
IKabs(j5eval[0]) < 0.0000010000000000 )
1143 if(
IKabs(j5eval[0]) < 0.0000010000000000 )
1147 bool bgotonextstatement =
true;
1150 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(j3))), 6.28318530717959)));
1151 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
1153 bgotonextstatement=
false;
1155 IkReal j5array[1], cj5array[1], sj5array[1];
1156 bool j5valid[1]={
false};
1160 j5array[0]=
IKatan2(new_r10, new_r11);
1161 sj5array[0]=
IKsin(j5array[0]);
1162 cj5array[0]=
IKcos(j5array[0]);
1163 if( j5array[0] >
IKPI )
1167 else if( j5array[0] < -
IKPI )
1168 { j5array[0]+=
IK2PI;
1171 for(
int ij5 = 0; ij5 < 1; ++ij5)
1177 _ij5[0] = ij5; _ij5[1] = -1;
1178 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
1182 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
1185 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
1188 IkReal x138=
IKsin(j5);
1189 IkReal x139=
IKcos(j5);
1191 evalcond[1]=((-1.0)*x139);
1192 evalcond[2]=(x138+(((-1.0)*new_r10)));
1193 evalcond[3]=(x139+(((-1.0)*new_r11)));
1201 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
1202 vinfos[0].jointtype = 1;
1203 vinfos[0].foffset = j0;
1204 vinfos[0].indices[0] = _ij0[0];
1205 vinfos[0].indices[1] = _ij0[1];
1206 vinfos[0].maxsolutions = _nj0;
1207 vinfos[1].jointtype = 1;
1208 vinfos[1].foffset = j1;
1209 vinfos[1].indices[0] = _ij1[0];
1210 vinfos[1].indices[1] = _ij1[1];
1211 vinfos[1].maxsolutions = _nj1;
1212 vinfos[2].jointtype = 1;
1213 vinfos[2].foffset = j2;
1214 vinfos[2].indices[0] = _ij2[0];
1215 vinfos[2].indices[1] = _ij2[1];
1216 vinfos[2].maxsolutions = _nj2;
1217 vinfos[3].jointtype = 1;
1218 vinfos[3].foffset = j3;
1219 vinfos[3].indices[0] = _ij3[0];
1220 vinfos[3].indices[1] = _ij3[1];
1221 vinfos[3].maxsolutions = _nj3;
1222 vinfos[4].jointtype = 1;
1223 vinfos[4].foffset = j4;
1224 vinfos[4].indices[0] = _ij4[0];
1225 vinfos[4].indices[1] = _ij4[1];
1226 vinfos[4].maxsolutions = _nj4;
1227 vinfos[5].jointtype = 1;
1228 vinfos[5].foffset = j5;
1229 vinfos[5].indices[0] = _ij5[0];
1230 vinfos[5].indices[1] = _ij5[1];
1231 vinfos[5].maxsolutions = _nj5;
1232 std::vector<int> vfree(0);
1240 if( bgotonextstatement )
1242 bool bgotonextstatement =
true;
1245 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-3.14159265358979)+j3)))), 6.28318530717959)));
1246 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
1248 bgotonextstatement=
false;
1250 IkReal j5array[1], cj5array[1], sj5array[1];
1251 bool j5valid[1]={
false};
1255 j5array[0]=
IKatan2(((-1.0)*new_r10), ((-1.0)*new_r11));
1256 sj5array[0]=
IKsin(j5array[0]);
1257 cj5array[0]=
IKcos(j5array[0]);
1258 if( j5array[0] >
IKPI )
1262 else if( j5array[0] < -
IKPI )
1263 { j5array[0]+=
IK2PI;
1266 for(
int ij5 = 0; ij5 < 1; ++ij5)
1272 _ij5[0] = ij5; _ij5[1] = -1;
1273 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
1277 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
1280 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
1283 IkReal x140=
IKsin(j5);
1284 IkReal x141=
IKcos(j5);
1286 evalcond[1]=(x140+new_r10);
1287 evalcond[2]=(x141+new_r11);
1288 evalcond[3]=((-1.0)*x141);
1296 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
1297 vinfos[0].jointtype = 1;
1298 vinfos[0].foffset = j0;
1299 vinfos[0].indices[0] = _ij0[0];
1300 vinfos[0].indices[1] = _ij0[1];
1301 vinfos[0].maxsolutions = _nj0;
1302 vinfos[1].jointtype = 1;
1303 vinfos[1].foffset = j1;
1304 vinfos[1].indices[0] = _ij1[0];
1305 vinfos[1].indices[1] = _ij1[1];
1306 vinfos[1].maxsolutions = _nj1;
1307 vinfos[2].jointtype = 1;
1308 vinfos[2].foffset = j2;
1309 vinfos[2].indices[0] = _ij2[0];
1310 vinfos[2].indices[1] = _ij2[1];
1311 vinfos[2].maxsolutions = _nj2;
1312 vinfos[3].jointtype = 1;
1313 vinfos[3].foffset = j3;
1314 vinfos[3].indices[0] = _ij3[0];
1315 vinfos[3].indices[1] = _ij3[1];
1316 vinfos[3].maxsolutions = _nj3;
1317 vinfos[4].jointtype = 1;
1318 vinfos[4].foffset = j4;
1319 vinfos[4].indices[0] = _ij4[0];
1320 vinfos[4].indices[1] = _ij4[1];
1321 vinfos[4].maxsolutions = _nj4;
1322 vinfos[5].jointtype = 1;
1323 vinfos[5].foffset = j5;
1324 vinfos[5].indices[0] = _ij5[0];
1325 vinfos[5].indices[1] = _ij5[1];
1326 vinfos[5].maxsolutions = _nj5;
1327 std::vector<int> vfree(0);
1335 if( bgotonextstatement )
1337 bool bgotonextstatement =
true;
1344 if((x142.
value) < -0.00001)
1347 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs((cj3+(((-1.0)*gconst24)))))+(
IKabs(((-1.0)+(
IKsign(sj3)))))), 6.28318530717959)));
1348 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
1350 bgotonextstatement=
false;
1357 if((((1.0)+(((-1.0)*(gconst24*gconst24))))) < -0.00001)
1359 sj3=
IKsqrt(((1.0)+(((-1.0)*(gconst24*gconst24)))));
1368 if((x143.
value) < -0.00001)
1371 j5eval[0]=((
IKabs(new_r11))+(
IKabs(new_r10)));
1372 if(
IKabs(j5eval[0]) < 0.0000010000000000 )
1375 IkReal j5array[1], cj5array[1], sj5array[1];
1376 bool j5valid[1]={
false};
1378 if((((1.0)+(((-1.0)*(gconst24*gconst24))))) < -0.00001)
1386 j5array[0]=
IKatan2(((((-1.0)*new_r00*(
IKsqrt(((1.0)+(((-1.0)*(gconst24*gconst24))))))))+((gconst24*new_r10))), (new_r11*(x144.
value)));
1387 sj5array[0]=
IKsin(j5array[0]);
1388 cj5array[0]=
IKcos(j5array[0]);
1389 if( j5array[0] >
IKPI )
1393 else if( j5array[0] < -
IKPI )
1394 { j5array[0]+=
IK2PI;
1397 for(
int ij5 = 0; ij5 < 1; ++ij5)
1403 _ij5[0] = ij5; _ij5[1] = -1;
1404 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
1408 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
1411 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
1414 IkReal x145=
IKcos(j5);
1415 IkReal x146=
IKsin(j5);
1416 IkReal x147=((1.0)*gconst24);
1417 if((((1.0)+(((-1.0)*gconst24*x147)))) < -0.00001)
1419 IkReal x148=
IKsqrt(((1.0)+(((-1.0)*gconst24*x147))));
1421 evalcond[1]=((-1.0)*x145);
1422 evalcond[2]=((((-1.0)*x145*x147))+new_r11);
1423 evalcond[3]=((((-1.0)*x146*x147))+new_r10);
1424 evalcond[4]=(((x145*x148))+new_r01);
1425 evalcond[5]=(((x146*x148))+new_r00);
1426 evalcond[6]=(((new_r00*x148))+x146+(((-1.0)*new_r10*x147)));
1427 evalcond[7]=(((new_r01*x148))+(((-1.0)*new_r11*x147))+x145);
1435 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
1436 vinfos[0].jointtype = 1;
1437 vinfos[0].foffset = j0;
1438 vinfos[0].indices[0] = _ij0[0];
1439 vinfos[0].indices[1] = _ij0[1];
1440 vinfos[0].maxsolutions = _nj0;
1441 vinfos[1].jointtype = 1;
1442 vinfos[1].foffset = j1;
1443 vinfos[1].indices[0] = _ij1[0];
1444 vinfos[1].indices[1] = _ij1[1];
1445 vinfos[1].maxsolutions = _nj1;
1446 vinfos[2].jointtype = 1;
1447 vinfos[2].foffset = j2;
1448 vinfos[2].indices[0] = _ij2[0];
1449 vinfos[2].indices[1] = _ij2[1];
1450 vinfos[2].maxsolutions = _nj2;
1451 vinfos[3].jointtype = 1;
1452 vinfos[3].foffset = j3;
1453 vinfos[3].indices[0] = _ij3[0];
1454 vinfos[3].indices[1] = _ij3[1];
1455 vinfos[3].maxsolutions = _nj3;
1456 vinfos[4].jointtype = 1;
1457 vinfos[4].foffset = j4;
1458 vinfos[4].indices[0] = _ij4[0];
1459 vinfos[4].indices[1] = _ij4[1];
1460 vinfos[4].maxsolutions = _nj4;
1461 vinfos[5].jointtype = 1;
1462 vinfos[5].foffset = j5;
1463 vinfos[5].indices[0] = _ij5[0];
1464 vinfos[5].indices[1] = _ij5[1];
1465 vinfos[5].maxsolutions = _nj5;
1466 std::vector<int> vfree(0);
1475 IkReal j5array[1], cj5array[1], sj5array[1];
1476 bool j5valid[1]={
false};
1486 j5array[0]=((-1.5707963267949)+(((1.5707963267949)*(x149.
value)))+(x150.
value));
1487 sj5array[0]=
IKsin(j5array[0]);
1488 cj5array[0]=
IKcos(j5array[0]);
1489 if( j5array[0] >
IKPI )
1493 else if( j5array[0] < -
IKPI )
1494 { j5array[0]+=
IK2PI;
1497 for(
int ij5 = 0; ij5 < 1; ++ij5)
1503 _ij5[0] = ij5; _ij5[1] = -1;
1504 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
1508 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
1511 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
1514 IkReal x151=
IKcos(j5);
1515 IkReal x152=
IKsin(j5);
1516 IkReal x153=((1.0)*gconst24);
1517 if((((1.0)+(((-1.0)*gconst24*x153)))) < -0.00001)
1519 IkReal x154=
IKsqrt(((1.0)+(((-1.0)*gconst24*x153))));
1521 evalcond[1]=((-1.0)*x151);
1522 evalcond[2]=((((-1.0)*x151*x153))+new_r11);
1523 evalcond[3]=((((-1.0)*x152*x153))+new_r10);
1524 evalcond[4]=(((x151*x154))+new_r01);
1525 evalcond[5]=(((x152*x154))+new_r00);
1526 evalcond[6]=(((new_r00*x154))+x152+(((-1.0)*new_r10*x153)));
1527 evalcond[7]=(((new_r01*x154))+x151+(((-1.0)*new_r11*x153)));
1535 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
1536 vinfos[0].jointtype = 1;
1537 vinfos[0].foffset = j0;
1538 vinfos[0].indices[0] = _ij0[0];
1539 vinfos[0].indices[1] = _ij0[1];
1540 vinfos[0].maxsolutions = _nj0;
1541 vinfos[1].jointtype = 1;
1542 vinfos[1].foffset = j1;
1543 vinfos[1].indices[0] = _ij1[0];
1544 vinfos[1].indices[1] = _ij1[1];
1545 vinfos[1].maxsolutions = _nj1;
1546 vinfos[2].jointtype = 1;
1547 vinfos[2].foffset = j2;
1548 vinfos[2].indices[0] = _ij2[0];
1549 vinfos[2].indices[1] = _ij2[1];
1550 vinfos[2].maxsolutions = _nj2;
1551 vinfos[3].jointtype = 1;
1552 vinfos[3].foffset = j3;
1553 vinfos[3].indices[0] = _ij3[0];
1554 vinfos[3].indices[1] = _ij3[1];
1555 vinfos[3].maxsolutions = _nj3;
1556 vinfos[4].jointtype = 1;
1557 vinfos[4].foffset = j4;
1558 vinfos[4].indices[0] = _ij4[0];
1559 vinfos[4].indices[1] = _ij4[1];
1560 vinfos[4].maxsolutions = _nj4;
1561 vinfos[5].jointtype = 1;
1562 vinfos[5].foffset = j5;
1563 vinfos[5].indices[0] = _ij5[0];
1564 vinfos[5].indices[1] = _ij5[1];
1565 vinfos[5].maxsolutions = _nj5;
1566 std::vector<int> vfree(0);
1578 if( bgotonextstatement )
1580 bool bgotonextstatement =
true;
1587 if((x155.
value) < -0.00001)
1590 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs((cj3+(((-1.0)*gconst24)))))+(
IKabs(((1.0)+(
IKsign(sj3)))))), 6.28318530717959)));
1591 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
1593 bgotonextstatement=
false;
1600 if((((1.0)+(((-1.0)*(gconst24*gconst24))))) < -0.00001)
1602 sj3=((-1.0)*(
IKsqrt(((1.0)+(((-1.0)*(gconst24*gconst24)))))));
1606 j3=((-1.0)*(
IKacos(gconst24)));
1611 if((x156.
value) < -0.00001)
1614 j5eval[0]=((
IKabs(new_r11))+(
IKabs(new_r10)));
1615 if(
IKabs(j5eval[0]) < 0.0000010000000000 )
1618 IkReal j5array[1], cj5array[1], sj5array[1];
1619 bool j5valid[1]={
false};
1621 if((((1.0)+(((-1.0)*(gconst24*gconst24))))) < -0.00001)
1629 j5array[0]=
IKatan2((((new_r00*(
IKsqrt(((1.0)+(((-1.0)*(gconst24*gconst24))))))))+((gconst24*new_r10))), (new_r11*(x157.
value)));
1630 sj5array[0]=
IKsin(j5array[0]);
1631 cj5array[0]=
IKcos(j5array[0]);
1632 if( j5array[0] >
IKPI )
1636 else if( j5array[0] < -
IKPI )
1637 { j5array[0]+=
IK2PI;
1640 for(
int ij5 = 0; ij5 < 1; ++ij5)
1646 _ij5[0] = ij5; _ij5[1] = -1;
1647 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
1651 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
1654 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
1657 IkReal x158=
IKcos(j5);
1658 IkReal x159=
IKsin(j5);
1659 IkReal x160=((1.0)*gconst24);
1660 IkReal x161=((1.0)*x159);
1661 if((((1.0)+(((-1.0)*gconst24*x160)))) < -0.00001)
1663 IkReal x162=
IKsqrt(((1.0)+(((-1.0)*gconst24*x160))));
1664 IkReal x163=((1.0)*x162);
1666 evalcond[1]=((-1.0)*x158);
1667 evalcond[2]=((((-1.0)*x158*x160))+new_r11);
1668 evalcond[3]=((((-1.0)*x159*x160))+new_r10);
1669 evalcond[4]=((((-1.0)*x158*x163))+new_r01);
1670 evalcond[5]=((((-1.0)*x161*x162))+new_r00);
1671 evalcond[6]=((((-1.0)*new_r00*x163))+(((-1.0)*new_r10*x160))+x159);
1672 evalcond[7]=((((-1.0)*new_r11*x160))+x158+(((-1.0)*new_r01*x163)));
1680 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
1681 vinfos[0].jointtype = 1;
1682 vinfos[0].foffset = j0;
1683 vinfos[0].indices[0] = _ij0[0];
1684 vinfos[0].indices[1] = _ij0[1];
1685 vinfos[0].maxsolutions = _nj0;
1686 vinfos[1].jointtype = 1;
1687 vinfos[1].foffset = j1;
1688 vinfos[1].indices[0] = _ij1[0];
1689 vinfos[1].indices[1] = _ij1[1];
1690 vinfos[1].maxsolutions = _nj1;
1691 vinfos[2].jointtype = 1;
1692 vinfos[2].foffset = j2;
1693 vinfos[2].indices[0] = _ij2[0];
1694 vinfos[2].indices[1] = _ij2[1];
1695 vinfos[2].maxsolutions = _nj2;
1696 vinfos[3].jointtype = 1;
1697 vinfos[3].foffset = j3;
1698 vinfos[3].indices[0] = _ij3[0];
1699 vinfos[3].indices[1] = _ij3[1];
1700 vinfos[3].maxsolutions = _nj3;
1701 vinfos[4].jointtype = 1;
1702 vinfos[4].foffset = j4;
1703 vinfos[4].indices[0] = _ij4[0];
1704 vinfos[4].indices[1] = _ij4[1];
1705 vinfos[4].maxsolutions = _nj4;
1706 vinfos[5].jointtype = 1;
1707 vinfos[5].foffset = j5;
1708 vinfos[5].indices[0] = _ij5[0];
1709 vinfos[5].indices[1] = _ij5[1];
1710 vinfos[5].maxsolutions = _nj5;
1711 std::vector<int> vfree(0);
1720 IkReal j5array[1], cj5array[1], sj5array[1];
1721 bool j5valid[1]={
false};
1731 j5array[0]=((-1.5707963267949)+(((1.5707963267949)*(x164.
value)))+(x165.
value));
1732 sj5array[0]=
IKsin(j5array[0]);
1733 cj5array[0]=
IKcos(j5array[0]);
1734 if( j5array[0] >
IKPI )
1738 else if( j5array[0] < -
IKPI )
1739 { j5array[0]+=
IK2PI;
1742 for(
int ij5 = 0; ij5 < 1; ++ij5)
1748 _ij5[0] = ij5; _ij5[1] = -1;
1749 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
1753 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
1756 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
1759 IkReal x166=
IKcos(j5);
1760 IkReal x167=
IKsin(j5);
1761 IkReal x168=((1.0)*gconst24);
1762 IkReal x169=((1.0)*x167);
1763 if((((1.0)+(((-1.0)*gconst24*x168)))) < -0.00001)
1765 IkReal x170=
IKsqrt(((1.0)+(((-1.0)*gconst24*x168))));
1766 IkReal x171=((1.0)*x170);
1768 evalcond[1]=((-1.0)*x166);
1769 evalcond[2]=((((-1.0)*x166*x168))+new_r11);
1770 evalcond[3]=(new_r10+(((-1.0)*x167*x168)));
1771 evalcond[4]=(new_r01+(((-1.0)*x166*x171)));
1772 evalcond[5]=(new_r00+(((-1.0)*x169*x170)));
1773 evalcond[6]=((((-1.0)*new_r10*x168))+x167+(((-1.0)*new_r00*x171)));
1774 evalcond[7]=((((-1.0)*new_r11*x168))+x166+(((-1.0)*new_r01*x171)));
1782 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
1783 vinfos[0].jointtype = 1;
1784 vinfos[0].foffset = j0;
1785 vinfos[0].indices[0] = _ij0[0];
1786 vinfos[0].indices[1] = _ij0[1];
1787 vinfos[0].maxsolutions = _nj0;
1788 vinfos[1].jointtype = 1;
1789 vinfos[1].foffset = j1;
1790 vinfos[1].indices[0] = _ij1[0];
1791 vinfos[1].indices[1] = _ij1[1];
1792 vinfos[1].maxsolutions = _nj1;
1793 vinfos[2].jointtype = 1;
1794 vinfos[2].foffset = j2;
1795 vinfos[2].indices[0] = _ij2[0];
1796 vinfos[2].indices[1] = _ij2[1];
1797 vinfos[2].maxsolutions = _nj2;
1798 vinfos[3].jointtype = 1;
1799 vinfos[3].foffset = j3;
1800 vinfos[3].indices[0] = _ij3[0];
1801 vinfos[3].indices[1] = _ij3[1];
1802 vinfos[3].maxsolutions = _nj3;
1803 vinfos[4].jointtype = 1;
1804 vinfos[4].foffset = j4;
1805 vinfos[4].indices[0] = _ij4[0];
1806 vinfos[4].indices[1] = _ij4[1];
1807 vinfos[4].maxsolutions = _nj4;
1808 vinfos[5].jointtype = 1;
1809 vinfos[5].foffset = j5;
1810 vinfos[5].indices[0] = _ij5[0];
1811 vinfos[5].indices[1] = _ij5[1];
1812 vinfos[5].maxsolutions = _nj5;
1813 std::vector<int> vfree(0);
1825 if( bgotonextstatement )
1827 bool bgotonextstatement =
true;
1834 if((x172.
value) < -0.00001)
1837 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs((cj3+(((-1.0)*gconst25)))))+(
IKabs(((-1.0)+(
IKsign(sj3)))))), 6.28318530717959)));
1838 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
1840 bgotonextstatement=
false;
1847 if((((1.0)+(((-1.0)*(gconst25*gconst25))))) < -0.00001)
1849 sj3=
IKsqrt(((1.0)+(((-1.0)*(gconst25*gconst25)))));
1858 if((x173.
value) < -0.00001)
1861 j5eval[0]=((
IKabs(new_r11))+(
IKabs(new_r10)));
1862 if(
IKabs(j5eval[0]) < 0.0000010000000000 )
1865 IkReal j5array[1], cj5array[1], sj5array[1];
1866 bool j5valid[1]={
false};
1868 if((((1.0)+(((-1.0)*(gconst25*gconst25))))) < -0.00001)
1876 j5array[0]=
IKatan2((((gconst25*new_r10))+(((-1.0)*new_r00*(
IKsqrt(((1.0)+(((-1.0)*(gconst25*gconst25))))))))), (new_r11*(x174.
value)));
1877 sj5array[0]=
IKsin(j5array[0]);
1878 cj5array[0]=
IKcos(j5array[0]);
1879 if( j5array[0] >
IKPI )
1883 else if( j5array[0] < -
IKPI )
1884 { j5array[0]+=
IK2PI;
1887 for(
int ij5 = 0; ij5 < 1; ++ij5)
1893 _ij5[0] = ij5; _ij5[1] = -1;
1894 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
1898 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
1901 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
1904 IkReal x175=
IKcos(j5);
1905 IkReal x176=
IKsin(j5);
1906 IkReal x177=((1.0)*gconst25);
1907 if((((1.0)+(((-1.0)*gconst25*x177)))) < -0.00001)
1909 IkReal x178=
IKsqrt(((1.0)+(((-1.0)*gconst25*x177))));
1911 evalcond[1]=((-1.0)*x175);
1912 evalcond[2]=((((-1.0)*x175*x177))+new_r11);
1913 evalcond[3]=((((-1.0)*x176*x177))+new_r10);
1914 evalcond[4]=(((x175*x178))+new_r01);
1915 evalcond[5]=(((x176*x178))+new_r00);
1916 evalcond[6]=(((new_r00*x178))+(((-1.0)*new_r10*x177))+x176);
1917 evalcond[7]=(((new_r01*x178))+(((-1.0)*new_r11*x177))+x175);
1925 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
1926 vinfos[0].jointtype = 1;
1927 vinfos[0].foffset = j0;
1928 vinfos[0].indices[0] = _ij0[0];
1929 vinfos[0].indices[1] = _ij0[1];
1930 vinfos[0].maxsolutions = _nj0;
1931 vinfos[1].jointtype = 1;
1932 vinfos[1].foffset = j1;
1933 vinfos[1].indices[0] = _ij1[0];
1934 vinfos[1].indices[1] = _ij1[1];
1935 vinfos[1].maxsolutions = _nj1;
1936 vinfos[2].jointtype = 1;
1937 vinfos[2].foffset = j2;
1938 vinfos[2].indices[0] = _ij2[0];
1939 vinfos[2].indices[1] = _ij2[1];
1940 vinfos[2].maxsolutions = _nj2;
1941 vinfos[3].jointtype = 1;
1942 vinfos[3].foffset = j3;
1943 vinfos[3].indices[0] = _ij3[0];
1944 vinfos[3].indices[1] = _ij3[1];
1945 vinfos[3].maxsolutions = _nj3;
1946 vinfos[4].jointtype = 1;
1947 vinfos[4].foffset = j4;
1948 vinfos[4].indices[0] = _ij4[0];
1949 vinfos[4].indices[1] = _ij4[1];
1950 vinfos[4].maxsolutions = _nj4;
1951 vinfos[5].jointtype = 1;
1952 vinfos[5].foffset = j5;
1953 vinfos[5].indices[0] = _ij5[0];
1954 vinfos[5].indices[1] = _ij5[1];
1955 vinfos[5].maxsolutions = _nj5;
1956 std::vector<int> vfree(0);
1965 IkReal j5array[1], cj5array[1], sj5array[1];
1966 bool j5valid[1]={
false};
1976 j5array[0]=((-1.5707963267949)+(((1.5707963267949)*(x179.
value)))+(x180.
value));
1977 sj5array[0]=
IKsin(j5array[0]);
1978 cj5array[0]=
IKcos(j5array[0]);
1979 if( j5array[0] >
IKPI )
1983 else if( j5array[0] < -
IKPI )
1984 { j5array[0]+=
IK2PI;
1987 for(
int ij5 = 0; ij5 < 1; ++ij5)
1993 _ij5[0] = ij5; _ij5[1] = -1;
1994 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
1998 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
2001 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
2004 IkReal x181=
IKcos(j5);
2005 IkReal x182=
IKsin(j5);
2006 IkReal x183=((1.0)*gconst25);
2007 if((((1.0)+(((-1.0)*gconst25*x183)))) < -0.00001)
2009 IkReal x184=
IKsqrt(((1.0)+(((-1.0)*gconst25*x183))));
2011 evalcond[1]=((-1.0)*x181);
2012 evalcond[2]=(new_r11+(((-1.0)*x181*x183)));
2013 evalcond[3]=(new_r10+(((-1.0)*x182*x183)));
2014 evalcond[4]=(new_r01+((x181*x184)));
2015 evalcond[5]=(new_r00+((x182*x184)));
2016 evalcond[6]=(((new_r00*x184))+x182+(((-1.0)*new_r10*x183)));
2017 evalcond[7]=(((new_r01*x184))+x181+(((-1.0)*new_r11*x183)));
2025 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
2026 vinfos[0].jointtype = 1;
2027 vinfos[0].foffset = j0;
2028 vinfos[0].indices[0] = _ij0[0];
2029 vinfos[0].indices[1] = _ij0[1];
2030 vinfos[0].maxsolutions = _nj0;
2031 vinfos[1].jointtype = 1;
2032 vinfos[1].foffset = j1;
2033 vinfos[1].indices[0] = _ij1[0];
2034 vinfos[1].indices[1] = _ij1[1];
2035 vinfos[1].maxsolutions = _nj1;
2036 vinfos[2].jointtype = 1;
2037 vinfos[2].foffset = j2;
2038 vinfos[2].indices[0] = _ij2[0];
2039 vinfos[2].indices[1] = _ij2[1];
2040 vinfos[2].maxsolutions = _nj2;
2041 vinfos[3].jointtype = 1;
2042 vinfos[3].foffset = j3;
2043 vinfos[3].indices[0] = _ij3[0];
2044 vinfos[3].indices[1] = _ij3[1];
2045 vinfos[3].maxsolutions = _nj3;
2046 vinfos[4].jointtype = 1;
2047 vinfos[4].foffset = j4;
2048 vinfos[4].indices[0] = _ij4[0];
2049 vinfos[4].indices[1] = _ij4[1];
2050 vinfos[4].maxsolutions = _nj4;
2051 vinfos[5].jointtype = 1;
2052 vinfos[5].foffset = j5;
2053 vinfos[5].indices[0] = _ij5[0];
2054 vinfos[5].indices[1] = _ij5[1];
2055 vinfos[5].maxsolutions = _nj5;
2056 std::vector<int> vfree(0);
2068 if( bgotonextstatement )
2070 bool bgotonextstatement =
true;
2077 if((x185.
value) < -0.00001)
2080 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs((cj3+(((-1.0)*gconst25)))))+(
IKabs(((1.0)+(
IKsign(sj3)))))), 6.28318530717959)));
2081 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
2083 bgotonextstatement=
false;
2090 if((((1.0)+(((-1.0)*(gconst25*gconst25))))) < -0.00001)
2092 sj3=((-1.0)*(
IKsqrt(((1.0)+(((-1.0)*(gconst25*gconst25)))))));
2096 j3=((-1.0)*(
IKacos(gconst25)));
2101 if((x186.
value) < -0.00001)
2104 j5eval[0]=((
IKabs(new_r11))+(
IKabs(new_r10)));
2105 if(
IKabs(j5eval[0]) < 0.0000010000000000 )
2108 IkReal j5array[1], cj5array[1], sj5array[1];
2109 bool j5valid[1]={
false};
2111 if((((1.0)+(((-1.0)*(gconst25*gconst25))))) < -0.00001)
2119 j5array[0]=
IKatan2((((gconst25*new_r10))+((new_r00*(
IKsqrt(((1.0)+(((-1.0)*(gconst25*gconst25))))))))), (new_r11*(x187.
value)));
2120 sj5array[0]=
IKsin(j5array[0]);
2121 cj5array[0]=
IKcos(j5array[0]);
2122 if( j5array[0] >
IKPI )
2126 else if( j5array[0] < -
IKPI )
2127 { j5array[0]+=
IK2PI;
2130 for(
int ij5 = 0; ij5 < 1; ++ij5)
2136 _ij5[0] = ij5; _ij5[1] = -1;
2137 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
2141 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
2144 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
2147 IkReal x188=
IKcos(j5);
2148 IkReal x189=
IKsin(j5);
2149 IkReal x190=((1.0)*gconst25);
2150 if((((1.0)+(((-1.0)*gconst25*x190)))) < -0.00001)
2152 IkReal x191=
IKsqrt(((1.0)+(((-1.0)*gconst25*x190))));
2153 IkReal x192=((1.0)*x191);
2155 evalcond[1]=((-1.0)*x188);
2156 evalcond[2]=((((-1.0)*x188*x190))+new_r11);
2157 evalcond[3]=((((-1.0)*x189*x190))+new_r10);
2158 evalcond[4]=((((-1.0)*x188*x192))+new_r01);
2159 evalcond[5]=((((-1.0)*x189*x192))+new_r00);
2160 evalcond[6]=(x189+(((-1.0)*new_r10*x190))+(((-1.0)*new_r00*x192)));
2161 evalcond[7]=(x188+(((-1.0)*new_r11*x190))+(((-1.0)*new_r01*x192)));
2169 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
2170 vinfos[0].jointtype = 1;
2171 vinfos[0].foffset = j0;
2172 vinfos[0].indices[0] = _ij0[0];
2173 vinfos[0].indices[1] = _ij0[1];
2174 vinfos[0].maxsolutions = _nj0;
2175 vinfos[1].jointtype = 1;
2176 vinfos[1].foffset = j1;
2177 vinfos[1].indices[0] = _ij1[0];
2178 vinfos[1].indices[1] = _ij1[1];
2179 vinfos[1].maxsolutions = _nj1;
2180 vinfos[2].jointtype = 1;
2181 vinfos[2].foffset = j2;
2182 vinfos[2].indices[0] = _ij2[0];
2183 vinfos[2].indices[1] = _ij2[1];
2184 vinfos[2].maxsolutions = _nj2;
2185 vinfos[3].jointtype = 1;
2186 vinfos[3].foffset = j3;
2187 vinfos[3].indices[0] = _ij3[0];
2188 vinfos[3].indices[1] = _ij3[1];
2189 vinfos[3].maxsolutions = _nj3;
2190 vinfos[4].jointtype = 1;
2191 vinfos[4].foffset = j4;
2192 vinfos[4].indices[0] = _ij4[0];
2193 vinfos[4].indices[1] = _ij4[1];
2194 vinfos[4].maxsolutions = _nj4;
2195 vinfos[5].jointtype = 1;
2196 vinfos[5].foffset = j5;
2197 vinfos[5].indices[0] = _ij5[0];
2198 vinfos[5].indices[1] = _ij5[1];
2199 vinfos[5].maxsolutions = _nj5;
2200 std::vector<int> vfree(0);
2209 IkReal j5array[1], cj5array[1], sj5array[1];
2210 bool j5valid[1]={
false};
2220 j5array[0]=((-1.5707963267949)+(((1.5707963267949)*(x193.
value)))+(x194.
value));
2221 sj5array[0]=
IKsin(j5array[0]);
2222 cj5array[0]=
IKcos(j5array[0]);
2223 if( j5array[0] >
IKPI )
2227 else if( j5array[0] < -
IKPI )
2228 { j5array[0]+=
IK2PI;
2231 for(
int ij5 = 0; ij5 < 1; ++ij5)
2237 _ij5[0] = ij5; _ij5[1] = -1;
2238 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
2242 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
2245 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
2248 IkReal x195=
IKcos(j5);
2249 IkReal x196=
IKsin(j5);
2250 IkReal x197=((1.0)*gconst25);
2251 if((((1.0)+(((-1.0)*gconst25*x197)))) < -0.00001)
2253 IkReal x198=
IKsqrt(((1.0)+(((-1.0)*gconst25*x197))));
2254 IkReal x199=((1.0)*x198);
2256 evalcond[1]=((-1.0)*x195);
2257 evalcond[2]=((((-1.0)*x195*x197))+new_r11);
2258 evalcond[3]=((((-1.0)*x196*x197))+new_r10);
2259 evalcond[4]=((((-1.0)*x195*x199))+new_r01);
2260 evalcond[5]=((((-1.0)*x196*x199))+new_r00);
2261 evalcond[6]=(x196+(((-1.0)*new_r10*x197))+(((-1.0)*new_r00*x199)));
2262 evalcond[7]=(x195+(((-1.0)*new_r11*x197))+(((-1.0)*new_r01*x199)));
2270 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
2271 vinfos[0].jointtype = 1;
2272 vinfos[0].foffset = j0;
2273 vinfos[0].indices[0] = _ij0[0];
2274 vinfos[0].indices[1] = _ij0[1];
2275 vinfos[0].maxsolutions = _nj0;
2276 vinfos[1].jointtype = 1;
2277 vinfos[1].foffset = j1;
2278 vinfos[1].indices[0] = _ij1[0];
2279 vinfos[1].indices[1] = _ij1[1];
2280 vinfos[1].maxsolutions = _nj1;
2281 vinfos[2].jointtype = 1;
2282 vinfos[2].foffset = j2;
2283 vinfos[2].indices[0] = _ij2[0];
2284 vinfos[2].indices[1] = _ij2[1];
2285 vinfos[2].maxsolutions = _nj2;
2286 vinfos[3].jointtype = 1;
2287 vinfos[3].foffset = j3;
2288 vinfos[3].indices[0] = _ij3[0];
2289 vinfos[3].indices[1] = _ij3[1];
2290 vinfos[3].maxsolutions = _nj3;
2291 vinfos[4].jointtype = 1;
2292 vinfos[4].foffset = j4;
2293 vinfos[4].indices[0] = _ij4[0];
2294 vinfos[4].indices[1] = _ij4[1];
2295 vinfos[4].maxsolutions = _nj4;
2296 vinfos[5].jointtype = 1;
2297 vinfos[5].foffset = j5;
2298 vinfos[5].indices[0] = _ij5[0];
2299 vinfos[5].indices[1] = _ij5[1];
2300 vinfos[5].maxsolutions = _nj5;
2301 std::vector<int> vfree(0);
2313 if( bgotonextstatement )
2315 bool bgotonextstatement =
true;
2320 bgotonextstatement=
false;
2325 if( bgotonextstatement )
2339 IkReal j5array[1], cj5array[1], sj5array[1];
2340 bool j5valid[1]={
false};
2342 IkReal x200=(new_r00*sj3);
2349 j5array[0]=
IKatan2((((cj3*new_r10))+(((-1.0)*x200))), ((x201.
value)*((((cj3*new_r22*x200))+(((-1.0)*new_r01))+(((-1.0)*new_r10*new_r22*(cj3*cj3)))))));
2350 sj5array[0]=
IKsin(j5array[0]);
2351 cj5array[0]=
IKcos(j5array[0]);
2352 if( j5array[0] >
IKPI )
2356 else if( j5array[0] < -
IKPI )
2357 { j5array[0]+=
IK2PI;
2360 for(
int ij5 = 0; ij5 < 1; ++ij5)
2366 _ij5[0] = ij5; _ij5[1] = -1;
2367 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
2371 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
2374 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
2376 IkReal evalcond[10];
2377 IkReal x202=
IKsin(j5);
2378 IkReal x203=
IKcos(j5);
2379 IkReal x204=((1.0)*cj3);
2380 IkReal x205=(cj3*new_r00);
2381 IkReal x206=(cj3*new_r22);
2382 IkReal x207=(new_r22*sj3);
2383 IkReal x208=(new_r22*x203);
2384 IkReal x209=(sj3*x202);
2385 evalcond[0]=(((new_r00*sj3))+x202+(((-1.0)*new_r10*x204)));
2386 evalcond[1]=(((new_r01*sj3))+x203+(((-1.0)*new_r11*x204)));
2387 evalcond[2]=(((new_r11*sj3))+((new_r22*x202))+((cj3*new_r01)));
2388 evalcond[3]=(((new_r11*x207))+((new_r01*x206))+x202);
2389 evalcond[4]=(((sj3*x203))+((x202*x206))+new_r01);
2390 evalcond[5]=(((new_r10*sj3))+x205+(((-1.0)*x208)));
2391 evalcond[6]=((((-1.0)*x204*x208))+x209+new_r00);
2392 evalcond[7]=((((-1.0)*x203*x204))+((x202*x207))+new_r11);
2393 evalcond[8]=(((new_r10*x207))+((new_r22*x205))+(((-1.0)*x203)));
2394 evalcond[9]=((((-1.0)*x202*x204))+(((-1.0)*x203*x207))+new_r10);
2402 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
2403 vinfos[0].jointtype = 1;
2404 vinfos[0].foffset = j0;
2405 vinfos[0].indices[0] = _ij0[0];
2406 vinfos[0].indices[1] = _ij0[1];
2407 vinfos[0].maxsolutions = _nj0;
2408 vinfos[1].jointtype = 1;
2409 vinfos[1].foffset = j1;
2410 vinfos[1].indices[0] = _ij1[0];
2411 vinfos[1].indices[1] = _ij1[1];
2412 vinfos[1].maxsolutions = _nj1;
2413 vinfos[2].jointtype = 1;
2414 vinfos[2].foffset = j2;
2415 vinfos[2].indices[0] = _ij2[0];
2416 vinfos[2].indices[1] = _ij2[1];
2417 vinfos[2].maxsolutions = _nj2;
2418 vinfos[3].jointtype = 1;
2419 vinfos[3].foffset = j3;
2420 vinfos[3].indices[0] = _ij3[0];
2421 vinfos[3].indices[1] = _ij3[1];
2422 vinfos[3].maxsolutions = _nj3;
2423 vinfos[4].jointtype = 1;
2424 vinfos[4].foffset = j4;
2425 vinfos[4].indices[0] = _ij4[0];
2426 vinfos[4].indices[1] = _ij4[1];
2427 vinfos[4].maxsolutions = _nj4;
2428 vinfos[5].jointtype = 1;
2429 vinfos[5].foffset = j5;
2430 vinfos[5].indices[0] = _ij5[0];
2431 vinfos[5].indices[1] = _ij5[1];
2432 vinfos[5].maxsolutions = _nj5;
2433 std::vector<int> vfree(0);
2446 IkReal j5array[1], cj5array[1], sj5array[1];
2447 bool j5valid[1]={
false};
2449 IkReal x210=((1.0)*new_r01);
2456 j5array[0]=
IKatan2(((x211.
value)*(((((-1.0)*cj3*x210))+(((-1.0)*new_r11*sj3))))), ((((-1.0)*sj3*x210))+((cj3*new_r11))));
2457 sj5array[0]=
IKsin(j5array[0]);
2458 cj5array[0]=
IKcos(j5array[0]);
2459 if( j5array[0] >
IKPI )
2463 else if( j5array[0] < -
IKPI )
2464 { j5array[0]+=
IK2PI;
2467 for(
int ij5 = 0; ij5 < 1; ++ij5)
2473 _ij5[0] = ij5; _ij5[1] = -1;
2474 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
2478 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
2481 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
2483 IkReal evalcond[10];
2484 IkReal x212=
IKsin(j5);
2485 IkReal x213=
IKcos(j5);
2486 IkReal x214=((1.0)*cj3);
2487 IkReal x215=(cj3*new_r00);
2488 IkReal x216=(cj3*new_r22);
2489 IkReal x217=(new_r22*sj3);
2490 IkReal x218=(new_r22*x213);
2491 IkReal x219=(sj3*x212);
2492 evalcond[0]=(((new_r00*sj3))+(((-1.0)*new_r10*x214))+x212);
2493 evalcond[1]=((((-1.0)*new_r11*x214))+((new_r01*sj3))+x213);
2494 evalcond[2]=(((new_r22*x212))+((new_r11*sj3))+((cj3*new_r01)));
2495 evalcond[3]=(x212+((new_r01*x216))+((new_r11*x217)));
2496 evalcond[4]=(((sj3*x213))+((x212*x216))+new_r01);
2497 evalcond[5]=(((new_r10*sj3))+x215+(((-1.0)*x218)));
2498 evalcond[6]=(x219+(((-1.0)*x214*x218))+new_r00);
2499 evalcond[7]=(((x212*x217))+(((-1.0)*x213*x214))+new_r11);
2500 evalcond[8]=(((new_r22*x215))+(((-1.0)*x213))+((new_r10*x217)));
2501 evalcond[9]=((((-1.0)*x213*x217))+new_r10+(((-1.0)*x212*x214)));
2509 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
2510 vinfos[0].jointtype = 1;
2511 vinfos[0].foffset = j0;
2512 vinfos[0].indices[0] = _ij0[0];
2513 vinfos[0].indices[1] = _ij0[1];
2514 vinfos[0].maxsolutions = _nj0;
2515 vinfos[1].jointtype = 1;
2516 vinfos[1].foffset = j1;
2517 vinfos[1].indices[0] = _ij1[0];
2518 vinfos[1].indices[1] = _ij1[1];
2519 vinfos[1].maxsolutions = _nj1;
2520 vinfos[2].jointtype = 1;
2521 vinfos[2].foffset = j2;
2522 vinfos[2].indices[0] = _ij2[0];
2523 vinfos[2].indices[1] = _ij2[1];
2524 vinfos[2].maxsolutions = _nj2;
2525 vinfos[3].jointtype = 1;
2526 vinfos[3].foffset = j3;
2527 vinfos[3].indices[0] = _ij3[0];
2528 vinfos[3].indices[1] = _ij3[1];
2529 vinfos[3].maxsolutions = _nj3;
2530 vinfos[4].jointtype = 1;
2531 vinfos[4].foffset = j4;
2532 vinfos[4].indices[0] = _ij4[0];
2533 vinfos[4].indices[1] = _ij4[1];
2534 vinfos[4].maxsolutions = _nj4;
2535 vinfos[5].jointtype = 1;
2536 vinfos[5].foffset = j5;
2537 vinfos[5].indices[0] = _ij5[0];
2538 vinfos[5].indices[1] = _ij5[1];
2539 vinfos[5].maxsolutions = _nj5;
2540 std::vector<int> vfree(0);
2553 IkReal j5array[1], cj5array[1], sj5array[1];
2554 bool j5valid[1]={
false};
2556 IkReal x220=cj3*cj3;
2557 IkReal x221=(cj3*new_r22);
2566 j5array[0]=((-1.5707963267949)+(((1.5707963267949)*(x222.
value)))+(x223.
value));
2567 sj5array[0]=
IKsin(j5array[0]);
2568 cj5array[0]=
IKcos(j5array[0]);
2569 if( j5array[0] >
IKPI )
2573 else if( j5array[0] < -
IKPI )
2574 { j5array[0]+=
IK2PI;
2577 for(
int ij5 = 0; ij5 < 1; ++ij5)
2583 _ij5[0] = ij5; _ij5[1] = -1;
2584 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
2588 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
2591 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
2593 IkReal evalcond[10];
2594 IkReal x224=
IKsin(j5);
2595 IkReal x225=
IKcos(j5);
2596 IkReal x226=((1.0)*cj3);
2597 IkReal x227=(cj3*new_r00);
2598 IkReal x228=(cj3*new_r22);
2599 IkReal x229=(new_r22*sj3);
2600 IkReal x230=(new_r22*x225);
2601 IkReal x231=(sj3*x224);
2602 evalcond[0]=((((-1.0)*new_r10*x226))+((new_r00*sj3))+x224);
2603 evalcond[1]=((((-1.0)*new_r11*x226))+((new_r01*sj3))+x225);
2604 evalcond[2]=(((new_r11*sj3))+((new_r22*x224))+((cj3*new_r01)));
2605 evalcond[3]=(((new_r01*x228))+x224+((new_r11*x229)));
2606 evalcond[4]=(((x224*x228))+((sj3*x225))+new_r01);
2607 evalcond[5]=(((new_r10*sj3))+x227+(((-1.0)*x230)));
2608 evalcond[6]=(x231+(((-1.0)*x226*x230))+new_r00);
2609 evalcond[7]=(((x224*x229))+(((-1.0)*x225*x226))+new_r11);
2610 evalcond[8]=(((new_r22*x227))+((new_r10*x229))+(((-1.0)*x225)));
2611 evalcond[9]=((((-1.0)*x224*x226))+(((-1.0)*x225*x229))+new_r10);
2619 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
2620 vinfos[0].jointtype = 1;
2621 vinfos[0].foffset = j0;
2622 vinfos[0].indices[0] = _ij0[0];
2623 vinfos[0].indices[1] = _ij0[1];
2624 vinfos[0].maxsolutions = _nj0;
2625 vinfos[1].jointtype = 1;
2626 vinfos[1].foffset = j1;
2627 vinfos[1].indices[0] = _ij1[0];
2628 vinfos[1].indices[1] = _ij1[1];
2629 vinfos[1].maxsolutions = _nj1;
2630 vinfos[2].jointtype = 1;
2631 vinfos[2].foffset = j2;
2632 vinfos[2].indices[0] = _ij2[0];
2633 vinfos[2].indices[1] = _ij2[1];
2634 vinfos[2].maxsolutions = _nj2;
2635 vinfos[3].jointtype = 1;
2636 vinfos[3].foffset = j3;
2637 vinfos[3].indices[0] = _ij3[0];
2638 vinfos[3].indices[1] = _ij3[1];
2639 vinfos[3].maxsolutions = _nj3;
2640 vinfos[4].jointtype = 1;
2641 vinfos[4].foffset = j4;
2642 vinfos[4].indices[0] = _ij4[0];
2643 vinfos[4].indices[1] = _ij4[1];
2644 vinfos[4].maxsolutions = _nj4;
2645 vinfos[5].jointtype = 1;
2646 vinfos[5].foffset = j5;
2647 vinfos[5].indices[0] = _ij5[0];
2648 vinfos[5].indices[1] = _ij5[1];
2649 vinfos[5].maxsolutions = _nj5;
2650 std::vector<int> vfree(0);
2667 if( bgotonextstatement )
2669 bool bgotonextstatement =
true;
2674 bgotonextstatement=
false;
2679 if( bgotonextstatement )
2690 IkReal j3array[1], cj3array[1], sj3array[1];
2691 bool j3valid[1]={
false};
2697 IkReal x232=x233.
value;
2704 j3array[0]=
IKatan2((x232*(x234.
value)*(((-1.0)+(new_r02*new_r02)+(cj4*cj4)))), ((-1.0)*new_r02*x232));
2705 sj3array[0]=
IKsin(j3array[0]);
2706 cj3array[0]=
IKcos(j3array[0]);
2707 if( j3array[0] >
IKPI )
2711 else if( j3array[0] < -
IKPI )
2712 { j3array[0]+=
IK2PI;
2715 for(
int ij3 = 0; ij3 < 1; ++ij3)
2721 _ij3[0] = ij3; _ij3[1] = -1;
2722 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
2726 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
2729 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
2732 IkReal x235=
IKcos(j3);
2733 IkReal x236=
IKsin(j3);
2734 IkReal x237=((1.0)*cj4);
2735 IkReal x238=(new_r02*x235);
2736 IkReal x239=(sj4*x236);
2737 IkReal x240=(sj4*x235);
2738 IkReal x241=(new_r12*x236);
2739 evalcond[0]=(x240+new_r02);
2740 evalcond[1]=(x239+new_r12);
2741 evalcond[2]=((((-1.0)*new_r02*x236))+((new_r12*x235)));
2742 evalcond[3]=(sj4+x238+x241);
2743 evalcond[4]=(((cj4*x241))+((new_r22*sj4))+((cj4*x238)));
2744 evalcond[5]=(((new_r10*x239))+(((-1.0)*new_r20*x237))+((new_r00*x240)));
2745 evalcond[6]=((((-1.0)*new_r21*x237))+((new_r11*x239))+((new_r01*x240)));
2746 evalcond[7]=((1.0)+(((-1.0)*new_r22*x237))+((new_r12*x239))+((sj4*x238)));
2757 j5eval[2]=((
IKabs(new_r20))+(
IKabs(new_r21)));
2758 if(
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000 ||
IKabs(j5eval[2]) < 0.0000010000000000 )
2764 if(
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000 )
2770 if(
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000 )
2774 bool bgotonextstatement =
true;
2777 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(j4))), 6.28318530717959)));
2778 evalcond[1]=new_r02;
2779 evalcond[2]=new_r12;
2780 evalcond[3]=new_r21;
2781 evalcond[4]=new_r20;
2782 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 )
2784 bgotonextstatement=
false;
2786 IkReal j5array[1], cj5array[1], sj5array[1];
2787 bool j5valid[1]={
false};
2789 IkReal x242=((1.0)*new_r01);
2792 j5array[0]=
IKatan2(((((-1.0)*cj3*x242))+(((-1.0)*new_r00*sj3))), ((((-1.0)*sj3*x242))+((cj3*new_r00))));
2793 sj5array[0]=
IKsin(j5array[0]);
2794 cj5array[0]=
IKcos(j5array[0]);
2795 if( j5array[0] >
IKPI )
2799 else if( j5array[0] < -
IKPI )
2800 { j5array[0]+=
IK2PI;
2803 for(
int ij5 = 0; ij5 < 1; ++ij5)
2809 _ij5[0] = ij5; _ij5[1] = -1;
2810 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
2814 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
2817 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
2820 IkReal x243=
IKsin(j5);
2821 IkReal x244=
IKcos(j5);
2822 IkReal x245=((1.0)*cj3);
2823 IkReal x246=(sj3*x243);
2824 IkReal x247=((1.0)*x244);
2825 IkReal x248=(x244*x245);
2826 evalcond[0]=(((new_r11*sj3))+x243+((cj3*new_r01)));
2827 evalcond[1]=(((new_r00*sj3))+x243+(((-1.0)*new_r10*x245)));
2828 evalcond[2]=(((new_r01*sj3))+x244+(((-1.0)*new_r11*x245)));
2829 evalcond[3]=(((sj3*x244))+new_r01+((cj3*x243)));
2830 evalcond[4]=(((new_r10*sj3))+((cj3*new_r00))+(((-1.0)*x247)));
2831 evalcond[5]=(x246+(((-1.0)*x248))+new_r00);
2832 evalcond[6]=(x246+(((-1.0)*x248))+new_r11);
2833 evalcond[7]=((((-1.0)*sj3*x247))+(((-1.0)*x243*x245))+new_r10);
2841 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
2842 vinfos[0].jointtype = 1;
2843 vinfos[0].foffset = j0;
2844 vinfos[0].indices[0] = _ij0[0];
2845 vinfos[0].indices[1] = _ij0[1];
2846 vinfos[0].maxsolutions = _nj0;
2847 vinfos[1].jointtype = 1;
2848 vinfos[1].foffset = j1;
2849 vinfos[1].indices[0] = _ij1[0];
2850 vinfos[1].indices[1] = _ij1[1];
2851 vinfos[1].maxsolutions = _nj1;
2852 vinfos[2].jointtype = 1;
2853 vinfos[2].foffset = j2;
2854 vinfos[2].indices[0] = _ij2[0];
2855 vinfos[2].indices[1] = _ij2[1];
2856 vinfos[2].maxsolutions = _nj2;
2857 vinfos[3].jointtype = 1;
2858 vinfos[3].foffset = j3;
2859 vinfos[3].indices[0] = _ij3[0];
2860 vinfos[3].indices[1] = _ij3[1];
2861 vinfos[3].maxsolutions = _nj3;
2862 vinfos[4].jointtype = 1;
2863 vinfos[4].foffset = j4;
2864 vinfos[4].indices[0] = _ij4[0];
2865 vinfos[4].indices[1] = _ij4[1];
2866 vinfos[4].maxsolutions = _nj4;
2867 vinfos[5].jointtype = 1;
2868 vinfos[5].foffset = j5;
2869 vinfos[5].indices[0] = _ij5[0];
2870 vinfos[5].indices[1] = _ij5[1];
2871 vinfos[5].maxsolutions = _nj5;
2872 std::vector<int> vfree(0);
2880 if( bgotonextstatement )
2882 bool bgotonextstatement =
true;
2885 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-3.14159265358979)+j4)))), 6.28318530717959)));
2886 evalcond[1]=new_r02;
2887 evalcond[2]=new_r12;
2888 evalcond[3]=new_r21;
2889 evalcond[4]=new_r20;
2890 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 )
2892 bgotonextstatement=
false;
2894 IkReal j5array[1], cj5array[1], sj5array[1];
2895 bool j5valid[1]={
false};
2897 IkReal x249=((1.0)*sj3);
2900 j5array[0]=
IKatan2(((((-1.0)*new_r00*x249))+((cj3*new_r01))), ((((-1.0)*new_r01*x249))+(((-1.0)*cj3*new_r00))));
2901 sj5array[0]=
IKsin(j5array[0]);
2902 cj5array[0]=
IKcos(j5array[0]);
2903 if( j5array[0] >
IKPI )
2907 else if( j5array[0] < -
IKPI )
2908 { j5array[0]+=
IK2PI;
2911 for(
int ij5 = 0; ij5 < 1; ++ij5)
2917 _ij5[0] = ij5; _ij5[1] = -1;
2918 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
2922 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
2925 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
2928 IkReal x250=
IKcos(j5);
2929 IkReal x251=
IKsin(j5);
2930 IkReal x252=((1.0)*cj3);
2931 IkReal x253=(sj3*x250);
2932 IkReal x254=((1.0)*x251);
2933 IkReal x255=(x251*x252);
2934 evalcond[0]=(((new_r10*sj3))+x250+((cj3*new_r00)));
2935 evalcond[1]=((((-1.0)*new_r10*x252))+((new_r00*sj3))+x251);
2936 evalcond[2]=((((-1.0)*new_r11*x252))+((new_r01*sj3))+x250);
2937 evalcond[3]=(((new_r11*sj3))+((cj3*new_r01))+(((-1.0)*x254)));
2938 evalcond[4]=(((cj3*x250))+((sj3*x251))+new_r00);
2939 evalcond[5]=(x253+new_r01+(((-1.0)*x255)));
2940 evalcond[6]=(x253+new_r10+(((-1.0)*x255)));
2941 evalcond[7]=((((-1.0)*x250*x252))+(((-1.0)*sj3*x254))+new_r11);
2949 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
2950 vinfos[0].jointtype = 1;
2951 vinfos[0].foffset = j0;
2952 vinfos[0].indices[0] = _ij0[0];
2953 vinfos[0].indices[1] = _ij0[1];
2954 vinfos[0].maxsolutions = _nj0;
2955 vinfos[1].jointtype = 1;
2956 vinfos[1].foffset = j1;
2957 vinfos[1].indices[0] = _ij1[0];
2958 vinfos[1].indices[1] = _ij1[1];
2959 vinfos[1].maxsolutions = _nj1;
2960 vinfos[2].jointtype = 1;
2961 vinfos[2].foffset = j2;
2962 vinfos[2].indices[0] = _ij2[0];
2963 vinfos[2].indices[1] = _ij2[1];
2964 vinfos[2].maxsolutions = _nj2;
2965 vinfos[3].jointtype = 1;
2966 vinfos[3].foffset = j3;
2967 vinfos[3].indices[0] = _ij3[0];
2968 vinfos[3].indices[1] = _ij3[1];
2969 vinfos[3].maxsolutions = _nj3;
2970 vinfos[4].jointtype = 1;
2971 vinfos[4].foffset = j4;
2972 vinfos[4].indices[0] = _ij4[0];
2973 vinfos[4].indices[1] = _ij4[1];
2974 vinfos[4].maxsolutions = _nj4;
2975 vinfos[5].jointtype = 1;
2976 vinfos[5].foffset = j5;
2977 vinfos[5].indices[0] = _ij5[0];
2978 vinfos[5].indices[1] = _ij5[1];
2979 vinfos[5].maxsolutions = _nj5;
2980 std::vector<int> vfree(0);
2988 if( bgotonextstatement )
2990 bool bgotonextstatement =
true;
2993 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-1.5707963267949)+j3)))), 6.28318530717959)));
2994 evalcond[1]=new_r02;
2995 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 )
2997 bgotonextstatement=
false;
2999 IkReal j5array[1], cj5array[1], sj5array[1];
3000 bool j5valid[1]={
false};
3004 j5array[0]=
IKatan2(((-1.0)*new_r00), ((-1.0)*new_r01));
3005 sj5array[0]=
IKsin(j5array[0]);
3006 cj5array[0]=
IKcos(j5array[0]);
3007 if( j5array[0] >
IKPI )
3011 else if( j5array[0] < -
IKPI )
3012 { j5array[0]+=
IK2PI;
3015 for(
int ij5 = 0; ij5 < 1; ++ij5)
3021 _ij5[0] = ij5; _ij5[1] = -1;
3022 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
3026 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
3029 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
3032 IkReal x256=
IKsin(j5);
3033 IkReal x257=
IKcos(j5);
3034 IkReal x258=((1.0)*x257);
3035 evalcond[0]=(x256+new_r00);
3036 evalcond[1]=(x257+new_r01);
3037 evalcond[2]=(((sj4*x256))+new_r21);
3038 evalcond[3]=(new_r11+((cj4*x256)));
3039 evalcond[4]=((((-1.0)*sj4*x258))+new_r20);
3040 evalcond[5]=((((-1.0)*cj4*x258))+new_r10);
3041 evalcond[6]=(((cj4*new_r11))+x256+((new_r21*sj4)));
3042 evalcond[7]=(((new_r20*sj4))+((cj4*new_r10))+(((-1.0)*x258)));
3050 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
3051 vinfos[0].jointtype = 1;
3052 vinfos[0].foffset = j0;
3053 vinfos[0].indices[0] = _ij0[0];
3054 vinfos[0].indices[1] = _ij0[1];
3055 vinfos[0].maxsolutions = _nj0;
3056 vinfos[1].jointtype = 1;
3057 vinfos[1].foffset = j1;
3058 vinfos[1].indices[0] = _ij1[0];
3059 vinfos[1].indices[1] = _ij1[1];
3060 vinfos[1].maxsolutions = _nj1;
3061 vinfos[2].jointtype = 1;
3062 vinfos[2].foffset = j2;
3063 vinfos[2].indices[0] = _ij2[0];
3064 vinfos[2].indices[1] = _ij2[1];
3065 vinfos[2].maxsolutions = _nj2;
3066 vinfos[3].jointtype = 1;
3067 vinfos[3].foffset = j3;
3068 vinfos[3].indices[0] = _ij3[0];
3069 vinfos[3].indices[1] = _ij3[1];
3070 vinfos[3].maxsolutions = _nj3;
3071 vinfos[4].jointtype = 1;
3072 vinfos[4].foffset = j4;
3073 vinfos[4].indices[0] = _ij4[0];
3074 vinfos[4].indices[1] = _ij4[1];
3075 vinfos[4].maxsolutions = _nj4;
3076 vinfos[5].jointtype = 1;
3077 vinfos[5].foffset = j5;
3078 vinfos[5].indices[0] = _ij5[0];
3079 vinfos[5].indices[1] = _ij5[1];
3080 vinfos[5].maxsolutions = _nj5;
3081 std::vector<int> vfree(0);
3089 if( bgotonextstatement )
3091 bool bgotonextstatement =
true;
3094 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((1.5707963267949)+j3)))), 6.28318530717959)));
3095 evalcond[1]=new_r02;
3096 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 )
3098 bgotonextstatement=
false;
3100 IkReal j5array[1], cj5array[1], sj5array[1];
3101 bool j5valid[1]={
false};
3105 j5array[0]=
IKatan2(new_r00, new_r01);
3106 sj5array[0]=
IKsin(j5array[0]);
3107 cj5array[0]=
IKcos(j5array[0]);
3108 if( j5array[0] >
IKPI )
3112 else if( j5array[0] < -
IKPI )
3113 { j5array[0]+=
IK2PI;
3116 for(
int ij5 = 0; ij5 < 1; ++ij5)
3122 _ij5[0] = ij5; _ij5[1] = -1;
3123 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
3127 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
3130 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
3133 IkReal x259=
IKsin(j5);
3134 IkReal x260=
IKcos(j5);
3135 IkReal x261=((1.0)*cj4);
3136 IkReal x262=((1.0)*x260);
3137 evalcond[0]=(((sj4*x259))+new_r21);
3138 evalcond[1]=(x259+(((-1.0)*new_r00)));
3139 evalcond[2]=(x260+(((-1.0)*new_r01)));
3140 evalcond[3]=((((-1.0)*sj4*x262))+new_r20);
3141 evalcond[4]=((((-1.0)*new_r11))+((cj4*x259)));
3142 evalcond[5]=((((-1.0)*new_r10))+(((-1.0)*x260*x261)));
3143 evalcond[6]=(x259+(((-1.0)*new_r11*x261))+((new_r21*sj4)));
3144 evalcond[7]=(((new_r20*sj4))+(((-1.0)*new_r10*x261))+(((-1.0)*x262)));
3152 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
3153 vinfos[0].jointtype = 1;
3154 vinfos[0].foffset = j0;
3155 vinfos[0].indices[0] = _ij0[0];
3156 vinfos[0].indices[1] = _ij0[1];
3157 vinfos[0].maxsolutions = _nj0;
3158 vinfos[1].jointtype = 1;
3159 vinfos[1].foffset = j1;
3160 vinfos[1].indices[0] = _ij1[0];
3161 vinfos[1].indices[1] = _ij1[1];
3162 vinfos[1].maxsolutions = _nj1;
3163 vinfos[2].jointtype = 1;
3164 vinfos[2].foffset = j2;
3165 vinfos[2].indices[0] = _ij2[0];
3166 vinfos[2].indices[1] = _ij2[1];
3167 vinfos[2].maxsolutions = _nj2;
3168 vinfos[3].jointtype = 1;
3169 vinfos[3].foffset = j3;
3170 vinfos[3].indices[0] = _ij3[0];
3171 vinfos[3].indices[1] = _ij3[1];
3172 vinfos[3].maxsolutions = _nj3;
3173 vinfos[4].jointtype = 1;
3174 vinfos[4].foffset = j4;
3175 vinfos[4].indices[0] = _ij4[0];
3176 vinfos[4].indices[1] = _ij4[1];
3177 vinfos[4].maxsolutions = _nj4;
3178 vinfos[5].jointtype = 1;
3179 vinfos[5].foffset = j5;
3180 vinfos[5].indices[0] = _ij5[0];
3181 vinfos[5].indices[1] = _ij5[1];
3182 vinfos[5].maxsolutions = _nj5;
3183 std::vector<int> vfree(0);
3191 if( bgotonextstatement )
3193 bool bgotonextstatement =
true;
3196 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(j3))), 6.28318530717959)));
3197 evalcond[1]=new_r12;
3198 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 )
3200 bgotonextstatement=
false;
3202 IkReal j5array[1], cj5array[1], sj5array[1];
3203 bool j5valid[1]={
false};
3207 j5array[0]=
IKatan2(new_r10, new_r11);
3208 sj5array[0]=
IKsin(j5array[0]);
3209 cj5array[0]=
IKcos(j5array[0]);
3210 if( j5array[0] >
IKPI )
3214 else if( j5array[0] < -
IKPI )
3215 { j5array[0]+=
IK2PI;
3218 for(
int ij5 = 0; ij5 < 1; ++ij5)
3224 _ij5[0] = ij5; _ij5[1] = -1;
3225 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
3229 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
3232 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
3235 IkReal x263=
IKcos(j5);
3236 IkReal x264=
IKsin(j5);
3237 IkReal x265=((1.0)*x263);
3238 evalcond[0]=(new_r20+((new_r02*x263)));
3239 evalcond[1]=(x264+(((-1.0)*new_r10)));
3240 evalcond[2]=(x263+(((-1.0)*new_r11)));
3241 evalcond[3]=(((cj4*x264))+new_r01);
3242 evalcond[4]=((((-1.0)*new_r02*x264))+new_r21);
3243 evalcond[5]=((((-1.0)*cj4*x265))+new_r00);
3244 evalcond[6]=(((cj4*new_r01))+x264+((new_r21*sj4)));
3245 evalcond[7]=(((new_r20*sj4))+((cj4*new_r00))+(((-1.0)*x265)));
3253 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
3254 vinfos[0].jointtype = 1;
3255 vinfos[0].foffset = j0;
3256 vinfos[0].indices[0] = _ij0[0];
3257 vinfos[0].indices[1] = _ij0[1];
3258 vinfos[0].maxsolutions = _nj0;
3259 vinfos[1].jointtype = 1;
3260 vinfos[1].foffset = j1;
3261 vinfos[1].indices[0] = _ij1[0];
3262 vinfos[1].indices[1] = _ij1[1];
3263 vinfos[1].maxsolutions = _nj1;
3264 vinfos[2].jointtype = 1;
3265 vinfos[2].foffset = j2;
3266 vinfos[2].indices[0] = _ij2[0];
3267 vinfos[2].indices[1] = _ij2[1];
3268 vinfos[2].maxsolutions = _nj2;
3269 vinfos[3].jointtype = 1;
3270 vinfos[3].foffset = j3;
3271 vinfos[3].indices[0] = _ij3[0];
3272 vinfos[3].indices[1] = _ij3[1];
3273 vinfos[3].maxsolutions = _nj3;
3274 vinfos[4].jointtype = 1;
3275 vinfos[4].foffset = j4;
3276 vinfos[4].indices[0] = _ij4[0];
3277 vinfos[4].indices[1] = _ij4[1];
3278 vinfos[4].maxsolutions = _nj4;
3279 vinfos[5].jointtype = 1;
3280 vinfos[5].foffset = j5;
3281 vinfos[5].indices[0] = _ij5[0];
3282 vinfos[5].indices[1] = _ij5[1];
3283 vinfos[5].maxsolutions = _nj5;
3284 std::vector<int> vfree(0);
3292 if( bgotonextstatement )
3294 bool bgotonextstatement =
true;
3297 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-3.14159265358979)+j3)))), 6.28318530717959)));
3298 evalcond[1]=new_r12;
3299 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 )
3301 bgotonextstatement=
false;
3303 IkReal j5array[1], cj5array[1], sj5array[1];
3304 bool j5valid[1]={
false};
3308 j5array[0]=
IKatan2(((-1.0)*new_r10), ((-1.0)*new_r11));
3309 sj5array[0]=
IKsin(j5array[0]);
3310 cj5array[0]=
IKcos(j5array[0]);
3311 if( j5array[0] >
IKPI )
3315 else if( j5array[0] < -
IKPI )
3316 { j5array[0]+=
IK2PI;
3319 for(
int ij5 = 0; ij5 < 1; ++ij5)
3325 _ij5[0] = ij5; _ij5[1] = -1;
3326 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
3330 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
3333 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
3336 IkReal x266=
IKsin(j5);
3337 IkReal x267=
IKcos(j5);
3338 IkReal x268=((1.0)*new_r00);
3339 IkReal x269=((1.0)*new_r01);
3340 IkReal x270=((1.0)*x267);
3341 evalcond[0]=(x266+new_r10);
3342 evalcond[1]=(x267+new_r11);
3343 evalcond[2]=(new_r21+((new_r02*x266)));
3344 evalcond[3]=((((-1.0)*new_r02*x270))+new_r20);
3345 evalcond[4]=(((cj4*x266))+(((-1.0)*x269)));
3346 evalcond[5]=((((-1.0)*cj4*x270))+(((-1.0)*x268)));
3347 evalcond[6]=((((-1.0)*cj4*x269))+x266+((new_r21*sj4)));
3348 evalcond[7]=((((-1.0)*cj4*x268))+((new_r20*sj4))+(((-1.0)*x270)));
3356 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
3357 vinfos[0].jointtype = 1;
3358 vinfos[0].foffset = j0;
3359 vinfos[0].indices[0] = _ij0[0];
3360 vinfos[0].indices[1] = _ij0[1];
3361 vinfos[0].maxsolutions = _nj0;
3362 vinfos[1].jointtype = 1;
3363 vinfos[1].foffset = j1;
3364 vinfos[1].indices[0] = _ij1[0];
3365 vinfos[1].indices[1] = _ij1[1];
3366 vinfos[1].maxsolutions = _nj1;
3367 vinfos[2].jointtype = 1;
3368 vinfos[2].foffset = j2;
3369 vinfos[2].indices[0] = _ij2[0];
3370 vinfos[2].indices[1] = _ij2[1];
3371 vinfos[2].maxsolutions = _nj2;
3372 vinfos[3].jointtype = 1;
3373 vinfos[3].foffset = j3;
3374 vinfos[3].indices[0] = _ij3[0];
3375 vinfos[3].indices[1] = _ij3[1];
3376 vinfos[3].maxsolutions = _nj3;
3377 vinfos[4].jointtype = 1;
3378 vinfos[4].foffset = j4;
3379 vinfos[4].indices[0] = _ij4[0];
3380 vinfos[4].indices[1] = _ij4[1];
3381 vinfos[4].maxsolutions = _nj4;
3382 vinfos[5].jointtype = 1;
3383 vinfos[5].foffset = j5;
3384 vinfos[5].indices[0] = _ij5[0];
3385 vinfos[5].indices[1] = _ij5[1];
3386 vinfos[5].maxsolutions = _nj5;
3387 std::vector<int> vfree(0);
3395 if( bgotonextstatement )
3397 bool bgotonextstatement =
true;
3400 evalcond[0]=((
IKabs(new_r20))+(
IKabs(new_r21)));
3401 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
3403 bgotonextstatement=
false;
3411 if(
IKabs(j5eval[0]) < 0.0000000100000000 )
3417 IkReal op[2+1], zeror[2];
3422 polyroots2(op,zeror,numroots);
3423 IkReal j5array[2], cj5array[2], sj5array[2], tempj5array[1];
3424 int numsolutions = 0;
3425 for(
int ij5 = 0; ij5 < numroots; ++ij5)
3427 IkReal htj5 = zeror[ij5];
3428 tempj5array[0]=((2.0)*(
atan(htj5)));
3429 for(
int kj5 = 0; kj5 < 1; ++kj5)
3431 j5array[numsolutions] = tempj5array[kj5];
3432 if( j5array[numsolutions] >
IKPI )
3434 j5array[numsolutions]-=
IK2PI;
3436 else if( j5array[numsolutions] < -
IKPI )
3438 j5array[numsolutions]+=
IK2PI;
3440 sj5array[numsolutions] =
IKsin(j5array[numsolutions]);
3441 cj5array[numsolutions] =
IKcos(j5array[numsolutions]);
3445 bool j5valid[2]={
true,
true};
3447 for(
int ij5 = 0; ij5 < numsolutions; ++ij5)
3453 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
3456 _ij5[0] = ij5; _ij5[1] = -1;
3457 for(
int iij5 = ij5+1; iij5 < numsolutions; ++iij5)
3461 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
3465 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
3466 vinfos[0].jointtype = 1;
3467 vinfos[0].foffset = j0;
3468 vinfos[0].indices[0] = _ij0[0];
3469 vinfos[0].indices[1] = _ij0[1];
3470 vinfos[0].maxsolutions = _nj0;
3471 vinfos[1].jointtype = 1;
3472 vinfos[1].foffset = j1;
3473 vinfos[1].indices[0] = _ij1[0];
3474 vinfos[1].indices[1] = _ij1[1];
3475 vinfos[1].maxsolutions = _nj1;
3476 vinfos[2].jointtype = 1;
3477 vinfos[2].foffset = j2;
3478 vinfos[2].indices[0] = _ij2[0];
3479 vinfos[2].indices[1] = _ij2[1];
3480 vinfos[2].maxsolutions = _nj2;
3481 vinfos[3].jointtype = 1;
3482 vinfos[3].foffset = j3;
3483 vinfos[3].indices[0] = _ij3[0];
3484 vinfos[3].indices[1] = _ij3[1];
3485 vinfos[3].maxsolutions = _nj3;
3486 vinfos[4].jointtype = 1;
3487 vinfos[4].foffset = j4;
3488 vinfos[4].indices[0] = _ij4[0];
3489 vinfos[4].indices[1] = _ij4[1];
3490 vinfos[4].maxsolutions = _nj4;
3491 vinfos[5].jointtype = 1;
3492 vinfos[5].foffset = j5;
3493 vinfos[5].indices[0] = _ij5[0];
3494 vinfos[5].indices[1] = _ij5[1];
3495 vinfos[5].maxsolutions = _nj5;
3496 std::vector<int> vfree(0);
3507 if( bgotonextstatement )
3509 bool bgotonextstatement =
true;
3514 bgotonextstatement=
false;
3519 if( bgotonextstatement )
3534 IkReal j5array[1], cj5array[1], sj5array[1];
3535 bool j5valid[1]={
false};
3541 IkReal x271=x272.
value;
3548 j5array[0]=
IKatan2(((-1.0)*new_r21*x271), (x271*(x273.
value)*((((new_r11*sj4))+(((-1.0)*cj4*new_r21*sj3))))));
3549 sj5array[0]=
IKsin(j5array[0]);
3550 cj5array[0]=
IKcos(j5array[0]);
3551 if( j5array[0] >
IKPI )
3555 else if( j5array[0] < -
IKPI )
3556 { j5array[0]+=
IK2PI;
3559 for(
int ij5 = 0; ij5 < 1; ++ij5)
3565 _ij5[0] = ij5; _ij5[1] = -1;
3566 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
3570 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
3573 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
3575 IkReal evalcond[12];
3576 IkReal x274=
IKsin(j5);
3577 IkReal x275=
IKcos(j5);
3578 IkReal x276=(cj3*new_r00);
3579 IkReal x277=(cj3*cj4);
3580 IkReal x278=(cj4*sj3);
3581 IkReal x279=((1.0)*cj3);
3582 IkReal x280=(sj3*x274);
3583 IkReal x281=((1.0)*x275);
3584 evalcond[0]=(new_r21+((sj4*x274)));
3585 evalcond[1]=((((-1.0)*sj4*x281))+new_r20);
3586 evalcond[2]=(((new_r00*sj3))+x274+(((-1.0)*new_r10*x279)));
3587 evalcond[3]=(((new_r01*sj3))+x275+(((-1.0)*new_r11*x279)));
3588 evalcond[4]=(((cj4*x274))+((new_r11*sj3))+((cj3*new_r01)));
3589 evalcond[5]=(((sj3*x275))+((x274*x277))+new_r01);
3590 evalcond[6]=(((new_r10*sj3))+x276+(((-1.0)*cj4*x281)));
3591 evalcond[7]=((((-1.0)*x277*x281))+x280+new_r00);
3592 evalcond[8]=(((x274*x278))+(((-1.0)*x275*x279))+new_r11);
3593 evalcond[9]=((((-1.0)*x274*x279))+new_r10+(((-1.0)*x278*x281)));
3594 evalcond[10]=(x274+((new_r01*x277))+((new_r21*sj4))+((new_r11*x278)));
3595 evalcond[11]=(((new_r20*sj4))+((cj4*x276))+(((-1.0)*x281))+((new_r10*x278)));
3603 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
3604 vinfos[0].jointtype = 1;
3605 vinfos[0].foffset = j0;
3606 vinfos[0].indices[0] = _ij0[0];
3607 vinfos[0].indices[1] = _ij0[1];
3608 vinfos[0].maxsolutions = _nj0;
3609 vinfos[1].jointtype = 1;
3610 vinfos[1].foffset = j1;
3611 vinfos[1].indices[0] = _ij1[0];
3612 vinfos[1].indices[1] = _ij1[1];
3613 vinfos[1].maxsolutions = _nj1;
3614 vinfos[2].jointtype = 1;
3615 vinfos[2].foffset = j2;
3616 vinfos[2].indices[0] = _ij2[0];
3617 vinfos[2].indices[1] = _ij2[1];
3618 vinfos[2].maxsolutions = _nj2;
3619 vinfos[3].jointtype = 1;
3620 vinfos[3].foffset = j3;
3621 vinfos[3].indices[0] = _ij3[0];
3622 vinfos[3].indices[1] = _ij3[1];
3623 vinfos[3].maxsolutions = _nj3;
3624 vinfos[4].jointtype = 1;
3625 vinfos[4].foffset = j4;
3626 vinfos[4].indices[0] = _ij4[0];
3627 vinfos[4].indices[1] = _ij4[1];
3628 vinfos[4].maxsolutions = _nj4;
3629 vinfos[5].jointtype = 1;
3630 vinfos[5].foffset = j5;
3631 vinfos[5].indices[0] = _ij5[0];
3632 vinfos[5].indices[1] = _ij5[1];
3633 vinfos[5].maxsolutions = _nj5;
3634 std::vector<int> vfree(0);
3647 IkReal j5array[1], cj5array[1], sj5array[1];
3648 bool j5valid[1]={
false};
3654 IkReal x282=x283.
value;
3661 j5array[0]=
IKatan2(((-1.0)*new_r21*x282), (x282*(x284.
value)*(((((-1.0)*new_r01*sj4))+((cj3*cj4*new_r21))))));
3662 sj5array[0]=
IKsin(j5array[0]);
3663 cj5array[0]=
IKcos(j5array[0]);
3664 if( j5array[0] >
IKPI )
3668 else if( j5array[0] < -
IKPI )
3669 { j5array[0]+=
IK2PI;
3672 for(
int ij5 = 0; ij5 < 1; ++ij5)
3678 _ij5[0] = ij5; _ij5[1] = -1;
3679 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
3683 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
3686 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
3688 IkReal evalcond[12];
3689 IkReal x285=
IKsin(j5);
3690 IkReal x286=
IKcos(j5);
3691 IkReal x287=(cj3*new_r00);
3692 IkReal x288=(cj3*cj4);
3693 IkReal x289=(cj4*sj3);
3694 IkReal x290=((1.0)*cj3);
3695 IkReal x291=(sj3*x285);
3696 IkReal x292=((1.0)*x286);
3697 evalcond[0]=(new_r21+((sj4*x285)));
3698 evalcond[1]=(new_r20+(((-1.0)*sj4*x292)));
3699 evalcond[2]=((((-1.0)*new_r10*x290))+((new_r00*sj3))+x285);
3700 evalcond[3]=((((-1.0)*new_r11*x290))+((new_r01*sj3))+x286);
3701 evalcond[4]=(((new_r11*sj3))+((cj3*new_r01))+((cj4*x285)));
3702 evalcond[5]=(((x285*x288))+((sj3*x286))+new_r01);
3703 evalcond[6]=(((new_r10*sj3))+(((-1.0)*cj4*x292))+x287);
3704 evalcond[7]=(x291+(((-1.0)*x288*x292))+new_r00);
3705 evalcond[8]=(((x285*x289))+(((-1.0)*x286*x290))+new_r11);
3706 evalcond[9]=((((-1.0)*x285*x290))+(((-1.0)*x289*x292))+new_r10);
3707 evalcond[10]=(x285+((new_r21*sj4))+((new_r11*x289))+((new_r01*x288)));
3708 evalcond[11]=(((new_r20*sj4))+(((-1.0)*x292))+((cj4*x287))+((new_r10*x289)));
3716 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
3717 vinfos[0].jointtype = 1;
3718 vinfos[0].foffset = j0;
3719 vinfos[0].indices[0] = _ij0[0];
3720 vinfos[0].indices[1] = _ij0[1];
3721 vinfos[0].maxsolutions = _nj0;
3722 vinfos[1].jointtype = 1;
3723 vinfos[1].foffset = j1;
3724 vinfos[1].indices[0] = _ij1[0];
3725 vinfos[1].indices[1] = _ij1[1];
3726 vinfos[1].maxsolutions = _nj1;
3727 vinfos[2].jointtype = 1;
3728 vinfos[2].foffset = j2;
3729 vinfos[2].indices[0] = _ij2[0];
3730 vinfos[2].indices[1] = _ij2[1];
3731 vinfos[2].maxsolutions = _nj2;
3732 vinfos[3].jointtype = 1;
3733 vinfos[3].foffset = j3;
3734 vinfos[3].indices[0] = _ij3[0];
3735 vinfos[3].indices[1] = _ij3[1];
3736 vinfos[3].maxsolutions = _nj3;
3737 vinfos[4].jointtype = 1;
3738 vinfos[4].foffset = j4;
3739 vinfos[4].indices[0] = _ij4[0];
3740 vinfos[4].indices[1] = _ij4[1];
3741 vinfos[4].maxsolutions = _nj4;
3742 vinfos[5].jointtype = 1;
3743 vinfos[5].foffset = j5;
3744 vinfos[5].indices[0] = _ij5[0];
3745 vinfos[5].indices[1] = _ij5[1];
3746 vinfos[5].maxsolutions = _nj5;
3747 std::vector<int> vfree(0);
3760 IkReal j5array[1], cj5array[1], sj5array[1];
3761 bool j5valid[1]={
false};
3771 j5array[0]=((-1.5707963267949)+(x293.
value)+(((1.5707963267949)*(x294.
value))));
3772 sj5array[0]=
IKsin(j5array[0]);
3773 cj5array[0]=
IKcos(j5array[0]);
3774 if( j5array[0] >
IKPI )
3778 else if( j5array[0] < -
IKPI )
3779 { j5array[0]+=
IK2PI;
3782 for(
int ij5 = 0; ij5 < 1; ++ij5)
3788 _ij5[0] = ij5; _ij5[1] = -1;
3789 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
3793 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
3796 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
3798 IkReal evalcond[12];
3799 IkReal x295=
IKsin(j5);
3800 IkReal x296=
IKcos(j5);
3801 IkReal x297=(cj3*new_r00);
3802 IkReal x298=(cj3*cj4);
3803 IkReal x299=(cj4*sj3);
3804 IkReal x300=((1.0)*cj3);
3805 IkReal x301=(sj3*x295);
3806 IkReal x302=((1.0)*x296);
3807 evalcond[0]=(((sj4*x295))+new_r21);
3808 evalcond[1]=((((-1.0)*sj4*x302))+new_r20);
3809 evalcond[2]=(((new_r00*sj3))+x295+(((-1.0)*new_r10*x300)));
3810 evalcond[3]=(((new_r01*sj3))+x296+(((-1.0)*new_r11*x300)));
3811 evalcond[4]=(((new_r11*sj3))+((cj4*x295))+((cj3*new_r01)));
3812 evalcond[5]=(((x295*x298))+new_r01+((sj3*x296)));
3813 evalcond[6]=(((new_r10*sj3))+(((-1.0)*cj4*x302))+x297);
3814 evalcond[7]=((((-1.0)*x298*x302))+x301+new_r00);
3815 evalcond[8]=((((-1.0)*x296*x300))+((x295*x299))+new_r11);
3816 evalcond[9]=((((-1.0)*x295*x300))+(((-1.0)*x299*x302))+new_r10);
3817 evalcond[10]=(((new_r11*x299))+x295+((new_r01*x298))+((new_r21*sj4)));
3818 evalcond[11]=(((new_r20*sj4))+((new_r10*x299))+((cj4*x297))+(((-1.0)*x302)));
3826 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
3827 vinfos[0].jointtype = 1;
3828 vinfos[0].foffset = j0;
3829 vinfos[0].indices[0] = _ij0[0];
3830 vinfos[0].indices[1] = _ij0[1];
3831 vinfos[0].maxsolutions = _nj0;
3832 vinfos[1].jointtype = 1;
3833 vinfos[1].foffset = j1;
3834 vinfos[1].indices[0] = _ij1[0];
3835 vinfos[1].indices[1] = _ij1[1];
3836 vinfos[1].maxsolutions = _nj1;
3837 vinfos[2].jointtype = 1;
3838 vinfos[2].foffset = j2;
3839 vinfos[2].indices[0] = _ij2[0];
3840 vinfos[2].indices[1] = _ij2[1];
3841 vinfos[2].maxsolutions = _nj2;
3842 vinfos[3].jointtype = 1;
3843 vinfos[3].foffset = j3;
3844 vinfos[3].indices[0] = _ij3[0];
3845 vinfos[3].indices[1] = _ij3[1];
3846 vinfos[3].maxsolutions = _nj3;
3847 vinfos[4].jointtype = 1;
3848 vinfos[4].foffset = j4;
3849 vinfos[4].indices[0] = _ij4[0];
3850 vinfos[4].indices[1] = _ij4[1];
3851 vinfos[4].maxsolutions = _nj4;
3852 vinfos[5].jointtype = 1;
3853 vinfos[5].foffset = j5;
3854 vinfos[5].indices[0] = _ij5[0];
3855 vinfos[5].indices[1] = _ij5[1];
3856 vinfos[5].maxsolutions = _nj5;
3857 std::vector<int> vfree(0);
3876 IkReal j3array[1], cj3array[1], sj3array[1];
3877 bool j3valid[1]={
false};
3887 j3array[0]=((-1.5707963267949)+(((1.5707963267949)*(x303.
value)))+(x304.
value));
3888 sj3array[0]=
IKsin(j3array[0]);
3889 cj3array[0]=
IKcos(j3array[0]);
3890 if( j3array[0] >
IKPI )
3894 else if( j3array[0] < -
IKPI )
3895 { j3array[0]+=
IK2PI;
3898 for(
int ij3 = 0; ij3 < 1; ++ij3)
3904 _ij3[0] = ij3; _ij3[1] = -1;
3905 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
3909 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
3912 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
3915 IkReal x305=
IKcos(j3);
3916 IkReal x306=
IKsin(j3);
3917 IkReal x307=((1.0)*cj4);
3918 IkReal x308=(new_r02*x305);
3919 IkReal x309=(sj4*x306);
3920 IkReal x310=(sj4*x305);
3921 IkReal x311=(new_r12*x306);
3922 evalcond[0]=(x310+new_r02);
3923 evalcond[1]=(x309+new_r12);
3924 evalcond[2]=((((-1.0)*new_r02*x306))+((new_r12*x305)));
3925 evalcond[3]=(sj4+x308+x311);
3926 evalcond[4]=(((cj4*x311))+((new_r22*sj4))+((cj4*x308)));
3927 evalcond[5]=(((new_r00*x310))+((new_r10*x309))+(((-1.0)*new_r20*x307)));
3928 evalcond[6]=(((new_r11*x309))+(((-1.0)*new_r21*x307))+((new_r01*x310)));
3929 evalcond[7]=((1.0)+(((-1.0)*new_r22*x307))+((new_r12*x309))+((sj4*x308)));
3940 j5eval[2]=((
IKabs(new_r20))+(
IKabs(new_r21)));
3941 if(
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000 ||
IKabs(j5eval[2]) < 0.0000010000000000 )
3947 if(
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000 )
3953 if(
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000 )
3957 bool bgotonextstatement =
true;
3960 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(j4))), 6.28318530717959)));
3961 evalcond[1]=new_r02;
3962 evalcond[2]=new_r12;
3963 evalcond[3]=new_r21;
3964 evalcond[4]=new_r20;
3965 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 )
3967 bgotonextstatement=
false;
3969 IkReal j5array[1], cj5array[1], sj5array[1];
3970 bool j5valid[1]={
false};
3972 IkReal x312=((1.0)*new_r01);
3975 j5array[0]=
IKatan2(((((-1.0)*new_r00*sj3))+(((-1.0)*cj3*x312))), ((((-1.0)*sj3*x312))+((cj3*new_r00))));
3976 sj5array[0]=
IKsin(j5array[0]);
3977 cj5array[0]=
IKcos(j5array[0]);
3978 if( j5array[0] >
IKPI )
3982 else if( j5array[0] < -
IKPI )
3983 { j5array[0]+=
IK2PI;
3986 for(
int ij5 = 0; ij5 < 1; ++ij5)
3992 _ij5[0] = ij5; _ij5[1] = -1;
3993 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
3997 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
4000 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
4003 IkReal x313=
IKsin(j5);
4004 IkReal x314=
IKcos(j5);
4005 IkReal x315=((1.0)*cj3);
4006 IkReal x316=(sj3*x313);
4007 IkReal x317=((1.0)*x314);
4008 IkReal x318=(x314*x315);
4009 evalcond[0]=(((new_r11*sj3))+x313+((cj3*new_r01)));
4010 evalcond[1]=(((new_r00*sj3))+x313+(((-1.0)*new_r10*x315)));
4011 evalcond[2]=(((new_r01*sj3))+(((-1.0)*new_r11*x315))+x314);
4012 evalcond[3]=(((cj3*x313))+new_r01+((sj3*x314)));
4013 evalcond[4]=(((new_r10*sj3))+(((-1.0)*x317))+((cj3*new_r00)));
4014 evalcond[5]=(x316+(((-1.0)*x318))+new_r00);
4015 evalcond[6]=(x316+(((-1.0)*x318))+new_r11);
4016 evalcond[7]=((((-1.0)*x313*x315))+(((-1.0)*sj3*x317))+new_r10);
4024 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
4025 vinfos[0].jointtype = 1;
4026 vinfos[0].foffset = j0;
4027 vinfos[0].indices[0] = _ij0[0];
4028 vinfos[0].indices[1] = _ij0[1];
4029 vinfos[0].maxsolutions = _nj0;
4030 vinfos[1].jointtype = 1;
4031 vinfos[1].foffset = j1;
4032 vinfos[1].indices[0] = _ij1[0];
4033 vinfos[1].indices[1] = _ij1[1];
4034 vinfos[1].maxsolutions = _nj1;
4035 vinfos[2].jointtype = 1;
4036 vinfos[2].foffset = j2;
4037 vinfos[2].indices[0] = _ij2[0];
4038 vinfos[2].indices[1] = _ij2[1];
4039 vinfos[2].maxsolutions = _nj2;
4040 vinfos[3].jointtype = 1;
4041 vinfos[3].foffset = j3;
4042 vinfos[3].indices[0] = _ij3[0];
4043 vinfos[3].indices[1] = _ij3[1];
4044 vinfos[3].maxsolutions = _nj3;
4045 vinfos[4].jointtype = 1;
4046 vinfos[4].foffset = j4;
4047 vinfos[4].indices[0] = _ij4[0];
4048 vinfos[4].indices[1] = _ij4[1];
4049 vinfos[4].maxsolutions = _nj4;
4050 vinfos[5].jointtype = 1;
4051 vinfos[5].foffset = j5;
4052 vinfos[5].indices[0] = _ij5[0];
4053 vinfos[5].indices[1] = _ij5[1];
4054 vinfos[5].maxsolutions = _nj5;
4055 std::vector<int> vfree(0);
4063 if( bgotonextstatement )
4065 bool bgotonextstatement =
true;
4068 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-3.14159265358979)+j4)))), 6.28318530717959)));
4069 evalcond[1]=new_r02;
4070 evalcond[2]=new_r12;
4071 evalcond[3]=new_r21;
4072 evalcond[4]=new_r20;
4073 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 )
4075 bgotonextstatement=
false;
4077 IkReal j5array[1], cj5array[1], sj5array[1];
4078 bool j5valid[1]={
false};
4080 IkReal x319=((1.0)*sj3);
4083 j5array[0]=
IKatan2(((((-1.0)*new_r00*x319))+((cj3*new_r01))), ((((-1.0)*cj3*new_r00))+(((-1.0)*new_r01*x319))));
4084 sj5array[0]=
IKsin(j5array[0]);
4085 cj5array[0]=
IKcos(j5array[0]);
4086 if( j5array[0] >
IKPI )
4090 else if( j5array[0] < -
IKPI )
4091 { j5array[0]+=
IK2PI;
4094 for(
int ij5 = 0; ij5 < 1; ++ij5)
4100 _ij5[0] = ij5; _ij5[1] = -1;
4101 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
4105 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
4108 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
4111 IkReal x320=
IKcos(j5);
4112 IkReal x321=
IKsin(j5);
4113 IkReal x322=((1.0)*cj3);
4114 IkReal x323=(sj3*x320);
4115 IkReal x324=((1.0)*x321);
4116 IkReal x325=(x321*x322);
4117 evalcond[0]=(((new_r10*sj3))+x320+((cj3*new_r00)));
4118 evalcond[1]=(((new_r00*sj3))+x321+(((-1.0)*new_r10*x322)));
4119 evalcond[2]=(((new_r01*sj3))+x320+(((-1.0)*new_r11*x322)));
4120 evalcond[3]=(((new_r11*sj3))+(((-1.0)*x324))+((cj3*new_r01)));
4121 evalcond[4]=(((sj3*x321))+new_r00+((cj3*x320)));
4122 evalcond[5]=((((-1.0)*x325))+x323+new_r01);
4123 evalcond[6]=((((-1.0)*x325))+x323+new_r10);
4124 evalcond[7]=((((-1.0)*x320*x322))+new_r11+(((-1.0)*sj3*x324)));
4132 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
4133 vinfos[0].jointtype = 1;
4134 vinfos[0].foffset = j0;
4135 vinfos[0].indices[0] = _ij0[0];
4136 vinfos[0].indices[1] = _ij0[1];
4137 vinfos[0].maxsolutions = _nj0;
4138 vinfos[1].jointtype = 1;
4139 vinfos[1].foffset = j1;
4140 vinfos[1].indices[0] = _ij1[0];
4141 vinfos[1].indices[1] = _ij1[1];
4142 vinfos[1].maxsolutions = _nj1;
4143 vinfos[2].jointtype = 1;
4144 vinfos[2].foffset = j2;
4145 vinfos[2].indices[0] = _ij2[0];
4146 vinfos[2].indices[1] = _ij2[1];
4147 vinfos[2].maxsolutions = _nj2;
4148 vinfos[3].jointtype = 1;
4149 vinfos[3].foffset = j3;
4150 vinfos[3].indices[0] = _ij3[0];
4151 vinfos[3].indices[1] = _ij3[1];
4152 vinfos[3].maxsolutions = _nj3;
4153 vinfos[4].jointtype = 1;
4154 vinfos[4].foffset = j4;
4155 vinfos[4].indices[0] = _ij4[0];
4156 vinfos[4].indices[1] = _ij4[1];
4157 vinfos[4].maxsolutions = _nj4;
4158 vinfos[5].jointtype = 1;
4159 vinfos[5].foffset = j5;
4160 vinfos[5].indices[0] = _ij5[0];
4161 vinfos[5].indices[1] = _ij5[1];
4162 vinfos[5].maxsolutions = _nj5;
4163 std::vector<int> vfree(0);
4171 if( bgotonextstatement )
4173 bool bgotonextstatement =
true;
4176 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-1.5707963267949)+j3)))), 6.28318530717959)));
4177 evalcond[1]=new_r02;
4178 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 )
4180 bgotonextstatement=
false;
4182 IkReal j5array[1], cj5array[1], sj5array[1];
4183 bool j5valid[1]={
false};
4187 j5array[0]=
IKatan2(((-1.0)*new_r00), ((-1.0)*new_r01));
4188 sj5array[0]=
IKsin(j5array[0]);
4189 cj5array[0]=
IKcos(j5array[0]);
4190 if( j5array[0] >
IKPI )
4194 else if( j5array[0] < -
IKPI )
4195 { j5array[0]+=
IK2PI;
4198 for(
int ij5 = 0; ij5 < 1; ++ij5)
4204 _ij5[0] = ij5; _ij5[1] = -1;
4205 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
4209 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
4212 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
4215 IkReal x326=
IKsin(j5);
4216 IkReal x327=
IKcos(j5);
4217 IkReal x328=((1.0)*x327);
4218 evalcond[0]=(x326+new_r00);
4219 evalcond[1]=(x327+new_r01);
4220 evalcond[2]=(((sj4*x326))+new_r21);
4221 evalcond[3]=(((cj4*x326))+new_r11);
4222 evalcond[4]=(new_r20+(((-1.0)*sj4*x328)));
4223 evalcond[5]=(new_r10+(((-1.0)*cj4*x328)));
4224 evalcond[6]=(((cj4*new_r11))+x326+((new_r21*sj4)));
4225 evalcond[7]=(((new_r20*sj4))+((cj4*new_r10))+(((-1.0)*x328)));
4233 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
4234 vinfos[0].jointtype = 1;
4235 vinfos[0].foffset = j0;
4236 vinfos[0].indices[0] = _ij0[0];
4237 vinfos[0].indices[1] = _ij0[1];
4238 vinfos[0].maxsolutions = _nj0;
4239 vinfos[1].jointtype = 1;
4240 vinfos[1].foffset = j1;
4241 vinfos[1].indices[0] = _ij1[0];
4242 vinfos[1].indices[1] = _ij1[1];
4243 vinfos[1].maxsolutions = _nj1;
4244 vinfos[2].jointtype = 1;
4245 vinfos[2].foffset = j2;
4246 vinfos[2].indices[0] = _ij2[0];
4247 vinfos[2].indices[1] = _ij2[1];
4248 vinfos[2].maxsolutions = _nj2;
4249 vinfos[3].jointtype = 1;
4250 vinfos[3].foffset = j3;
4251 vinfos[3].indices[0] = _ij3[0];
4252 vinfos[3].indices[1] = _ij3[1];
4253 vinfos[3].maxsolutions = _nj3;
4254 vinfos[4].jointtype = 1;
4255 vinfos[4].foffset = j4;
4256 vinfos[4].indices[0] = _ij4[0];
4257 vinfos[4].indices[1] = _ij4[1];
4258 vinfos[4].maxsolutions = _nj4;
4259 vinfos[5].jointtype = 1;
4260 vinfos[5].foffset = j5;
4261 vinfos[5].indices[0] = _ij5[0];
4262 vinfos[5].indices[1] = _ij5[1];
4263 vinfos[5].maxsolutions = _nj5;
4264 std::vector<int> vfree(0);
4272 if( bgotonextstatement )
4274 bool bgotonextstatement =
true;
4277 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((1.5707963267949)+j3)))), 6.28318530717959)));
4278 evalcond[1]=new_r02;
4279 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 )
4281 bgotonextstatement=
false;
4283 IkReal j5array[1], cj5array[1], sj5array[1];
4284 bool j5valid[1]={
false};
4288 j5array[0]=
IKatan2(new_r00, new_r01);
4289 sj5array[0]=
IKsin(j5array[0]);
4290 cj5array[0]=
IKcos(j5array[0]);
4291 if( j5array[0] >
IKPI )
4295 else if( j5array[0] < -
IKPI )
4296 { j5array[0]+=
IK2PI;
4299 for(
int ij5 = 0; ij5 < 1; ++ij5)
4305 _ij5[0] = ij5; _ij5[1] = -1;
4306 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
4310 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
4313 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
4316 IkReal x329=
IKsin(j5);
4317 IkReal x330=
IKcos(j5);
4318 IkReal x331=((1.0)*cj4);
4319 IkReal x332=((1.0)*x330);
4320 evalcond[0]=(((sj4*x329))+new_r21);
4321 evalcond[1]=(x329+(((-1.0)*new_r00)));
4322 evalcond[2]=(x330+(((-1.0)*new_r01)));
4323 evalcond[3]=((((-1.0)*sj4*x332))+new_r20);
4324 evalcond[4]=(((cj4*x329))+(((-1.0)*new_r11)));
4325 evalcond[5]=((((-1.0)*x330*x331))+(((-1.0)*new_r10)));
4326 evalcond[6]=((((-1.0)*new_r11*x331))+x329+((new_r21*sj4)));
4327 evalcond[7]=((((-1.0)*new_r10*x331))+((new_r20*sj4))+(((-1.0)*x332)));
4335 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
4336 vinfos[0].jointtype = 1;
4337 vinfos[0].foffset = j0;
4338 vinfos[0].indices[0] = _ij0[0];
4339 vinfos[0].indices[1] = _ij0[1];
4340 vinfos[0].maxsolutions = _nj0;
4341 vinfos[1].jointtype = 1;
4342 vinfos[1].foffset = j1;
4343 vinfos[1].indices[0] = _ij1[0];
4344 vinfos[1].indices[1] = _ij1[1];
4345 vinfos[1].maxsolutions = _nj1;
4346 vinfos[2].jointtype = 1;
4347 vinfos[2].foffset = j2;
4348 vinfos[2].indices[0] = _ij2[0];
4349 vinfos[2].indices[1] = _ij2[1];
4350 vinfos[2].maxsolutions = _nj2;
4351 vinfos[3].jointtype = 1;
4352 vinfos[3].foffset = j3;
4353 vinfos[3].indices[0] = _ij3[0];
4354 vinfos[3].indices[1] = _ij3[1];
4355 vinfos[3].maxsolutions = _nj3;
4356 vinfos[4].jointtype = 1;
4357 vinfos[4].foffset = j4;
4358 vinfos[4].indices[0] = _ij4[0];
4359 vinfos[4].indices[1] = _ij4[1];
4360 vinfos[4].maxsolutions = _nj4;
4361 vinfos[5].jointtype = 1;
4362 vinfos[5].foffset = j5;
4363 vinfos[5].indices[0] = _ij5[0];
4364 vinfos[5].indices[1] = _ij5[1];
4365 vinfos[5].maxsolutions = _nj5;
4366 std::vector<int> vfree(0);
4374 if( bgotonextstatement )
4376 bool bgotonextstatement =
true;
4379 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(j3))), 6.28318530717959)));
4380 evalcond[1]=new_r12;
4381 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 )
4383 bgotonextstatement=
false;
4385 IkReal j5array[1], cj5array[1], sj5array[1];
4386 bool j5valid[1]={
false};
4390 j5array[0]=
IKatan2(new_r10, new_r11);
4391 sj5array[0]=
IKsin(j5array[0]);
4392 cj5array[0]=
IKcos(j5array[0]);
4393 if( j5array[0] >
IKPI )
4397 else if( j5array[0] < -
IKPI )
4398 { j5array[0]+=
IK2PI;
4401 for(
int ij5 = 0; ij5 < 1; ++ij5)
4407 _ij5[0] = ij5; _ij5[1] = -1;
4408 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
4412 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
4415 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
4418 IkReal x333=
IKcos(j5);
4419 IkReal x334=
IKsin(j5);
4420 IkReal x335=((1.0)*x333);
4421 evalcond[0]=(((new_r02*x333))+new_r20);
4422 evalcond[1]=(x334+(((-1.0)*new_r10)));
4423 evalcond[2]=(x333+(((-1.0)*new_r11)));
4424 evalcond[3]=(((cj4*x334))+new_r01);
4425 evalcond[4]=((((-1.0)*new_r02*x334))+new_r21);
4426 evalcond[5]=((((-1.0)*cj4*x335))+new_r00);
4427 evalcond[6]=(((cj4*new_r01))+x334+((new_r21*sj4)));
4428 evalcond[7]=(((new_r20*sj4))+((cj4*new_r00))+(((-1.0)*x335)));
4436 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
4437 vinfos[0].jointtype = 1;
4438 vinfos[0].foffset = j0;
4439 vinfos[0].indices[0] = _ij0[0];
4440 vinfos[0].indices[1] = _ij0[1];
4441 vinfos[0].maxsolutions = _nj0;
4442 vinfos[1].jointtype = 1;
4443 vinfos[1].foffset = j1;
4444 vinfos[1].indices[0] = _ij1[0];
4445 vinfos[1].indices[1] = _ij1[1];
4446 vinfos[1].maxsolutions = _nj1;
4447 vinfos[2].jointtype = 1;
4448 vinfos[2].foffset = j2;
4449 vinfos[2].indices[0] = _ij2[0];
4450 vinfos[2].indices[1] = _ij2[1];
4451 vinfos[2].maxsolutions = _nj2;
4452 vinfos[3].jointtype = 1;
4453 vinfos[3].foffset = j3;
4454 vinfos[3].indices[0] = _ij3[0];
4455 vinfos[3].indices[1] = _ij3[1];
4456 vinfos[3].maxsolutions = _nj3;
4457 vinfos[4].jointtype = 1;
4458 vinfos[4].foffset = j4;
4459 vinfos[4].indices[0] = _ij4[0];
4460 vinfos[4].indices[1] = _ij4[1];
4461 vinfos[4].maxsolutions = _nj4;
4462 vinfos[5].jointtype = 1;
4463 vinfos[5].foffset = j5;
4464 vinfos[5].indices[0] = _ij5[0];
4465 vinfos[5].indices[1] = _ij5[1];
4466 vinfos[5].maxsolutions = _nj5;
4467 std::vector<int> vfree(0);
4475 if( bgotonextstatement )
4477 bool bgotonextstatement =
true;
4480 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((-3.14159265358979)+j3)))), 6.28318530717959)));
4481 evalcond[1]=new_r12;
4482 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 )
4484 bgotonextstatement=
false;
4486 IkReal j5array[1], cj5array[1], sj5array[1];
4487 bool j5valid[1]={
false};
4491 j5array[0]=
IKatan2(((-1.0)*new_r10), ((-1.0)*new_r11));
4492 sj5array[0]=
IKsin(j5array[0]);
4493 cj5array[0]=
IKcos(j5array[0]);
4494 if( j5array[0] >
IKPI )
4498 else if( j5array[0] < -
IKPI )
4499 { j5array[0]+=
IK2PI;
4502 for(
int ij5 = 0; ij5 < 1; ++ij5)
4508 _ij5[0] = ij5; _ij5[1] = -1;
4509 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
4513 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
4516 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
4519 IkReal x336=
IKsin(j5);
4520 IkReal x337=
IKcos(j5);
4521 IkReal x338=((1.0)*new_r00);
4522 IkReal x339=((1.0)*new_r01);
4523 IkReal x340=((1.0)*x337);
4524 evalcond[0]=(x336+new_r10);
4525 evalcond[1]=(x337+new_r11);
4526 evalcond[2]=(((new_r02*x336))+new_r21);
4527 evalcond[3]=((((-1.0)*new_r02*x340))+new_r20);
4528 evalcond[4]=((((-1.0)*x339))+((cj4*x336)));
4529 evalcond[5]=((((-1.0)*cj4*x340))+(((-1.0)*x338)));
4530 evalcond[6]=((((-1.0)*cj4*x339))+x336+((new_r21*sj4)));
4531 evalcond[7]=(((new_r20*sj4))+(((-1.0)*cj4*x338))+(((-1.0)*x340)));
4539 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
4540 vinfos[0].jointtype = 1;
4541 vinfos[0].foffset = j0;
4542 vinfos[0].indices[0] = _ij0[0];
4543 vinfos[0].indices[1] = _ij0[1];
4544 vinfos[0].maxsolutions = _nj0;
4545 vinfos[1].jointtype = 1;
4546 vinfos[1].foffset = j1;
4547 vinfos[1].indices[0] = _ij1[0];
4548 vinfos[1].indices[1] = _ij1[1];
4549 vinfos[1].maxsolutions = _nj1;
4550 vinfos[2].jointtype = 1;
4551 vinfos[2].foffset = j2;
4552 vinfos[2].indices[0] = _ij2[0];
4553 vinfos[2].indices[1] = _ij2[1];
4554 vinfos[2].maxsolutions = _nj2;
4555 vinfos[3].jointtype = 1;
4556 vinfos[3].foffset = j3;
4557 vinfos[3].indices[0] = _ij3[0];
4558 vinfos[3].indices[1] = _ij3[1];
4559 vinfos[3].maxsolutions = _nj3;
4560 vinfos[4].jointtype = 1;
4561 vinfos[4].foffset = j4;
4562 vinfos[4].indices[0] = _ij4[0];
4563 vinfos[4].indices[1] = _ij4[1];
4564 vinfos[4].maxsolutions = _nj4;
4565 vinfos[5].jointtype = 1;
4566 vinfos[5].foffset = j5;
4567 vinfos[5].indices[0] = _ij5[0];
4568 vinfos[5].indices[1] = _ij5[1];
4569 vinfos[5].maxsolutions = _nj5;
4570 std::vector<int> vfree(0);
4578 if( bgotonextstatement )
4580 bool bgotonextstatement =
true;
4583 evalcond[0]=((
IKabs(new_r20))+(
IKabs(new_r21)));
4584 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
4586 bgotonextstatement=
false;
4594 if(
IKabs(j5eval[0]) < 0.0000000100000000 )
4600 IkReal op[2+1], zeror[2];
4605 polyroots2(op,zeror,numroots);
4606 IkReal j5array[2], cj5array[2], sj5array[2], tempj5array[1];
4607 int numsolutions = 0;
4608 for(
int ij5 = 0; ij5 < numroots; ++ij5)
4610 IkReal htj5 = zeror[ij5];
4611 tempj5array[0]=((2.0)*(
atan(htj5)));
4612 for(
int kj5 = 0; kj5 < 1; ++kj5)
4614 j5array[numsolutions] = tempj5array[kj5];
4615 if( j5array[numsolutions] >
IKPI )
4617 j5array[numsolutions]-=
IK2PI;
4619 else if( j5array[numsolutions] < -
IKPI )
4621 j5array[numsolutions]+=
IK2PI;
4623 sj5array[numsolutions] =
IKsin(j5array[numsolutions]);
4624 cj5array[numsolutions] =
IKcos(j5array[numsolutions]);
4628 bool j5valid[2]={
true,
true};
4630 for(
int ij5 = 0; ij5 < numsolutions; ++ij5)
4636 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
4639 _ij5[0] = ij5; _ij5[1] = -1;
4640 for(
int iij5 = ij5+1; iij5 < numsolutions; ++iij5)
4644 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
4648 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
4649 vinfos[0].jointtype = 1;
4650 vinfos[0].foffset = j0;
4651 vinfos[0].indices[0] = _ij0[0];
4652 vinfos[0].indices[1] = _ij0[1];
4653 vinfos[0].maxsolutions = _nj0;
4654 vinfos[1].jointtype = 1;
4655 vinfos[1].foffset = j1;
4656 vinfos[1].indices[0] = _ij1[0];
4657 vinfos[1].indices[1] = _ij1[1];
4658 vinfos[1].maxsolutions = _nj1;
4659 vinfos[2].jointtype = 1;
4660 vinfos[2].foffset = j2;
4661 vinfos[2].indices[0] = _ij2[0];
4662 vinfos[2].indices[1] = _ij2[1];
4663 vinfos[2].maxsolutions = _nj2;
4664 vinfos[3].jointtype = 1;
4665 vinfos[3].foffset = j3;
4666 vinfos[3].indices[0] = _ij3[0];
4667 vinfos[3].indices[1] = _ij3[1];
4668 vinfos[3].maxsolutions = _nj3;
4669 vinfos[4].jointtype = 1;
4670 vinfos[4].foffset = j4;
4671 vinfos[4].indices[0] = _ij4[0];
4672 vinfos[4].indices[1] = _ij4[1];
4673 vinfos[4].maxsolutions = _nj4;
4674 vinfos[5].jointtype = 1;
4675 vinfos[5].foffset = j5;
4676 vinfos[5].indices[0] = _ij5[0];
4677 vinfos[5].indices[1] = _ij5[1];
4678 vinfos[5].maxsolutions = _nj5;
4679 std::vector<int> vfree(0);
4690 if( bgotonextstatement )
4692 bool bgotonextstatement =
true;
4697 bgotonextstatement=
false;
4702 if( bgotonextstatement )
4717 IkReal j5array[1], cj5array[1], sj5array[1];
4718 bool j5valid[1]={
false};
4724 IkReal x341=x342.
value;
4731 j5array[0]=
IKatan2(((-1.0)*new_r21*x341), (x341*(x343.
value)*((((new_r11*sj4))+(((-1.0)*cj4*new_r21*sj3))))));
4732 sj5array[0]=
IKsin(j5array[0]);
4733 cj5array[0]=
IKcos(j5array[0]);
4734 if( j5array[0] >
IKPI )
4738 else if( j5array[0] < -
IKPI )
4739 { j5array[0]+=
IK2PI;
4742 for(
int ij5 = 0; ij5 < 1; ++ij5)
4748 _ij5[0] = ij5; _ij5[1] = -1;
4749 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
4753 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
4756 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
4758 IkReal evalcond[12];
4759 IkReal x344=
IKsin(j5);
4760 IkReal x345=
IKcos(j5);
4761 IkReal x346=(cj3*new_r00);
4762 IkReal x347=(cj3*cj4);
4763 IkReal x348=(cj4*sj3);
4764 IkReal x349=((1.0)*cj3);
4765 IkReal x350=(sj3*x344);
4766 IkReal x351=((1.0)*x345);
4767 evalcond[0]=(((sj4*x344))+new_r21);
4768 evalcond[1]=(new_r20+(((-1.0)*sj4*x351)));
4769 evalcond[2]=((((-1.0)*new_r10*x349))+((new_r00*sj3))+x344);
4770 evalcond[3]=((((-1.0)*new_r11*x349))+((new_r01*sj3))+x345);
4771 evalcond[4]=(((new_r11*sj3))+((cj4*x344))+((cj3*new_r01)));
4772 evalcond[5]=(((sj3*x345))+((x344*x347))+new_r01);
4773 evalcond[6]=(((new_r10*sj3))+x346+(((-1.0)*cj4*x351)));
4774 evalcond[7]=(x350+(((-1.0)*x347*x351))+new_r00);
4775 evalcond[8]=(((x344*x348))+(((-1.0)*x345*x349))+new_r11);
4776 evalcond[9]=((((-1.0)*x348*x351))+(((-1.0)*x344*x349))+new_r10);
4777 evalcond[10]=(((new_r11*x348))+((new_r01*x347))+x344+((new_r21*sj4)));
4778 evalcond[11]=(((new_r20*sj4))+(((-1.0)*x351))+((new_r10*x348))+((cj4*x346)));
4786 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
4787 vinfos[0].jointtype = 1;
4788 vinfos[0].foffset = j0;
4789 vinfos[0].indices[0] = _ij0[0];
4790 vinfos[0].indices[1] = _ij0[1];
4791 vinfos[0].maxsolutions = _nj0;
4792 vinfos[1].jointtype = 1;
4793 vinfos[1].foffset = j1;
4794 vinfos[1].indices[0] = _ij1[0];
4795 vinfos[1].indices[1] = _ij1[1];
4796 vinfos[1].maxsolutions = _nj1;
4797 vinfos[2].jointtype = 1;
4798 vinfos[2].foffset = j2;
4799 vinfos[2].indices[0] = _ij2[0];
4800 vinfos[2].indices[1] = _ij2[1];
4801 vinfos[2].maxsolutions = _nj2;
4802 vinfos[3].jointtype = 1;
4803 vinfos[3].foffset = j3;
4804 vinfos[3].indices[0] = _ij3[0];
4805 vinfos[3].indices[1] = _ij3[1];
4806 vinfos[3].maxsolutions = _nj3;
4807 vinfos[4].jointtype = 1;
4808 vinfos[4].foffset = j4;
4809 vinfos[4].indices[0] = _ij4[0];
4810 vinfos[4].indices[1] = _ij4[1];
4811 vinfos[4].maxsolutions = _nj4;
4812 vinfos[5].jointtype = 1;
4813 vinfos[5].foffset = j5;
4814 vinfos[5].indices[0] = _ij5[0];
4815 vinfos[5].indices[1] = _ij5[1];
4816 vinfos[5].maxsolutions = _nj5;
4817 std::vector<int> vfree(0);
4830 IkReal j5array[1], cj5array[1], sj5array[1];
4831 bool j5valid[1]={
false};
4837 IkReal x352=x353.
value;
4844 j5array[0]=
IKatan2(((-1.0)*new_r21*x352), (x352*(x354.
value)*(((((-1.0)*new_r01*sj4))+((cj3*cj4*new_r21))))));
4845 sj5array[0]=
IKsin(j5array[0]);
4846 cj5array[0]=
IKcos(j5array[0]);
4847 if( j5array[0] >
IKPI )
4851 else if( j5array[0] < -
IKPI )
4852 { j5array[0]+=
IK2PI;
4855 for(
int ij5 = 0; ij5 < 1; ++ij5)
4861 _ij5[0] = ij5; _ij5[1] = -1;
4862 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
4866 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
4869 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
4871 IkReal evalcond[12];
4872 IkReal x355=
IKsin(j5);
4873 IkReal x356=
IKcos(j5);
4874 IkReal x357=(cj3*new_r00);
4875 IkReal x358=(cj3*cj4);
4876 IkReal x359=(cj4*sj3);
4877 IkReal x360=((1.0)*cj3);
4878 IkReal x361=(sj3*x355);
4879 IkReal x362=((1.0)*x356);
4880 evalcond[0]=(((sj4*x355))+new_r21);
4881 evalcond[1]=((((-1.0)*sj4*x362))+new_r20);
4882 evalcond[2]=(((new_r00*sj3))+x355+(((-1.0)*new_r10*x360)));
4883 evalcond[3]=(((new_r01*sj3))+x356+(((-1.0)*new_r11*x360)));
4884 evalcond[4]=(((new_r11*sj3))+((cj4*x355))+((cj3*new_r01)));
4885 evalcond[5]=(((x355*x358))+((sj3*x356))+new_r01);
4886 evalcond[6]=((((-1.0)*cj4*x362))+((new_r10*sj3))+x357);
4887 evalcond[7]=((((-1.0)*x358*x362))+x361+new_r00);
4888 evalcond[8]=(((x355*x359))+(((-1.0)*x356*x360))+new_r11);
4889 evalcond[9]=((((-1.0)*x355*x360))+(((-1.0)*x359*x362))+new_r10);
4890 evalcond[10]=(((new_r01*x358))+x355+((new_r21*sj4))+((new_r11*x359)));
4891 evalcond[11]=(((new_r20*sj4))+(((-1.0)*x362))+((cj4*x357))+((new_r10*x359)));
4899 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
4900 vinfos[0].jointtype = 1;
4901 vinfos[0].foffset = j0;
4902 vinfos[0].indices[0] = _ij0[0];
4903 vinfos[0].indices[1] = _ij0[1];
4904 vinfos[0].maxsolutions = _nj0;
4905 vinfos[1].jointtype = 1;
4906 vinfos[1].foffset = j1;
4907 vinfos[1].indices[0] = _ij1[0];
4908 vinfos[1].indices[1] = _ij1[1];
4909 vinfos[1].maxsolutions = _nj1;
4910 vinfos[2].jointtype = 1;
4911 vinfos[2].foffset = j2;
4912 vinfos[2].indices[0] = _ij2[0];
4913 vinfos[2].indices[1] = _ij2[1];
4914 vinfos[2].maxsolutions = _nj2;
4915 vinfos[3].jointtype = 1;
4916 vinfos[3].foffset = j3;
4917 vinfos[3].indices[0] = _ij3[0];
4918 vinfos[3].indices[1] = _ij3[1];
4919 vinfos[3].maxsolutions = _nj3;
4920 vinfos[4].jointtype = 1;
4921 vinfos[4].foffset = j4;
4922 vinfos[4].indices[0] = _ij4[0];
4923 vinfos[4].indices[1] = _ij4[1];
4924 vinfos[4].maxsolutions = _nj4;
4925 vinfos[5].jointtype = 1;
4926 vinfos[5].foffset = j5;
4927 vinfos[5].indices[0] = _ij5[0];
4928 vinfos[5].indices[1] = _ij5[1];
4929 vinfos[5].maxsolutions = _nj5;
4930 std::vector<int> vfree(0);
4943 IkReal j5array[1], cj5array[1], sj5array[1];
4944 bool j5valid[1]={
false};
4954 j5array[0]=((-1.5707963267949)+(x363.
value)+(((1.5707963267949)*(x364.
value))));
4955 sj5array[0]=
IKsin(j5array[0]);
4956 cj5array[0]=
IKcos(j5array[0]);
4957 if( j5array[0] >
IKPI )
4961 else if( j5array[0] < -
IKPI )
4962 { j5array[0]+=
IK2PI;
4965 for(
int ij5 = 0; ij5 < 1; ++ij5)
4971 _ij5[0] = ij5; _ij5[1] = -1;
4972 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
4976 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
4979 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
4981 IkReal evalcond[12];
4982 IkReal x365=
IKsin(j5);
4983 IkReal x366=
IKcos(j5);
4984 IkReal x367=(cj3*new_r00);
4985 IkReal x368=(cj3*cj4);
4986 IkReal x369=(cj4*sj3);
4987 IkReal x370=((1.0)*cj3);
4988 IkReal x371=(sj3*x365);
4989 IkReal x372=((1.0)*x366);
4990 evalcond[0]=(((sj4*x365))+new_r21);
4991 evalcond[1]=((((-1.0)*sj4*x372))+new_r20);
4992 evalcond[2]=(((new_r00*sj3))+x365+(((-1.0)*new_r10*x370)));
4993 evalcond[3]=(((new_r01*sj3))+x366+(((-1.0)*new_r11*x370)));
4994 evalcond[4]=(((new_r11*sj3))+((cj4*x365))+((cj3*new_r01)));
4995 evalcond[5]=(((x365*x368))+((sj3*x366))+new_r01);
4996 evalcond[6]=(((new_r10*sj3))+(((-1.0)*cj4*x372))+x367);
4997 evalcond[7]=((((-1.0)*x368*x372))+x371+new_r00);
4998 evalcond[8]=(((x365*x369))+(((-1.0)*x366*x370))+new_r11);
4999 evalcond[9]=((((-1.0)*x369*x372))+new_r10+(((-1.0)*x365*x370)));
5000 evalcond[10]=(x365+((new_r01*x368))+((new_r21*sj4))+((new_r11*x369)));
5001 evalcond[11]=(((new_r20*sj4))+(((-1.0)*x372))+((cj4*x367))+((new_r10*x369)));
5009 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
5010 vinfos[0].jointtype = 1;
5011 vinfos[0].foffset = j0;
5012 vinfos[0].indices[0] = _ij0[0];
5013 vinfos[0].indices[1] = _ij0[1];
5014 vinfos[0].maxsolutions = _nj0;
5015 vinfos[1].jointtype = 1;
5016 vinfos[1].foffset = j1;
5017 vinfos[1].indices[0] = _ij1[0];
5018 vinfos[1].indices[1] = _ij1[1];
5019 vinfos[1].maxsolutions = _nj1;
5020 vinfos[2].jointtype = 1;
5021 vinfos[2].foffset = j2;
5022 vinfos[2].indices[0] = _ij2[0];
5023 vinfos[2].indices[1] = _ij2[1];
5024 vinfos[2].maxsolutions = _nj2;
5025 vinfos[3].jointtype = 1;
5026 vinfos[3].foffset = j3;
5027 vinfos[3].indices[0] = _ij3[0];
5028 vinfos[3].indices[1] = _ij3[1];
5029 vinfos[3].maxsolutions = _nj3;
5030 vinfos[4].jointtype = 1;
5031 vinfos[4].foffset = j4;
5032 vinfos[4].indices[0] = _ij4[0];
5033 vinfos[4].indices[1] = _ij4[1];
5034 vinfos[4].maxsolutions = _nj4;
5035 vinfos[5].jointtype = 1;
5036 vinfos[5].foffset = j5;
5037 vinfos[5].indices[0] = _ij5[0];
5038 vinfos[5].indices[1] = _ij5[1];
5039 vinfos[5].maxsolutions = _nj5;
5040 std::vector<int> vfree(0);
5059 IkReal j5array[1], cj5array[1], sj5array[1];
5060 bool j5valid[1]={
false};
5070 j5array[0]=((-1.5707963267949)+(x373.
value)+(((1.5707963267949)*(x374.
value))));
5071 sj5array[0]=
IKsin(j5array[0]);
5072 cj5array[0]=
IKcos(j5array[0]);
5073 if( j5array[0] >
IKPI )
5077 else if( j5array[0] < -
IKPI )
5078 { j5array[0]+=
IK2PI;
5081 for(
int ij5 = 0; ij5 < 1; ++ij5)
5087 _ij5[0] = ij5; _ij5[1] = -1;
5088 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
5092 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
5095 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
5098 evalcond[0]=(((sj4*(
IKsin(j5))))+new_r21);
5099 evalcond[1]=((((-1.0)*sj4*(
IKcos(j5))))+new_r20);
5110 j3eval[2]=((
IKabs(new_r12))+(
IKabs(new_r02)));
5111 if(
IKabs(j3eval[0]) < 0.0000010000000000 ||
IKabs(j3eval[1]) < 0.0000010000000000 ||
IKabs(j3eval[2]) < 0.0000010000000000 )
5117 if(
IKabs(j3eval[0]) < 0.0000010000000000 ||
IKabs(j3eval[1]) < 0.0000010000000000 )
5121 bool bgotonextstatement =
true;
5124 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(j4))), 6.28318530717959)));
5125 evalcond[1]=new_r02;
5126 evalcond[2]=new_r12;
5127 evalcond[3]=new_r21;
5128 evalcond[4]=new_r20;
5129 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 )
5131 bgotonextstatement=
false;
5137 IkReal x375=((1.0)*new_r11);
5138 IkReal x376=((((-1.0)*new_r10*x375))+(((-1.0)*new_r00*new_r01)));
5140 j3eval[1]=((
IKabs((((new_r10*sj5))+((new_r01*sj5)))))+(
IKabs(((((-1.0)*sj5*x375))+((new_r00*sj5))))));
5142 if(
IKabs(j3eval[0]) < 0.0000010000000000 ||
IKabs(j3eval[1]) < 0.0000010000000000 ||
IKabs(j3eval[2]) < 0.0000010000000000 )
5149 IkReal x377=((((-1.0)*(new_r01*new_r01)))+(((-1.0)*(new_r11*new_r11))));
5151 j3eval[1]=((
IKabs((((new_r11*sj5))+((cj5*new_r01)))))+(
IKabs((((new_r01*sj5))+(((-1.0)*cj5*new_r11))))));
5153 if(
IKabs(j3eval[0]) < 0.0000010000000000 ||
IKabs(j3eval[1]) < 0.0000010000000000 ||
IKabs(j3eval[2]) < 0.0000010000000000 )
5160 IkReal x378=((1.0)*new_r11);
5161 IkReal x379=((((-1.0)*cj5*x378))+(((-1.0)*new_r01*sj5)));
5164 j3eval[2]=((
IKabs((((new_r00*new_r01))+((cj5*sj5)))))+(
IKabs(((1.0)+(((-1.0)*new_r00*x378))+(((-1.0)*(cj5*cj5)))))));
5165 if(
IKabs(j3eval[0]) < 0.0000010000000000 ||
IKabs(j3eval[1]) < 0.0000010000000000 ||
IKabs(j3eval[2]) < 0.0000010000000000 )
5169 bool bgotonextstatement =
true;
5172 IkReal x380=((-1.0)*new_r01);
5173 IkReal x382 = ((new_r01*new_r01)+(new_r11*new_r11));
5177 IkReal x381=
pow(x382,-0.5);
5182 IkReal gconst6=((-1.0)*(x383.
value));
5183 IkReal gconst7=(new_r11*x381);
5184 IkReal gconst8=(x380*x381);
5189 evalcond[0]=((-3.14159265358979)+(
IKfmod(((3.14159265358979)+(
IKabs(((x384.
value)+j5)))), 6.28318530717959)));
5190 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
5192 bgotonextstatement=
false;
5195 IkReal x385=((-1.0)*new_r01);
5200 IkReal x386=((-1.0)*(x388.
value));
5208 IkReal gconst6=x386;
5209 IkReal gconst7=(new_r11*x387);
5210 IkReal gconst8=(x385*x387);
5211 IkReal x389=new_r11*new_r11;
5212 IkReal x390=(new_r10*new_r11);
5213 IkReal x391=((((-1.0)*x390))+(((-1.0)*new_r00*new_r01)));
5215 IkReal x393=(new_r11*x392);
5217 j3eval[1]=((
IKabs(((((-1.0)*x389*x392))+((new_r00*x393)))))+(
IKabs((((new_r01*x393))+((x390*x392))))));
5219 if(
IKabs(j3eval[0]) < 0.0000010000000000 ||
IKabs(j3eval[1]) < 0.0000010000000000 ||
IKabs(j3eval[2]) < 0.0000010000000000 )
5223 IkReal x394=((-1.0)*new_r01);
5228 IkReal x395=((-1.0)*(x397.
value));
5236 IkReal gconst6=x395;
5237 IkReal gconst7=(new_r11*x396);
5238 IkReal gconst8=(x394*x396);
5239 IkReal x398=new_r11*new_r11;
5244 IkReal x399=x401.
value;
5245 IkReal x400=(x398*x399);
5246 j3eval[0]=((
IKabs((((new_r01*new_r10))+x400)))+(
IKabs((((new_r00*new_r01*x400))+((new_r00*x399*(new_r01*new_r01*new_r01)))+((new_r01*new_r11*x399))))));
5247 if(
IKabs(j3eval[0]) < 0.0000010000000000 )
5251 IkReal x402=((-1.0)*new_r01);
5256 IkReal x403=((-1.0)*(x405.
value));
5264 IkReal gconst6=x403;
5265 IkReal gconst7=(new_r11*x404);
5266 IkReal gconst8=(x402*x404);
5267 IkReal x406=new_r01*new_r01;
5268 IkReal x407=new_r11*new_r11;
5273 IkReal x408=x414.
value;
5274 IkReal x409=(x407*x408);
5279 IkReal x410=x415.
value;
5280 IkReal x411=((1.0)*x410);
5281 IkReal x412=(new_r11*x411);
5282 IkReal x413=(new_r01*x411);
5283 j3eval[0]=((
IKabs((((x406*x409))+((x408*(x406*x406)))+(((-1.0)*x409)))))+(
IKabs(((((-1.0)*new_r01*x412*(new_r11*new_r11)))+(((-1.0)*x412*(new_r01*new_r01*new_r01)))+(((-1.0)*new_r01*x412))))));
5284 if(
IKabs(j3eval[0]) < 0.0000010000000000 )
5288 bool bgotonextstatement =
true;
5291 evalcond[0]=((
IKabs(new_r11))+(
IKabs(new_r00)));
5292 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
5294 bgotonextstatement=
false;
5296 IkReal j3array[2], cj3array[2], sj3array[2];
5297 bool j3valid[2]={
false};
5303 sj3array[0]=(new_r10*(x416.
value));
5306 j3valid[0] = j3valid[1] =
true;
5307 j3array[0] =
IKasin(sj3array[0]);
5308 cj3array[0] =
IKcos(j3array[0]);
5309 sj3array[1] = sj3array[0];
5310 j3array[1] = j3array[0] > 0 ? (
IKPI-j3array[0]) : (-
IKPI-j3array[0]);
5311 cj3array[1] = -cj3array[0];
5313 else if( isnan(sj3array[0]) )
5317 cj3array[0] = 1; sj3array[0] = 0; j3array[0] = 0;
5319 for(
int ij3 = 0; ij3 < 2; ++ij3)
5325 _ij3[0] = ij3; _ij3[1] = -1;
5326 for(
int iij3 = ij3+1; iij3 < 2; ++iij3)
5330 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
5333 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
5336 IkReal x417=
IKcos(j3);
5337 IkReal x418=
IKsin(j3);
5338 IkReal x419=((-1.0)*x417);
5339 evalcond[0]=(new_r01*x417);
5340 evalcond[1]=(new_r10*x419);
5341 evalcond[2]=(gconst8*x419);
5342 evalcond[3]=(gconst8+((new_r01*x418)));
5343 evalcond[4]=(((gconst8*x418))+new_r01);
5344 evalcond[5]=((((-1.0)*gconst8))+((new_r10*x418)));
5352 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
5353 vinfos[0].jointtype = 1;
5354 vinfos[0].foffset = j0;
5355 vinfos[0].indices[0] = _ij0[0];
5356 vinfos[0].indices[1] = _ij0[1];
5357 vinfos[0].maxsolutions = _nj0;
5358 vinfos[1].jointtype = 1;
5359 vinfos[1].foffset = j1;
5360 vinfos[1].indices[0] = _ij1[0];
5361 vinfos[1].indices[1] = _ij1[1];
5362 vinfos[1].maxsolutions = _nj1;
5363 vinfos[2].jointtype = 1;
5364 vinfos[2].foffset = j2;
5365 vinfos[2].indices[0] = _ij2[0];
5366 vinfos[2].indices[1] = _ij2[1];
5367 vinfos[2].maxsolutions = _nj2;
5368 vinfos[3].jointtype = 1;
5369 vinfos[3].foffset = j3;
5370 vinfos[3].indices[0] = _ij3[0];
5371 vinfos[3].indices[1] = _ij3[1];
5372 vinfos[3].maxsolutions = _nj3;
5373 vinfos[4].jointtype = 1;
5374 vinfos[4].foffset = j4;
5375 vinfos[4].indices[0] = _ij4[0];
5376 vinfos[4].indices[1] = _ij4[1];
5377 vinfos[4].maxsolutions = _nj4;
5378 vinfos[5].jointtype = 1;
5379 vinfos[5].foffset = j5;
5380 vinfos[5].indices[0] = _ij5[0];
5381 vinfos[5].indices[1] = _ij5[1];
5382 vinfos[5].maxsolutions = _nj5;
5383 std::vector<int> vfree(0);
5391 if( bgotonextstatement )
5393 bool bgotonextstatement =
true;
5396 evalcond[0]=((
IKabs(new_r10))+(
IKabs(new_r00)));
5397 evalcond[1]=gconst7;
5398 if(
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 )
5400 bgotonextstatement=
false;
5403 IkReal x420=((-1.0)*new_r01);
5408 IkReal x421=((-1.0)*(x422.
value));
5419 IkReal gconst6=x421;
5420 IkReal gconst7=new_r11;
5421 IkReal gconst8=x420;
5423 j3eval[1]=((
IKabs((new_r01*new_r11)))+(
IKabs(((1.0)+(((-1.0)*(new_r01*new_r01)))))));
5425 if(
IKabs(j3eval[0]) < 0.0000010000000000 ||
IKabs(j3eval[1]) < 0.0000010000000000 ||
IKabs(j3eval[2]) < 0.0000010000000000 )
5429 IkReal x423=((-1.0)*new_r01);
5434 IkReal x424=((-1.0)*(x425.
value));
5445 IkReal gconst6=x424;
5446 IkReal gconst7=new_r11;
5447 IkReal gconst8=x423;
5450 j3eval[2]=((
IKabs(new_r01*new_r01))+(
IKabs((new_r01*new_r11))));
5451 if(
IKabs(j3eval[0]) < 0.0000010000000000 ||
IKabs(j3eval[1]) < 0.0000010000000000 ||
IKabs(j3eval[2]) < 0.0000010000000000 )
5455 IkReal x426=((-1.0)*new_r01);
5460 IkReal x427=((-1.0)*(x428.
value));
5471 IkReal gconst6=x427;
5472 IkReal gconst7=new_r11;
5473 IkReal gconst8=x426;
5475 j3eval[1]=((((0.5)*(
IKabs(((-1.0)+(((2.0)*(new_r01*new_r01))))))))+(
IKabs((new_r01*new_r11))));
5477 if(
IKabs(j3eval[0]) < 0.0000010000000000 ||
IKabs(j3eval[1]) < 0.0000010000000000 ||
IKabs(j3eval[2]) < 0.0000010000000000 )
5484 IkReal j3array[1], cj3array[1], sj3array[1];
5485 bool j3valid[1]={
false};
5487 IkReal x429=((1.0)*new_r01);
5496 j3array[0]=((-1.5707963267949)+(((1.5707963267949)*(x430.
value)))+(x431.
value));
5497 sj3array[0]=
IKsin(j3array[0]);
5498 cj3array[0]=
IKcos(j3array[0]);
5499 if( j3array[0] >
IKPI )
5503 else if( j3array[0] < -
IKPI )
5504 { j3array[0]+=
IK2PI;
5507 for(
int ij3 = 0; ij3 < 1; ++ij3)
5513 _ij3[0] = ij3; _ij3[1] = -1;
5514 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
5518 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
5521 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
5524 IkReal x432=
IKsin(j3);
5525 IkReal x433=
IKcos(j3);
5526 IkReal x434=(gconst7*x432);
5527 IkReal x435=((1.0)*x433);
5528 IkReal x436=(gconst8*x432);
5529 IkReal x437=(gconst8*x435);
5530 evalcond[0]=(((new_r01*x433))+gconst7+((new_r11*x432)));
5531 evalcond[1]=(((gconst7*x433))+x436+new_r01);
5532 evalcond[2]=((((-1.0)*x437))+x434);
5533 evalcond[3]=(((new_r01*x432))+gconst8+(((-1.0)*new_r11*x435)));
5534 evalcond[4]=((((-1.0)*x437))+x434+new_r11);
5535 evalcond[5]=((((-1.0)*x436))+(((-1.0)*gconst7*x435)));
5543 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
5544 vinfos[0].jointtype = 1;
5545 vinfos[0].foffset = j0;
5546 vinfos[0].indices[0] = _ij0[0];
5547 vinfos[0].indices[1] = _ij0[1];
5548 vinfos[0].maxsolutions = _nj0;
5549 vinfos[1].jointtype = 1;
5550 vinfos[1].foffset = j1;
5551 vinfos[1].indices[0] = _ij1[0];
5552 vinfos[1].indices[1] = _ij1[1];
5553 vinfos[1].maxsolutions = _nj1;
5554 vinfos[2].jointtype = 1;
5555 vinfos[2].foffset = j2;
5556 vinfos[2].indices[0] = _ij2[0];
5557 vinfos[2].indices[1] = _ij2[1];
5558 vinfos[2].maxsolutions = _nj2;
5559 vinfos[3].jointtype = 1;
5560 vinfos[3].foffset = j3;
5561 vinfos[3].indices[0] = _ij3[0];
5562 vinfos[3].indices[1] = _ij3[1];
5563 vinfos[3].maxsolutions = _nj3;
5564 vinfos[4].jointtype = 1;
5565 vinfos[4].foffset = j4;
5566 vinfos[4].indices[0] = _ij4[0];
5567 vinfos[4].indices[1] = _ij4[1];
5568 vinfos[4].maxsolutions = _nj4;
5569 vinfos[5].jointtype = 1;
5570 vinfos[5].foffset = j5;
5571 vinfos[5].indices[0] = _ij5[0];
5572 vinfos[5].indices[1] = _ij5[1];
5573 vinfos[5].maxsolutions = _nj5;
5574 std::vector<int> vfree(0);
5587 IkReal j3array[1], cj3array[1], sj3array[1];
5588 bool j3valid[1]={
false};
5598 j3array[0]=((-1.5707963267949)+(((1.5707963267949)*(x438.
value)))+(x439.
value));
5599 sj3array[0]=
IKsin(j3array[0]);
5600 cj3array[0]=
IKcos(j3array[0]);
5601 if( j3array[0] >
IKPI )
5605 else if( j3array[0] < -
IKPI )
5606 { j3array[0]+=
IK2PI;
5609 for(
int ij3 = 0; ij3 < 1; ++ij3)
5615 _ij3[0] = ij3; _ij3[1] = -1;
5616 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
5620 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
5623 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
5626 IkReal x440=
IKsin(j3);
5627 IkReal x441=
IKcos(j3);
5628 IkReal x442=(gconst7*x440);
5629 IkReal x443=((1.0)*x441);
5630 IkReal x444=(gconst8*x440);
5631 IkReal x445=(gconst8*x443);
5632 evalcond[0]=(((new_r01*x441))+gconst7+((new_r11*x440)));
5633 evalcond[1]=(((gconst7*x441))+x444+new_r01);
5634 evalcond[2]=((((-1.0)*x445))+x442);
5635 evalcond[3]=(((new_r01*x440))+gconst8+(((-1.0)*new_r11*x443)));
5636 evalcond[4]=((((-1.0)*x445))+x442+new_r11);
5637 evalcond[5]=((((-1.0)*x444))+(((-1.0)*gconst7*x443)));
5645 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
5646 vinfos[0].jointtype = 1;
5647 vinfos[0].foffset = j0;
5648 vinfos[0].indices[0] = _ij0[0];
5649 vinfos[0].indices[1] = _ij0[1];
5650 vinfos[0].maxsolutions = _nj0;
5651 vinfos[1].jointtype = 1;
5652 vinfos[1].foffset = j1;
5653 vinfos[1].indices[0] = _ij1[0];
5654 vinfos[1].indices[1] = _ij1[1];
5655 vinfos[1].maxsolutions = _nj1;
5656 vinfos[2].jointtype = 1;
5657 vinfos[2].foffset = j2;
5658 vinfos[2].indices[0] = _ij2[0];
5659 vinfos[2].indices[1] = _ij2[1];
5660 vinfos[2].maxsolutions = _nj2;
5661 vinfos[3].jointtype = 1;
5662 vinfos[3].foffset = j3;
5663 vinfos[3].indices[0] = _ij3[0];
5664 vinfos[3].indices[1] = _ij3[1];
5665 vinfos[3].maxsolutions = _nj3;
5666 vinfos[4].jointtype = 1;
5667 vinfos[4].foffset = j4;
5668 vinfos[4].indices[0] = _ij4[0];
5669 vinfos[4].indices[1] = _ij4[1];
5670 vinfos[4].maxsolutions = _nj4;
5671 vinfos[5].jointtype = 1;
5672 vinfos[5].foffset = j5;
5673 vinfos[5].indices[0] = _ij5[0];
5674 vinfos[5].indices[1] = _ij5[1];
5675 vinfos[5].maxsolutions = _nj5;
5676 std::vector<int> vfree(0);
5689 IkReal j3array[1], cj3array[1], sj3array[1];
5690 bool j3valid[1]={
false};
5700 j3array[0]=((-1.5707963267949)+(((1.5707963267949)*(x446.
value)))+(x447.
value));
5701 sj3array[0]=
IKsin(j3array[0]);
5702 cj3array[0]=
IKcos(j3array[0]);
5703 if( j3array[0] >
IKPI )
5707 else if( j3array[0] < -
IKPI )
5708 { j3array[0]+=
IK2PI;
5711 for(
int ij3 = 0; ij3 < 1; ++ij3)
5717 _ij3[0] = ij3; _ij3[1] = -1;
5718 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
5722 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
5725 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
5728 IkReal x448=
IKsin(j3);
5729 IkReal x449=
IKcos(j3);
5730 IkReal x450=(gconst7*x448);
5731 IkReal x451=((1.0)*x449);
5732 IkReal x452=(gconst8*x448);
5733 IkReal x453=(gconst8*x451);
5734 evalcond[0]=(((new_r01*x449))+gconst7+((new_r11*x448)));
5735 evalcond[1]=(((gconst7*x449))+x452+new_r01);
5736 evalcond[2]=((((-1.0)*x453))+x450);
5737 evalcond[3]=(((new_r01*x448))+gconst8+(((-1.0)*new_r11*x451)));
5738 evalcond[4]=((((-1.0)*x453))+x450+new_r11);
5739 evalcond[5]=((((-1.0)*x452))+(((-1.0)*gconst7*x451)));
5747 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
5748 vinfos[0].jointtype = 1;
5749 vinfos[0].foffset = j0;
5750 vinfos[0].indices[0] = _ij0[0];
5751 vinfos[0].indices[1] = _ij0[1];
5752 vinfos[0].maxsolutions = _nj0;
5753 vinfos[1].jointtype = 1;
5754 vinfos[1].foffset = j1;
5755 vinfos[1].indices[0] = _ij1[0];
5756 vinfos[1].indices[1] = _ij1[1];
5757 vinfos[1].maxsolutions = _nj1;
5758 vinfos[2].jointtype = 1;
5759 vinfos[2].foffset = j2;
5760 vinfos[2].indices[0] = _ij2[0];
5761 vinfos[2].indices[1] = _ij2[1];
5762 vinfos[2].maxsolutions = _nj2;
5763 vinfos[3].jointtype = 1;
5764 vinfos[3].foffset = j3;
5765 vinfos[3].indices[0] = _ij3[0];
5766 vinfos[3].indices[1] = _ij3[1];
5767 vinfos[3].maxsolutions = _nj3;
5768 vinfos[4].jointtype = 1;
5769 vinfos[4].foffset = j4;
5770 vinfos[4].indices[0] = _ij4[0];
5771 vinfos[4].indices[1] = _ij4[1];
5772 vinfos[4].maxsolutions = _nj4;
5773 vinfos[5].jointtype = 1;
5774 vinfos[5].foffset = j5;
5775 vinfos[5].indices[0] = _ij5[0];
5776 vinfos[5].indices[1] = _ij5[1];
5777 vinfos[5].maxsolutions = _nj5;
5778 std::vector<int> vfree(0);
5790 if( bgotonextstatement )
5792 bool bgotonextstatement =
true;
5795 evalcond[0]=((
IKabs(new_r10))+(
IKabs(new_r01)));
5796 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
5798 bgotonextstatement=
false;
5805 IkReal x454=((-1.0)*(x455.
value));
5814 IkReal gconst6=x454;
5815 IkReal x456 = new_r11*new_r11;
5819 IkReal gconst7=(new_r11*(
pow(x456,-0.5)));
5822 if(
IKabs(j3eval[0]) < 0.0000010000000000 )
5830 IkReal x457=((-1.0)*(x458.
value));
5839 IkReal gconst6=x457;
5840 IkReal x459 = new_r11*new_r11;
5844 IkReal gconst7=(new_r11*(
pow(x459,-0.5)));
5847 if(
IKabs(j3eval[0]) < 0.0000010000000000 )
5850 IkReal j3array[2], cj3array[2], sj3array[2];
5851 bool j3valid[2]={
false};
5857 sj3array[0]=((-1.0)*new_r00*(x460.
value));
5860 j3valid[0] = j3valid[1] =
true;
5861 j3array[0] =
IKasin(sj3array[0]);
5862 cj3array[0] =
IKcos(j3array[0]);
5863 sj3array[1] = sj3array[0];
5864 j3array[1] = j3array[0] > 0 ? (
IKPI-j3array[0]) : (-
IKPI-j3array[0]);
5865 cj3array[1] = -cj3array[0];
5867 else if( isnan(sj3array[0]) )
5871 cj3array[0] = 1; sj3array[0] = 0; j3array[0] = 0;
5873 for(
int ij3 = 0; ij3 < 2; ++ij3)
5879 _ij3[0] = ij3; _ij3[1] = -1;
5880 for(
int iij3 = ij3+1; iij3 < 2; ++iij3)
5884 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
5887 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
5890 IkReal x461=
IKcos(j3);
5891 IkReal x462=
IKsin(j3);
5892 evalcond[0]=(gconst7*x461);
5893 evalcond[1]=(new_r00*x461);
5894 evalcond[2]=((-1.0)*new_r11*x461);
5895 evalcond[3]=(((new_r00*x462))+gconst7);
5896 evalcond[4]=(((new_r11*x462))+gconst7);
5897 evalcond[5]=(((gconst7*x462))+new_r11);
5905 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
5906 vinfos[0].jointtype = 1;
5907 vinfos[0].foffset = j0;
5908 vinfos[0].indices[0] = _ij0[0];
5909 vinfos[0].indices[1] = _ij0[1];
5910 vinfos[0].maxsolutions = _nj0;
5911 vinfos[1].jointtype = 1;
5912 vinfos[1].foffset = j1;
5913 vinfos[1].indices[0] = _ij1[0];
5914 vinfos[1].indices[1] = _ij1[1];
5915 vinfos[1].maxsolutions = _nj1;
5916 vinfos[2].jointtype = 1;
5917 vinfos[2].foffset = j2;
5918 vinfos[2].indices[0] = _ij2[0];
5919 vinfos[2].indices[1] = _ij2[1];
5920 vinfos[2].maxsolutions = _nj2;
5921 vinfos[3].jointtype = 1;
5922 vinfos[3].foffset = j3;
5923 vinfos[3].indices[0] = _ij3[0];
5924 vinfos[3].indices[1] = _ij3[1];
5925 vinfos[3].maxsolutions = _nj3;
5926 vinfos[4].jointtype = 1;
5927 vinfos[4].foffset = j4;
5928 vinfos[4].indices[0] = _ij4[0];
5929 vinfos[4].indices[1] = _ij4[1];
5930 vinfos[4].maxsolutions = _nj4;
5931 vinfos[5].jointtype = 1;
5932 vinfos[5].foffset = j5;
5933 vinfos[5].indices[0] = _ij5[0];
5934 vinfos[5].indices[1] = _ij5[1];
5935 vinfos[5].maxsolutions = _nj5;
5936 std::vector<int> vfree(0);
5945 IkReal j3array[2], cj3array[2], sj3array[2];
5946 bool j3valid[2]={
false};
5952 sj3array[0]=((-1.0)*gconst7*(x463.
value));
5955 j3valid[0] = j3valid[1] =
true;
5956 j3array[0] =
IKasin(sj3array[0]);
5957 cj3array[0] =
IKcos(j3array[0]);
5958 sj3array[1] = sj3array[0];
5959 j3array[1] = j3array[0] > 0 ? (
IKPI-j3array[0]) : (-
IKPI-j3array[0]);
5960 cj3array[1] = -cj3array[0];
5962 else if( isnan(sj3array[0]) )
5966 cj3array[0] = 1; sj3array[0] = 0; j3array[0] = 0;
5968 for(
int ij3 = 0; ij3 < 2; ++ij3)
5974 _ij3[0] = ij3; _ij3[1] = -1;
5975 for(
int iij3 = ij3+1; iij3 < 2; ++iij3)
5979 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
5982 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
5985 IkReal x464=
IKcos(j3);
5986 IkReal x465=
IKsin(j3);
5987 IkReal x466=(gconst7*x465);
5988 evalcond[0]=(gconst7*x464);
5989 evalcond[1]=(new_r00*x464);
5990 evalcond[2]=((-1.0)*new_r11*x464);
5991 evalcond[3]=(((new_r00*x465))+gconst7);
5992 evalcond[4]=(x466+new_r00);
5993 evalcond[5]=(x466+new_r11);
6001 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
6002 vinfos[0].jointtype = 1;
6003 vinfos[0].foffset = j0;
6004 vinfos[0].indices[0] = _ij0[0];
6005 vinfos[0].indices[1] = _ij0[1];
6006 vinfos[0].maxsolutions = _nj0;
6007 vinfos[1].jointtype = 1;
6008 vinfos[1].foffset = j1;
6009 vinfos[1].indices[0] = _ij1[0];
6010 vinfos[1].indices[1] = _ij1[1];
6011 vinfos[1].maxsolutions = _nj1;
6012 vinfos[2].jointtype = 1;
6013 vinfos[2].foffset = j2;
6014 vinfos[2].indices[0] = _ij2[0];
6015 vinfos[2].indices[1] = _ij2[1];
6016 vinfos[2].maxsolutions = _nj2;
6017 vinfos[3].jointtype = 1;
6018 vinfos[3].foffset = j3;
6019 vinfos[3].indices[0] = _ij3[0];
6020 vinfos[3].indices[1] = _ij3[1];
6021 vinfos[3].maxsolutions = _nj3;
6022 vinfos[4].jointtype = 1;
6023 vinfos[4].foffset = j4;
6024 vinfos[4].indices[0] = _ij4[0];
6025 vinfos[4].indices[1] = _ij4[1];
6026 vinfos[4].maxsolutions = _nj4;
6027 vinfos[5].jointtype = 1;
6028 vinfos[5].foffset = j5;
6029 vinfos[5].indices[0] = _ij5[0];
6030 vinfos[5].indices[1] = _ij5[1];
6031 vinfos[5].maxsolutions = _nj5;
6032 std::vector<int> vfree(0);
6045 IkReal j3array[2], cj3array[2], sj3array[2];
6046 bool j3valid[2]={
false};
6052 sj3array[0]=((-1.0)*gconst7*(x467.
value));
6055 j3valid[0] = j3valid[1] =
true;
6056 j3array[0] =
IKasin(sj3array[0]);
6057 cj3array[0] =
IKcos(j3array[0]);
6058 sj3array[1] = sj3array[0];
6059 j3array[1] = j3array[0] > 0 ? (
IKPI-j3array[0]) : (-
IKPI-j3array[0]);
6060 cj3array[1] = -cj3array[0];
6062 else if( isnan(sj3array[0]) )
6066 cj3array[0] = 1; sj3array[0] = 0; j3array[0] = 0;
6068 for(
int ij3 = 0; ij3 < 2; ++ij3)
6074 _ij3[0] = ij3; _ij3[1] = -1;
6075 for(
int iij3 = ij3+1; iij3 < 2; ++iij3)
6079 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
6082 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
6085 IkReal x468=
IKcos(j3);
6086 IkReal x469=
IKsin(j3);
6087 IkReal x470=(gconst7*x469);
6088 evalcond[0]=(gconst7*x468);
6089 evalcond[1]=(new_r00*x468);
6090 evalcond[2]=((-1.0)*new_r11*x468);
6091 evalcond[3]=(((new_r11*x469))+gconst7);
6092 evalcond[4]=(x470+new_r00);
6093 evalcond[5]=(x470+new_r11);
6101 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
6102 vinfos[0].jointtype = 1;
6103 vinfos[0].foffset = j0;
6104 vinfos[0].indices[0] = _ij0[0];
6105 vinfos[0].indices[1] = _ij0[1];
6106 vinfos[0].maxsolutions = _nj0;
6107 vinfos[1].jointtype = 1;
6108 vinfos[1].foffset = j1;
6109 vinfos[1].indices[0] = _ij1[0];
6110 vinfos[1].indices[1] = _ij1[1];
6111 vinfos[1].maxsolutions = _nj1;
6112 vinfos[2].jointtype = 1;
6113 vinfos[2].foffset = j2;
6114 vinfos[2].indices[0] = _ij2[0];
6115 vinfos[2].indices[1] = _ij2[1];
6116 vinfos[2].maxsolutions = _nj2;
6117 vinfos[3].jointtype = 1;
6118 vinfos[3].foffset = j3;
6119 vinfos[3].indices[0] = _ij3[0];
6120 vinfos[3].indices[1] = _ij3[1];
6121 vinfos[3].maxsolutions = _nj3;
6122 vinfos[4].jointtype = 1;
6123 vinfos[4].foffset = j4;
6124 vinfos[4].indices[0] = _ij4[0];
6125 vinfos[4].indices[1] = _ij4[1];
6126 vinfos[4].maxsolutions = _nj4;
6127 vinfos[5].jointtype = 1;
6128 vinfos[5].foffset = j5;
6129 vinfos[5].indices[0] = _ij5[0];
6130 vinfos[5].indices[1] = _ij5[1];
6131 vinfos[5].maxsolutions = _nj5;
6132 std::vector<int> vfree(0);
6144 if( bgotonextstatement )
6146 bool bgotonextstatement =
true;
6149 evalcond[0]=
IKabs(new_r11);
6150 if(
IKabs(evalcond[0]) < 0.0000050000000000 )
6152 bgotonextstatement=
false;
6155 IkReal x471=((-1.0)*new_r01);
6160 IkReal x472=((-1.0)*(x473.
value));
6168 IkReal gconst6=x472;
6170 IkReal x474 = new_r01*new_r01;
6174 IkReal gconst8=(x471*(
pow(x474,-0.5)));
6175 j3eval[0]=((
IKabs(new_r10))+(
IKabs(new_r00)));
6176 if(
IKabs(j3eval[0]) < 0.0000010000000000 )
6180 IkReal x475=((-1.0)*new_r01);
6185 IkReal x476=((-1.0)*(x477.
value));
6193 IkReal gconst6=x476;
6195 IkReal x478 = new_r01*new_r01;
6199 IkReal gconst8=(x475*(
pow(x478,-0.5)));
6200 j3eval[0]=((
IKabs(new_r00))+(
IKabs(new_r01)));
6201 if(
IKabs(j3eval[0]) < 0.0000010000000000 )