25 #ifndef IKFAST_HAS_LIBRARY
26 #define IKFAST_NO_MAIN
32 #define IKFAST_COMPILE_ASSERT(x) extern int __dummy[(int)x]
47 #ifndef __PRETTY_FUNCTION__
48 #define __PRETTY_FUNCTION__ __FUNCDNAME__
52 #ifndef __PRETTY_FUNCTION__
53 #define __PRETTY_FUNCTION__ __func__
56 #define IKFAST_ASSERT(b) \
60 std::stringstream ss; \
61 ss << "ikfast exception: " << __FILE__ << ":" << __LINE__ << ": " << __PRETTY_FUNCTION__ << ": Assertion '" \
62 << #b << "' failed"; \
63 throw std::runtime_error(ss.str()); \
70 #define IKFAST_ALIGNED16(x) __declspec(align(16)) x
72 #define IKFAST_ALIGNED16(x) x __attribute((aligned(16)))
75 #define IK2PI ((IkReal)6.28318530717959)
76 #define IKPI ((IkReal)3.14159265358979)
77 #define IKPI_2 ((IkReal)1.57079632679490)
93 void dgetrf_(
const int* m,
const int* n,
double* a,
const int* lda,
int* ipiv,
int* info);
94 void zgetrf_(
const int* m,
const int* n, std::complex<double>* a,
const int* lda,
int* ipiv,
int* info);
95 void dgetri_(
const int* n,
const double* a,
const int* lda,
int* ipiv,
double* work,
const int* lwork,
int* info);
96 void dgesv_(
const int* n,
const int* nrhs,
double* a,
const int* lda,
int* ipiv,
double* b,
const int* ldb,
int* info);
106 void dgeev_(
const char* jobvl,
124 #ifdef IKFAST_NAMESPACE
125 namespace IKFAST_NAMESPACE
129 inline float IKabs(
float f) {
return fabsf(f); }
130 inline double IKabs(
double f) {
return fabs(f); }
132 inline float IKsqr(
float f) {
return f * f; }
133 inline double IKsqr(
double f) {
return f * f; }
135 inline float IKlog(
float f) {
return logf(f); }
136 inline double IKlog(
double f) {
return log(f); }
139 #ifndef IKFAST_SINCOS_THRESH
140 #define IKFAST_SINCOS_THRESH ((IkReal)1e-7)
145 #ifndef IKFAST_ATAN2_MAGTHRESH
146 #define IKFAST_ATAN2_MAGTHRESH ((IkReal)1e-7)
150 #ifndef IKFAST_SOLUTION_THRESH
151 #define IKFAST_SOLUTION_THRESH ((IkReal)1e-6)
156 #ifndef IKFAST_EVALCOND_THRESH
157 #define IKFAST_EVALCOND_THRESH ((IkReal)0.00001)
221 inline float IKsin(
float f) {
return sinf(f); }
222 inline double IKsin(
double f) {
return sin(f); }
223 inline float IKcos(
float f) {
return cosf(f); }
224 inline double IKcos(
double f) {
return cos(f); }
225 inline float IKtan(
float f) {
return tanf(f); }
226 inline double IKtan(
double f) {
return tan(f); }
251 return atan2f(fy, fx);
265 return atan2(fy, fx);
268 template <
typename T>
275 template <
typename T>
281 if (!isnan(fy) && !isnan(fx))
318 template <
typename T>
338 ret.
value = (T)1.0e30;
343 ret.
value = T(1.0) / f;
348 int num = n > 0 ? n : -n;
355 ret.
value = f * f * f;
380 IKFAST_API
void ComputeFk(
const IkReal* j, IkReal* eetrans, IkReal* eerot)
382 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,
383 x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46,
384 x47, x48, x49, x50, x51, x52, x53, x54, x55, x56, x57, x58, x59, x60, x61, x62, x63, x64, x65, x66, x67, x68;
400 x15 = ((0.15085) * x5);
407 x22 = ((0.15085) * x7);
408 x23 = ((0.15085) * x8);
412 x27 = ((0.15085) * x9);
428 x43 = ((((-1.0) * x40)) + ((x0 * x36)));
429 x44 = (x29 + ((x1 * x33)));
430 x45 = (((x1 * x5)) + ((x2 * x35)));
431 x46 = (x40 + (((-1.0) * x21 * x37)));
432 x47 = ((((-1.0) * x37)) + ((x1 * x40)));
433 x48 = ((((-1.0) * x1 * x18)) + x41);
434 x49 = (((x0 * x1 * x19)) + (((1.0) * x33)));
435 x50 = ((((-1.0) * x0 * x19)) + (((-1.0) * x21 * x33)));
442 x57 = (x52 + ((x28 * x7)));
443 x58 = (((x3 * x35)) + ((x44 * x5)));
444 x59 = (((x46 * x7)) + ((x28 * x5)));
445 x60 = ((((-1.0) * x42)) + x53);
446 x61 = (((x26 * (((((-1.0) * x1 * x7)) + x41)))) + ((x17 * x4 * x6)));
447 x62 = ((((-1.0) * x18 * x28)) + (((-1.0) * x16 * x43)));
448 x63 = (((x3 * x31)) + x56);
449 x64 = ((((-1.0) * x18 * x39)) + (((-1.0) * x16 * x44)));
453 x68 = (x54 + ((x64 * x8)));
456 (((((1.0) * x65)) + (((1.0) * x13 * ((((x8 * (((((-1.0) * x28 * x7)) + (((-1.0) * x52)))))) + x55)))))))) +
457 ((x11 * (((((-1.0) * x17 * x49)) + (((-1.0) * x26 * x57)))))));
458 eerot[1] = (((x11 * ((((x13 * ((x55 + x66)))) + x65)))) + ((x10 * ((((x34 * x49)) + ((x30 * x57)))))));
459 eerot[2] = (((x13 * x59)) + ((x12 * (((((-1.0) * x17 * x62)) + (((-1.0) * x26 * x49)))))));
460 eetrans[0] = (((x7 * (((((-1.0) * x0 * x1 * x25)) + ((x14 * x4)))))) + ((x13 * ((((x22 * x46)) + ((x15 * x28)))))) +
461 (((0.4) * x28)) + ((x12 * (((((-1.0) * x27 * x49)) + (((-1.0) * x23 * x62)))))) + ((x24 * x28)));
462 eerot[3] = (((x10 * (((((-1.0) * x20 * x68)) + (((-1.0) * x67)))))) + ((x11 * ((((x34 * x47)) + ((x30 * x58)))))));
463 eerot[4] = (((x10 * (((((-1.0) * x17 * x47)) + (((-1.0) * x26 * x58)))))) + ((x11 * ((((x13 * x68)) + x67)))));
464 eerot[5] = (((x13 * x63)) + ((x12 * (((((-1.0) * x17 * x64)) + (((-1.0) * x26 * x47)))))));
465 eetrans[1] = (((x13 * ((((x15 * x39)) + ((x22 * x50)))))) + ((x7 * (((((-1.0) * x14 * x36)) + (((-0.4) * x29)))))) +
466 ((x14 * x6)) + ((x14 * x31)) + ((x12 * (((((-1.0) * x27 * x47)) + (((-1.0) * x23 * x64)))))));
467 eerot[6] = (((x11 * x61)) + ((x10 * (((((-1.0) * x20 * x60)) + (((-1.0) * x51)))))));
468 eerot[7] = (((x11 * ((((x13 * x60)) + x51)))) + ((x10 * x61)));
469 eerot[8] = (((x12 * (((((-1.0) * x17 * x48)) + x42)))) + ((x13 * x45)));
470 eetrans[2] = ((0.34) + ((x1 * x24)) + (((0.4) * x1)) + ((x12 * ((((x27 * x4 * x6)) + (((-1.0) * x23 * x48)))))) +
471 ((x13 * ((((x1 * x15)) + ((x22 * x38)))))) + ((x25 * x35)));
477 static int freeparams[] = { 4 };
489 IkReal j0, cj0, sj0, htj0, j0mul, j1, cj1, sj1, htj1, j1mul, j2, cj2, sj2, htj2, j2mul, j3, cj3, sj3, htj3, j3mul, j5,
490 cj5, sj5, htj5, j5mul, j6, cj6, sj6, htj6, j6mul, j4, cj4, sj4, htj4, new_r00, r00, rxp0_0, new_r01, r01, rxp0_1,
491 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,
492 new_r21, r21, rxp2_1, new_r22, r22, rxp2_2, new_px, px, npx, new_py, py, npy, new_pz, pz, npz, pp;
493 unsigned char _ij0[2], _nj0, _ij1[2], _nj1, _ij2[2], _nj2, _ij3[2], _nj3, _ij5[2], _nj5, _ij6[2], _nj6, _ij4[2], _nj4;
495 IkReal j100, cj100, sj100;
496 unsigned char _ij100[2], _nj100;
499 j0 = numeric_limits<IkReal>::quiet_NaN();
503 j1 = numeric_limits<IkReal>::quiet_NaN();
507 j2 = numeric_limits<IkReal>::quiet_NaN();
511 j3 = numeric_limits<IkReal>::quiet_NaN();
515 j5 = numeric_limits<IkReal>::quiet_NaN();
519 j6 = numeric_limits<IkReal>::quiet_NaN();
526 for (
int dummyiter = 0; dummyiter < 1; ++dummyiter)
531 sj4 = sin(pfree[0]), htj4 = tan(pfree[0] * 0.5);
532 r00 = eerot[0 * 3 + 0];
533 r01 = eerot[0 * 3 + 1];
534 r02 = eerot[0 * 3 + 2];
535 r10 = eerot[1 * 3 + 0];
536 r11 = eerot[1 * 3 + 1];
537 r12 = eerot[1 * 3 + 2];
538 r20 = eerot[2 * 3 + 0];
539 r21 = eerot[2 * 3 + 1];
540 r22 = eerot[2 * 3 + 2];
545 new_r00 = ((-1.0) * r00);
546 new_r01 = ((-1.0) * r01);
548 new_px = (px + (((-0.15085) * r02)));
549 new_r10 = ((-1.0) * r10);
550 new_r11 = ((-1.0) * r11);
552 new_py = (py + (((-0.15085) * r12)));
553 new_r20 = ((-1.0) * r20);
554 new_r21 = ((-1.0) * r21);
556 new_pz = ((-0.34) + pz + (((-0.15085) * r22)));
569 IkReal x69 = ((1.0) * px);
570 IkReal x70 = ((1.0) * pz);
571 IkReal x71 = ((1.0) * py);
572 pp = ((px * px) + (py * py) + (pz * pz));
573 npx = (((px * r00)) + ((py * r10)) + ((pz * r20)));
574 npy = (((px * r01)) + ((py * r11)) + ((pz * r21)));
575 npz = (((px * r02)) + ((py * r12)) + ((pz * r22)));
576 rxp0_0 = ((((-1.0) * r20 * x71)) + ((pz * r10)));
577 rxp0_1 = (((px * r20)) + (((-1.0) * r00 * x70)));
578 rxp0_2 = ((((-1.0) * r10 * x69)) + ((py * r00)));
579 rxp1_0 = ((((-1.0) * r21 * x71)) + ((pz * r11)));
580 rxp1_1 = (((px * r21)) + (((-1.0) * r01 * x70)));
581 rxp1_2 = ((((-1.0) * r11 * x69)) + ((py * r01)));
582 rxp2_0 = ((((-1.0) * r22 * x71)) + ((pz * r12)));
583 rxp2_1 = (((px * r22)) + (((-1.0) * r02 * x70)));
584 rxp2_2 = ((((-1.0) * r12 * x69)) + ((py * r02)));
586 IkReal j3array[2], cj3array[2], sj3array[2];
587 bool j3valid[2] = {
false };
589 cj3array[0] = ((-1.0) + (((3.125) * pp)));
592 j3valid[0] = j3valid[1] =
true;
593 j3array[0] =
IKacos(cj3array[0]);
594 sj3array[0] =
IKsin(j3array[0]);
595 cj3array[1] = cj3array[0];
596 j3array[1] = -j3array[0];
597 sj3array[1] = -sj3array[0];
599 else if (isnan(cj3array[0]))
607 for (
int ij3 = 0; ij3 < 2; ++ij3)
615 for (
int iij3 = ij3 + 1; iij3 < 2; ++iij3)
620 j3valid[iij3] =
false;
632 j6eval[1] = ((npx * npx) + (npy * npy));
633 if (
IKabs(j6eval[0]) < 0.0000010000000000 ||
IKabs(j6eval[1]) < 0.0000010000000000)
637 j5eval[0] = ((1.0) + (cj3 * cj3) + (((2.0) * cj3)) + (((cj4 * cj4) * (sj3 * sj3))));
638 j5eval[1] = ((((2.5) * (
IKabs(((0.4) + (((0.4) * cj3))))))) + (
IKabs((cj4 * sj3))));
639 if (
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000)
643 bool bgotonextstatement =
true;
647 ((-3.14159265358979) +
648 (
IKfmod(((3.14159265358979) + (
IKabs(((-3.14159265358979) + j3)))), 6.28318530717959)));
650 if (
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000)
652 bgotonextstatement =
false;
657 j3 = 3.14159265358979;
659 if (
IKabs(j6eval[0]) < 0.0000010000000000)
666 IkReal j6array[2], cj6array[2], sj6array[2];
667 bool j6valid[2] = {
false };
675 IkReal x72 = x73.
value;
676 j6array[0] = ((-1.0) * x72);
677 sj6array[0] =
IKsin(j6array[0]);
678 cj6array[0] =
IKcos(j6array[0]);
679 j6array[1] = ((3.14159265358979) + (((-1.0) * x72)));
680 sj6array[1] =
IKsin(j6array[1]);
681 cj6array[1] =
IKcos(j6array[1]);
682 if (j6array[0] >
IKPI)
686 else if (j6array[0] < -
IKPI)
691 if (j6array[1] >
IKPI)
695 else if (j6array[1] < -
IKPI)
700 for (
int ij6 = 0; ij6 < 2; ++ij6)
708 for (
int iij6 = ij6 + 1; iij6 < 2; ++iij6)
713 j6valid[iij6] =
false;
723 evalcond[0] = ((((-1.0) * npy * (
IKcos(j6)))) + (((-1.0) * npx * (
IKsin(j6)))));
734 j3 = 3.14159265358979;
735 j5eval[0] =
IKabs((((cj6 * npx)) + (((-1.0) * npy * sj6))));
736 if (
IKabs(j5eval[0]) < 0.0000000100000000)
742 IkReal op[2 + 1], zeror[2];
744 IkReal x74 = (npy * sj6);
745 IkReal x75 = (cj6 * npx);
746 op[0] = (x75 + (((-1.0) * x74)));
748 op[2] = (x74 + (((-1.0) * x75)));
749 polyroots2(op, zeror, numroots);
750 IkReal j5array[2], cj5array[2], sj5array[2], tempj5array[1];
751 int numsolutions = 0;
752 for (
int ij5 = 0; ij5 < numroots; ++ij5)
754 IkReal htj5 = zeror[ij5];
755 tempj5array[0] = ((2.0) * (atan(htj5)));
756 for (
int kj5 = 0; kj5 < 1; ++kj5)
758 j5array[numsolutions] = tempj5array[kj5];
759 if (j5array[numsolutions] >
IKPI)
761 j5array[numsolutions] -=
IK2PI;
763 else if (j5array[numsolutions] < -
IKPI)
765 j5array[numsolutions] +=
IK2PI;
767 sj5array[numsolutions] =
IKsin(j5array[numsolutions]);
768 cj5array[numsolutions] =
IKcos(j5array[numsolutions]);
772 bool j5valid[2] = {
true,
true };
774 for (
int ij5 = 0; ij5 < numsolutions; ++ij5)
783 htj5 =
IKtan(j5 / 2);
787 for (
int iij5 = ij5 + 1; iij5 < numsolutions; ++iij5)
793 j5valid[iij5] =
false;
798 rotationfunction0(solutions);
808 if (bgotonextstatement)
810 bool bgotonextstatement =
true;
815 bgotonextstatement =
false;
819 if (bgotonextstatement)
828 IkReal j5array[2], cj5array[2], sj5array[2];
829 bool j5valid[2] = {
false };
831 IkReal x1007 = ((0.4) + (((0.4) * cj3)));
838 IkReal x1008 = ((1.0) * (x1010.
value));
839 if ((((((0.16) * (cj4 * cj4) * (sj3 * sj3))) + (x1007 * x1007))) < -0.00001)
842 IKabs(
IKsqrt(((((0.16) * (cj4 * cj4) * (sj3 * sj3))) + (x1007 * x1007)))), -1);
851 j5array[0] = (x1009 + (((-1.0) * x1008)));
852 sj5array[0] =
IKsin(j5array[0]);
853 cj5array[0] =
IKcos(j5array[0]);
854 j5array[1] = ((3.14159265358979) + (((-1.0) * x1009)) + (((-1.0) * x1008)));
855 sj5array[1] =
IKsin(j5array[1]);
856 cj5array[1] =
IKcos(j5array[1]);
857 if (j5array[0] >
IKPI)
861 else if (j5array[0] < -
IKPI)
866 if (j5array[1] >
IKPI)
870 else if (j5array[1] < -
IKPI)
875 for (
int ij5 = 0; ij5 < 2; ++ij5)
883 for (
int iij5 = ij5 + 1; iij5 < 2; ++iij5)
888 j5valid[iij5] =
false;
899 IkReal x1012 = npy * npy;
900 IkReal x1013 = npx * npx;
901 IkReal x1014 = (cj5 * sj4);
902 IkReal x1015 = (cj5 * x1013);
903 IkReal x1016 = (cj5 * x1012);
904 IkReal x1017 = ((5.0) * npz * sj5);
905 IkReal x1018 = ((2.0) * npy * sj3);
906 IkReal x1019 = ((2.0) * npx * sj3);
907 j6eval[0] = (x1015 + x1016);
908 j6eval[1] = ((
IKabs((((x1014 * x1019)) + ((cj4 * x1018)) + (((-1.0) * npy * x1017))))) +
909 (
IKabs((((x1014 * x1018)) + (((-1.0) * cj4 * x1019)) + ((npx * x1017))))));
910 j6eval[2] =
IKsign(((((5.0) * x1016)) + (((5.0) * x1015))));
911 if (
IKabs(j6eval[0]) < 0.0000010000000000 ||
IKabs(j6eval[1]) < 0.0000010000000000 ||
912 IKabs(j6eval[2]) < 0.0000010000000000)
916 IkReal x1020 = npy * npy;
917 IkReal x1021 = npx * npx;
918 IkReal x1022 = ((2.0) * cj3);
919 IkReal x1023 = ((5.0) * sj5);
920 IkReal x1024 = ((2.0) * npx);
921 IkReal x1025 = ((2.0) * npy);
922 IkReal x1026 = ((5.0) * cj5 * npz);
923 IkReal x1027 = (sj3 * sj4 * sj5);
924 j6eval[0] = (((sj5 * x1021)) + ((sj5 * x1020)));
925 j6eval[1] =
IKsign((((x1021 * x1023)) + ((x1020 * x1023))));
927 ((
IKabs((x1024 + ((npx * x1022)) + (((-1.0) * npx * x1026)) + ((x1025 * x1027))))) +
928 (
IKabs((((npy * x1026)) + (((-1.0) * x1025)) + (((-1.0) * npy * x1022)) +
929 ((x1024 * x1027))))));
930 if (
IKabs(j6eval[0]) < 0.0000010000000000 ||
IKabs(j6eval[1]) < 0.0000010000000000 ||
931 IKabs(j6eval[2]) < 0.0000010000000000)
935 IkReal x1028 = npx * npx;
936 IkReal x1029 = npy * npy;
937 IkReal x1030 = ((2.0) * sj5);
938 IkReal x1031 = ((2.0) * sj3);
939 IkReal x1032 = (cj4 * cj5);
940 j6eval[0] = (x1029 + x1028);
941 j6eval[1] = ((
IKabs(((((-1.0) * npx * x1031 * x1032)) + ((npy * sj4 * x1031)) +
942 ((npx * x1030)) + ((cj3 * npx * x1030))))) +
943 (
IKabs((((npx * sj4 * x1031)) + ((npy * x1031 * x1032)) +
944 (((-1.0) * cj3 * npy * x1030)) + (((-1.0) * npy * x1030))))));
945 j6eval[2] =
IKsign(((((5.0) * x1028)) + (((5.0) * x1029))));
946 if (
IKabs(j6eval[0]) < 0.0000010000000000 ||
IKabs(j6eval[1]) < 0.0000010000000000 ||
947 IKabs(j6eval[2]) < 0.0000010000000000)
951 bool bgotonextstatement =
true;
954 evalcond[0] = ((-3.14159265358979) +
955 (
IKfmod(((3.14159265358979) + (
IKabs(((-3.14159265358979) + j3)))),
958 if (
IKabs(evalcond[0]) < 0.0000050000000000 &&
959 IKabs(evalcond[1]) < 0.0000050000000000)
961 bgotonextstatement =
false;
966 j3 = 3.14159265358979;
968 if (
IKabs(j6eval[0]) < 0.0000010000000000)
974 j3 = 3.14159265358979;
975 j6eval[0] = ((
IKabs((npx * sj5))) + (
IKabs((npy * sj5))));
976 if (
IKabs(j6eval[0]) < 0.0000010000000000)
982 j3 = 3.14159265358979;
983 j6eval[0] = ((
IKabs((cj5 * npx))) + (
IKabs((cj5 * npy))));
984 if (
IKabs(j6eval[0]) < 0.0000010000000000)
988 bool bgotonextstatement =
true;
991 evalcond[0] = ((-3.14159265358979) +
992 (
IKfmod(((3.14159265358979) +
993 (
IKabs(((-1.5707963267949) + j5)))),
995 if (
IKabs(evalcond[0]) < 0.0000050000000000)
997 bgotonextstatement =
false;
1002 j3 = 3.14159265358979;
1005 j5 = 1.5707963267949;
1007 if (
IKabs(j6eval[0]) < 0.0000010000000000)
1014 IkReal j6array[2], cj6array[2], sj6array[2];
1015 bool j6valid[2] = {
false };
1025 IkReal x1033 = x1034.
value;
1026 j6array[0] = ((-1.0) * x1033);
1027 sj6array[0] =
IKsin(j6array[0]);
1028 cj6array[0] =
IKcos(j6array[0]);
1029 j6array[1] = ((3.14159265358979) + (((-1.0) * x1033)));
1030 sj6array[1] =
IKsin(j6array[1]);
1031 cj6array[1] =
IKcos(j6array[1]);
1032 if (j6array[0] >
IKPI)
1034 j6array[0] -=
IK2PI;
1036 else if (j6array[0] < -
IKPI)
1038 j6array[0] +=
IK2PI;
1041 if (j6array[1] >
IKPI)
1043 j6array[1] -=
IK2PI;
1045 else if (j6array[1] < -
IKPI)
1047 j6array[1] +=
IK2PI;
1050 for (
int ij6 = 0; ij6 < 2; ++ij6)
1058 for (
int iij6 = ij6 + 1; iij6 < 2; ++iij6)
1060 if (j6valid[iij6] &&
1061 IKabs(cj6array[ij6] - cj6array[iij6]) <
1063 IKabs(sj6array[ij6] - sj6array[iij6]) <
1066 j6valid[iij6] =
false;
1072 cj6 = cj6array[ij6];
1073 sj6 = sj6array[ij6];
1076 evalcond[0] = ((((-1.0) * npy * (
IKcos(j6)))) +
1077 (((-1.0) * npx * (
IKsin(j6)))));
1084 rotationfunction0(solutions);
1091 if (bgotonextstatement)
1093 bool bgotonextstatement =
true;
1096 evalcond[0] = ((-3.14159265358979) +
1097 (
IKfmod(((3.14159265358979) +
1098 (
IKabs(((1.5707963267949) + j5)))),
1099 6.28318530717959)));
1100 if (
IKabs(evalcond[0]) < 0.0000050000000000)
1102 bgotonextstatement =
false;
1107 j3 = 3.14159265358979;
1110 j5 = -1.5707963267949;
1112 if (
IKabs(j6eval[0]) < 0.0000010000000000)
1119 IkReal j6array[2], cj6array[2], sj6array[2];
1120 bool j6valid[2] = {
false };
1124 IkReal(((-1.0) * npy)),
1130 IkReal x1035 = x1036.
value;
1131 j6array[0] = ((-1.0) * x1035);
1132 sj6array[0] =
IKsin(j6array[0]);
1133 cj6array[0] =
IKcos(j6array[0]);
1135 ((3.14159265358979) + (((-1.0) * x1035)));
1136 sj6array[1] =
IKsin(j6array[1]);
1137 cj6array[1] =
IKcos(j6array[1]);
1138 if (j6array[0] >
IKPI)
1140 j6array[0] -=
IK2PI;
1142 else if (j6array[0] < -
IKPI)
1144 j6array[0] +=
IK2PI;
1147 if (j6array[1] >
IKPI)
1149 j6array[1] -=
IK2PI;
1151 else if (j6array[1] < -
IKPI)
1153 j6array[1] +=
IK2PI;
1156 for (
int ij6 = 0; ij6 < 2; ++ij6)
1164 for (
int iij6 = ij6 + 1; iij6 < 2; ++iij6)
1166 if (j6valid[iij6] &&
1167 IKabs(cj6array[ij6] - cj6array[iij6]) <
1169 IKabs(sj6array[ij6] - sj6array[iij6]) <
1172 j6valid[iij6] =
false;
1178 cj6 = cj6array[ij6];
1179 sj6 = sj6array[ij6];
1182 evalcond[0] = ((((-1.0) * npy * (
IKcos(j6)))) +
1183 (((-1.0) * npx * (
IKsin(j6)))));
1190 rotationfunction0(solutions);
1197 if (bgotonextstatement)
1199 bool bgotonextstatement =
true;
1202 evalcond[0] = ((-3.14159265358979) +
1204 6.28318530717959)));
1205 if (
IKabs(evalcond[0]) < 0.0000050000000000)
1207 bgotonextstatement =
false;
1212 j3 = 3.14159265358979;
1217 if (
IKabs(j6eval[0]) < 0.0000010000000000)
1224 IkReal j6array[2], cj6array[2], sj6array[2];
1225 bool j6valid[2] = {
false };
1235 IkReal x1037 = x1038.
value;
1236 j6array[0] = ((-1.0) * x1037);
1237 sj6array[0] =
IKsin(j6array[0]);
1238 cj6array[0] =
IKcos(j6array[0]);
1240 ((3.14159265358979) + (((-1.0) * x1037)));
1241 sj6array[1] =
IKsin(j6array[1]);
1242 cj6array[1] =
IKcos(j6array[1]);
1243 if (j6array[0] >
IKPI)
1245 j6array[0] -=
IK2PI;
1247 else if (j6array[0] < -
IKPI)
1249 j6array[0] +=
IK2PI;
1252 if (j6array[1] >
IKPI)
1254 j6array[1] -=
IK2PI;
1256 else if (j6array[1] < -
IKPI)
1258 j6array[1] +=
IK2PI;
1261 for (
int ij6 = 0; ij6 < 2; ++ij6)
1269 for (
int iij6 = ij6 + 1; iij6 < 2; ++iij6)
1271 if (j6valid[iij6] &&
1272 IKabs(cj6array[ij6] - cj6array[iij6]) <
1274 IKabs(sj6array[ij6] - sj6array[iij6]) <
1277 j6valid[iij6] =
false;
1283 cj6 = cj6array[ij6];
1284 sj6 = sj6array[ij6];
1287 evalcond[0] = ((((-1.0) * npy * (
IKcos(j6)))) +
1288 (((-1.0) * npx * (
IKsin(j6)))));
1295 rotationfunction0(solutions);
1302 if (bgotonextstatement)
1304 bool bgotonextstatement =
true;
1308 ((-3.14159265358979) +
1309 (
IKfmod(((3.14159265358979) +
1310 (
IKabs(((-3.14159265358979) + j5)))),
1311 6.28318530717959)));
1312 if (
IKabs(evalcond[0]) < 0.0000050000000000)
1314 bgotonextstatement =
false;
1319 j3 = 3.14159265358979;
1322 j5 = 3.14159265358979;
1324 if (
IKabs(j6eval[0]) < 0.0000010000000000)
1331 IkReal j6array[2], cj6array[2], sj6array[2];
1332 bool j6valid[2] = {
false };
1336 IkReal(((-1.0) * npy)),
1342 IkReal x1039 = x1040.
value;
1343 j6array[0] = ((-1.0) * x1039);
1344 sj6array[0] =
IKsin(j6array[0]);
1345 cj6array[0] =
IKcos(j6array[0]);
1347 ((3.14159265358979) + (((-1.0) * x1039)));
1348 sj6array[1] =
IKsin(j6array[1]);
1349 cj6array[1] =
IKcos(j6array[1]);
1350 if (j6array[0] >
IKPI)
1352 j6array[0] -=
IK2PI;
1354 else if (j6array[0] < -
IKPI)
1356 j6array[0] +=
IK2PI;
1359 if (j6array[1] >
IKPI)
1361 j6array[1] -=
IK2PI;
1363 else if (j6array[1] < -
IKPI)
1365 j6array[1] +=
IK2PI;
1368 for (
int ij6 = 0; ij6 < 2; ++ij6)
1376 for (
int iij6 = ij6 + 1; iij6 < 2; ++iij6)
1378 if (j6valid[iij6] &&
1379 IKabs(cj6array[ij6] - cj6array[iij6]) <
1381 IKabs(sj6array[ij6] - sj6array[iij6]) <
1384 j6valid[iij6] =
false;
1390 cj6 = cj6array[ij6];
1391 sj6 = sj6array[ij6];
1395 ((((-1.0) * npy * (
IKcos(j6)))) +
1396 (((-1.0) * npx * (
IKsin(j6)))));
1397 if (
IKabs(evalcond[0]) >
1404 rotationfunction0(solutions);
1411 if (bgotonextstatement)
1413 bool bgotonextstatement =
true;
1418 bgotonextstatement =
false;
1422 if (bgotonextstatement)
1434 IkReal j6array[2], cj6array[2], sj6array[2];
1435 bool j6valid[2] = {
false };
1439 IkReal((cj5 * npy)),
1445 IkReal x1041 = x1042.
value;
1446 j6array[0] = ((-1.0) * x1041);
1447 sj6array[0] =
IKsin(j6array[0]);
1448 cj6array[0] =
IKcos(j6array[0]);
1449 j6array[1] = ((3.14159265358979) + (((-1.0) * x1041)));
1450 sj6array[1] =
IKsin(j6array[1]);
1451 cj6array[1] =
IKcos(j6array[1]);
1452 if (j6array[0] >
IKPI)
1454 j6array[0] -=
IK2PI;
1456 else if (j6array[0] < -
IKPI)
1458 j6array[0] +=
IK2PI;
1461 if (j6array[1] >
IKPI)
1463 j6array[1] -=
IK2PI;
1465 else if (j6array[1] < -
IKPI)
1467 j6array[1] +=
IK2PI;
1470 for (
int ij6 = 0; ij6 < 2; ++ij6)
1478 for (
int iij6 = ij6 + 1; iij6 < 2; ++iij6)
1480 if (j6valid[iij6] &&
1481 IKabs(cj6array[ij6] - cj6array[iij6]) <
1483 IKabs(sj6array[ij6] - sj6array[iij6]) <
1486 j6valid[iij6] =
false;
1492 cj6 = cj6array[ij6];
1493 sj6 = sj6array[ij6];
1496 IkReal x1043 =
IKsin(j6);
1497 IkReal x1044 =
IKcos(j6);
1498 IkReal x1045 = ((1.0) * npx);
1499 IkReal x1046 = (npy * x1043);
1500 evalcond[0] = (x1046 + (((-1.0) * x1044 * x1045)));
1502 ((((-1.0) * x1043 * x1045)) + (((-1.0) * npy * x1044)));
1504 (((sj5 * x1046)) + (((-1.0) * sj5 * x1044 * x1045)));
1513 rotationfunction0(solutions);
1522 IkReal j6array[2], cj6array[2], sj6array[2];
1523 bool j6valid[2] = {
false };
1527 IkReal((npy * sj5)),
1533 IkReal x1047 = x1048.
value;
1534 j6array[0] = ((-1.0) * x1047);
1535 sj6array[0] =
IKsin(j6array[0]);
1536 cj6array[0] =
IKcos(j6array[0]);
1537 j6array[1] = ((3.14159265358979) + (((-1.0) * x1047)));
1538 sj6array[1] =
IKsin(j6array[1]);
1539 cj6array[1] =
IKcos(j6array[1]);
1540 if (j6array[0] >
IKPI)
1542 j6array[0] -=
IK2PI;
1544 else if (j6array[0] < -
IKPI)
1546 j6array[0] +=
IK2PI;
1549 if (j6array[1] >
IKPI)
1551 j6array[1] -=
IK2PI;
1553 else if (j6array[1] < -
IKPI)
1555 j6array[1] +=
IK2PI;
1558 for (
int ij6 = 0; ij6 < 2; ++ij6)
1566 for (
int iij6 = ij6 + 1; iij6 < 2; ++iij6)
1568 if (j6valid[iij6] &&
1569 IKabs(cj6array[ij6] - cj6array[iij6]) <
1571 IKabs(sj6array[ij6] - sj6array[iij6]) <
1574 j6valid[iij6] =
false;
1580 cj6 = cj6array[ij6];
1581 sj6 = sj6array[ij6];
1584 IkReal x1049 =
IKsin(j6);
1585 IkReal x1050 =
IKcos(j6);
1586 IkReal x1051 = ((1.0) * npx);
1587 IkReal x1052 = (npy * x1049);
1588 evalcond[0] = (x1052 + (((-1.0) * x1050 * x1051)));
1590 ((((-1.0) * npy * x1050)) + (((-1.0) * x1049 * x1051)));
1592 ((((-1.0) * cj5 * x1050 * x1051)) + ((cj5 * x1052)));
1601 rotationfunction0(solutions);
1610 IkReal j6array[2], cj6array[2], sj6array[2];
1611 bool j6valid[2] = {
false };
1619 IkReal x1053 = x1054.
value;
1620 j6array[0] = ((-1.0) * x1053);
1621 sj6array[0] =
IKsin(j6array[0]);
1622 cj6array[0] =
IKcos(j6array[0]);
1623 j6array[1] = ((3.14159265358979) + (((-1.0) * x1053)));
1624 sj6array[1] =
IKsin(j6array[1]);
1625 cj6array[1] =
IKcos(j6array[1]);
1626 if (j6array[0] >
IKPI)
1628 j6array[0] -=
IK2PI;
1630 else if (j6array[0] < -
IKPI)
1632 j6array[0] +=
IK2PI;
1635 if (j6array[1] >
IKPI)
1637 j6array[1] -=
IK2PI;
1639 else if (j6array[1] < -
IKPI)
1641 j6array[1] +=
IK2PI;
1644 for (
int ij6 = 0; ij6 < 2; ++ij6)
1652 for (
int iij6 = ij6 + 1; iij6 < 2; ++iij6)
1654 if (j6valid[iij6] &&
1658 j6valid[iij6] =
false;
1664 cj6 = cj6array[ij6];
1665 sj6 = sj6array[ij6];
1668 IkReal x1055 =
IKsin(j6);
1669 IkReal x1056 =
IKcos(j6);
1670 IkReal x1057 = ((1.0) * npx);
1671 IkReal x1058 = (npy * x1055);
1672 evalcond[0] = ((((-1.0) * npy * x1056)) + (((-1.0) * x1055 * x1057)));
1673 evalcond[1] = (((sj5 * x1058)) + (((-1.0) * sj5 * x1056 * x1057)));
1674 evalcond[2] = ((((-1.0) * cj5 * x1056 * x1057)) + ((cj5 * x1058)));
1683 rotationfunction0(solutions);
1690 if (bgotonextstatement)
1692 bool bgotonextstatement =
true;
1695 evalcond[0] = ((-3.14159265358979) +
1696 (
IKfmod(((3.14159265358979) + (
IKabs(j5))), 6.28318530717959)));
1697 if (
IKabs(evalcond[0]) < 0.0000050000000000)
1699 bgotonextstatement =
false;
1705 IkReal x1059 = npx * npx;
1706 IkReal x1060 = npy * npy;
1707 IkReal x1061 = (npy * sj3);
1708 IkReal x1062 = (npx * sj3);
1709 j6eval[0] = (x1059 + x1060);
1710 j6eval[1] = ((
IKabs(((((-1.0) * cj4 * x1062)) + ((sj4 * x1061))))) +
1711 (
IKabs((((cj4 * x1061)) + ((sj4 * x1062))))));
1712 j6eval[2] =
IKsign(((((5.0) * x1060)) + (((5.0) * x1059))));
1713 if (
IKabs(j6eval[0]) < 0.0000010000000000 ||
1714 IKabs(j6eval[1]) < 0.0000010000000000 ||
1715 IKabs(j6eval[2]) < 0.0000010000000000)
1719 bool bgotonextstatement =
true;
1723 ((-3.14159265358979) +
1724 (
IKfmod(((3.14159265358979) + (
IKabs(j3))), 6.28318530717959)));
1725 if (
IKabs(evalcond[0]) < 0.0000050000000000)
1727 bgotonextstatement =
false;
1737 if (
IKabs(j6eval[0]) < 0.0000010000000000)
1744 IkReal j6array[2], cj6array[2], sj6array[2];
1745 bool j6valid[2] = {
false };
1755 IkReal x1063 = x1064.
value;
1756 j6array[0] = ((-1.0) * x1063);
1757 sj6array[0] =
IKsin(j6array[0]);
1758 cj6array[0] =
IKcos(j6array[0]);
1759 j6array[1] = ((3.14159265358979) + (((-1.0) * x1063)));
1760 sj6array[1] =
IKsin(j6array[1]);
1761 cj6array[1] =
IKcos(j6array[1]);
1762 if (j6array[0] >
IKPI)
1764 j6array[0] -=
IK2PI;
1766 else if (j6array[0] < -
IKPI)
1768 j6array[0] +=
IK2PI;
1771 if (j6array[1] >
IKPI)
1773 j6array[1] -=
IK2PI;
1775 else if (j6array[1] < -
IKPI)
1777 j6array[1] +=
IK2PI;
1780 for (
int ij6 = 0; ij6 < 2; ++ij6)
1788 for (
int iij6 = ij6 + 1; iij6 < 2; ++iij6)
1790 if (j6valid[iij6] &&
1791 IKabs(cj6array[ij6] - cj6array[iij6]) <
1793 IKabs(sj6array[ij6] - sj6array[iij6]) <
1796 j6valid[iij6] =
false;
1802 cj6 = cj6array[ij6];
1803 sj6 = sj6array[ij6];
1806 evalcond[0] = ((((-1.0) * npy * (
IKcos(j6)))) +
1807 (((-1.0) * npx * (
IKsin(j6)))));
1814 rotationfunction0(solutions);
1821 if (bgotonextstatement)
1823 bool bgotonextstatement =
true;
1828 bgotonextstatement =
false;
1832 if (bgotonextstatement)
1841 IkReal j6array[1], cj6array[1], sj6array[1];
1842 bool j6valid[1] = {
false };
1844 IkReal x1065 = ((2.0) * sj3);
1846 IkReal((((cj4 * npy * x1065)) + ((npx * sj4 * x1065)))),
1847 IkReal(((((-1.0) * cj4 * npx * x1065)) + ((npy * sj4 * x1065)))),
1854 IKsign(((((5.0) * (npx * npx))) + (((5.0) * (npy * npy))))), -1);
1859 j6array[0] = ((-1.5707963267949) + (x1066.
value) +
1860 (((1.5707963267949) * (x1067.
value))));
1861 sj6array[0] =
IKsin(j6array[0]);
1862 cj6array[0] =
IKcos(j6array[0]);
1863 if (j6array[0] >
IKPI)
1865 j6array[0] -=
IK2PI;
1867 else if (j6array[0] < -
IKPI)
1869 j6array[0] +=
IK2PI;
1872 for (
int ij6 = 0; ij6 < 1; ++ij6)
1880 for (
int iij6 = ij6 + 1; iij6 < 1; ++iij6)
1882 if (j6valid[iij6] &&
1883 IKabs(cj6array[ij6] - cj6array[iij6]) <
1887 j6valid[iij6] =
false;
1893 cj6 = cj6array[ij6];
1894 sj6 = sj6array[ij6];
1897 IkReal x1068 =
IKsin(j6);
1898 IkReal x1069 =
IKcos(j6);
1899 IkReal x1070 = ((0.4) * sj3);
1900 IkReal x1071 = ((1.0) * x1069);
1901 evalcond[0] = ((((-1.0) * npx * x1071)) + (((-1.0) * cj4 * x1070)) +
1903 evalcond[1] = ((((-1.0) * npy * x1071)) + (((-1.0) * npx * x1068)) +
1912 rotationfunction0(solutions);
1919 if (bgotonextstatement)
1921 bool bgotonextstatement =
true;
1925 ((-3.14159265358979) +
1926 (
IKfmod(((3.14159265358979) + (
IKabs(((-3.14159265358979) + j5)))),
1927 6.28318530717959)));
1928 if (
IKabs(evalcond[0]) < 0.0000050000000000)
1930 bgotonextstatement =
false;
1935 j5 = 3.14159265358979;
1936 IkReal x1072 = npx * npx;
1937 IkReal x1073 = npy * npy;
1938 IkReal x1074 = (cj4 * sj3);
1939 IkReal x1075 = (sj3 * sj4);
1940 j6eval[0] = (x1072 + x1073);
1941 j6eval[1] = ((
IKabs((((npx * x1074)) + ((npy * x1075))))) +
1942 (
IKabs(((((-1.0) * npy * x1074)) + ((npx * x1075))))));
1943 j6eval[2] =
IKsign(((((5.0) * x1073)) + (((5.0) * x1072))));
1944 if (
IKabs(j6eval[0]) < 0.0000010000000000 ||
1945 IKabs(j6eval[1]) < 0.0000010000000000 ||
1946 IKabs(j6eval[2]) < 0.0000010000000000)
1950 bool bgotonextstatement =
true;
1953 evalcond[0] = ((-3.14159265358979) +
1955 6.28318530717959)));
1956 if (
IKabs(evalcond[0]) < 0.0000050000000000)
1958 bgotonextstatement =
false;
1963 j5 = 3.14159265358979;
1968 if (
IKabs(j6eval[0]) < 0.0000010000000000)
1975 IkReal j6array[2], cj6array[2], sj6array[2];
1976 bool j6valid[2] = {
false };
1980 IkReal(((-1.0) * npy)),
1986 IkReal x1076 = x1077.
value;
1987 j6array[0] = ((-1.0) * x1076);
1988 sj6array[0] =
IKsin(j6array[0]);
1989 cj6array[0] =
IKcos(j6array[0]);
1990 j6array[1] = ((3.14159265358979) + (((-1.0) * x1076)));
1991 sj6array[1] =
IKsin(j6array[1]);
1992 cj6array[1] =
IKcos(j6array[1]);
1993 if (j6array[0] >
IKPI)
1995 j6array[0] -=
IK2PI;
1997 else if (j6array[0] < -
IKPI)
1999 j6array[0] +=
IK2PI;
2002 if (j6array[1] >
IKPI)
2004 j6array[1] -=
IK2PI;
2006 else if (j6array[1] < -
IKPI)
2008 j6array[1] +=
IK2PI;
2011 for (
int ij6 = 0; ij6 < 2; ++ij6)
2019 for (
int iij6 = ij6 + 1; iij6 < 2; ++iij6)
2021 if (j6valid[iij6] &&
2022 IKabs(cj6array[ij6] - cj6array[iij6]) <
2024 IKabs(sj6array[ij6] - sj6array[iij6]) <
2027 j6valid[iij6] =
false;
2033 cj6 = cj6array[ij6];
2034 sj6 = sj6array[ij6];
2037 evalcond[0] = ((((-1.0) * npy * (
IKcos(j6)))) +
2038 (((-1.0) * npx * (
IKsin(j6)))));
2045 rotationfunction0(solutions);
2052 if (bgotonextstatement)
2054 bool bgotonextstatement =
true;
2059 bgotonextstatement =
false;
2063 if (bgotonextstatement)
2072 IkReal j6array[1], cj6array[1], sj6array[1];
2073 bool j6valid[1] = {
false };
2075 IkReal x1078 = ((2.0) * sj3);
2077 IKsign(((((5.0) * (npx * npx))) + (((5.0) * (npy * npy))))), -1);
2083 IkReal(((((-1.0) * cj4 * npy * x1078)) + ((npx * sj4 * x1078)))),
2084 IkReal((((cj4 * npx * x1078)) + ((npy * sj4 * x1078)))),
2090 j6array[0] = ((-1.5707963267949) +
2091 (((1.5707963267949) * (x1079.
value))) + (x1080.
value));
2092 sj6array[0] =
IKsin(j6array[0]);
2093 cj6array[0] =
IKcos(j6array[0]);
2094 if (j6array[0] >
IKPI)
2096 j6array[0] -=
IK2PI;
2098 else if (j6array[0] < -
IKPI)
2100 j6array[0] +=
IK2PI;
2103 for (
int ij6 = 0; ij6 < 1; ++ij6)
2111 for (
int iij6 = ij6 + 1; iij6 < 1; ++iij6)
2113 if (j6valid[iij6] &&
2114 IKabs(cj6array[ij6] - cj6array[iij6]) <
2116 IKabs(sj6array[ij6] - sj6array[iij6]) <
2119 j6valid[iij6] =
false;
2125 cj6 = cj6array[ij6];
2126 sj6 = sj6array[ij6];
2129 IkReal x1081 =
IKsin(j6);
2130 IkReal x1082 =
IKcos(j6);
2131 IkReal x1083 = ((0.4) * sj3);
2132 IkReal x1084 = ((1.0) * npy);
2133 evalcond[0] = ((((-1.0) * x1081 * x1084)) + ((npx * x1082)) +
2134 (((-1.0) * cj4 * x1083)));
2135 evalcond[1] = ((((-1.0) * x1082 * x1084)) + ((sj4 * x1083)) +
2136 (((-1.0) * npx * x1081)));
2144 rotationfunction0(solutions);
2151 if (bgotonextstatement)
2153 bool bgotonextstatement =
true;
2157 ((-3.14159265358979) +
2158 (
IKfmod(((3.14159265358979) + (
IKabs(((-1.5707963267949) + j5)))),
2159 6.28318530717959)));
2160 if (
IKabs(evalcond[0]) < 0.0000050000000000)
2162 bgotonextstatement =
false;
2167 j5 = 1.5707963267949;
2168 IkReal x1085 = npx * npx;
2169 IkReal x1086 = npy * npy;
2170 IkReal x1087 = ((2.0) * cj3);
2171 IkReal x1088 = ((2.0) * npx);
2172 IkReal x1089 = (sj3 * sj4);
2173 IkReal x1090 = ((2.0) * npy);
2174 j6eval[0] = (x1086 + x1085);
2175 j6eval[1] = ((
IKabs((x1088 + ((x1089 * x1090)) + ((npx * x1087))))) +
2176 (
IKabs(((((-1.0) * x1090)) + (((-1.0) * npy * x1087)) +
2177 ((x1088 * x1089))))));
2178 j6eval[2] =
IKsign(((((5.0) * x1085)) + (((5.0) * x1086))));
2179 if (
IKabs(j6eval[0]) < 0.0000010000000000 ||
2180 IKabs(j6eval[1]) < 0.0000010000000000 ||
2181 IKabs(j6eval[2]) < 0.0000010000000000)
2188 IkReal j6array[1], cj6array[1], sj6array[1];
2189 bool j6valid[1] = {
false };
2191 IkReal x1091 = ((2.0) * cj3);
2192 IkReal x1092 = ((2.0) * npx);
2193 IkReal x1093 = (sj3 * sj4);
2194 IkReal x1094 = ((2.0) * npy);
2196 IkReal(((((-1.0) * x1094)) + ((x1092 * x1093)) +
2197 (((-1.0) * npy * x1091)))),
2198 IkReal((((npx * x1091)) + x1092 + ((x1093 * x1094)))),
2205 IKsign(((((5.0) * (npx * npx))) + (((5.0) * (npy * npy))))),
2211 j6array[0] = ((-1.5707963267949) + (x1095.
value) +
2212 (((1.5707963267949) * (x1096.
value))));
2213 sj6array[0] =
IKsin(j6array[0]);
2214 cj6array[0] =
IKcos(j6array[0]);
2215 if (j6array[0] >
IKPI)
2217 j6array[0] -=
IK2PI;
2219 else if (j6array[0] < -
IKPI)
2221 j6array[0] +=
IK2PI;
2224 for (
int ij6 = 0; ij6 < 1; ++ij6)
2232 for (
int iij6 = ij6 + 1; iij6 < 1; ++iij6)
2234 if (j6valid[iij6] &&
2235 IKabs(cj6array[ij6] - cj6array[iij6]) <
2237 IKabs(sj6array[ij6] - sj6array[iij6]) <
2240 j6valid[iij6] =
false;
2246 cj6 = cj6array[ij6];
2247 sj6 = sj6array[ij6];
2250 IkReal x1097 =
IKsin(j6);
2251 IkReal x1098 =
IKcos(j6);
2252 IkReal x1099 = ((1.0) * npx);
2253 evalcond[0] = ((0.4) + (((0.4) * cj3)) + ((npy * x1097)) +
2254 (((-1.0) * x1098 * x1099)));
2256 ((((-1.0) * x1097 * x1099)) + (((-1.0) * npy * x1098)) +
2257 (((0.4) * sj3 * sj4)));
2265 rotationfunction0(solutions);
2272 if (bgotonextstatement)
2274 bool bgotonextstatement =
true;
2278 ((-3.14159265358979) +
2279 (
IKfmod(((3.14159265358979) + (
IKabs(((1.5707963267949) + j5)))),
2280 6.28318530717959)));
2281 if (
IKabs(evalcond[0]) < 0.0000050000000000)
2283 bgotonextstatement =
false;
2288 j5 = -1.5707963267949;
2289 IkReal x1100 = npx * npx;
2290 IkReal x1101 = npy * npy;
2291 IkReal x1102 = ((2.0) * cj3);
2292 IkReal x1103 = ((2.0) * npx);
2293 IkReal x1104 = (sj3 * sj4);
2294 IkReal x1105 = ((2.0) * npy);
2295 j6eval[0] = (x1100 + x1101);
2296 j6eval[1] = ((
IKabs(((((-1.0) * npx * x1102)) + ((x1104 * x1105)) +
2297 (((-1.0) * x1103))))) +
2298 (
IKabs((x1105 + ((npy * x1102)) + ((x1103 * x1104))))));
2299 j6eval[2] =
IKsign(((((5.0) * x1101)) + (((5.0) * x1100))));
2300 if (
IKabs(j6eval[0]) < 0.0000010000000000 ||
2301 IKabs(j6eval[1]) < 0.0000010000000000 ||
2302 IKabs(j6eval[2]) < 0.0000010000000000)
2309 IkReal j6array[1], cj6array[1], sj6array[1];
2310 bool j6valid[1] = {
false };
2312 IkReal x1106 = ((2.0) * cj3);
2313 IkReal x1107 = ((2.0) * npx);
2314 IkReal x1108 = (sj3 * sj4);
2315 IkReal x1109 = ((2.0) * npy);
2317 IKsign(((((5.0) * (npx * npx))) + (((5.0) * (npy * npy))))),
2324 IkReal((x1109 + ((npy * x1106)) + ((x1107 * x1108)))),
2325 IkReal((((x1108 * x1109)) + (((-1.0) * npx * x1106)) +
2326 (((-1.0) * x1107)))),
2333 ((-1.5707963267949) + (((1.5707963267949) * (x1110.
value))) +
2335 sj6array[0] =
IKsin(j6array[0]);
2336 cj6array[0] =
IKcos(j6array[0]);
2337 if (j6array[0] >
IKPI)
2339 j6array[0] -=
IK2PI;
2341 else if (j6array[0] < -
IKPI)
2343 j6array[0] +=
IK2PI;
2346 for (
int ij6 = 0; ij6 < 1; ++ij6)
2354 for (
int iij6 = ij6 + 1; iij6 < 1; ++iij6)
2356 if (j6valid[iij6] &&
2357 IKabs(cj6array[ij6] - cj6array[iij6]) <
2359 IKabs(sj6array[ij6] - sj6array[iij6]) <
2362 j6valid[iij6] =
false;
2368 cj6 = cj6array[ij6];
2369 sj6 = sj6array[ij6];
2372 IkReal x1112 =
IKsin(j6);
2373 IkReal x1113 =
IKcos(j6);
2374 IkReal x1114 = ((1.0) * x1112);
2375 evalcond[0] = ((0.4) + ((npx * x1113)) +
2376 (((-1.0) * npy * x1114)) + (((0.4) * cj3)));
2378 ((((-1.0) * npy * x1113)) + (((-1.0) * npx * x1114)) +
2379 (((0.4) * sj3 * sj4)));
2387 rotationfunction0(solutions);
2394 if (bgotonextstatement)
2396 bool bgotonextstatement =
true;
2401 bgotonextstatement =
false;
2405 if (bgotonextstatement)
2418 IkReal j6array[1], cj6array[1], sj6array[1];
2419 bool j6valid[1] = {
false };
2421 IkReal x1115 = ((2.0) * sj5);
2422 IkReal x1116 = ((2.0) * sj3);
2423 IkReal x1117 = (cj4 * cj5);
2425 IkReal((((npy * x1116 * x1117)) + (((-1.0) * npy * x1115)) +
2426 ((npx * sj4 * x1116)) + (((-1.0) * cj3 * npy * x1115)))),
2427 IkReal((((npx * x1115)) + (((-1.0) * npx * x1116 * x1117)) +
2428 ((npy * sj4 * x1116)) + ((cj3 * npx * x1115)))),
2435 IKsign(((((5.0) * (npx * npx))) + (((5.0) * (npy * npy))))), -1);
2441 ((-1.5707963267949) + (x1118.
value) + (((1.5707963267949) * (x1119.
value))));
2442 sj6array[0] =
IKsin(j6array[0]);
2443 cj6array[0] =
IKcos(j6array[0]);
2444 if (j6array[0] >
IKPI)
2446 j6array[0] -=
IK2PI;
2448 else if (j6array[0] < -
IKPI)
2450 j6array[0] +=
IK2PI;
2453 for (
int ij6 = 0; ij6 < 1; ++ij6)
2461 for (
int iij6 = ij6 + 1; iij6 < 1; ++iij6)
2463 if (j6valid[iij6] &&
2467 j6valid[iij6] =
false;
2473 cj6 = cj6array[ij6];
2474 sj6 = sj6array[ij6];
2477 IkReal x1120 =
IKsin(j6);
2478 IkReal x1121 =
IKcos(j6);
2479 IkReal x1122 = ((0.4) * sj3);
2480 IkReal x1123 = ((1.0) * npx);
2481 IkReal x1124 = ((0.4) * sj5);
2482 IkReal x1125 = (npy * x1120);
2484 ((((-1.0) * npy * x1121)) + ((sj4 * x1122)) + (((-1.0) * x1120 * x1123)));
2485 evalcond[1] = (((npz * sj5)) + (((-1.0) * cj4 * x1122)) +
2486 (((-1.0) * cj5 * x1121 * x1123)) + ((cj5 * x1125)));
2487 evalcond[2] = ((0.4) + (((0.4) * cj3)) + (((-1.0) * sj5 * x1121 * x1123)) +
2488 (((-1.0) * cj5 * npz)) + ((sj5 * x1125)));
2489 evalcond[3] = ((((-1.0) * cj4 * cj5 * x1122)) + x1124 + x1125 +
2490 (((-1.0) * x1121 * x1123)) + ((cj3 * x1124)));
2500 rotationfunction0(solutions);
2509 IkReal j6array[1], cj6array[1], sj6array[1];
2510 bool j6valid[1] = {
false };
2512 IkReal x1126 = ((2.0) * cj3);
2513 IkReal x1127 = ((5.0) * sj5);
2514 IkReal x1128 = ((2.0) * npx);
2515 IkReal x1129 = ((2.0) * npy);
2516 IkReal x1130 = ((5.0) * cj5 * npz);
2517 IkReal x1131 = (sj3 * sj4 * sj5);
2519 IKsign((((x1127 * (npy * npy))) + ((x1127 * (npx * npx))))), -1);
2525 IkReal(((((-1.0) * npy * x1126)) + ((npy * x1130)) + (((-1.0) * x1129)) +
2526 ((x1128 * x1131)))),
2527 IkReal((x1128 + ((npx * x1126)) + (((-1.0) * npx * x1130)) + ((x1129 * x1131)))),
2534 ((-1.5707963267949) + (((1.5707963267949) * (x1132.
value))) + (x1133.
value));
2535 sj6array[0] =
IKsin(j6array[0]);
2536 cj6array[0] =
IKcos(j6array[0]);
2537 if (j6array[0] >
IKPI)
2539 j6array[0] -=
IK2PI;
2541 else if (j6array[0] < -
IKPI)
2543 j6array[0] +=
IK2PI;
2546 for (
int ij6 = 0; ij6 < 1; ++ij6)
2554 for (
int iij6 = ij6 + 1; iij6 < 1; ++iij6)
2556 if (j6valid[iij6] &&
2560 j6valid[iij6] =
false;
2566 cj6 = cj6array[ij6];
2567 sj6 = sj6array[ij6];
2570 IkReal x1134 =
IKsin(j6);
2571 IkReal x1135 =
IKcos(j6);
2572 IkReal x1136 = ((0.4) * sj3);
2573 IkReal x1137 = ((1.0) * npx);
2574 IkReal x1138 = ((0.4) * sj5);
2575 IkReal x1139 = (npy * x1134);
2577 ((((-1.0) * npy * x1135)) + ((sj4 * x1136)) + (((-1.0) * x1134 * x1137)));
2578 evalcond[1] = ((((-1.0) * cj4 * x1136)) + ((npz * sj5)) +
2579 (((-1.0) * cj5 * x1135 * x1137)) + ((cj5 * x1139)));
2580 evalcond[2] = ((0.4) + (((-1.0) * sj5 * x1135 * x1137)) + (((0.4) * cj3)) +
2581 (((-1.0) * cj5 * npz)) + ((sj5 * x1139)));
2582 evalcond[3] = (x1139 + x1138 + ((cj3 * x1138)) + (((-1.0) * cj4 * cj5 * x1136)) +
2583 (((-1.0) * x1135 * x1137)));
2593 rotationfunction0(solutions);
2602 IkReal j6array[1], cj6array[1], sj6array[1];
2603 bool j6valid[1] = {
false };
2605 IkReal x1140 = (cj5 * sj4);
2606 IkReal x1141 = ((5.0) * cj5);
2607 IkReal x1142 = ((5.0) * npz * sj5);
2608 IkReal x1143 = ((2.0) * npy * sj3);
2609 IkReal x1144 = ((2.0) * npx * sj3);
2611 IkReal((((x1140 * x1144)) + (((-1.0) * npy * x1142)) + ((cj4 * x1143)))),
2612 IkReal((((x1140 * x1143)) + (((-1.0) * cj4 * x1144)) + ((npx * x1142)))),
2624 j6array[0] = ((-1.5707963267949) + (x1145.
value) + (((1.5707963267949) * (x1146.
value))));
2625 sj6array[0] =
IKsin(j6array[0]);
2626 cj6array[0] =
IKcos(j6array[0]);
2627 if (j6array[0] >
IKPI)
2629 j6array[0] -=
IK2PI;
2631 else if (j6array[0] < -
IKPI)
2633 j6array[0] +=
IK2PI;
2636 for (
int ij6 = 0; ij6 < 1; ++ij6)
2644 for (
int iij6 = ij6 + 1; iij6 < 1; ++iij6)
2649 j6valid[iij6] =
false;
2655 cj6 = cj6array[ij6];
2656 sj6 = sj6array[ij6];
2659 IkReal x1147 =
IKsin(j6);
2660 IkReal x1148 =
IKcos(j6);
2661 IkReal x1149 = ((0.4) * sj3);
2662 IkReal x1150 = ((1.0) * npx);
2663 IkReal x1151 = ((0.4) * sj5);
2664 IkReal x1152 = (npy * x1147);
2665 evalcond[0] = (((sj4 * x1149)) + (((-1.0) * x1147 * x1150)) + (((-1.0) * npy * x1148)));
2666 evalcond[1] = (((npz * sj5)) + (((-1.0) * cj4 * x1149)) +
2667 (((-1.0) * cj5 * x1148 * x1150)) + ((cj5 * x1152)));
2668 evalcond[2] = ((0.4) + (((0.4) * cj3)) + ((sj5 * x1152)) + (((-1.0) * cj5 * npz)) +
2669 (((-1.0) * sj5 * x1148 * x1150)));
2670 evalcond[3] = (x1151 + x1152 + ((cj3 * x1151)) + (((-1.0) * x1148 * x1150)) +
2671 (((-1.0) * cj4 * cj5 * x1149)));
2681 rotationfunction0(solutions);
2694 IkReal j6array[2], cj6array[2], sj6array[2];
2695 bool j6valid[2] = {
false };
2703 IkReal x1153 = ((1.0) * (x1155.
value));
2704 if ((((npx * npx) + (npy * npy))) < -0.00001)
2714 IkReal x1154 =
IKasin(((0.4) * sj3 * sj4 * (x1156.
value)));
2715 j6array[0] = ((((-1.0) * x1153)) + (((-1.0) * x1154)));
2716 sj6array[0] =
IKsin(j6array[0]);
2717 cj6array[0] =
IKcos(j6array[0]);
2718 j6array[1] = ((3.14159265358979) + x1154 + (((-1.0) * x1153)));
2719 sj6array[1] =
IKsin(j6array[1]);
2720 cj6array[1] =
IKcos(j6array[1]);
2721 if (j6array[0] >
IKPI)
2723 j6array[0] -=
IK2PI;
2725 else if (j6array[0] < -
IKPI)
2727 j6array[0] +=
IK2PI;
2730 if (j6array[1] >
IKPI)
2732 j6array[1] -=
IK2PI;
2734 else if (j6array[1] < -
IKPI)
2736 j6array[1] +=
IK2PI;
2739 for (
int ij6 = 0; ij6 < 2; ++ij6)
2747 for (
int iij6 = ij6 + 1; iij6 < 2; ++iij6)
2752 j6valid[iij6] =
false;
2758 cj6 = cj6array[ij6];
2759 sj6 = sj6array[ij6];
2763 IkReal x1157 = (cj6 * npx);
2764 IkReal x1158 = (npy * sj6);
2765 IkReal x1159 = ((2.0) * cj3);
2766 IkReal x1160 = ((5.0) * npz);
2767 IkReal x1161 = ((0.8) * cj4 * sj3);
2768 IkReal x1162 = (cj4 * npz * sj3);
2769 j5eval[0] = (x1158 + x1162 + ((cj3 * x1158)) + (((-1.0) * cj3 * x1157)) + (((-1.0) * x1157)));
2770 j5eval[1] = ((
IKabs(((-0.8) + (((-1.6) * cj3)) + ((npz * x1160)) + (((-0.8) * (cj3 * cj3)))))) +
2771 (
IKabs((x1161 + ((cj3 * x1161)) + ((x1158 * x1160)) + (((-1.0) * x1157 * x1160))))));
2772 j5eval[2] =
IKsign(((((-1.0) * x1157 * x1159)) + ((x1158 * x1159)) + (((2.0) * x1158)) +
2773 (((2.0) * x1162)) + (((-2.0) * x1157))));
2774 if (
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000 ||
2775 IKabs(j5eval[2]) < 0.0000010000000000)
2779 IkReal x1163 = cj3 * cj3;
2780 IkReal x1164 = cj4 * cj4;
2781 IkReal x1165 = ((10.0) * cj3);
2782 IkReal x1166 = (npy * sj6);
2783 IkReal x1167 = (cj6 * npx);
2784 IkReal x1168 = ((4.0) * x1164);
2785 IkReal x1169 = ((10.0) * cj4 * sj3);
2786 j5eval[0] = ((1.0) + x1164 + x1163 + (((-1.0) * x1163 * x1164)) + (((2.0) * cj3)));
2788 IKsign(((4.0) + x1168 + (((8.0) * cj3)) + (((-1.0) * x1163 * x1168)) + (((4.0) * x1163))));
2789 j5eval[2] = ((
IKabs((((x1165 * x1167)) + ((npz * x1169)) + (((10.0) * x1167)) +
2790 (((-10.0) * x1166)) + (((-1.0) * x1165 * x1166))))) +
2791 (
IKabs((((x1166 * x1169)) + (((10.0) * npz)) + ((npz * x1165)) +
2792 (((-1.0) * x1167 * x1169))))));
2793 if (
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000 ||
2794 IKabs(j5eval[2]) < 0.0000010000000000)
2798 IkReal x1170 = cj6 * cj6;
2799 IkReal x1171 = npy * npy;
2800 IkReal x1172 = npx * npx;
2801 IkReal x1173 = npz * npz;
2802 IkReal x1174 = ((2.0) * cj3);
2803 IkReal x1175 = (cj6 * npx);
2804 IkReal x1176 = ((2.0) * npz);
2805 IkReal x1177 = (cj4 * sj3);
2806 IkReal x1178 = ((2.0) * npy * sj6);
2807 IkReal x1179 = (x1170 * x1171);
2808 IkReal x1180 = (x1170 * x1172);
2809 j5eval[0] = (x1180 + x1173 + x1171 + (((-1.0) * x1175 * x1178)) + (((-1.0) * x1179)));
2811 ((
IKabs((((x1174 * x1175)) + ((x1176 * x1177)) + (((2.0) * x1175)) +
2812 (((-1.0) * npy * sj6 * x1174)) + (((-1.0) * x1178))))) +
2813 (
IKabs((x1176 + ((x1177 * x1178)) + ((npz * x1174)) + (((-2.0) * x1175 * x1177))))));
2814 j5eval[2] =
IKsign(((((5.0) * x1180)) + (((-5.0) * x1179)) + (((5.0) * x1171)) +
2815 (((5.0) * x1173)) + (((-10.0) * npy * sj6 * x1175))));
2816 if (
IKabs(j5eval[0]) < 0.0000010000000000 ||
IKabs(j5eval[1]) < 0.0000010000000000 ||
2817 IKabs(j5eval[2]) < 0.0000010000000000)
2821 bool bgotonextstatement =
true;
2824 evalcond[0] = ((-3.14159265358979) +
2825 (
IKfmod(((3.14159265358979) + (
IKabs(((-3.14159265358979) + j3)))),
2826 6.28318530717959)));
2828 if (
IKabs(evalcond[0]) < 0.0000050000000000 &&
2829 IKabs(evalcond[1]) < 0.0000050000000000)
2831 bgotonextstatement =
false;
2836 j3 = 3.14159265358979;
2837 j5eval[0] =
IKabs((((cj6 * npx)) + (((-1.0) * npy * sj6))));
2838 if (
IKabs(j5eval[0]) < 0.0000000100000000)
2844 IkReal op[2 + 1], zeror[2];
2846 IkReal x1181 = (npy * sj6);
2847 IkReal x1182 = (cj6 * npx);
2848 op[0] = (x1182 + (((-1.0) * x1181)));
2850 op[2] = (x1181 + (((-1.0) * x1182)));
2851 polyroots2(op, zeror, numroots);
2852 IkReal j5array[2], cj5array[2], sj5array[2], tempj5array[1];
2853 int numsolutions = 0;
2854 for (
int ij5 = 0; ij5 < numroots; ++ij5)
2856 IkReal htj5 = zeror[ij5];
2857 tempj5array[0] = ((2.0) * (atan(htj5)));
2858 for (
int kj5 = 0; kj5 < 1; ++kj5)
2860 j5array[numsolutions] = tempj5array[kj5];
2861 if (j5array[numsolutions] >
IKPI)
2863 j5array[numsolutions] -=
IK2PI;
2865 else if (j5array[numsolutions] < -
IKPI)
2867 j5array[numsolutions] +=
IK2PI;
2869 sj5array[numsolutions] =
IKsin(j5array[numsolutions]);
2870 cj5array[numsolutions] =
IKcos(j5array[numsolutions]);
2874 bool j5valid[2] = {
true,
true };
2876 for (
int ij5 = 0; ij5 < numsolutions; ++ij5)
2883 cj5 = cj5array[ij5];
2884 sj5 = sj5array[ij5];
2885 htj5 =
IKtan(j5 / 2);
2889 for (
int iij5 = ij5 + 1; iij5 < numsolutions; ++iij5)
2891 if (j5valid[iij5] &&
2895 j5valid[iij5] =
false;
2900 rotationfunction0(solutions);
2906 if (bgotonextstatement)
2908 bool bgotonextstatement =
true;
2913 bgotonextstatement =
false;
2917 if (bgotonextstatement)
2926 IkReal j5array[1], cj5array[1], sj5array[1];
2927 bool j5valid[1] = {
false };
2929 IkReal x1183 = cj6 * cj6;
2930 IkReal x1184 = npy * npy;
2931 IkReal x1185 = (npy * sj6);
2932 IkReal x1186 = ((2.0) * cj3);
2933 IkReal x1187 = (cj6 * npx);
2934 IkReal x1188 = ((2.0) * npz);
2935 IkReal x1189 = (cj4 * sj3);
2936 IkReal x1190 = ((5.0) * x1184);
2938 IKsign((x1190 + (((-10.0) * x1185 * x1187)) + (((5.0) * (npz * npz))) +
2939 (((-1.0) * x1183 * x1190)) + (((5.0) * x1183 * (npx * npx))))),
2946 IKatan2WithCheck(IkReal((((x1186 * x1187)) + ((x1188 * x1189)) + (((2.0) * x1187)) +
2947 (((-2.0) * x1185)) + (((-1.0) * x1185 * x1186)))),
2948 IkReal(((((2.0) * x1185 * x1189)) + x1188 +
2949 (((-2.0) * x1187 * x1189)) + ((npz * x1186)))),
2956 ((-1.5707963267949) + (((1.5707963267949) * (x1191.
value))) + (x1192.
value));
2957 sj5array[0] =
IKsin(j5array[0]);
2958 cj5array[0] =
IKcos(j5array[0]);
2959 if (j5array[0] >
IKPI)
2961 j5array[0] -=
IK2PI;
2963 else if (j5array[0] < -
IKPI)
2965 j5array[0] +=
IK2PI;
2968 for (
int ij5 = 0; ij5 < 1; ++ij5)
2976 for (
int iij5 = ij5 + 1; iij5 < 1; ++iij5)
2978 if (j5valid[iij5] &&
2982 j5valid[iij5] =
false;
2988 cj5 = cj5array[ij5];
2989 sj5 = sj5array[ij5];
2992 IkReal x1193 =
IKcos(j5);
2993 IkReal x1194 =
IKsin(j5);
2994 IkReal x1195 = (npy * sj6);
2995 IkReal x1196 = ((1.0) * npz);
2996 IkReal x1197 = ((1.0) * cj6 * npx);
2997 IkReal x1198 = ((0.4) * cj4 * sj3);
2998 IkReal x1199 = ((0.4) * x1194);
2999 IkReal x1200 = ((0.4) * x1193);
3000 evalcond[0] = (x1200 + ((x1194 * x1198)) + (((-1.0) * x1196)) + ((cj3 * x1200)));
3001 evalcond[1] = ((((-1.0) * x1193 * x1197)) + (((-1.0) * x1198)) + ((npz * x1194)) +
3003 evalcond[2] = ((0.4) + (((-1.0) * x1193 * x1196)) + ((x1194 * x1195)) +
3004 (((-1.0) * x1194 * x1197)) + (((0.4) * cj3)));
3005 evalcond[3] = (x1199 + x1195 + (((-1.0) * x1193 * x1198)) + (((-1.0) * x1197)) +
3016 rotationfunction0(solutions);
3025 IkReal j5array[1], cj5array[1], sj5array[1];
3026 bool j5valid[1] = {
false };
3028 IkReal x1201 = cj3 * cj3;
3029 IkReal x1202 = cj4 * cj4;
3030 IkReal x1203 = ((10.0) * cj3);
3031 IkReal x1204 = (npy * sj6);
3032 IkReal x1205 = (cj6 * npx);
3033 IkReal x1206 = ((10.0) * cj4 * sj3);
3034 IkReal x1207 = ((4.0) * x1202);
3037 (((-1.0) * x1201 * x1207)))),
3044 IKatan2WithCheck(IkReal(((((-10.0) * x1204)) + (((10.0) * x1205)) + ((npz * x1206)) +
3045 ((x1203 * x1205)) + (((-1.0) * x1203 * x1204)))),
3046 IkReal((((x1204 * x1206)) + (((10.0) * npz)) + ((npz * x1203)) +
3047 (((-1.0) * x1205 * x1206)))),
3053 j5array[0] = ((-1.5707963267949) + (((1.5707963267949) * (x1208.
value))) + (x1209.
value));
3054 sj5array[0] =
IKsin(j5array[0]);
3055 cj5array[0] =
IKcos(j5array[0]);
3056 if (j5array[0] >
IKPI)
3058 j5array[0] -=
IK2PI;
3060 else if (j5array[0] < -
IKPI)
3062 j5array[0] +=
IK2PI;
3065 for (
int ij5 = 0; ij5 < 1; ++ij5)
3073 for (
int iij5 = ij5 + 1; iij5 < 1; ++iij5)
3078 j5valid[iij5] =
false;
3084 cj5 = cj5array[ij5];
3085 sj5 = sj5array[ij5];
3088 IkReal x1210 =
IKcos(j5);
3089 IkReal x1211 =
IKsin(j5);
3090 IkReal x1212 = (npy * sj6);
3091 IkReal x1213 = ((1.0) * npz);
3092 IkReal x1214 = ((1.0) * cj6 * npx);
3093 IkReal x1215 = ((0.4) * cj4 * sj3);
3094 IkReal x1216 = ((0.4) * x1211);
3095 IkReal x1217 = ((0.4) * x1210);
3096 evalcond[0] = (x1217 + ((cj3 * x1217)) + ((x1211 * x1215)) + (((-1.0) * x1213)));
3097 evalcond[1] = (((x1210 * x1212)) + ((npz * x1211)) + (((-1.0) * x1210 * x1214)) +
3098 (((-1.0) * x1215)));
3099 evalcond[2] = ((0.4) + (((0.4) * cj3)) + (((-1.0) * x1210 * x1213)) +
3100 (((-1.0) * x1211 * x1214)) + ((x1211 * x1212)));
3102 (x1212 + x1216 + (((-1.0) * x1210 * x1215)) + ((cj3 * x1216)) + (((-1.0) * x1214)));
3112 rotationfunction0(solutions);
3121 IkReal j5array[1], cj5array[1], sj5array[1];
3122 bool j5valid[1] = {
false };
3124 IkReal x1218 = (npy * sj6);
3125 IkReal x1219 = (cj6 * npx);
3126 IkReal x1220 = ((2.0) * cj3);
3127 IkReal x1221 = ((5.0) * npz);
3128 IkReal x1222 = ((0.8) * cj4 * sj3);
3130 IkReal(((-0.8) + ((npz * x1221)) + (((-1.6) * cj3)) + (((-0.8) * (cj3 * cj3))))),
3131 IkReal((x1222 + ((cj3 * x1222)) + ((x1218 * x1221)) + (((-1.0) * x1219 * x1221)))),
3138 IKsign((((x1218 * x1220)) + (((2.0) * x1218)) + (((-1.0) * x1219 * x1220)) +
3139 (((-2.0) * x1219)) + (((2.0) * cj4 * npz * sj3)))),
3145 j5array[0] = ((-1.5707963267949) + (x1223.
value) + (((1.5707963267949) * (x1224.
value))));
3146 sj5array[0] =
IKsin(j5array[0]);
3147 cj5array[0] =
IKcos(j5array[0]);
3148 if (j5array[0] >
IKPI)
3150 j5array[0] -=
IK2PI;
3152 else if (j5array[0] < -
IKPI)
3154 j5array[0] +=
IK2PI;
3157 for (
int ij5 = 0; ij5 < 1; ++ij5)
3165 for (
int iij5 = ij5 + 1; iij5 < 1; ++iij5)
3170 j5valid[iij5] =
false;
3176 cj5 = cj5array[ij5];
3177 sj5 = sj5array[ij5];
3180 IkReal x1225 =
IKcos(j5);
3181 IkReal x1226 =
IKsin(j5);
3182 IkReal x1227 = (npy * sj6);
3183 IkReal x1228 = ((1.0) * npz);
3184 IkReal x1229 = ((1.0) * cj6 * npx);
3185 IkReal x1230 = ((0.4) * cj4 * sj3);
3186 IkReal x1231 = ((0.4) * x1226);
3187 IkReal x1232 = ((0.4) * x1225);
3188 evalcond[0] = (((cj3 * x1232)) + x1232 + (((-1.0) * x1228)) + ((x1226 * x1230)));
3190 (((npz * x1226)) + (((-1.0) * x1225 * x1229)) + (((-1.0) * x1230)) + ((x1225 * x1227)));
3191 evalcond[2] = ((0.4) + (((-1.0) * x1225 * x1228)) + (((0.4) * cj3)) +
3192 (((-1.0) * x1226 * x1229)) + ((x1226 * x1227)));
3194 (((cj3 * x1231)) + x1231 + x1227 + (((-1.0) * x1225 * x1230)) + (((-1.0) * x1229)));
3204 rotationfunction0(solutions);
3216 return solutions.GetNumSolutions() > 0;
3220 for (
int rotationiter = 0; rotationiter < 1; ++rotationiter)
3222 IkReal x76 = (r02 * sj5);
3223 IkReal x77 = ((1.0) * cj5);
3224 IkReal x78 = ((1.0) * sj6);
3225 IkReal x79 = ((1.0) * cj4);
3226 IkReal x80 = ((1.0) * cj3);
3227 IkReal x81 = ((1.0) * sj4);
3228 IkReal x82 = ((1.0) * cj6);
3229 IkReal x83 = ((((-1.0) * r01 * x78)) + ((cj6 * r00)));
3230 IkReal x84 = (((cj6 * r10)) + (((-1.0) * r11 * x78)));
3231 IkReal x85 = ((((-1.0) * r21 * x78)) + ((cj6 * r20)));
3232 IkReal x86 = ((((-1.0) * r00 * x78)) + (((-1.0) * r01 * x82)));
3233 IkReal x87 = ((((-1.0) * r11 * x82)) + (((-1.0) * r10 * x78)));
3234 IkReal x88 = ((((-1.0) * r20 * x78)) + (((-1.0) * r21 * x82)));
3235 IkReal x89 = (((sj5 * x83)) + ((cj5 * r02)));
3236 IkReal x90 = ((((-1.0) * x77 * x83)) + x76);
3237 IkReal x91 = ((((-1.0) * x77 * x84)) + ((r12 * sj5)));
3238 IkReal x92 = (((cj5 * r12)) + ((sj5 * x84)));
3239 IkReal x93 = (((r22 * sj5)) + (((-1.0) * x77 * x85)));
3240 IkReal x94 = (((cj5 * r22)) + ((sj5 * x85)));
3241 IkReal x95 = (sj4 * x86);
3242 IkReal x96 = ((1.0) * x88);
3243 IkReal x97 = ((((-1.0) * x81 * x87)) + ((cj4 * x91)));
3244 IkReal x98 = ((((-1.0) * x81 * x88)) + ((cj4 * x93)));
3245 new_r00 = ((((-1.0) * x80 * ((((cj4 * (((((-1.0) * cj5 * x83)) + x76)))) + (((-1.0) * x95)))))) + ((sj3 * x89)));
3246 new_r01 = ((((-1.0) * x79 * x86)) + (((-1.0) * x81 * x90)));
3247 new_r02 = (((cj3 * x89)) + ((sj3 * (((((-1.0) * x81 * x86)) + ((cj4 * x90)))))));
3248 new_r10 = (((sj3 * x92)) + (((-1.0) * x80 * x97)));
3249 new_r11 = ((((-1.0) * x79 * x87)) + (((-1.0) * x81 * x91)));
3250 new_r12 = (((sj3 * x97)) + ((cj3 * x92)));
3251 new_r20 = (((sj3 * x94)) + (((-1.0) * x80 * x98)));
3252 new_r21 = ((((-1.0) * x79 * x88)) + (((-1.0) * x81 * x93)));
3253 new_r22 = (((sj3 * x98)) + ((cj3 * x94)));
3255 IkReal j1array[2], cj1array[2], sj1array[2];
3256 bool j1valid[2] = {
false };
3258 cj1array[0] = new_r22;
3261 j1valid[0] = j1valid[1] =
true;
3262 j1array[0] =
IKacos(cj1array[0]);
3263 sj1array[0] =
IKsin(j1array[0]);
3264 cj1array[1] = cj1array[0];
3265 j1array[1] = -j1array[0];
3266 sj1array[1] = -sj1array[0];
3268 else if (isnan(cj1array[0]))
3276 for (
int ij1 = 0; ij1 < 2; ++ij1)
3284 for (
int iij1 = ij1 + 1; iij1 < 2; ++iij1)
3289 j1valid[iij1] =
false;
3295 cj1 = cj1array[ij1];
3296 sj1 = sj1array[ij1];
3301 j0eval[1] = ((
IKabs(new_r12)) + (
IKabs(new_r02)));
3303 if (
IKabs(j0eval[0]) < 0.0000010000000000 ||
IKabs(j0eval[1]) < 0.0000010000000000 ||
3304 IKabs(j0eval[2]) < 0.0000010000000000)
3310 j2eval[2] = ((
IKabs(new_r20)) + (
IKabs(new_r21)));
3311 if (
IKabs(j2eval[0]) < 0.0000010000000000 ||
IKabs(j2eval[1]) < 0.0000010000000000 ||
3312 IKabs(j2eval[2]) < 0.0000010000000000)
3316 j0eval[0] = new_r12;
3318 if (
IKabs(j0eval[0]) < 0.0000010000000000 ||
IKabs(j0eval[1]) < 0.0000010000000000)
3322 bool bgotonextstatement =
true;
3326 ((-3.14159265358979) + (
IKfmod(((3.14159265358979) + (
IKabs(j1))), 6.28318530717959)));
3327 evalcond[1] = new_r21;
3328 evalcond[2] = new_r02;
3329 evalcond[3] = new_r12;
3330 evalcond[4] = new_r20;
3331 if (
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 &&
3332 IKabs(evalcond[2]) < 0.0000050000000000 &&
IKabs(evalcond[3]) < 0.0000050000000000 &&
3333 IKabs(evalcond[4]) < 0.0000050000000000)
3335 bgotonextstatement =
false;
3344 j0 =
IKatan2(((-1.0) * new_r10), ((-1.0) * new_r00));
3346 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
3347 vinfos[0].jointtype = 1;
3348 vinfos[0].foffset = j0;
3349 vinfos[0].fmul = j0mul;
3350 vinfos[0].freeind = 0;
3351 vinfos[0].maxsolutions = 0;
3352 vinfos[1].jointtype = 1;
3353 vinfos[1].foffset = j1;
3354 vinfos[1].indices[0] = _ij1[0];
3355 vinfos[1].indices[1] = _ij1[1];
3356 vinfos[1].maxsolutions = _nj1;
3357 vinfos[2].jointtype = 1;
3358 vinfos[2].foffset = j2;
3359 vinfos[2].fmul = j2mul;
3360 vinfos[2].freeind = 0;
3361 vinfos[2].maxsolutions = 0;
3362 vinfos[3].jointtype = 1;
3363 vinfos[3].foffset = j3;
3364 vinfos[3].indices[0] = _ij3[0];
3365 vinfos[3].indices[1] = _ij3[1];
3366 vinfos[3].maxsolutions = _nj3;
3367 vinfos[4].jointtype = 1;
3368 vinfos[4].foffset = j4;
3369 vinfos[4].indices[0] = _ij4[0];
3370 vinfos[4].indices[1] = _ij4[1];
3371 vinfos[4].maxsolutions = _nj4;
3372 vinfos[5].jointtype = 1;
3373 vinfos[5].foffset = j5;
3374 vinfos[5].indices[0] = _ij5[0];
3375 vinfos[5].indices[1] = _ij5[1];
3376 vinfos[5].maxsolutions = _nj5;
3377 vinfos[6].jointtype = 1;
3378 vinfos[6].foffset = j6;
3379 vinfos[6].indices[0] = _ij6[0];
3380 vinfos[6].indices[1] = _ij6[1];
3381 vinfos[6].maxsolutions = _nj6;
3382 std::vector<int> vfree(1);
3384 solutions.AddSolution(vinfos, vfree);
3388 if (bgotonextstatement)
3390 bool bgotonextstatement =
true;
3393 evalcond[0] = ((-3.14159265358979) +
3394 (
IKfmod(((3.14159265358979) + (
IKabs(((-3.14159265358979) + j1)))),
3395 6.28318530717959)));
3396 evalcond[1] = new_r21;
3397 evalcond[2] = new_r02;
3398 evalcond[3] = new_r12;
3399 evalcond[4] = new_r20;
3400 if (
IKabs(evalcond[0]) < 0.0000050000000000 &&
IKabs(evalcond[1]) < 0.0000050000000000 &&
3401 IKabs(evalcond[2]) < 0.0000050000000000 &&
IKabs(evalcond[3]) < 0.0000050000000000 &&
3402 IKabs(evalcond[4]) < 0.0000050000000000)
3404 bgotonextstatement =
false;
3412 j0 =
IKatan2(new_r10, ((-1.0) * new_r11));
3414 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
3415 vinfos[0].jointtype = 1;
3416 vinfos[0].foffset = j0;
3417 vinfos[0].fmul = j0mul;
3418 vinfos[0].freeind = 0;
3419 vinfos[0].maxsolutions = 0;
3420 vinfos[1].jointtype = 1;
3421 vinfos[1].foffset = j1;
3422 vinfos[1].indices[0] = _ij1[0];
3423 vinfos[1].indices[1] = _ij1[1];
3424 vinfos[1].maxsolutions = _nj1;
3425 vinfos[2].jointtype = 1;
3426 vinfos[2].foffset = j2;
3427 vinfos[2].fmul = j2mul;
3428 vinfos[2].freeind = 0;
3429 vinfos[2].maxsolutions = 0;
3430 vinfos[3].jointtype = 1;
3431 vinfos[3].foffset = j3;
3432 vinfos[3].indices[0] = _ij3[0];
3433 vinfos[3].indices[1] = _ij3[1];
3434 vinfos[3].maxsolutions = _nj3;
3435 vinfos[4].jointtype = 1;
3436 vinfos[4].foffset = j4;
3437 vinfos[4].indices[0] = _ij4[0];
3438 vinfos[4].indices[1] = _ij4[1];
3439 vinfos[4].maxsolutions = _nj4;
3440 vinfos[5].jointtype = 1;
3441 vinfos[5].foffset = j5;
3442 vinfos[5].indices[0] = _ij5[0];
3443 vinfos[5].indices[1] = _ij5[1];
3444 vinfos[5].maxsolutions = _nj5;
3445 vinfos[6].jointtype = 1;
3446 vinfos[6].foffset = j6;
3447 vinfos[6].indices[0] = _ij6[0];
3448 vinfos[6].indices[1] = _ij6[1];
3449 vinfos[6].maxsolutions = _nj6;
3450 std::vector<int> vfree(1);
3452 solutions.AddSolution(vinfos, vfree);
3456 if (bgotonextstatement)
3458 bool bgotonextstatement =
true;
3461 evalcond[0] = ((
IKabs(new_r12)) + (
IKabs(new_r02)));
3462 if (
IKabs(evalcond[0]) < 0.0000050000000000)
3464 bgotonextstatement =
false;
3471 IkReal x99 = new_r22 * new_r22;
3472 IkReal x100 = ((16.0) * new_r10);
3473 IkReal x101 = ((16.0) * new_r01);
3474 IkReal x102 = ((16.0) * new_r22);
3475 IkReal x103 = ((8.0) * new_r11);
3476 IkReal x104 = ((8.0) * new_r00);
3477 IkReal x105 = (x100 * x99);
3478 IkReal x106 = (x101 * x99);
3481 ((((16.0) * new_r00)) + (((-32.0) * new_r00 * x99)) + ((new_r11 * x102))))) +
3482 (
IKabs(((((-1.0) * x105)) + x100))) + (
IKabs(((((-1.0) * x100)) + x105))) +
3483 (
IKabs(((((32.0) * new_r11)) + (((-1.0) * new_r00 * x102)) +
3484 (((-16.0) * new_r11 * x99))))) +
3485 (
IKabs(((((-1.0) * x101)) + x106))) +
3486 (
IKabs((((x103 * x99)) + (((-1.0) * new_r22 * x104))))) +
3487 (
IKabs((((new_r22 * x103)) + (((-1.0) * x104))))) +
3488 (
IKabs(((((-1.0) * x106)) + x101))));
3489 if (
IKabs(j0eval[0]) < 0.0000000100000000)
3495 IkReal op[4 + 1], zeror[4];
3497 IkReal j0evalpoly[1];
3498 IkReal x107 = new_r22 * new_r22;
3499 IkReal x108 = ((16.0) * new_r10);
3500 IkReal x109 = (new_r11 * new_r22);
3501 IkReal x110 = (x107 * x108);
3502 IkReal x111 = ((((8.0) * x109)) + (((-8.0) * new_r00)));
3504 op[1] = ((((-1.0) * x110)) + x108);
3505 op[2] = ((((16.0) * x109)) + (((-32.0) * new_r00 * x107)) + (((16.0) * new_r00)));
3506 op[3] = ((((-1.0) * x108)) + x110);
3508 polyroots4(op, zeror, numroots);
3509 IkReal j0array[4], cj0array[4], sj0array[4], tempj0array[1];
3510 int numsolutions = 0;
3511 for (
int ij0 = 0; ij0 < numroots; ++ij0)
3513 IkReal htj0 = zeror[ij0];
3514 tempj0array[0] = ((2.0) * (atan(htj0)));
3515 for (
int kj0 = 0; kj0 < 1; ++kj0)
3517 j0array[numsolutions] = tempj0array[kj0];
3518 if (j0array[numsolutions] >
IKPI)
3520 j0array[numsolutions] -=
IK2PI;
3522 else if (j0array[numsolutions] < -
IKPI)
3524 j0array[numsolutions] +=
IK2PI;
3526 sj0array[numsolutions] =
IKsin(j0array[numsolutions]);
3527 cj0array[numsolutions] =
IKcos(j0array[numsolutions]);
3531 bool j0valid[4] = {
true,
true,
true,
true };
3533 for (
int ij0 = 0; ij0 < numsolutions; ++ij0)
3540 cj0 = cj0array[ij0];
3541 sj0 = sj0array[ij0];
3542 htj0 =
IKtan(j0 / 2);
3544 IkReal x112 = ((16.0) * new_r01);
3545 IkReal x113 = new_r22 * new_r22;
3546 IkReal x114 = (new_r00 * new_r22);
3547 IkReal x115 = ((8.0) * x114);
3548 IkReal x116 = (new_r11 * x113);
3549 IkReal x117 = (x112 * x113);
3550 IkReal x118 = ((8.0) * x116);
3552 (((htj0 * (((((-1.0) * x117)) + x112)))) +
3553 (((htj0 * htj0 * htj0) * (((((-1.0) * x112)) + x117)))) + (((-1.0) * x115)) +
3556 (((((32.0) * new_r11)) + (((-16.0) * x114)) + (((-16.0) * x116)))))) +
3557 (((htj0 * htj0 * htj0 * htj0) * (((((-1.0) * x115)) + x118)))));
3558 if (
IKabs(j0evalpoly[0]) > 0.0000001000000000)
3564 for (
int iij0 = ij0 + 1; iij0 < numsolutions; ++iij0)
3566 if (j0valid[iij0] &&
3570 j0valid[iij0] =
false;
3581 IkReal x119 = cj0 * cj0;
3582 IkReal x120 = new_r22 * new_r22;
3583 IkReal x121 = ((1.0) * cj0);
3584 IkReal x122 = (new_r22 * sj0);
3585 IkReal x123 = (x120 + x119 + (((-1.0) * x119 * x120)));
3588 ((
IKabs(((((-1.0) * new_r10 * x122)) + (((-1.0) * new_r11 * x121))))) +
3589 (
IKabs(((((-1.0) * new_r10 * x121)) + ((new_r11 * x122))))));
3590 j2eval[2] =
IKsign(x123);
3591 if (
IKabs(j2eval[0]) < 0.0000010000000000 ||
3592 IKabs(j2eval[1]) < 0.0000010000000000 ||
3593 IKabs(j2eval[2]) < 0.0000010000000000)
3601 j2eval[0] = new_r22;
3602 if (
IKabs(j2eval[0]) < 0.0000010000000000)
3611 if (
IKabs(j2eval[0]) < 0.0000010000000000)
3615 bool bgotonextstatement =
true;
3618 evalcond[0] = ((-3.14159265358979) +
3619 (
IKfmod(((3.14159265358979) +
3620 (
IKabs(((-1.5707963267949) + j0)))),
3621 6.28318530717959)));
3622 if (
IKabs(evalcond[0]) < 0.0000050000000000)
3624 bgotonextstatement =
false;
3626 IkReal j2array[1], cj2array[1], sj2array[1];
3627 bool j2valid[1] = {
false };
3634 j2array[0] =
IKatan2(new_r00, new_r01);
3635 sj2array[0] =
IKsin(j2array[0]);
3636 cj2array[0] =
IKcos(j2array[0]);
3637 if (j2array[0] >
IKPI)
3639 j2array[0] -=
IK2PI;
3641 else if (j2array[0] < -
IKPI)
3643 j2array[0] +=
IK2PI;
3646 for (
int ij2 = 0; ij2 < 1; ++ij2)
3654 for (
int iij2 = ij2 + 1; iij2 < 1; ++iij2)
3656 if (j2valid[iij2] &&
3657 IKabs(cj2array[ij2] - cj2array[iij2]) <
3659 IKabs(sj2array[ij2] - sj2array[iij2]) <
3662 j2valid[iij2] =
false;
3668 cj2 = cj2array[ij2];
3669 sj2 = sj2array[ij2];
3672 IkReal x124 =
IKsin(j2);
3673 IkReal x125 =
IKcos(j2);
3675 evalcond[1] = ((-1.0) * x124);
3676 evalcond[2] = (x124 + (((-1.0) * new_r00)));
3677 evalcond[3] = (x125 + (((-1.0) * new_r01)));
3688 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
3689 vinfos[0].jointtype = 1;
3690 vinfos[0].foffset = j0;
3691 vinfos[0].indices[0] = _ij0[0];
3692 vinfos[0].indices[1] = _ij0[1];
3693 vinfos[0].maxsolutions = _nj0;
3694 vinfos[1].jointtype = 1;
3695 vinfos[1].foffset = j1;
3696 vinfos[1].indices[0] = _ij1[0];
3697 vinfos[1].indices[1] = _ij1[1];
3698 vinfos[1].maxsolutions = _nj1;
3699 vinfos[2].jointtype = 1;
3700 vinfos[2].foffset = j2;
3701 vinfos[2].indices[0] = _ij2[0];
3702 vinfos[2].indices[1] = _ij2[1];
3703 vinfos[2].maxsolutions = _nj2;
3704 vinfos[3].jointtype = 1;
3705 vinfos[3].foffset = j3;
3706 vinfos[3].indices[0] = _ij3[0];
3707 vinfos[3].indices[1] = _ij3[1];
3708 vinfos[3].maxsolutions = _nj3;
3709 vinfos[4].jointtype = 1;
3710 vinfos[4].foffset = j4;
3711 vinfos[4].indices[0] = _ij4[0];
3712 vinfos[4].indices[1] = _ij4[1];
3713 vinfos[4].maxsolutions = _nj4;
3714 vinfos[5].jointtype = 1;
3715 vinfos[5].foffset = j5;
3716 vinfos[5].indices[0] = _ij5[0];
3717 vinfos[5].indices[1] = _ij5[1];
3718 vinfos[5].maxsolutions = _nj5;
3719 vinfos[6].jointtype = 1;
3720 vinfos[6].foffset = j6;
3721 vinfos[6].indices[0] = _ij6[0];
3722 vinfos[6].indices[1] = _ij6[1];
3723 vinfos[6].maxsolutions = _nj6;
3724 std::vector<int> vfree(0);
3725 solutions.AddSolution(vinfos, vfree);
3731 if (bgotonextstatement)
3733 bool bgotonextstatement =
true;
3736 evalcond[0] = ((-3.14159265358979) +
3737 (
IKfmod(((3.14159265358979) +
3738 (
IKabs(((1.5707963267949) + j0)))),
3739 6.28318530717959)));
3740 if (
IKabs(evalcond[0]) < 0.0000050000000000)
3742 bgotonextstatement =
false;
3744 IkReal j2array[1], cj2array[1], sj2array[1];
3745 bool j2valid[1] = {
false };
3750 IKsqr(((-1.0) * new_r01)) - 1) <=
3754 IKatan2(((-1.0) * new_r00), ((-1.0) * new_r01));
3755 sj2array[0] =
IKsin(j2array[0]);
3756 cj2array[0] =
IKcos(j2array[0]);
3757 if (j2array[0] >
IKPI)
3759 j2array[0] -=
IK2PI;
3761 else if (j2array[0] < -
IKPI)
3763 j2array[0] +=
IK2PI;
3766 for (
int ij2 = 0; ij2 < 1; ++ij2)
3774 for (
int iij2 = ij2 + 1; iij2 < 1; ++iij2)
3776 if (j2valid[iij2] &&
3777 IKabs(cj2array[ij2] - cj2array[iij2]) <
3779 IKabs(sj2array[ij2] - sj2array[iij2]) <
3782 j2valid[iij2] =
false;
3788 cj2 = cj2array[ij2];
3789 sj2 = sj2array[ij2];
3792 IkReal x126 =
IKcos(j2);
3793 IkReal x127 =
IKsin(j2);
3795 evalcond[1] = (x127 + new_r00);
3796 evalcond[2] = (x126 + new_r01);
3797 evalcond[3] = ((-1.0) * x127);
3808 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
3809 vinfos[0].jointtype = 1;
3810 vinfos[0].foffset = j0;
3811 vinfos[0].indices[0] = _ij0[0];
3812 vinfos[0].indices[1] = _ij0[1];
3813 vinfos[0].maxsolutions = _nj0;
3814 vinfos[1].jointtype = 1;
3815 vinfos[1].foffset = j1;
3816 vinfos[1].indices[0] = _ij1[0];
3817 vinfos[1].indices[1] = _ij1[1];
3818 vinfos[1].maxsolutions = _nj1;
3819 vinfos[2].jointtype = 1;
3820 vinfos[2].foffset = j2;
3821 vinfos[2].indices[0] = _ij2[0];
3822 vinfos[2].indices[1] = _ij2[1];
3823 vinfos[2].maxsolutions = _nj2;
3824 vinfos[3].jointtype = 1;
3825 vinfos[3].foffset = j3;
3826 vinfos[3].indices[0] = _ij3[0];
3827 vinfos[3].indices[1] = _ij3[1];
3828 vinfos[3].maxsolutions = _nj3;
3829 vinfos[4].jointtype = 1;
3830 vinfos[4].foffset = j4;
3831 vinfos[4].indices[0] = _ij4[0];
3832 vinfos[4].indices[1] = _ij4[1];
3833 vinfos[4].maxsolutions = _nj4;
3834 vinfos[5].jointtype = 1;
3835 vinfos[5].foffset = j5;
3836 vinfos[5].indices[0] = _ij5[0];
3837 vinfos[5].indices[1] = _ij5[1];
3838 vinfos[5].maxsolutions = _nj5;
3839 vinfos[6].jointtype = 1;
3840 vinfos[6].foffset = j6;
3841 vinfos[6].indices[0] = _ij6[0];
3842 vinfos[6].indices[1] = _ij6[1];
3843 vinfos[6].maxsolutions = _nj6;
3844 std::vector<int> vfree(0);
3845 solutions.AddSolution(vinfos, vfree);
3851 if (bgotonextstatement)
3853 bool bgotonextstatement =
true;
3856 IkReal x128 = new_r22 * new_r22;
3863 if ((((-1.0) * x128 * (x129.
value))) < -0.00001)
3865 IkReal gconst12 =
IKsqrt(((-1.0) * x128 * (x129.
value)));
3867 ((-3.14159265358979) +
3868 (
IKfmod(((3.14159265358979) +
3869 (
IKabs((cj0 + (((-1.0) * gconst12))))) +
3871 6.28318530717959)));
3872 if (
IKabs(evalcond[0]) < 0.0000050000000000)
3874 bgotonextstatement =
false;
3877 IkReal x130 = new_r22 * new_r22;
3882 if ((((1.0) + (((-1.0) * (gconst12 * gconst12))))) <
3886 IKsqrt(((1.0) + (((-1.0) * (gconst12 * gconst12)))));
3893 ((1.0) + (((-1.0) * x130))), -1);
3898 if ((((-1.0) * x130 * (x131.
value))) < -0.00001)
3900 IkReal gconst12 =
IKsqrt(((-1.0) * x130 * (x131.
value)));
3901 j2eval[0] = ((
IKabs(new_r11)) + (
IKabs(new_r10)));
3902 if (
IKabs(j2eval[0]) < 0.0000010000000000)
3905 IkReal j2array[1], cj2array[1], sj2array[1];
3906 bool j2valid[1] = {
false };
3914 if ((((1.0) + (((-1.0) * (gconst12 * gconst12))))) <
3917 if (
IKabs(((-1.0) * new_r10 * (x132.
value))) <
3922 (gconst12 * gconst12)))))))) +
3923 (((-1.0) * gconst12 * new_r11)))) <
3928 (
IKsqrt(((1.0) + (((-1.0) *
3931 (((-1.0) * gconst12 * new_r11)))) -
3935 ((-1.0) * new_r10 * (x132.
value)),
3937 (
IKsqrt(((1.0) + (((-1.0) * (gconst12 *
3939 (((-1.0) * gconst12 * new_r11))));
3940 sj2array[0] =
IKsin(j2array[0]);
3941 cj2array[0] =
IKcos(j2array[0]);
3942 if (j2array[0] >
IKPI)
3944 j2array[0] -=
IK2PI;
3946 else if (j2array[0] < -
IKPI)
3948 j2array[0] +=
IK2PI;
3951 for (
int ij2 = 0; ij2 < 1; ++ij2)
3959 for (
int iij2 = ij2 + 1; iij2 < 1; ++iij2)
3961 if (j2valid[iij2] &&
3962 IKabs(cj2array[ij2] - cj2array[iij2]) <
3964 IKabs(sj2array[ij2] - sj2array[iij2]) <
3967 j2valid[iij2] =
false;
3973 cj2 = cj2array[ij2];
3974 sj2 = sj2array[ij2];
3977 IkReal x133 =
IKsin(j2);
3978 IkReal x134 =
IKcos(j2);
3980 (((-1.0) * (gconst12 * gconst12))))) <
3984 ((1.0) + (((-1.0) * (gconst12 * gconst12)))));
3985 IkReal x136 = ((1.0) * x135);
3987 evalcond[1] = ((-1.0) * x133);
3988 evalcond[2] = (((gconst12 * x133)) + new_r10);
3989 evalcond[3] = (((gconst12 * x134)) + new_r11);
3991 ((((-1.0) * x133 * x136)) + new_r00);
3993 ((((-1.0) * x134 * x136)) + new_r01);
3994 evalcond[6] = ((((-1.0) * new_r00 * x136)) +
3995 x133 + ((gconst12 * new_r10)));
3996 evalcond[7] = ((((-1.0) * new_r01 * x136)) +
3997 x134 + ((gconst12 * new_r11)));
4012 std::vector<IkSingleDOFSolutionBase<IkReal> >
4014 vinfos[0].jointtype = 1;
4015 vinfos[0].foffset = j0;
4016 vinfos[0].indices[0] = _ij0[0];
4017 vinfos[0].indices[1] = _ij0[1];
4018 vinfos[0].maxsolutions = _nj0;
4019 vinfos[1].jointtype = 1;
4020 vinfos[1].foffset = j1;
4021 vinfos[1].indices[0] = _ij1[0];
4022 vinfos[1].indices[1] = _ij1[1];
4023 vinfos[1].maxsolutions = _nj1;
4024 vinfos[2].jointtype = 1;
4025 vinfos[2].foffset = j2;
4026 vinfos[2].indices[0] = _ij2[0];
4027 vinfos[2].indices[1] = _ij2[1];
4028 vinfos[2].maxsolutions = _nj2;
4029 vinfos[3].jointtype = 1;
4030 vinfos[3].foffset = j3;
4031 vinfos[3].indices[0] = _ij3[0];
4032 vinfos[3].indices[1] = _ij3[1];
4033 vinfos[3].maxsolutions = _nj3;
4034 vinfos[4].jointtype = 1;
4035 vinfos[4].foffset = j4;
4036 vinfos[4].indices[0] = _ij4[0];
4037 vinfos[4].indices[1] = _ij4[1];
4038 vinfos[4].maxsolutions = _nj4;
4039 vinfos[5].jointtype = 1;
4040 vinfos[5].foffset = j5;
4041 vinfos[5].indices[0] = _ij5[0];
4042 vinfos[5].indices[1] = _ij5[1];
4043 vinfos[5].maxsolutions = _nj5;
4044 vinfos[6].jointtype = 1;
4045 vinfos[6].foffset = j6;
4046 vinfos[6].indices[0] = _ij6[0];
4047 vinfos[6].indices[1] = _ij6[1];
4048 vinfos[6].maxsolutions = _nj6;
4049 std::vector<int> vfree(0);
4050 solutions.AddSolution(vinfos, vfree);
4058 IkReal j2array[1], cj2array[1], sj2array[1];
4059 bool j2valid[1] = {
false };
4063 IkReal(((-1.0) * new_r11)),
4075 j2array[0] = ((-1.5707963267949) + (x137.
value) +
4076 (((1.5707963267949) * (x138.
value))));
4077 sj2array[0] =
IKsin(j2array[0]);
4078 cj2array[0] =
IKcos(j2array[0]);
4079 if (j2array[0] >
IKPI)
4081 j2array[0] -=
IK2PI;
4083 else if (j2array[0] < -
IKPI)
4085 j2array[0] +=
IK2PI;
4088 for (
int ij2 = 0; ij2 < 1; ++ij2)
4096 for (
int iij2 = ij2 + 1; iij2 < 1; ++iij2)
4098 if (j2valid[iij2] &&
4099 IKabs(cj2array[ij2] - cj2array[iij2]) <
4101 IKabs(sj2array[ij2] - sj2array[iij2]) <
4104 j2valid[iij2] =
false;
4110 cj2 = cj2array[ij2];
4111 sj2 = sj2array[ij2];
4114 IkReal x139 =
IKsin(j2);
4115 IkReal x140 =
IKcos(j2);
4117 (((-1.0) * (gconst12 * gconst12))))) <
4121 ((1.0) + (((-1.0) * (gconst12 * gconst12)))));
4122 IkReal x142 = ((1.0) * x141);
4124 evalcond[1] = ((-1.0) * x139);
4125 evalcond[2] = (((gconst12 * x139)) + new_r10);
4126 evalcond[3] = (((gconst12 * x140)) + new_r11);
4128 ((((-1.0) * x139 * x142)) + new_r00);
4130 ((((-1.0) * x140 * x142)) + new_r01);
4132 (x139 + (((-1.0) * new_r00 * x142)) +
4133 ((gconst12 * new_r10)));
4134 evalcond[7] = ((((-1.0) * new_r01 * x142)) +
4135 x140 + ((gconst12 * new_r11)));
4150 std::vector<IkSingleDOFSolutionBase<IkReal> >
4152 vinfos[0].jointtype = 1;
4153 vinfos[0].foffset = j0;
4154 vinfos[0].indices[0] = _ij0[0];
4155 vinfos[0].indices[1] = _ij0[1];
4156 vinfos[0].maxsolutions = _nj0;
4157 vinfos[1].jointtype = 1;
4158 vinfos[1].foffset = j1;
4159 vinfos[1].indices[0] = _ij1[0];
4160 vinfos[1].indices[1] = _ij1[1];
4161 vinfos[1].maxsolutions = _nj1;
4162 vinfos[2].jointtype = 1;
4163 vinfos[2].foffset = j2;
4164 vinfos[2].indices[0] = _ij2[0];
4165 vinfos[2].indices[1] = _ij2[1];
4166 vinfos[2].maxsolutions = _nj2;
4167 vinfos[3].jointtype = 1;
4168 vinfos[3].foffset = j3;
4169 vinfos[3].indices[0] = _ij3[0];
4170 vinfos[3].indices[1] = _ij3[1];
4171 vinfos[3].maxsolutions = _nj3;
4172 vinfos[4].jointtype = 1;
4173 vinfos[4].foffset = j4;
4174 vinfos[4].indices[0] = _ij4[0];
4175 vinfos[4].indices[1] = _ij4[1];
4176 vinfos[4].maxsolutions = _nj4;
4177 vinfos[5].jointtype = 1;
4178 vinfos[5].foffset = j5;
4179 vinfos[5].indices[0] = _ij5[0];
4180 vinfos[5].indices[1] = _ij5[1];
4181 vinfos[5].maxsolutions = _nj5;
4182 vinfos[6].jointtype = 1;
4183 vinfos[6].foffset = j6;
4184 vinfos[6].indices[0] = _ij6[0];
4185 vinfos[6].indices[1] = _ij6[1];
4186 vinfos[6].maxsolutions = _nj6;
4187 std::vector<int> vfree(0);
4188 solutions.AddSolution(vinfos, vfree);
4196 if (bgotonextstatement)
4198 bool bgotonextstatement =
true;
4201 IkReal x143 = new_r22 * new_r22;
4208 if ((((-1.0) * x143 * (x144.
value))) < -0.00001)
4210 IkReal gconst12 =
IKsqrt(((-1.0) * x143 * (x144.
value)));
4212 ((-3.14159265358979) +
4213 (
IKfmod(((3.14159265358979) +
4214 (
IKabs((cj0 + (((-1.0) * gconst12))))) +
4216 6.28318530717959)));
4217 if (
IKabs(evalcond[0]) < 0.0000050000000000)
4219 bgotonextstatement =
false;
4222 IkReal x145 = new_r22 * new_r22;
4227 if ((((1.0) + (((-1.0) * (gconst12 * gconst12))))) <
4232 (((-1.0) * (gconst12 * gconst12)))))));
4237 j0 = ((-1.0) * (
IKacos(gconst12)));
4239 ((1.0) + (((-1.0) * x145))), -1);
4244 if ((((-1.0) * x145 * (x146.
value))) < -0.00001)
4248 j2eval[0] = ((
IKabs(new_r11)) + (
IKabs(new_r10)));
4249 if (
IKabs(j2eval[0]) < 0.0000010000000000)
4252 IkReal j2array[1], cj2array[1], sj2array[1];
4253 bool j2valid[1] = {
false };
4261 if ((((1.0) + (((-1.0) * (gconst12 * gconst12))))) <
4264 if (
IKabs(((-1.0) * new_r10 * (x147.
value))) <
4266 IKabs(((((-1.0) * new_r01 *
4268 (((-1.0) * (gconst12 *
4270 (((-1.0) * gconst12 * new_r11)))) <
4273 IKsqr(((((-1.0) * new_r01 *
4278 (((-1.0) * gconst12 * new_r11)))) -
4282 ((-1.0) * new_r10 * (x147.
value)),
4283 ((((-1.0) * new_r01 *
4286 (((-1.0) * (gconst12 * gconst12)))))))) +
4287 (((-1.0) * gconst12 * new_r11))));
4288 sj2array[0] =
IKsin(j2array[0]);
4289 cj2array[0] =
IKcos(j2array[0]);
4290 if (j2array[0] >
IKPI)
4292 j2array[0] -=
IK2PI;
4294 else if (j2array[0] < -
IKPI)
4296 j2array[0] +=
IK2PI;
4299 for (
int ij2 = 0; ij2 < 1; ++ij2)
4307 for (
int iij2 = ij2 + 1; iij2 < 1; ++iij2)
4309 if (j2valid[iij2] &&
4310 IKabs(cj2array[ij2] - cj2array[iij2]) <
4312 IKabs(sj2array[ij2] - sj2array[iij2]) <
4315 j2valid[iij2] =
false;
4321 cj2 = cj2array[ij2];
4322 sj2 = sj2array[ij2];
4325 IkReal x148 =
IKsin(j2);
4326 IkReal x149 =
IKcos(j2);
4328 (((-1.0) * (gconst12 * gconst12))))) <
4333 (((-1.0) * (gconst12 * gconst12)))));
4335 evalcond[1] = ((-1.0) * x148);
4336 evalcond[2] = (((gconst12 * x148)) + new_r10);
4337 evalcond[3] = (((gconst12 * x149)) + new_r11);
4338 evalcond[4] = (((x148 * x150)) + new_r00);
4339 evalcond[5] = (((x149 * x150)) + new_r01);
4340 evalcond[6] = (((new_r00 * x150)) + x148 +
4341 ((gconst12 * new_r10)));
4342 evalcond[7] = (((new_r01 * x150)) + x149 +
4343 ((gconst12 * new_r11)));
4344 if (
IKabs(evalcond[0]) >
4346 IKabs(evalcond[1]) >
4348 IKabs(evalcond[2]) >
4350 IKabs(evalcond[3]) >
4352 IKabs(evalcond[4]) >
4354 IKabs(evalcond[5]) >
4356 IKabs(evalcond[6]) >
4365 std::vector<IkSingleDOFSolutionBase<IkReal> >
4367 vinfos[0].jointtype = 1;
4368 vinfos[0].foffset = j0;
4369 vinfos[0].indices[0] = _ij0[0];
4370 vinfos[0].indices[1] = _ij0[1];
4371 vinfos[0].maxsolutions = _nj0;
4372 vinfos[1].jointtype = 1;
4373 vinfos[1].foffset = j1;
4374 vinfos[1].indices[0] = _ij1[0];
4375 vinfos[1].indices[1] = _ij1[1];
4376 vinfos[1].maxsolutions = _nj1;
4377 vinfos[2].jointtype = 1;
4378 vinfos[2].foffset = j2;
4379 vinfos[2].indices[0] = _ij2[0];
4380 vinfos[2].indices[1] = _ij2[1];
4381 vinfos[2].maxsolutions = _nj2;
4382 vinfos[3].jointtype = 1;
4383 vinfos[3].foffset = j3;
4384 vinfos[3].indices[0] = _ij3[0];
4385 vinfos[3].indices[1] = _ij3[1];
4386 vinfos[3].maxsolutions = _nj3;
4387 vinfos[4].jointtype = 1;
4388 vinfos[4].foffset = j4;
4389 vinfos[4].indices[0] = _ij4[0];
4390 vinfos[4].indices[1] = _ij4[1];
4391 vinfos[4].maxsolutions = _nj4;
4392 vinfos[5].jointtype = 1;
4393 vinfos[5].foffset = j5;
4394 vinfos[5].indices[0] = _ij5[0];
4395 vinfos[5].indices[1] = _ij5[1];
4396 vinfos[5].maxsolutions = _nj5;
4397 vinfos[6].jointtype = 1;
4398 vinfos[6].foffset = j6;
4399 vinfos[6].indices[0] = _ij6[0];
4400 vinfos[6].indices[1] = _ij6[1];
4401 vinfos[6].maxsolutions = _nj6;
4402 std::vector<int> vfree(0);
4403 solutions.AddSolution(vinfos, vfree);
4411 IkReal j2array[1], cj2array[1], sj2array[1];
4412 bool j2valid[1] = {
false };
4416 IkReal(((-1.0) * new_r11)),
4428 j2array[0] = ((-1.5707963267949) + (x151.
value) +
4429 (((1.5707963267949) * (x152.
value))));
4430 sj2array[0] =
IKsin(j2array[0]);
4431 cj2array[0] =
IKcos(j2array[0]);
4432 if (j2array[0] >
IKPI)
4434 j2array[0] -=
IK2PI;
4436 else if (j2array[0] < -
IKPI)
4438 j2array[0] +=
IK2PI;
4441 for (
int ij2 = 0; ij2 < 1; ++ij2)
4449 for (
int iij2 = ij2 + 1; iij2 < 1; ++iij2)
4451 if (j2valid[iij2] &&
4452 IKabs(cj2array[ij2] - cj2array[iij2]) <
4454 IKabs(sj2array[ij2] - sj2array[iij2]) <
4457 j2valid[iij2] =
false;
4463 cj2 = cj2array[ij2];
4464 sj2 = sj2array[ij2];
4467 IkReal x153 =
IKsin(j2);
4468 IkReal x154 =
IKcos(j2);
4470 (((-1.0) * (gconst12 * gconst12))))) <
4475 (((-1.0) * (gconst12 * gconst12)))));
4477 evalcond[1] = ((-1.0) * x153);
4478 evalcond[2] = (((gconst12 * x153)) + new_r10);
4479 evalcond[3] = (((gconst12 * x154)) + new_r11);
4480 evalcond[4] = (((x153 * x155)) + new_r00);
4481 evalcond[5] = (((x154 * x155)) + new_r01);
4482 evalcond[6] = (((new_r00 * x155)) + x153 +
4483 ((gconst12 * new_r10)));
4484 evalcond[7] = (((new_r01 * x155)) + x154 +
4485 ((gconst12 * new_r11)));
4486 if (
IKabs(evalcond[0]) >
4488 IKabs(evalcond[1]) >
4490 IKabs(evalcond[2]) >
4492 IKabs(evalcond[3]) >
4494 IKabs(evalcond[4]) >
4496 IKabs(evalcond[5]) >
4498 IKabs(evalcond[6]) >
4507 std::vector<IkSingleDOFSolutionBase<IkReal> >
4509 vinfos[0].jointtype = 1;
4510 vinfos[0].foffset = j0;
4511 vinfos[0].indices[0] = _ij0[0];
4512 vinfos[0].indices[1] = _ij0[1];
4513 vinfos[0].maxsolutions = _nj0;
4514 vinfos[1].jointtype = 1;
4515 vinfos[1].foffset = j1;
4516 vinfos[1].indices[0] = _ij1[0];
4517 vinfos[1].indices[1] = _ij1[1];
4518 vinfos[1].maxsolutions = _nj1;
4519 vinfos[2].jointtype = 1;
4520 vinfos[2].foffset = j2;
4521 vinfos[2].indices[0] = _ij2[0];
4522 vinfos[2].indices[1] = _ij2[1];
4523 vinfos[2].maxsolutions = _nj2;
4524 vinfos[3].jointtype = 1;
4525 vinfos[3].foffset = j3;
4526 vinfos[3].indices[0] = _ij3[0];
4527 vinfos[3].indices[1] = _ij3[1];
4528 vinfos[3].maxsolutions = _nj3;
4529 vinfos[4].jointtype = 1;
4530 vinfos[4].foffset = j4;
4531 vinfos[4].indices[0] = _ij4[0];
4532 vinfos[4].indices[1] = _ij4[1];
4533 vinfos[4].maxsolutions = _nj4;
4534 vinfos[5].jointtype = 1;
4535 vinfos[5].foffset = j5;
4536 vinfos[5].indices[0] = _ij5[0];
4537 vinfos[5].indices[1] = _ij5[1];
4538 vinfos[5].maxsolutions = _nj5;
4539 vinfos[6].jointtype = 1;
4540 vinfos[6].foffset = j6;
4541 vinfos[6].indices[0] = _ij6[0];
4542 vinfos[6].indices[1] = _ij6[1];
4543 vinfos[6].maxsolutions = _nj6;
4544 std::vector<int> vfree(0);
4545 solutions.AddSolution(vinfos, vfree);
4553 if (bgotonextstatement)
4555 bool bgotonextstatement =
true;
4558 IkReal x156 = new_r22 * new_r22;
4560 ((1.0) + (((-1.0) * x156))), -1);
4565 if ((((-1.0) * x156 * (x157.
value))) < -0.00001)
4568 ((-1.0) * (
IKsqrt(((-1.0) * x156 * (x157.
value)))));
4570 ((-3.14159265358979) +
4571 (
IKfmod(((3.14159265358979) +
4572 (
IKabs((cj0 + (((-1.0) * gconst13))))) +
4574 6.28318530717959)));
4575 if (
IKabs(evalcond[0]) < 0.0000050000000000)
4577 bgotonextstatement =
false;
4580 IkReal x158 = new_r22 * new_r22;
4585 if ((((1.0) + (((-1.0) * (gconst13 * gconst13))))) <
4589 ((1.0) + (((-1.0) * (gconst13 * gconst13)))));
4596 ((1.0) + (((-1.0) * x158))), -1);
4601 if ((((-1.0) * x158 * (x159.
value))) < -0.00001)
4606 j2eval[0] = ((
IKabs(new_r11)) + (
IKabs(new_r10)));
4607 if (
IKabs(j2eval[0]) < 0.0000010000000000)
4610 IkReal j2array[1], cj2array[1], sj2array[1];
4611 bool j2valid[1] = {
false };
4620 (((-1.0) * (gconst13 * gconst13))))) <
4623 if (
IKabs(((-1.0) * new_r10 * (x160.
value))) <
4626 (((-1.0) * gconst13 * new_r11)) +
4628 (
IKsqrt(((1.0) + (((-1.0) *
4630 gconst13)))))))))) <
4634 IKsqr(((((-1.0) * gconst13 * new_r11)) +
4639 gconst13)))))))))) -
4643 ((-1.0) * new_r10 * (x160.
value)),
4644 ((((-1.0) * gconst13 * new_r11)) +
4648 (gconst13 * gconst13))))))))));
4649 sj2array[0] =
IKsin(j2array[0]);
4650 cj2array[0] =
IKcos(j2array[0]);
4651 if (j2array[0] >
IKPI)
4653 j2array[0] -=
IK2PI;
4655 else if (j2array[0] < -
IKPI)
4657 j2array[0] +=
IK2PI;
4660 for (
int ij2 = 0; ij2 < 1; ++ij2)
4668 for (
int iij2 = ij2 + 1; iij2 < 1; ++iij2)
4670 if (j2valid[iij2] &&
4671 IKabs(cj2array[ij2] - cj2array[iij2]) <
4673 IKabs(sj2array[ij2] - sj2array[iij2]) <
4676 j2valid[iij2] =
false;
4682 cj2 = cj2array[ij2];
4683 sj2 = sj2array[ij2];
4686 IkReal x161 =
IKsin(j2);
4687 IkReal x162 =
IKcos(j2);
4689 (((-1.0) * (gconst13 * gconst13))))) <
4694 (((-1.0) * (gconst13 * gconst13)))));
4695 IkReal x164 = ((1.0) * x163);
4697 evalcond[1] = ((-1.0) * x161);
4698 evalcond[2] = (new_r10 + ((gconst13 * x161)));
4699 evalcond[3] = (new_r11 + ((gconst13 * x162)));
4701 ((((-1.0) * x161 * x164)) + new_r00);
4703 ((((-1.0) * x162 * x164)) + new_r01);
4704 evalcond[6] = ((((-1.0) * new_r00 * x164)) +
4705 x161 + ((gconst13 * new_r10)));
4706 evalcond[7] = (x162 + ((gconst13 * new_r11)) +
4707 (((-1.0) * new_r01 * x164)));
4708 if (
IKabs(evalcond[0]) >
4710 IKabs(evalcond[1]) >
4712 IKabs(evalcond[2]) >
4714 IKabs(evalcond[3]) >
4716 IKabs(evalcond[4]) >
4718 IKabs(evalcond[5]) >
4720 IKabs(evalcond[6]) >
4722 IKabs(evalcond[7]) >
4730 std::vector<IkSingleDOFSolutionBase<IkReal> >
4732 vinfos[0].jointtype = 1;
4733 vinfos[0].foffset = j0;
4734 vinfos[0].indices[0] = _ij0[0];
4735 vinfos[0].indices[1] = _ij0[1];
4736 vinfos[0].maxsolutions = _nj0;
4737 vinfos[1].jointtype = 1;
4738 vinfos[1].foffset = j1;
4739 vinfos[1].indices[0] = _ij1[0];
4740 vinfos[1].indices[1] = _ij1[1];
4741 vinfos[1].maxsolutions = _nj1;
4742 vinfos[2].jointtype = 1;
4743 vinfos[2].foffset = j2;
4744 vinfos[2].indices[0] = _ij2[0];
4745 vinfos[2].indices[1] = _ij2[1];
4746 vinfos[2].maxsolutions = _nj2;
4747 vinfos[3].jointtype = 1;
4748 vinfos[3].foffset = j3;
4749 vinfos[3].indices[0] = _ij3[0];
4750 vinfos[3].indices[1] = _ij3[1];
4751 vinfos[3].maxsolutions = _nj3;
4752 vinfos[4].jointtype = 1;
4753 vinfos[4].foffset = j4;
4754 vinfos[4].indices[0] = _ij4[0];
4755 vinfos[4].indices[1] = _ij4[1];
4756 vinfos[4].maxsolutions = _nj4;
4757 vinfos[5].jointtype = 1;
4758 vinfos[5].foffset = j5;
4759 vinfos[5].indices[0] = _ij5[0];
4760 vinfos[5].indices[1] = _ij5[1];
4761 vinfos[5].maxsolutions = _nj5;
4762 vinfos[6].jointtype = 1;
4763 vinfos[6].foffset = j6;
4764 vinfos[6].indices[0] = _ij6[0];
4765 vinfos[6].indices[1] = _ij6[1];
4766 vinfos[6].maxsolutions = _nj6;
4767 std::vector<int> vfree(0);
4768 solutions.AddSolution(vinfos, vfree);
4776 IkReal j2array[1], cj2array[1], sj2array[1];
4777 bool j2valid[1] = {
false };
4781 IkReal(((-1.0) * new_r11)),
4794 ((-1.5707963267949) + (x165.
value) +
4795 (((1.5707963267949) * (x166.
value))));
4796 sj2array[0] =
IKsin(j2array[0]);
4797 cj2array[0] =
IKcos(j2array[0]);
4798 if (j2array[0] >
IKPI)
4800 j2array[0] -=
IK2PI;
4802 else if (j2array[0] < -
IKPI)
4804 j2array[0] +=
IK2PI;
4807 for (
int ij2 = 0; ij2 < 1; ++ij2)
4815 for (
int iij2 = ij2 + 1; iij2 < 1; ++iij2)
4817 if (j2valid[iij2] &&
4818 IKabs(cj2array[ij2] - cj2array[iij2]) <
4820 IKabs(sj2array[ij2] - sj2array[iij2]) <
4823 j2valid[iij2] =
false;
4829 cj2 = cj2array[ij2];
4830 sj2 = sj2array[ij2];
4833 IkReal x167 =
IKsin(j2);
4834 IkReal x168 =
IKcos(j2);
4836 (((-1.0) * (gconst13 * gconst13))))) <
4841 (((-1.0) * (gconst13 * gconst13)))));
4842 IkReal x170 = ((1.0) * x169);
4844 evalcond[1] = ((-1.0) * x167);
4845 evalcond[2] = (new_r10 + ((gconst13 * x167)));
4846 evalcond[3] = (new_r11 + ((gconst13 * x168)));
4848 (new_r00 + (((-1.0) * x167 * x170)));
4850 ((((-1.0) * x168 * x170)) + new_r01);
4851 evalcond[6] = (x167 + ((gconst13 * new_r10)) +
4852 (((-1.0) * new_r00 * x170)));
4853 evalcond[7] = (x168 + ((gconst13 * new_r11)) +
4854 (((-1.0) * new_r01 * x170)));
4855 if (
IKabs(evalcond[0]) >
4857 IKabs(evalcond[1]) >
4859 IKabs(evalcond[2]) >
4861 IKabs(evalcond[3]) >
4863 IKabs(evalcond[4]) >
4865 IKabs(evalcond[5]) >
4867 IKabs(evalcond[6]) >
4869 IKabs(evalcond[7]) >
4877 std::vector<IkSingleDOFSolutionBase<IkReal> >
4879 vinfos[0].jointtype = 1;
4880 vinfos[0].foffset = j0;
4881 vinfos[0].indices[0] = _ij0[0];
4882 vinfos[0].indices[1] = _ij0[1];
4883 vinfos[0].maxsolutions = _nj0;
4884 vinfos[1].jointtype = 1;
4885 vinfos[1].foffset = j1;
4886 vinfos[1].indices[0] = _ij1[0];
4887 vinfos[1].indices[1] = _ij1[1];
4888 vinfos[1].maxsolutions = _nj1;
4889 vinfos[2].jointtype = 1;
4890 vinfos[2].foffset = j2;
4891 vinfos[2].indices[0] = _ij2[0];
4892 vinfos[2].indices[1] = _ij2[1];
4893 vinfos[2].maxsolutions = _nj2;
4894 vinfos[3].jointtype = 1;
4895 vinfos[3].foffset = j3;
4896 vinfos[3].indices[0] = _ij3[0];
4897 vinfos[3].indices[1] = _ij3[1];
4898 vinfos[3].maxsolutions = _nj3;
4899 vinfos[4].jointtype = 1;
4900 vinfos[4].foffset = j4;
4901 vinfos[4].indices[0] = _ij4[0];
4902 vinfos[4].indices[1] = _ij4[1];
4903 vinfos[4].maxsolutions = _nj4;
4904 vinfos[5].jointtype = 1;
4905 vinfos[5].foffset = j5;
4906 vinfos[5].indices[0] = _ij5[0];
4907 vinfos[5].indices[1] = _ij5[1];
4908 vinfos[5].maxsolutions = _nj5;
4909 vinfos[6].jointtype = 1;
4910 vinfos[6].foffset = j6;
4911 vinfos[6].indices[0] = _ij6[0];
4912 vinfos[6].indices[1] = _ij6[1];
4913 vinfos[6].maxsolutions = _nj6;
4914 std::vector<int> vfree(0);
4915 solutions.AddSolution(vinfos, vfree);
4923 if (bgotonextstatement)
4925 bool bgotonextstatement =
true;
4928 IkReal x171 = new_r22 * new_r22;
4930 ((1.0) + (((-1.0) * x171))), -1);
4935 if ((((-1.0) * x171 * (x172.
value))) < -0.00001)
4938 ((-1.0) * (
IKsqrt(((-1.0) * x171 * (x172.
value)))));
4940 ((-3.14159265358979) +
4941 (
IKfmod(((3.14159265358979) +
4943 (
IKabs((cj0 + (((-1.0) * gconst13)))))),
4944 6.28318530717959)));
4945 if (
IKabs(evalcond[0]) < 0.0000050000000000)
4947 bgotonextstatement =
false;
4950 IkReal x173 = new_r22 * new_r22;
4955 if ((((1.0) + (((-1.0) * (gconst13 * gconst13))))) <
4959 (
IKsqrt(((1.0) + (((-1.0) * (gconst13 *
4965 j0 = ((-1.0) * (
IKacos(gconst13)));
4967 ((1.0) + (((-1.0) * x173))), -1);
4972 if ((((-1.0) * x173 * (x174.
value))) < -0.00001)
4977 j2eval[0] = ((
IKabs(new_r11)) + (
IKabs(new_r10)));
4978 if (
IKabs(j2eval[0]) < 0.0000010000000000)
4981 IkReal j2array[1], cj2array[1], sj2array[1];
4982 bool j2valid[1] = {
false };
4991 (((-1.0) * (gconst13 * gconst13))))) <
4994 if (
IKabs(((-1.0) * new_r10 * (x175.
value))) <
4996 IKabs(((((-1.0) * gconst13 * new_r11)) +
4997 (((-1.0) * new_r01 *
5001 gconst13)))))))))) <
5006 (((-1.0) * gconst13 * new_r11)) +
5007 (((-1.0) * new_r01 *
5011 gconst13)))))))))) -
5015 ((-1.0) * new_r10 * (x175.
value)),
5016 ((((-1.0) * gconst13 * new_r11)) +
5017 (((-1.0) * new_r01 *
5019 (((-1.0) * (gconst13 *
5021 sj2array[0] =
IKsin(j2array[0]);
5022 cj2array[0] =
IKcos(j2array[0]);
5023 if (j2array[0] >
IKPI)
5025 j2array[0] -=
IK2PI;
5027 else if (j2array[0] < -
IKPI)
5029 j2array[0] +=
IK2PI;
5032 for (
int ij2 = 0; ij2 < 1; ++ij2)
5040 for (
int iij2 = ij2 + 1; iij2 < 1; ++iij2)
5042 if (j2valid[iij2] &&
5043 IKabs(cj2array[ij2] - cj2array[iij2]) <
5045 IKabs(sj2array[ij2] - sj2array[iij2]) <
5048 j2valid[iij2] =
false;
5054 cj2 = cj2array[ij2];
5055 sj2 = sj2array[ij2];
5058 IkReal x176 =
IKsin(j2);
5059 IkReal x177 =
IKcos(j2);
5061 (((-1.0) * (gconst13 * gconst13))))) <
5066 (((-1.0) * (gconst13 * gconst13)))));
5068 evalcond[1] = ((-1.0) * x176);
5070 (new_r10 + ((gconst13 * x176)));
5072 (new_r11 + ((gconst13 * x177)));
5073 evalcond[4] = (((x176 * x178)) + new_r00);
5074 evalcond[5] = (new_r01 + ((x177 * x178)));
5075 evalcond[6] = (((new_r00 * x178)) + x176 +
5076 ((gconst13 * new_r10)));
5077 evalcond[7] = (((new_r01 * x178)) + x177 +
5078 ((gconst13 * new_r11)));
5079 if (
IKabs(evalcond[0]) >
5081 IKabs(evalcond[1]) >
5083 IKabs(evalcond[2]) >
5085 IKabs(evalcond[3]) >
5087 IKabs(evalcond[4]) >
5089 IKabs(evalcond[5]) >
5091 IKabs(evalcond[6]) >
5093 IKabs(evalcond[7]) >
5104 vinfos[0].jointtype = 1;
5105 vinfos[0].foffset = j0;
5106 vinfos[0].indices[0] = _ij0[0];
5107 vinfos[0].indices[1] = _ij0[1];
5108 vinfos[0].maxsolutions = _nj0;
5109 vinfos[1].jointtype = 1;
5110 vinfos[1].foffset = j1;
5111 vinfos[1].indices[0] = _ij1[0];
5112 vinfos[1].indices[1] = _ij1[1];
5113 vinfos[1].maxsolutions = _nj1;
5114 vinfos[2].jointtype = 1;
5115 vinfos[2].foffset = j2;
5116 vinfos[2].indices[0] = _ij2[0];
5117 vinfos[2].indices[1] = _ij2[1];
5118 vinfos[2].maxsolutions = _nj2;
5119 vinfos[3].jointtype = 1;
5120 vinfos[3].foffset = j3;
5121 vinfos[3].indices[0] = _ij3[0];
5122 vinfos[3].indices[1] = _ij3[1];
5123 vinfos[3].maxsolutions = _nj3;
5124 vinfos[4].jointtype = 1;
5125 vinfos[4].foffset = j4;
5126 vinfos[4].indices[0] = _ij4[0];
5127 vinfos[4].indices[1] = _ij4[1];
5128 vinfos[4].maxsolutions = _nj4;
5129 vinfos[5].jointtype = 1;
5130 vinfos[5].foffset = j5;
5131 vinfos[5].indices[0] = _ij5[0];
5132 vinfos[5].indices[1] = _ij5[1];
5133 vinfos[5].maxsolutions = _nj5;
5134 vinfos[6].jointtype = 1;
5135 vinfos[6].foffset = j6;
5136 vinfos[6].indices[0] = _ij6[0];
5137 vinfos[6].indices[1] = _ij6[1];
5138 vinfos[6].maxsolutions = _nj6;
5139 std::vector<int> vfree(0);
5140 solutions.AddSolution(vinfos, vfree);
5148 IkReal j2array[1], cj2array[1], sj2array[1];
5149 bool j2valid[1] = {
false };
5153 IkReal(((-1.0) * new_r11)),
5166 ((-1.5707963267949) + (x179.
value) +
5167 (((1.5707963267949) * (x180.
value))));
5168 sj2array[0] =
IKsin(j2array[0]);
5169 cj2array[0] =
IKcos(j2array[0]);
5170 if (j2array[0] >
IKPI)
5172 j2array[0] -=
IK2PI;
5174 else if (j2array[0] < -
IKPI)
5176 j2array[0] +=
IK2PI;
5179 for (
int ij2 = 0; ij2 < 1; ++ij2)
5187 for (
int iij2 = ij2 + 1; iij2 < 1; ++iij2)
5189 if (j2valid[iij2] &&
5190 IKabs(cj2array[ij2] - cj2array[iij2]) <
5192 IKabs(sj2array[ij2] - sj2array[iij2]) <
5195 j2valid[iij2] =
false;
5201 cj2 = cj2array[ij2];
5202 sj2 = sj2array[ij2];
5205 IkReal x181 =
IKsin(j2);
5206 IkReal x182 =
IKcos(j2);
5208 (((-1.0) * (gconst13 * gconst13))))) <
5213 (((-1.0) * (gconst13 * gconst13)))));
5215 evalcond[1] = ((-1.0) * x181);
5217 (((gconst13 * x181)) + new_r10);
5219 (((gconst13 * x182)) + new_r11);
5220 evalcond[4] = (new_r00 + ((x181 * x183)));
5221 evalcond[5] = (new_r01 + ((x182 * x183)));
5222 evalcond[6] = (((new_r00 * x183)) + x181 +
5223 ((gconst13 * new_r10)));
5224 evalcond[7] = (((new_r01 * x183)) + x182 +
5225 ((gconst13 * new_r11)));
5226 if (
IKabs(evalcond[0]) >
5228 IKabs(evalcond[1]) >
5230 IKabs(evalcond[2]) >
5232 IKabs(evalcond[3]) >
5234 IKabs(evalcond[4]) >
5236 IKabs(evalcond[5]) >
5238 IKabs(evalcond[6]) >
5240 IKabs(evalcond[7]) >
5251 vinfos[0].jointtype = 1;
5252 vinfos[0].foffset = j0;
5253 vinfos[0].indices[0] = _ij0[0];
5254 vinfos[0].indices[1] = _ij0[1];
5255 vinfos[0].maxsolutions = _nj0;
5256 vinfos[1].jointtype = 1;
5257 vinfos[1].foffset = j1;
5258 vinfos[1].indices[0] = _ij1[0];
5259 vinfos[1].indices[1] = _ij1[1];
5260 vinfos[1].maxsolutions = _nj1;
5261 vinfos[2].jointtype = 1;
5262 vinfos[2].foffset = j2;
5263 vinfos[2].indices[0] = _ij2[0];
5264 vinfos[2].indices[1] = _ij2[1];
5265 vinfos[2].maxsolutions = _nj2;
5266 vinfos[3].jointtype = 1;
5267 vinfos[3].foffset = j3;
5268 vinfos[3].indices[0] = _ij3[0];
5269 vinfos[3].indices[1] = _ij3[1];
5270 vinfos[3].maxsolutions = _nj3;
5271 vinfos[4].jointtype = 1;
5272 vinfos[4].foffset = j4;
5273 vinfos[4].indices[0] = _ij4[0];
5274 vinfos[4].indices[1] = _ij4[1];
5275 vinfos[4].maxsolutions = _nj4;
5276 vinfos[5].jointtype = 1;
5277 vinfos[5].foffset = j5;
5278 vinfos[5].indices[0] = _ij5[0];
5279 vinfos[5].indices[1] = _ij5[1];
5280 vinfos[5].maxsolutions = _nj5;
5281 vinfos[6].jointtype = 1;
5282 vinfos[6].foffset = j6;
5283 vinfos[6].indices[0] = _ij6[0];
5284 vinfos[6].indices[1] = _ij6[1];
5285 vinfos[6].maxsolutions = _nj6;
5286 std::vector<int> vfree(0);
5287 solutions.AddSolution(vinfos, vfree);
5295 if (bgotonextstatement)
5297 bool bgotonextstatement =
true;
5302 bgotonextstatement =
false;
5306 if (bgotonextstatement)
5320 IkReal j2array[1], cj2array[1], sj2array[1];
5321 bool j2valid[1] = {
false };
5323 IkReal x184 = (new_r01 * new_r22);
5324 IkReal x185 = (cj0 * new_r11);
5331 ((((new_r22 * sj0 * x185)) + ((x184 * (cj0 * cj0))) +
5332 (((-1.0) * x184)) + (((-1.0) * new_r10)))))) <
5334 IKabs((((new_r01 * sj0)) + (((-1.0) * x185)))) <
5338 ((((new_r22 * sj0 * x185)) + ((x184 * (cj0 * cj0))) +
5339 (((-1.0) * x184)) + (((-1.0) * new_r10)))))) +
5340 IKsqr((((new_r01 * sj0)) + (((-1.0) * x185)))) - 1) <=
5345 ((((new_r22 * sj0 * x185)) + ((x184 * (cj0 * cj0))) +
5346 (((-1.0) * x184)) + (((-1.0) * new_r10))))),
5347 (((new_r01 * sj0)) + (((-1.0) * x185))));
5348 sj2array[0] =
IKsin(j2array[0]);
5349 cj2array[0] =
IKcos(j2array[0]);
5350 if (j2array[0] >
IKPI)
5352 j2array[0] -=
IK2PI;
5354 else if (j2array[0] < -
IKPI)
5356 j2array[0] +=
IK2PI;
5359 for (
int ij2 = 0; ij2 < 1; ++ij2)
5367 for (
int iij2 = ij2 + 1; iij2 < 1; ++iij2)
5369 if (j2valid[iij2] &&
5370 IKabs(cj2array[ij2] - cj2array[iij2]) <
5372 IKabs(sj2array[ij2] - sj2array[iij2]) <
5375 j2valid[iij2] =
false;
5381 cj2 = cj2array[ij2];
5382 sj2 = sj2array[ij2];
5384 IkReal evalcond[10];
5385 IkReal x187 =
IKcos(j2);
5386 IkReal x188 =
IKsin(j2);
5387 IkReal x189 = (cj0 * new_r22);
5388 IkReal x190 = ((1.0) * sj0);
5389 IkReal x191 = (new_r22 * sj0);
5390 IkReal x192 = (new_r22 * x188);
5391 IkReal x193 = ((1.0) * x188);
5393 (x188 + (((-1.0) * new_r00 * x190)) + ((cj0 * new_r10)));
5395 (x187 + (((-1.0) * new_r01 * x190)) + ((cj0 * new_r11)));
5396 evalcond[2] = (((new_r10 * sj0)) + ((new_r22 * x187)) +
5398 evalcond[3] = (((new_r10 * x191)) + ((new_r00 * x189)) + x187);
5399 evalcond[4] = (((cj0 * x188)) + ((x187 * x191)) + new_r10);
5401 (((new_r11 * sj0)) + (((-1.0) * x192)) + ((cj0 * new_r01)));
5403 ((((-1.0) * x188 * x190)) + ((x187 * x189)) + new_r00);
5405 (((cj0 * x187)) + (((-1.0) * x190 * x192)) + new_r11);
5406 evalcond[8] = (((new_r11 * x191)) + ((new_r01 * x189)) +
5408 evalcond[9] = ((((-1.0) * x189 * x193)) +
5409 (((-1.0) * x187 * x190)) + new_r01);
5426 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
5427 vinfos[0].jointtype = 1;
5428 vinfos[0].foffset = j0;
5429 vinfos[0].indices[0] = _ij0[0];
5430 vinfos[0].indices[1] = _ij0[1];
5431 vinfos[0].maxsolutions = _nj0;
5432 vinfos[1].jointtype = 1;
5433 vinfos[1].foffset = j1;
5434 vinfos[1].indices[0] = _ij1[0];
5435 vinfos[1].indices[1] = _ij1[1];
5436 vinfos[1].maxsolutions = _nj1;
5437 vinfos[2].jointtype = 1;
5438 vinfos[2].foffset = j2;
5439 vinfos[2].indices[0] = _ij2[0];
5440 vinfos[2].indices[1] = _ij2[1];
5441 vinfos[2].maxsolutions = _nj2;
5442 vinfos[3].jointtype = 1;
5443 vinfos[3].foffset = j3;
5444 vinfos[3].indices[0] = _ij3[0];
5445 vinfos[3].indices[1] = _ij3[1];
5446 vinfos[3].maxsolutions = _nj3;
5447 vinfos[4].jointtype = 1;
5448 vinfos[4].foffset = j4;
5449 vinfos[4].indices[0] = _ij4[0];
5450 vinfos[4].indices[1] = _ij4[1];
5451 vinfos[4].maxsolutions = _nj4;
5452 vinfos[5].jointtype = 1;
5453 vinfos[5].foffset = j5;
5454 vinfos[5].indices[0] = _ij5[0];
5455 vinfos[5].indices[1] = _ij5[1];
5456 vinfos[5].maxsolutions = _nj5;
5457 vinfos[6].jointtype = 1;
5458 vinfos[6].foffset = j6;
5459 vinfos[6].indices[0] = _ij6[0];
5460 vinfos[6].indices[1] = _ij6[1];
5461 vinfos[6].maxsolutions = _nj6;
5462 std::vector<int> vfree(0);
5463 solutions.AddSolution(vinfos, vfree);
5473 IkReal j2array[1], cj2array[1], sj2array[1];
5474 bool j2valid[1] = {
false };
5476 IkReal x194 = ((1.0) * cj0);
5482 if (
IKabs((((new_r00 * sj0)) + (((-1.0) * new_r10 * x194)))) <
5484 IKabs(((x195.
value) * (((((-1.0) * new_r10 * sj0)) +
5485 (((-1.0) * new_r00 * x194)))))) <
5487 IKabs(
IKsqr((((new_r00 * sj0)) + (((-1.0) * new_r10 * x194)))) +
5488 IKsqr(((x195.
value) * (((((-1.0) * new_r10 * sj0)) +
5489 (((-1.0) * new_r00 * x194)))))) -
5492 j2array[0] =
IKatan2((((new_r00 * sj0)) + (((-1.0) * new_r10 * x194))),
5493 ((x195.
value) * (((((-1.0) * new_r10 * sj0)) +
5494 (((-1.0) * new_r00 * x194))))));
5495 sj2array[0] =
IKsin(j2array[0]);
5496 cj2array[0] =
IKcos(j2array[0]);
5497 if (j2array[0] >
IKPI)
5499 j2array[0] -=
IK2PI;
5501 else if (j2array[0] < -
IKPI)
5503 j2array[0] +=
IK2PI;
5506 for (
int ij2 = 0; ij2 < 1; ++ij2)
5514 for (
int iij2 = ij2 + 1; iij2 < 1; ++iij2)
5516 if (j2valid[iij2] &&
5517 IKabs(cj2array[ij2] - cj2array[iij2]) <
5521 j2valid[iij2] =
false;
5527 cj2 = cj2array[ij2];
5528 sj2 = sj2array[ij2];
5530 IkReal evalcond[10];
5531 IkReal x196 =
IKcos(j2);
5532 IkReal x197 =
IKsin(j2);
5533 IkReal x198 = (cj0 * new_r22);
5534 IkReal x199 = ((1.0) * sj0);
5535 IkReal x200 = (new_r22 * sj0);
5536 IkReal x201 = (new_r22 * x197);
5537 IkReal x202 = ((1.0) * x197);
5539 (x197 + (((-1.0) * new_r00 * x199)) + ((cj0 * new_r10)));
5541 (x196 + (((-1.0) * new_r01 * x199)) + ((cj0 * new_r11)));
5543 (((new_r10 * sj0)) + ((new_r22 * x196)) + ((cj0 * new_r00)));
5544 evalcond[3] = (((new_r00 * x198)) + ((new_r10 * x200)) + x196);
5545 evalcond[4] = (((x196 * x200)) + ((cj0 * x197)) + new_r10);
5547 (((new_r11 * sj0)) + ((cj0 * new_r01)) + (((-1.0) * x201)));
5549 ((((-1.0) * x197 * x199)) + ((x196 * x198)) + new_r00);
5550 evalcond[7] = (((cj0 * x196)) + (((-1.0) * x199 * x201)) + new_r11);
5552 (((new_r01 * x198)) + ((new_r11 * x200)) + (((-1.0) * x202)));
5554 ((((-1.0) * x196 * x199)) + (((-1.0) * x198 * x202)) + new_r01);
5571 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
5572 vinfos[0].jointtype = 1;
5573 vinfos[0].foffset = j0;
5574 vinfos[0].indices[0] = _ij0[0];
5575 vinfos[0].indices[1] = _ij0[1];
5576 vinfos[0].maxsolutions = _nj0;
5577 vinfos[1].jointtype = 1;
5578 vinfos[1].foffset = j1;
5579 vinfos[1].indices[0] = _ij1[0];
5580 vinfos[1].indices[1] = _ij1[1];
5581 vinfos[1].maxsolutions = _nj1;
5582 vinfos[2].jointtype = 1;
5583 vinfos[2].foffset = j2;
5584 vinfos[2].indices[0] = _ij2[0];
5585 vinfos[2].indices[1] = _ij2[1];
5586 vinfos[2].maxsolutions = _nj2;
5587 vinfos[3].jointtype = 1;
5588 vinfos[3].foffset = j3;
5589 vinfos[3].indices[0] = _ij3[0];
5590 vinfos[3].indices[1] = _ij3[1];
5591 vinfos[3].maxsolutions = _nj3;
5592 vinfos[4].jointtype = 1;
5593 vinfos[4].foffset = j4;
5594 vinfos[4].indices[0] = _ij4[0];
5595 vinfos[4].indices[1] = _ij4[1];
5596 vinfos[4].maxsolutions = _nj4;
5597 vinfos[5].jointtype = 1;
5598 vinfos[5].foffset = j5;
5599 vinfos[5].indices[0] = _ij5[0];
5600 vinfos[5].indices[1] = _ij5[1];
5601 vinfos[5].maxsolutions = _nj5;
5602 vinfos[6].jointtype = 1;
5603 vinfos[6].foffset = j6;
5604 vinfos[6].indices[0] = _ij6[0];
5605 vinfos[6].indices[1] = _ij6[1];
5606 vinfos[6].maxsolutions = _nj6;
5607 std::vector<int> vfree(0);
5608 solutions.AddSolution(vinfos, vfree);
5618 IkReal j2array[1], cj2array[1], sj2array[1];
5619 bool j2valid[1] = {
false };
5621 IkReal x203 = cj0 * cj0;
5622 IkReal x204 = new_r22 * new_r22;
5623 IkReal x205 = ((1.0) * cj0);
5624 IkReal x206 = (new_r22 * sj0);
5626 IkReal((((new_r11 * x206)) + (((-1.0) * new_r10 * x205)))),
5627 IkReal(((((-1.0) * new_r11 * x205)) + (((-1.0) * new_r10 * x206)))),
5634 IKsign((x204 + x203 + (((-1.0) * x203 * x204)))), -1);
5639 j2array[0] = ((-1.5707963267949) + (x207.
value) +
5640 (((1.5707963267949) * (x208.
value))));
5641 sj2array[0] =
IKsin(j2array[0]);
5642 cj2array[0] =
IKcos(j2array[0]);
5643 if (j2array[0] >
IKPI)
5645 j2array[0] -=
IK2PI;
5647 else if (j2array[0] < -
IKPI)
5649 j2array[0] +=
IK2PI;
5652 for (
int ij2 = 0; ij2 < 1; ++ij2)
5660 for (
int iij2 = ij2 + 1; iij2 < 1; ++iij2)
5662 if (j2valid[iij2] &&
5666 j2valid[iij2] =
false;
5672 cj2 = cj2array[ij2];
5673 sj2 = sj2array[ij2];
5675 IkReal evalcond[10];
5676 IkReal x209 =
IKcos(j2);
5677 IkReal x210 =
IKsin(j2);
5678 IkReal x211 = (cj0 * new_r22);
5679 IkReal x212 = ((1.0) * sj0);
5680 IkReal x213 = (new_r22 * sj0);
5681 IkReal x214 = (new_r22 * x210);
5682 IkReal x215 = ((1.0) * x210);
5683 evalcond[0] = (x210 + (((-1.0) * new_r00 * x212)) + ((cj0 * new_r10)));
5684 evalcond[1] = (x209 + (((-1.0) * new_r01 * x212)) + ((cj0 * new_r11)));
5686 (((new_r10 * sj0)) + ((new_r22 * x209)) + ((cj0 * new_r00)));
5687 evalcond[3] = (x209 + ((new_r00 * x211)) + ((new_r10 * x213)));
5688 evalcond[4] = (((cj0 * x210)) + ((x209 * x213)) + new_r10);
5690 (((new_r11 * sj0)) + (((-1.0) * x214)) + ((cj0 * new_r01)));
5691 evalcond[6] = (((x209 * x211)) + (((-1.0) * x210 * x212)) + new_r00);
5692 evalcond[7] = (((cj0 * x209)) + new_r11 + (((-1.0) * x212 * x214)));
5694 (((new_r01 * x211)) + (((-1.0) * x215)) + ((new_r11 * x213)));
5696 ((((-1.0) * x211 * x215)) + new_r01 + (((-1.0) * x209 * x212)));
5713 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
5714 vinfos[0].jointtype = 1;
5715 vinfos[0].foffset = j0;
5716 vinfos[0].indices[0] = _ij0[0];
5717 vinfos[0].indices[1] = _ij0[1];
5718 vinfos[0].maxsolutions = _nj0;
5719 vinfos[1].jointtype = 1;
5720 vinfos[1].foffset = j1;
5721 vinfos[1].indices[0] = _ij1[0];
5722 vinfos[1].indices[1] = _ij1[1];
5723 vinfos[1].maxsolutions = _nj1;
5724 vinfos[2].jointtype = 1;
5725 vinfos[2].foffset = j2;
5726 vinfos[2].indices[0] = _ij2[0];
5727 vinfos[2].indices[1] = _ij2[1];
5728 vinfos[2].maxsolutions = _nj2;
5729 vinfos[3].jointtype = 1;
5730 vinfos[3].foffset = j3;
5731 vinfos[3].indices[0] = _ij3[0];
5732 vinfos[3].indices[1] = _ij3[1];
5733 vinfos[3].maxsolutions = _nj3;
5734 vinfos[4].jointtype = 1;
5735 vinfos[4].foffset = j4;
5736 vinfos[4].indices[0] = _ij4[0];
5737 vinfos[4].indices[1] = _ij4[1];
5738 vinfos[4].maxsolutions = _nj4;
5739 vinfos[5].jointtype = 1;
5740 vinfos[5].foffset = j5;
5741 vinfos[5].indices[0] = _ij5[0];
5742 vinfos[5].indices[1] = _ij5[1];
5743 vinfos[5].maxsolutions = _nj5;
5744 vinfos[6].jointtype = 1;
5745 vinfos[6].foffset = j6;
5746 vinfos[6].indices[0] = _ij6[0];
5747 vinfos[6].indices[1] = _ij6[1];
5748 vinfos[6].maxsolutions = _nj6;
5749 std::vector<int> vfree(0);
5750 solutions.AddSolution(vinfos, vfree);
5761 if (bgotonextstatement)
5763 bool bgotonextstatement =
true;
5768 bgotonextstatement =
false;
5772 if (bgotonextstatement)
5783 IkReal j0array[1], cj0array[1], sj0array[1];
5784 bool j0valid[1] = {
false };
5791 IkReal x216 = x217.
value;
5798 (((1.0) + (((-1.0) * (new_r02 * new_r02))) + (((-1.0) * (cj1 * cj1))))))) <
5802 (((1.0) + (((-1.0) * (new_r02 * new_r02))) + (((-1.0) * (cj1 * cj1))))))) +
5806 (((1.0) + (((-1.0) * (new_r02 * new_r02))) + (((-1.0) * (cj1 * cj1)))))),
5808 sj0array[0] =
IKsin(j0array[0]);
5809 cj0array[0] =
IKcos(j0array[0]);
5810 if (j0array[0] >
IKPI)
5812 j0array[0] -=
IK2PI;
5814 else if (j0array[0] < -
IKPI)
5816 j0array[0] +=
IK2PI;
5819 for (
int ij0 = 0; ij0 < 1; ++ij0)
5827 for (
int iij0 = ij0 + 1; iij0 < 1; ++iij0)
5832 j0valid[iij0] =
false;
5838 cj0 = cj0array[ij0];
5839 sj0 = sj0array[ij0];
5842 IkReal x219 =
IKcos(j0);
5843 IkReal x220 =
IKsin(j0);
5844 IkReal x221 = ((1.0) * cj1);
5845 IkReal x222 = ((1.0) * sj1);
5846 IkReal x223 = (new_r12 * x220);
5847 IkReal x224 = (new_r02 * x219);
5848 evalcond[0] = ((((-1.0) * x219 * x222)) + new_r02);
5849 evalcond[1] = ((((-1.0) * x220 * x222)) + new_r12);
5850 evalcond[2] = (((new_r12 * x219)) + (((-1.0) * new_r02 * x220)));
5851 evalcond[3] = (x223 + x224 + (((-1.0) * x222)));
5852 evalcond[4] = (((cj1 * x224)) + ((cj1 * x223)) + (((-1.0) * new_r22 * x222)));
5853 evalcond[5] = ((((-1.0) * new_r10 * x220 * x222)) + (((-1.0) * new_r00 * x219 * x222)) +
5854 (((-1.0) * new_r20 * x221)));
5855 evalcond[6] = ((((-1.0) * new_r11 * x220 * x222)) + (((-1.0) * new_r01 * x219 * x222)) +
5856 (((-1.0) * new_r21 * x221)));
5857 evalcond[7] = ((1.0) + (((-1.0) * x222 * x223)) + (((-1.0) * x222 * x224)) +
5858 (((-1.0) * new_r22 * x221)));
5876 j2eval[2] = ((
IKabs(new_r20)) + (
IKabs(new_r21)));
5877 if (
IKabs(j2eval[0]) < 0.0000010000000000 ||
IKabs(j2eval[1]) < 0.0000010000000000 ||
5878 IKabs(j2eval[2]) < 0.0000010000000000)
5884 if (
IKabs(j2eval[0]) < 0.0000010000000000 ||
IKabs(j2eval[1]) < 0.0000010000000000)
5891 if (
IKabs(j2eval[0]) < 0.0000010000000000 ||
5892 IKabs(j2eval[1]) < 0.0000010000000000 ||
IKabs(j2eval[2]) < 0.0000010000000000)
5896 bool bgotonextstatement =
true;
5900 ((-3.14159265358979) +
5901 (
IKfmod(((3.14159265358979) + (
IKabs(j1))), 6.28318530717959)));
5902 evalcond[1] = new_r21;
5903 evalcond[2] = new_r02;
5904 evalcond[3] = new_r12;
5905 evalcond[4] = new_r20;
5906 if (
IKabs(evalcond[0]) < 0.0000050000000000 &&
5907 IKabs(evalcond[1]) < 0.0000050000000000 &&
5908 IKabs(evalcond[2]) < 0.0000050000000000 &&
5909 IKabs(evalcond[3]) < 0.0000050000000000 &&
5910 IKabs(evalcond[4]) < 0.0000050000000000)
5912 bgotonextstatement =
false;
5914 IkReal j2array[1], cj2array[1], sj2array[1];
5915 bool j2valid[1] = {
false };
5917 IkReal x225 = ((1.0) * cj0);
5918 if (
IKabs(((((-1.0) * new_r10 * x225)) + ((new_r00 * sj0)))) <
5920 IKabs(((((-1.0) * new_r10 * sj0)) + (((-1.0) * new_r00 * x225)))) <
5922 IKabs(
IKsqr(((((-1.0) * new_r10 * x225)) + ((new_r00 * sj0)))) +
5923 IKsqr(((((-1.0) * new_r10 * sj0)) +
5924 (((-1.0) * new_r00 * x225)))) -
5928 IKatan2(((((-1.0) * new_r10 * x225)) + ((new_r00 * sj0))),
5929 ((((-1.0) * new_r10 * sj0)) + (((-1.0) * new_r00 * x225))));
5930 sj2array[0] =
IKsin(j2array[0]);
5931 cj2array[0] =
IKcos(j2array[0]);
5932 if (j2array[0] >
IKPI)
5934 j2array[0] -=
IK2PI;
5936 else if (j2array[0] < -
IKPI)
5938 j2array[0] +=
IK2PI;
5941 for (
int ij2 = 0; ij2 < 1; ++ij2)
5949 for (
int iij2 = ij2 + 1; iij2 < 1; ++iij2)
5951 if (j2valid[iij2] &&
5955 j2valid[iij2] =
false;
5961 cj2 = cj2array[ij2];
5962 sj2 = sj2array[ij2];
5965 IkReal x226 =
IKcos(j2);
5966 IkReal x227 =
IKsin(j2);
5967 IkReal x228 = ((1.0) * sj0);
5968 IkReal x229 = (cj0 * x226);
5969 IkReal x230 = (cj0 * x227);
5970 IkReal x231 = (x227 * x228);
5971 evalcond[0] = (((new_r10 * sj0)) + x226 + ((cj0 * new_r00)));
5973 (x227 + ((cj0 * new_r10)) + (((-1.0) * new_r00 * x228)));
5975 ((((-1.0) * new_r01 * x228)) + x226 + ((cj0 * new_r11)));
5976 evalcond[3] = (((sj0 * x226)) + x230 + new_r10);
5978 (((new_r11 * sj0)) + ((cj0 * new_r01)) + (((-1.0) * x227)));
5979 evalcond[5] = ((((-1.0) * x231)) + x229 + new_r00);
5980 evalcond[6] = ((((-1.0) * x231)) + x229 + new_r11);
5982 (new_r01 + (((-1.0) * x226 * x228)) + (((-1.0) * x230)));
5997 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
5998 vinfos[0].jointtype = 1;
5999 vinfos[0].foffset = j0;
6000 vinfos[0].indices[0] = _ij0[0];
6001 vinfos[0].indices[1] = _ij0[1];
6002 vinfos[0].maxsolutions = _nj0;
6003 vinfos[1].jointtype = 1;
6004 vinfos[1].foffset = j1;
6005 vinfos[1].indices[0] = _ij1[0];
6006 vinfos[1].indices[1] = _ij1[1];
6007 vinfos[1].maxsolutions = _nj1;
6008 vinfos[2].jointtype = 1;
6009 vinfos[2].foffset = j2;
6010 vinfos[2].indices[0] = _ij2[0];
6011 vinfos[2].indices[1] = _ij2[1];
6012 vinfos[2].maxsolutions = _nj2;
6013 vinfos[3].jointtype = 1;
6014 vinfos[3].foffset = j3;
6015 vinfos[3].indices[0] = _ij3[0];
6016 vinfos[3].indices[1] = _ij3[1];
6017 vinfos[3].maxsolutions = _nj3;
6018 vinfos[4].jointtype = 1;
6019 vinfos[4].foffset = j4;
6020 vinfos[4].indices[0] = _ij4[0];
6021 vinfos[4].indices[1] = _ij4[1];
6022 vinfos[4].maxsolutions = _nj4;
6023 vinfos[5].jointtype = 1;
6024 vinfos[5].foffset = j5;
6025 vinfos[5].indices[0] = _ij5[0];
6026 vinfos[5].indices[1] = _ij5[1];
6027 vinfos[5].maxsolutions = _nj5;
6028 vinfos[6].jointtype = 1;
6029 vinfos[6].foffset = j6;
6030 vinfos[6].indices[0] = _ij6[0];
6031 vinfos[6].indices[1] = _ij6[1];
6032 vinfos[6].maxsolutions = _nj6;
6033 std::vector<int> vfree(0);
6034 solutions.AddSolution(vinfos, vfree);
6040 if (bgotonextstatement)
6042 bool bgotonextstatement =
true;
6046 ((-3.14159265358979) +
6047 (
IKfmod(((3.14159265358979) + (
IKabs(((-3.14159265358979) + j1)))),
6048 6.28318530717959)));
6049 evalcond[1] = new_r21;
6050 evalcond[2] = new_r02;
6051 evalcond[3] = new_r12;
6052 evalcond[4] = new_r20;
6053 if (
IKabs(evalcond[0]) < 0.0000050000000000 &&
6054 IKabs(evalcond[1]) < 0.0000050000000000 &&
6055 IKabs(evalcond[2]) < 0.0000050000000000 &&
6056 IKabs(evalcond[3]) < 0.0000050000000000 &&
6057 IKabs(evalcond[4]) < 0.0000050000000000)
6059 bgotonextstatement =
false;
6061 IkReal j2array[1], cj2array[1], sj2array[1];
6062 bool j2valid[1] = {
false };
6064 IkReal x232 = ((1.0) * cj0);
6065 if (
IKabs(((((-1.0) * new_r11 * sj0)) + (((-1.0) * new_r10 * x232)))) <
6067 IKabs((((new_r10 * sj0)) + (((-1.0) * new_r11 * x232)))) <
6070 (((-1.0) * new_r10 * x232)))) +
6071 IKsqr((((new_r10 * sj0)) + (((-1.0) * new_r11 * x232)))) -
6075 IKatan2(((((-1.0) * new_r11 * sj0)) + (((-1.0) * new_r10 * x232))),
6076 (((new_r10 * sj0)) + (((-1.0) * new_r11 * x232))));
6077 sj2array[0] =
IKsin(j2array[0]);
6078 cj2array[0] =
IKcos(j2array[0]);
6079 if (j2array[0] >
IKPI)
6081 j2array[0] -=
IK2PI;
6083 else if (j2array[0] < -
IKPI)
6085 j2array[0] +=
IK2PI;
6088 for (
int ij2 = 0; ij2 < 1; ++ij2)
6096 for (
int iij2 = ij2 + 1; iij2 < 1; ++iij2)
6098 if (j2valid[iij2] &&
6099 IKabs(cj2array[ij2] - cj2array[iij2]) <
6103 j2valid[iij2] =
false;
6109 cj2 = cj2array[ij2];
6110 sj2 = sj2array[ij2];
6113 IkReal x233 =
IKsin(j2);
6114 IkReal x234 =
IKcos(j2);
6115 IkReal x235 = ((1.0) * sj0);
6116 IkReal x236 = (cj0 * x233);
6117 IkReal x237 = ((1.0) * x234);
6118 IkReal x238 = (x234 * x235);
6119 evalcond[0] = (((new_r11 * sj0)) + x233 + ((cj0 * new_r01)));
6121 (x233 + ((cj0 * new_r10)) + (((-1.0) * new_r00 * x235)));
6123 (x234 + (((-1.0) * new_r01 * x235)) + ((cj0 * new_r11)));
6125 (((new_r10 * sj0)) + (((-1.0) * x237)) + ((cj0 * new_r00)));
6126 evalcond[4] = (((sj0 * x233)) + new_r11 + ((cj0 * x234)));
6127 evalcond[5] = ((((-1.0) * x238)) + x236 + new_r10);
6128 evalcond[6] = ((((-1.0) * x238)) + x236 + new_r01);
6130 ((((-1.0) * x233 * x235)) + (((-1.0) * cj0 * x237)) + new_r00);
6145 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
6146 vinfos[0].jointtype = 1;
6147 vinfos[0].foffset = j0;
6148 vinfos[0].indices[0] = _ij0[0];
6149 vinfos[0].indices[1] = _ij0[1];
6150 vinfos[0].maxsolutions = _nj0;
6151 vinfos[1].jointtype = 1;
6152 vinfos[1].foffset = j1;
6153 vinfos[1].indices[0] = _ij1[0];
6154 vinfos[1].indices[1] = _ij1[1];
6155 vinfos[1].maxsolutions = _nj1;
6156 vinfos[2].jointtype = 1;
6157 vinfos[2].foffset = j2;
6158 vinfos[2].indices[0] = _ij2[0];
6159 vinfos[2].indices[1] = _ij2[1];
6160 vinfos[2].maxsolutions = _nj2;
6161 vinfos[3].jointtype = 1;
6162 vinfos[3].foffset = j3;
6163 vinfos[3].indices[0] = _ij3[0];
6164 vinfos[3].indices[1] = _ij3[1];
6165 vinfos[3].maxsolutions = _nj3;
6166 vinfos[4].jointtype = 1;
6167 vinfos[4].foffset = j4;
6168 vinfos[4].indices[0] = _ij4[0];
6169 vinfos[4].indices[1] = _ij4[1];
6170 vinfos[4].maxsolutions = _nj4;
6171 vinfos[5].jointtype = 1;
6172 vinfos[5].foffset = j5;
6173 vinfos[5].indices[0] = _ij5[0];
6174 vinfos[5].indices[1] = _ij5[1];
6175 vinfos[5].maxsolutions = _nj5;
6176 vinfos[6].jointtype = 1;
6177 vinfos[6].foffset = j6;
6178 vinfos[6].indices[0] = _ij6[0];
6179 vinfos[6].indices[1] = _ij6[1];
6180 vinfos[6].maxsolutions = _nj6;
6181 std::vector<int> vfree(0);
6182 solutions.AddSolution(vinfos, vfree);
6188 if (bgotonextstatement)
6190 bool bgotonextstatement =
true;
6194 ((-3.14159265358979) +
6195 (
IKfmod(((3.14159265358979) + (
IKabs(((-1.5707963267949) + j1)))),
6196 6.28318530717959)));
6197 evalcond[1] = new_r22;
6198 if (
IKabs(evalcond[0]) < 0.0000050000000000 &&
6199 IKabs(evalcond[1]) < 0.0000050000000000)
6201 bgotonextstatement =
false;
6203 IkReal j2array[1], cj2array[1], sj2array[1];
6204 bool j2valid[1] = {
false };
6211 j2array[0] =
IKatan2(((-1.0) * new_r21), new_r20);
6212 sj2array[0] =
IKsin(j2array[0]);
6213 cj2array[0] =
IKcos(j2array[0]);
6214 if (j2array[0] >
IKPI)
6216 j2array[0] -=
IK2PI;
6218 else if (j2array[0] < -
IKPI)
6220 j2array[0] +=
IK2PI;
6223 for (
int ij2 = 0; ij2 < 1; ++ij2)
6231 for (
int iij2 = ij2 + 1; iij2 < 1; ++iij2)
6233 if (j2valid[iij2] &&
6234 IKabs(cj2array[ij2] - cj2array[iij2]) <
6236 IKabs(sj2array[ij2] - sj2array[iij2]) <
6239 j2valid[iij2] =
false;
6245 cj2 = cj2array[ij2];
6246 sj2 = sj2array[ij2];
6249 IkReal x239 =
IKsin(j2);
6250 IkReal x240 =
IKcos(j2);
6251 IkReal x241 = ((1.0) * sj0);
6252 evalcond[0] = (x239 + new_r21);
6253 evalcond[1] = ((((-1.0) * x240)) + new_r20);
6254 evalcond[2] = (((new_r02 * x239)) + new_r10);
6255 evalcond[3] = (((cj0 * x240)) + new_r11);
6256 evalcond[4] = (new_r00 + (((-1.0) * x239 * x241)));
6257 evalcond[5] = ((((-1.0) * x240 * x241)) + new_r01);
6259 ((((-1.0) * new_r00 * x241)) + x239 + ((cj0 * new_r10)));
6261 ((((-1.0) * new_r01 * x241)) + x240 + ((cj0 * new_r11)));
6276 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
6277 vinfos[0].jointtype = 1;
6278 vinfos[0].foffset = j0;
6279 vinfos[0].indices[0] = _ij0[0];
6280 vinfos[0].indices[1] = _ij0[1];
6281 vinfos[0].maxsolutions = _nj0;
6282 vinfos[1].jointtype = 1;
6283 vinfos[1].foffset = j1;
6284 vinfos[1].indices[0] = _ij1[0];
6285 vinfos[1].indices[1] = _ij1[1];
6286 vinfos[1].maxsolutions = _nj1;
6287 vinfos[2].jointtype = 1;
6288 vinfos[2].foffset = j2;
6289 vinfos[2].indices[0] = _ij2[0];
6290 vinfos[2].indices[1] = _ij2[1];
6291 vinfos[2].maxsolutions = _nj2;
6292 vinfos[3].jointtype = 1;
6293 vinfos[3].foffset = j3;
6294 vinfos[3].indices[0] = _ij3[0];
6295 vinfos[3].indices[1] = _ij3[1];
6296 vinfos[3].maxsolutions = _nj3;
6297 vinfos[4].jointtype = 1;
6298 vinfos[4].foffset = j4;
6299 vinfos[4].indices[0] = _ij4[0];
6300 vinfos[4].indices[1] = _ij4[1];
6301 vinfos[4].maxsolutions = _nj4;
6302 vinfos[5].jointtype = 1;
6303 vinfos[5].foffset = j5;
6304 vinfos[5].indices[0] = _ij5[0];
6305 vinfos[5].indices[1] = _ij5[1];
6306 vinfos[5].maxsolutions = _nj5;
6307 vinfos[6].jointtype = 1;
6308 vinfos[6].foffset = j6;
6309 vinfos[6].indices[0] = _ij6[0];
6310 vinfos[6].indices[1] = _ij6[1];
6311 vinfos[6].maxsolutions = _nj6;
6312 std::vector<int> vfree(0);
6313 solutions.AddSolution(vinfos, vfree);
6319 if (bgotonextstatement)
6321 bool bgotonextstatement =
true;
6325 ((-3.14159265358979) +
6326 (
IKfmod(((3.14159265358979) + (
IKabs(((1.5707963267949) + j1)))),
6327 6.28318530717959)));
6328 evalcond[1] = new_r22;
6329 if (
IKabs(evalcond[0]) < 0.0000050000000000 &&
6330 IKabs(evalcond[1]) < 0.0000050000000000)
6332 bgotonextstatement =
false;
6334 IkReal j2array[1], cj2array[1], sj2array[1];
6335 bool j2valid[1] = {
false };
6342 j2array[0] =
IKatan2(new_r21, ((-1.0) * new_r20));
6343 sj2array[0] =
IKsin(j2array[0]);
6344 cj2array[0] =
IKcos(j2array[0]);
6345 if (j2array[0] >
IKPI)
6347 j2array[0] -=
IK2PI;
6349 else if (j2array[0] < -
IKPI)
6351 j2array[0] +=
IK2PI;
6354 for (
int ij2 = 0; ij2 < 1; ++ij2)
6362 for (
int iij2 = ij2 + 1; iij2 < 1; ++iij2)
6364 if (j2valid[iij2] &&
6365 IKabs(cj2array[ij2] - cj2array[iij2]) <
6367 IKabs(sj2array[ij2] - sj2array[iij2]) <
6370 j2valid[iij2] =
false;
6376 cj2 = cj2array[ij2];
6377 sj2 = sj2array[ij2];
6380 IkReal x242 =
IKcos(j2);
6381 IkReal x243 =
IKsin(j2);
6382 IkReal x244 = ((1.0) * sj0);
6383 IkReal x245 = ((1.0) * x243);
6384 evalcond[0] = (x242 + new_r20);
6385 evalcond[1] = ((((-1.0) * x245)) + new_r21);
6386 evalcond[2] = (((cj0 * x242)) + new_r11);
6387 evalcond[3] = ((((-1.0) * new_r02 * x245)) + new_r10);
6388 evalcond[4] = ((((-1.0) * x243 * x244)) + new_r00);
6389 evalcond[5] = ((((-1.0) * x242 * x244)) + new_r01);
6391 ((((-1.0) * new_r00 * x244)) + x243 + ((cj0 * new_r10)));
6393 ((((-1.0) * new_r01 * x244)) + x242 + ((cj0 * new_r11)));
6408 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
6409 vinfos[0].jointtype = 1;
6410 vinfos[0].foffset = j0;
6411 vinfos[0].indices[0] = _ij0[0];
6412 vinfos[0].indices[1] = _ij0[1];
6413 vinfos[0].maxsolutions = _nj0;
6414 vinfos[1].jointtype = 1;
6415 vinfos[1].foffset = j1;
6416 vinfos[1].indices[0] = _ij1[0];
6417 vinfos[1].indices[1] = _ij1[1];
6418 vinfos[1].maxsolutions = _nj1;
6419 vinfos[2].jointtype = 1;
6420 vinfos[2].foffset = j2;
6421 vinfos[2].indices[0] = _ij2[0];
6422 vinfos[2].indices[1] = _ij2[1];
6423 vinfos[2].maxsolutions = _nj2;
6424 vinfos[3].jointtype = 1;
6425 vinfos[3].foffset = j3;
6426 vinfos[3].indices[0] = _ij3[0];
6427 vinfos[3].indices[1] = _ij3[1];
6428 vinfos[3].maxsolutions = _nj3;
6429 vinfos[4].jointtype = 1;
6430 vinfos[4].foffset = j4;
6431 vinfos[4].indices[0] = _ij4[0];
6432 vinfos[4].indices[1] = _ij4[1];
6433 vinfos[4].maxsolutions = _nj4;
6434 vinfos[5].jointtype = 1;
6435 vinfos[5].foffset = j5;
6436 vinfos[5].indices[0] = _ij5[0];
6437 vinfos[5].indices[1] = _ij5[1];
6438 vinfos[5].maxsolutions = _nj5;
6439 vinfos[6].jointtype = 1;
6440 vinfos[6].foffset = j6;
6441 vinfos[6].indices[0] = _ij6[0];
6442 vinfos[6].indices[1] = _ij6[1];
6443 vinfos[6].maxsolutions = _nj6;
6444 std::vector<int> vfree(0);
6445 solutions.AddSolution(vinfos, vfree);
6451 if (bgotonextstatement)
6453 bool bgotonextstatement =
true;
6457 ((-3.14159265358979) +
6458 (
IKfmod(((3.14159265358979) + (
IKabs(j0))), 6.28318530717959)));
6459 evalcond[1] = new_r12;
6460 if (
IKabs(evalcond[0]) < 0.0000050000000000 &&
6461 IKabs(evalcond[1]) < 0.0000050000000000)
6463 bgotonextstatement =
false;
6465 IkReal j2array[1], cj2array[1], sj2array[1];
6466 bool j2valid[1] = {
false };
6473 j2array[0] =
IKatan2(((-1.0) * new_r10), ((-1.0) * new_r11));
6474 sj2array[0] =
IKsin(j2array[0]);
6475 cj2array[0] =
IKcos(j2array[0]);
6476 if (j2array[0] >
IKPI)
6478 j2array[0] -=
IK2PI;
6480 else if (j2array[0] < -
IKPI)
6482 j2array[0] +=
IK2PI;
6485 for (
int ij2 = 0; ij2 < 1; ++ij2)
6493 for (
int iij2 = ij2 + 1; iij2 < 1; ++iij2)
6495 if (j2valid[iij2] &&
6496 IKabs(cj2array[ij2] - cj2array[iij2]) <
6498 IKabs(sj2array[ij2] - sj2array[iij2]) <
6501 j2valid[iij2] =
false;
6507 cj2 = cj2array[ij2];
6508 sj2 = sj2array[ij2];
6511 IkReal x246 =
IKsin(j2);
6512 IkReal x247 =
IKcos(j2);
6513 IkReal x248 = ((1.0) * sj1);
6514 IkReal x249 = ((1.0) * x246);
6515 evalcond[0] = (x246 + new_r10);
6516 evalcond[1] = (x247 + new_r11);
6517 evalcond[2] = (new_r21 + ((sj1 * x246)));
6518 evalcond[3] = (((cj1 * x247)) + new_r00);
6519 evalcond[4] = (new_r20 + (((-1.0) * x247 * x248)));
6520 evalcond[5] = ((((-1.0) * cj1 * x249)) + new_r01);
6522 (((cj1 * new_r00)) + x247 + (((-1.0) * new_r20 * x248)));
6523 evalcond[7] = ((((-1.0) * new_r21 * x248)) +
6524 ((cj1 * new_r01)) + (((-1.0) * x249)));
6539 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
6540 vinfos[0].jointtype = 1;
6541 vinfos[0].foffset = j0;
6542 vinfos[0].indices[0] = _ij0[0];
6543 vinfos[0].indices[1] = _ij0[1];
6544 vinfos[0].maxsolutions = _nj0;
6545 vinfos[1].jointtype = 1;
6546 vinfos[1].foffset = j1;
6547 vinfos[1].indices[0] = _ij1[0];
6548 vinfos[1].indices[1] = _ij1[1];
6549 vinfos[1].maxsolutions = _nj1;
6550 vinfos[2].jointtype = 1;
6551 vinfos[2].foffset = j2;
6552 vinfos[2].indices[0] = _ij2[0];
6553 vinfos[2].indices[1] = _ij2[1];
6554 vinfos[2].maxsolutions = _nj2;
6555 vinfos[3].jointtype = 1;
6556 vinfos[3].foffset = j3;
6557 vinfos[3].indices[0] = _ij3[0];
6558 vinfos[3].indices[1] = _ij3[1];
6559 vinfos[3].maxsolutions = _nj3;
6560 vinfos[4].jointtype = 1;
6561 vinfos[4].foffset = j4;
6562 vinfos[4].indices[0] = _ij4[0];
6563 vinfos[4].indices[1] = _ij4[1];
6564 vinfos[4].maxsolutions = _nj4;
6565 vinfos[5].jointtype = 1;
6566 vinfos[5].foffset = j5;
6567 vinfos[5].indices[0] = _ij5[0];
6568 vinfos[5].indices[1] = _ij5[1];
6569 vinfos[5].maxsolutions = _nj5;
6570 vinfos[6].jointtype = 1;
6571 vinfos[6].foffset = j6;
6572 vinfos[6].indices[0] = _ij6[0];
6573 vinfos[6].indices[1] = _ij6[1];
6574 vinfos[6].maxsolutions = _nj6;
6575 std::vector<int> vfree(0);
6576 solutions.AddSolution(vinfos, vfree);
6582 if (bgotonextstatement)
6584 bool bgotonextstatement =
true;
6587 evalcond[0] = ((-3.14159265358979) +
6588 (
IKfmod(((3.14159265358979) +
6589 (
IKabs(((-3.14159265358979) + j0)))),
6590 6.28318530717959)));
6591 evalcond[1] = new_r12;
6592 if (
IKabs(evalcond[0]) < 0.0000050000000000 &&
6593 IKabs(evalcond[1]) < 0.0000050000000000)
6595 bgotonextstatement =
false;
6597 IkReal j2array[1], cj2array[1], sj2array[1];
6598 bool j2valid[1] = {
false };
6605 j2array[0] =
IKatan2(new_r10, new_r11);
6606 sj2array[0] =
IKsin(j2array[0]);
6607 cj2array[0] =
IKcos(j2array[0]);
6608 if (j2array[0] >
IKPI)
6610 j2array[0] -=
IK2PI;
6612 else if (j2array[0] < -
IKPI)
6614 j2array[0] +=
IK2PI;
6617 for (
int ij2 = 0; ij2 < 1; ++ij2)
6625 for (
int iij2 = ij2 + 1; iij2 < 1; ++iij2)
6627 if (j2valid[iij2] &&
6628 IKabs(cj2array[ij2] - cj2array[iij2]) <
6630 IKabs(sj2array[ij2] - sj2array[iij2]) <
6633 j2valid[iij2] =
false;
6639 cj2 = cj2array[ij2];
6640 sj2 = sj2array[ij2];
6643 IkReal x250 =
IKsin(j2);
6644 IkReal x251 =
IKcos(j2);
6645 IkReal x252 = ((1.0) * sj1);
6646 IkReal x253 = ((1.0) * new_r00);
6647 IkReal x254 = ((1.0) * new_r01);
6648 IkReal x255 = ((1.0) * x250);
6649 evalcond[0] = (((sj1 * x250)) + new_r21);
6650 evalcond[1] = (x250 + (((-1.0) * new_r10)));
6651 evalcond[2] = (x251 + (((-1.0) * new_r11)));
6652 evalcond[3] = ((((-1.0) * x251 * x252)) + new_r20);
6653 evalcond[4] = (((cj1 * x251)) + (((-1.0) * x253)));
6654 evalcond[5] = ((((-1.0) * cj1 * x255)) + (((-1.0) * x254)));
6655 evalcond[6] = (x251 + (((-1.0) * cj1 * x253)) +
6656 (((-1.0) * new_r20 * x252)));
6657 evalcond[7] = ((((-1.0) * new_r21 * x252)) +
6658 (((-1.0) * cj1 * x254)) + (((-1.0) * x255)));
6673 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
6674 vinfos[0].jointtype = 1;
6675 vinfos[0].foffset = j0;
6676 vinfos[0].indices[0] = _ij0[0];
6677 vinfos[0].indices[1] = _ij0[1];
6678 vinfos[0].maxsolutions = _nj0;
6679 vinfos[1].jointtype = 1;
6680 vinfos[1].foffset = j1;
6681 vinfos[1].indices[0] = _ij1[0];
6682 vinfos[1].indices[1] = _ij1[1];
6683 vinfos[1].maxsolutions = _nj1;
6684 vinfos[2].jointtype = 1;
6685 vinfos[2].foffset = j2;
6686 vinfos[2].indices[0] = _ij2[0];
6687 vinfos[2].indices[1] = _ij2[1];
6688 vinfos[2].maxsolutions = _nj2;
6689 vinfos[3].jointtype = 1;
6690 vinfos[3].foffset = j3;
6691 vinfos[3].indices[0] = _ij3[0];
6692 vinfos[3].indices[1] = _ij3[1];
6693 vinfos[3].maxsolutions = _nj3;
6694 vinfos[4].jointtype = 1;
6695 vinfos[4].foffset = j4;
6696 vinfos[4].indices[0] = _ij4[0];
6697 vinfos[4].indices[1] = _ij4[1];
6698 vinfos[4].maxsolutions = _nj4;
6699 vinfos[5].jointtype = 1;
6700 vinfos[5].foffset = j5;
6701 vinfos[5].indices[0] = _ij5[0];
6702 vinfos[5].indices[1] = _ij5[1];
6703 vinfos[5].maxsolutions = _nj5;
6704 vinfos[6].jointtype = 1;
6705 vinfos[6].foffset = j6;
6706 vinfos[6].indices[0] = _ij6[0];
6707 vinfos[6].indices[1] = _ij6[1];
6708 vinfos[6].maxsolutions = _nj6;
6709 std::vector<int> vfree(0);
6710 solutions.AddSolution(vinfos, vfree);
6716 if (bgotonextstatement)
6718 bool bgotonextstatement =
true;
6721 evalcond[0] = ((-3.14159265358979) +
6722 (
IKfmod(((3.14159265358979) +
6723 (
IKabs(((-1.5707963267949) + j0)))),
6724 6.28318530717959)));
6725 evalcond[1] = new_r02;
6726 if (
IKabs(evalcond[0]) < 0.0000050000000000 &&
6727 IKabs(evalcond[1]) < 0.0000050000000000)
6729 bgotonextstatement =
false;
6731 IkReal j2array[1], cj2array[1], sj2array[1];
6732 bool j2valid[1] = {
false };
6739 j2array[0] =
IKatan2(new_r00, new_r01);
6740 sj2array[0] =
IKsin(j2array[0]);
6741 cj2array[0] =
IKcos(j2array[0]);
6742 if (j2array[0] >
IKPI)
6744 j2array[0] -=
IK2PI;
6746 else if (j2array[0] < -
IKPI)
6748 j2array[0] +=
IK2PI;
6751 for (
int ij2 = 0; ij2 < 1; ++ij2)
6759 for (
int iij2 = ij2 + 1; iij2 < 1; ++iij2)
6761 if (j2valid[iij2] &&
6762 IKabs(cj2array[ij2] - cj2array[iij2]) <
6764 IKabs(sj2array[ij2] - sj2array[iij2]) <
6767 j2valid[iij2] =
false;
6773 cj2 = cj2array[ij2];
6774 sj2 = sj2array[ij2];
6777 IkReal x256 =
IKsin(j2);
6778 IkReal x257 =
IKcos(j2);
6779 IkReal x258 = ((1.0) * sj1);
6780 IkReal x259 = ((1.0) * x256);
6781 evalcond[0] = (((sj1 * x256)) + new_r21);
6782 evalcond[1] = (x256 + (((-1.0) * new_r00)));
6783 evalcond[2] = (x257 + (((-1.0) * new_r01)));
6784 evalcond[3] = (((cj1 * x257)) + new_r10);
6785 evalcond[4] = ((((-1.0) * x257 * x258)) + new_r20);
6786 evalcond[5] = ((((-1.0) * cj1 * x259)) + new_r11);
6787 evalcond[6] = (((cj1 * new_r10)) + x257 +
6788 (((-1.0) * new_r20 * x258)));
6789 evalcond[7] = ((((-1.0) * new_r21 * x258)) +
6790 ((cj1 * new_r11)) + (((-1.0) * x259)));
6805 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
6806 vinfos[0].jointtype = 1;
6807 vinfos[0].foffset = j0;
6808 vinfos[0].indices[0] = _ij0[0];
6809 vinfos[0].indices[1] = _ij0[1];
6810 vinfos[0].maxsolutions = _nj0;
6811 vinfos[1].jointtype = 1;
6812 vinfos[1].foffset = j1;
6813 vinfos[1].indices[0] = _ij1[0];
6814 vinfos[1].indices[1] = _ij1[1];
6815 vinfos[1].maxsolutions = _nj1;
6816 vinfos[2].jointtype = 1;
6817 vinfos[2].foffset = j2;
6818 vinfos[2].indices[0] = _ij2[0];
6819 vinfos[2].indices[1] = _ij2[1];
6820 vinfos[2].maxsolutions = _nj2;
6821 vinfos[3].jointtype = 1;
6822 vinfos[3].foffset = j3;
6823 vinfos[3].indices[0] = _ij3[0];
6824 vinfos[3].indices[1] = _ij3[1];
6825 vinfos[3].maxsolutions = _nj3;
6826 vinfos[4].jointtype = 1;
6827 vinfos[4].foffset = j4;
6828 vinfos[4].indices[0] = _ij4[0];
6829 vinfos[4].indices[1] = _ij4[1];
6830 vinfos[4].maxsolutions = _nj4;
6831 vinfos[5].jointtype = 1;
6832 vinfos[5].foffset = j5;
6833 vinfos[5].indices[0] = _ij5[0];
6834 vinfos[5].indices[1] = _ij5[1];
6835 vinfos[5].maxsolutions = _nj5;
6836 vinfos[6].jointtype = 1;
6837 vinfos[6].foffset = j6;
6838 vinfos[6].indices[0] = _ij6[0];
6839 vinfos[6].indices[1] = _ij6[1];
6840 vinfos[6].maxsolutions = _nj6;
6841 std::vector<int> vfree(0);
6842 solutions.AddSolution(vinfos, vfree);
6848 if (bgotonextstatement)
6850 bool bgotonextstatement =
true;
6853 evalcond[0] = ((-3.14159265358979) +
6854 (
IKfmod(((3.14159265358979) +
6855 (
IKabs(((1.5707963267949) + j0)))),
6856 6.28318530717959)));
6857 evalcond[1] = new_r02;
6858 if (
IKabs(evalcond[0]) < 0.0000050000000000 &&
6859 IKabs(evalcond[1]) < 0.0000050000000000)
6861 bgotonextstatement =
false;
6863 IkReal j2array[1], cj2array[1], sj2array[1];
6864 bool j2valid[1] = {
false };
6869 IKsqr(((-1.0) * new_r01)) - 1) <=
6873 IKatan2(((-1.0) * new_r00), ((-1.0) * new_r01));
6874 sj2array[0] =
IKsin(j2array[0]);
6875 cj2array[0] =
IKcos(j2array[0]);
6876 if (j2array[0] >
IKPI)
6878 j2array[0] -=
IK2PI;
6880 else if (j2array[0] < -
IKPI)
6882 j2array[0] +=
IK2PI;
6885 for (
int ij2 = 0; ij2 < 1; ++ij2)
6893 for (
int iij2 = ij2 + 1; iij2 < 1; ++iij2)
6895 if (j2valid[iij2] &&
6896 IKabs(cj2array[ij2] - cj2array[iij2]) <
6898 IKabs(sj2array[ij2] - sj2array[iij2]) <
6901 j2valid[iij2] =
false;
6907 cj2 = cj2array[ij2];
6908 sj2 = sj2array[ij2];
6911 IkReal x260 =
IKsin(j2);
6912 IkReal x261 =
IKcos(j2);
6913 IkReal x262 = ((1.0) * new_r11);
6914 IkReal x263 = ((1.0) * sj1);
6915 IkReal x264 = ((1.0) * new_r10);
6916 IkReal x265 = ((1.0) * x260);
6917 evalcond[0] = (x260 + new_r00);
6918 evalcond[1] = (x261 + new_r01);
6919 evalcond[2] = (new_r21 + ((sj1 * x260)));
6920 evalcond[3] = ((((-1.0) * x261 * x263)) + new_r20);
6921 evalcond[4] = (((cj1 * x261)) + (((-1.0) * x264)));
6923 ((((-1.0) * cj1 * x265)) + (((-1.0) * x262)));
6924 evalcond[6] = ((((-1.0) * cj1 * x264)) + x261 +
6925 (((-1.0) * new_r20 * x263)));
6927 ((((-1.0) * cj1 * x262)) +
6928 (((-1.0) * new_r21 * x263)) + (((-1.0) * x265)));
6943 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
6944 vinfos[0].jointtype = 1;
6945 vinfos[0].foffset = j0;
6946 vinfos[0].indices[0] = _ij0[0];
6947 vinfos[0].indices[1] = _ij0[1];
6948 vinfos[0].maxsolutions = _nj0;
6949 vinfos[1].jointtype = 1;
6950 vinfos[1].foffset = j1;
6951 vinfos[1].indices[0] = _ij1[0];
6952 vinfos[1].indices[1] = _ij1[1];
6953 vinfos[1].maxsolutions = _nj1;
6954 vinfos[2].jointtype = 1;
6955 vinfos[2].foffset = j2;
6956 vinfos[2].indices[0] = _ij2[0];
6957 vinfos[2].indices[1] = _ij2[1];
6958 vinfos[2].maxsolutions = _nj2;
6959 vinfos[3].jointtype = 1;
6960 vinfos[3].foffset = j3;
6961 vinfos[3].indices[0] = _ij3[0];
6962 vinfos[3].indices[1] = _ij3[1];
6963 vinfos[3].maxsolutions = _nj3;
6964 vinfos[4].jointtype = 1;
6965 vinfos[4].foffset = j4;
6966 vinfos[4].indices[0] = _ij4[0];
6967 vinfos[4].indices[1] = _ij4[1];
6968 vinfos[4].maxsolutions = _nj4;
6969 vinfos[5].jointtype = 1;
6970 vinfos[5].foffset = j5;
6971 vinfos[5].indices[0] = _ij5[0];
6972 vinfos[5].indices[1] = _ij5[1];
6973 vinfos[5].maxsolutions = _nj5;
6974 vinfos[6].jointtype = 1;
6975 vinfos[6].foffset = j6;
6976 vinfos[6].indices[0] = _ij6[0];
6977 vinfos[6].indices[1] = _ij6[1];
6978 vinfos[6].maxsolutions = _nj6;
6979 std::vector<int> vfree(0);
6980 solutions.AddSolution(vinfos, vfree);
6986 if (bgotonextstatement)
6988 bool bgotonextstatement =
true;
6991 evalcond[0] = ((
IKabs(new_r20)) + (
IKabs(new_r21)));
6992 if (
IKabs(evalcond[0]) < 0.0000050000000000)
6994 bgotonextstatement =
false;
7001 j2eval[0] =
IKabs(new_r22);
7002 if (
IKabs(j2eval[0]) < 0.0000000100000000)
7008 IkReal op[2 + 1], zeror[2];
7010 op[0] = ((-1.0) * new_r22);
7013 polyroots2(op, zeror, numroots);
7014 IkReal j2array[2], cj2array[2], sj2array[2],
7016 int numsolutions = 0;
7017 for (
int ij2 = 0; ij2 < numroots; ++ij2)
7019 IkReal htj2 = zeror[ij2];
7020 tempj2array[0] = ((2.0) * (atan(htj2)));
7021 for (
int kj2 = 0; kj2 < 1; ++kj2)
7023 j2array[numsolutions] = tempj2array[kj2];
7024 if (j2array[numsolutions] >
IKPI)
7026 j2array[numsolutions] -=
IK2PI;
7028 else if (j2array[numsolutions] < -
IKPI)
7030 j2array[numsolutions] +=
IK2PI;
7032 sj2array[numsolutions] =
7033 IKsin(j2array[numsolutions]);
7034 cj2array[numsolutions] =
7035 IKcos(j2array[numsolutions]);
7039 bool j2valid[2] = {
true,
true };
7041 for (
int ij2 = 0; ij2 < numsolutions; ++ij2)
7048 cj2 = cj2array[ij2];
7049 sj2 = sj2array[ij2];
7050 htj2 =
IKtan(j2 / 2);
7054 for (
int iij2 = ij2 + 1; iij2 < numsolutions; ++iij2)
7056 if (j2valid[iij2] &&
7057 IKabs(cj2array[ij2] - cj2array[iij2]) <
7059 IKabs(sj2array[ij2] - sj2array[iij2]) <
7062 j2valid[iij2] =
false;
7068 std::vector<IkSingleDOFSolutionBase<IkReal> >
7070 vinfos[0].jointtype = 1;
7071 vinfos[0].foffset = j0;
7072 vinfos[0].indices[0] = _ij0[0];
7073 vinfos[0].indices[1] = _ij0[1];
7074 vinfos[0].maxsolutions = _nj0;
7075 vinfos[1].jointtype = 1;
7076 vinfos[1].foffset = j1;
7077 vinfos[1].indices[0] = _ij1[0];
7078 vinfos[1].indices[1] = _ij1[1];
7079 vinfos[1].maxsolutions = _nj1;
7080 vinfos[2].jointtype = 1;
7081 vinfos[2].foffset = j2;
7082 vinfos[2].indices[0] = _ij2[0];
7083 vinfos[2].indices[1] = _ij2[1];
7084 vinfos[2].maxsolutions = _nj2;
7085 vinfos[3].jointtype = 1;
7086 vinfos[3].foffset = j3;
7087 vinfos[3].indices[0] = _ij3[0];
7088 vinfos[3].indices[1] = _ij3[1];
7089 vinfos[3].maxsolutions = _nj3;
7090 vinfos[4].jointtype = 1;
7091 vinfos[4].foffset = j4;
7092 vinfos[4].indices[0] = _ij4[0];
7093 vinfos[4].indices[1] = _ij4[1];
7094 vinfos[4].maxsolutions = _nj4;
7095 vinfos[5].jointtype = 1;
7096 vinfos[5].foffset = j5;
7097 vinfos[5].indices[0] = _ij5[0];
7098 vinfos[5].indices[1] = _ij5[1];
7099 vinfos[5].maxsolutions = _nj5;
7100 vinfos[6].jointtype = 1;
7101 vinfos[6].foffset = j6;
7102 vinfos[6].indices[0] = _ij6[0];
7103 vinfos[6].indices[1] = _ij6[1];
7104 vinfos[6].maxsolutions = _nj6;
7105 std::vector<int> vfree(0);
7106 solutions.AddSolution(vinfos, vfree);
7113 if (bgotonextstatement)
7115 bool bgotonextstatement =
true;
7120 bgotonextstatement =
false;
7124 if (bgotonextstatement)
7141 IkReal j2array[1], cj2array[1], sj2array[1];
7142 bool j2valid[1] = {
false };
7149 IkReal x266 = x267.
value;
7162 ((((cj0 * new_r21)) + (((-1.0) * new_r10 * sj1)))))) <
7166 ((((cj0 * new_r21)) + (((-1.0) * new_r10 * sj1)))))) -
7169 j2array[0] =
IKatan2(((-1.0) * new_r21 * x266),
7171 ((((cj0 * new_r21)) + (((-1.0) * new_r10 * sj1))))));
7172 sj2array[0] =
IKsin(j2array[0]);
7173 cj2array[0] =
IKcos(j2array[0]);
7174 if (j2array[0] >
IKPI)
7176 j2array[0] -=
IK2PI;
7178 else if (j2array[0] < -
IKPI)
7180 j2array[0] +=
IK2PI;
7183 for (
int ij2 = 0; ij2 < 1; ++ij2)
7191 for (
int iij2 = ij2 + 1; iij2 < 1; ++iij2)
7193 if (j2valid[iij2] &&
7197 j2valid[iij2] =
false;
7203 cj2 = cj2array[ij2];
7204 sj2 = sj2array[ij2];
7206 IkReal evalcond[12];
7207 IkReal x270 =
IKsin(j2);
7208 IkReal x271 =
IKcos(j2);
7209 IkReal x272 = ((1.0) * sj0);
7210 IkReal x273 = ((1.0) * sj1);
7211 IkReal x274 = (cj0 * new_r00);
7212 IkReal x275 = (cj1 * sj0);
7213 IkReal x276 = (cj0 * new_r01);
7214 IkReal x277 = (cj1 * x271);
7215 IkReal x278 = (cj1 * x270);
7216 evalcond[0] = (new_r21 + ((sj1 * x270)));
7217 evalcond[1] = ((((-1.0) * x271 * x273)) + new_r20);
7218 evalcond[2] = ((((-1.0) * new_r00 * x272)) + x270 + ((cj0 * new_r10)));
7219 evalcond[3] = ((((-1.0) * new_r01 * x272)) + x271 + ((cj0 * new_r11)));
7220 evalcond[4] = (((new_r10 * sj0)) + x277 + x274);
7221 evalcond[5] = (((x271 * x275)) + new_r10 + ((cj0 * x270)));
7222 evalcond[6] = ((((-1.0) * x278)) + ((new_r11 * sj0)) + x276);
7223 evalcond[7] = ((((-1.0) * x270 * x272)) + new_r00 + ((cj0 * x277)));
7224 evalcond[8] = ((((-1.0) * x272 * x278)) + new_r11 + ((cj0 * x271)));
7226 ((((-1.0) * cj0 * x278)) + (((-1.0) * x271 * x272)) + new_r01);
7227 evalcond[10] = (((cj1 * x274)) + x271 + (((-1.0) * new_r20 * x273)) +
7228 ((new_r10 * x275)));
7229 evalcond[11] = ((((-1.0) * x270)) + ((cj1 * x276)) +
7230 (((-1.0) * new_r21 * x273)) + ((new_r11 * x275)));
7249 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
7250 vinfos[0].jointtype = 1;
7251 vinfos[0].foffset = j0;
7252 vinfos[0].indices[0] = _ij0[0];
7253 vinfos[0].indices[1] = _ij0[1];
7254 vinfos[0].maxsolutions = _nj0;
7255 vinfos[1].jointtype = 1;
7256 vinfos[1].foffset = j1;
7257 vinfos[1].indices[0] = _ij1[0];
7258 vinfos[1].indices[1] = _ij1[1];
7259 vinfos[1].maxsolutions = _nj1;
7260 vinfos[2].jointtype = 1;
7261 vinfos[2].foffset = j2;
7262 vinfos[2].indices[0] = _ij2[0];
7263 vinfos[2].indices[1] = _ij2[1];
7264 vinfos[2].maxsolutions = _nj2;
7265 vinfos[3].jointtype = 1;
7266 vinfos[3].foffset = j3;
7267 vinfos[3].indices[0] = _ij3[0];
7268 vinfos[3].indices[1] = _ij3[1];
7269 vinfos[3].maxsolutions = _nj3;
7270 vinfos[4].jointtype = 1;
7271 vinfos[4].foffset = j4;
7272 vinfos[4].indices[0] = _ij4[0];
7273 vinfos[4].indices[1] = _ij4[1];
7274 vinfos[4].maxsolutions = _nj4;
7275 vinfos[5].jointtype = 1;
7276 vinfos[5].foffset = j5;
7277 vinfos[5].indices[0] = _ij5[0];
7278 vinfos[5].indices[1] = _ij5[1];
7279 vinfos[5].maxsolutions = _nj5;
7280 vinfos[6].jointtype = 1;
7281 vinfos[6].foffset = j6;
7282 vinfos[6].indices[0] = _ij6[0];
7283 vinfos[6].indices[1] = _ij6[1];
7284 vinfos[6].maxsolutions = _nj6;
7285 std::vector<int> vfree(0);
7286 solutions.AddSolution(vinfos, vfree);
7296 IkReal j2array[1], cj2array[1], sj2array[1];
7297 bool j2valid[1] = {
false };
7304 IkReal x279 = x280.
value;
7312 (((((-1.0) * cj1 * new_r21 * sj0)) + (((-1.0) * new_r11 * sj1)))))) <
7315 IKsqr(((-1.0) * new_r21 * x279)) +
7317 (((((-1.0) * cj1 * new_r21 * sj0)) + (((-1.0) * new_r11 * sj1)))))) -
7321 IKatan2(((-1.0) * new_r21 * x279),
7322 (x279 * (x281.
value) *
7323 (((((-1.0) * cj1 * new_r21 * sj0)) + (((-1.0) * new_r11 * sj1))))));
7324 sj2array[0] =
IKsin(j2array[0]);
7325 cj2array[0] =
IKcos(j2array[0]);
7326 if (j2array[0] >
IKPI)
7328 j2array[0] -=
IK2PI;
7330 else if (j2array[0] < -
IKPI)
7332 j2array[0] +=
IK2PI;
7335 for (
int ij2 = 0; ij2 < 1; ++ij2)
7343 for (
int iij2 = ij2 + 1; iij2 < 1; ++iij2)
7345 if (j2valid[iij2] &&
7349 j2valid[iij2] =
false;
7355 cj2 = cj2array[ij2];
7356 sj2 = sj2array[ij2];
7358 IkReal evalcond[12];
7359 IkReal x282 =
IKsin(j2);
7360 IkReal x283 =
IKcos(j2);
7361 IkReal x284 = ((1.0) * sj0);
7362 IkReal x285 = ((1.0) * sj1);
7363 IkReal x286 = (cj0 * new_r00);
7364 IkReal x287 = (cj1 * sj0);
7365 IkReal x288 = (cj0 * new_r01);
7366 IkReal x289 = (cj1 * x283);
7367 IkReal x290 = (cj1 * x282);
7368 evalcond[0] = (new_r21 + ((sj1 * x282)));
7369 evalcond[1] = (new_r20 + (((-1.0) * x283 * x285)));
7370 evalcond[2] = ((((-1.0) * new_r00 * x284)) + x282 + ((cj0 * new_r10)));
7371 evalcond[3] = (x283 + (((-1.0) * new_r01 * x284)) + ((cj0 * new_r11)));
7372 evalcond[4] = (((new_r10 * sj0)) + x289 + x286);
7373 evalcond[5] = (((cj0 * x282)) + new_r10 + ((x283 * x287)));
7374 evalcond[6] = ((((-1.0) * x290)) + ((new_r11 * sj0)) + x288);
7375 evalcond[7] = (((cj0 * x289)) + (((-1.0) * x282 * x284)) + new_r00);
7376 evalcond[8] = ((((-1.0) * x284 * x290)) + ((cj0 * x283)) + new_r11);
7377 evalcond[9] = ((((-1.0) * cj0 * x290)) + new_r01 + (((-1.0) * x283 * x284)));
7379 (x283 + (((-1.0) * new_r20 * x285)) + ((cj1 * x286)) + ((new_r10 * x287)));
7380 evalcond[11] = ((((-1.0) * x282)) + (((-1.0) * new_r21 * x285)) +
7381 ((new_r11 * x287)) + ((cj1 * x288)));
7400 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
7401 vinfos[0].jointtype = 1;
7402 vinfos[0].foffset = j0;
7403 vinfos[0].indices[0] = _ij0[0];
7404 vinfos[0].indices[1] = _ij0[1];
7405 vinfos[0].maxsolutions = _nj0;
7406 vinfos[1].jointtype = 1;
7407 vinfos[1].foffset = j1;
7408 vinfos[1].indices[0] = _ij1[0];
7409 vinfos[1].indices[1] = _ij1[1];
7410 vinfos[1].maxsolutions = _nj1;
7411 vinfos[2].jointtype = 1;
7412 vinfos[2].foffset = j2;
7413 vinfos[2].indices[0] = _ij2[0];
7414 vinfos[2].indices[1] = _ij2[1];
7415 vinfos[2].maxsolutions = _nj2;
7416 vinfos[3].jointtype = 1;
7417 vinfos[3].foffset = j3;
7418 vinfos[3].indices[0] = _ij3[0];
7419 vinfos[3].indices[1] = _ij3[1];
7420 vinfos[3].maxsolutions = _nj3;
7421 vinfos[4].jointtype = 1;
7422 vinfos[4].foffset = j4;
7423 vinfos[4].indices[0] = _ij4[0];
7424 vinfos[4].indices[1] = _ij4[1];
7425 vinfos[4].maxsolutions = _nj4;
7426 vinfos[5].jointtype = 1;
7427 vinfos[5].foffset = j5;
7428 vinfos[5].indices[0] = _ij5[0];
7429 vinfos[5].indices[1] = _ij5[1];
7430 vinfos[5].maxsolutions = _nj5;
7431 vinfos[6].jointtype = 1;
7432 vinfos[6].foffset = j6;
7433 vinfos[6].indices[0] = _ij6[0];
7434 vinfos[6].indices[1] = _ij6[1];
7435 vinfos[6].maxsolutions = _nj6;
7436 std::vector<int> vfree(0);
7437 solutions.AddSolution(vinfos, vfree);
7447 IkReal j2array[1], cj2array[1], sj2array[1];
7448 bool j2valid[1] = {
false };
7461 j2array[0] = ((-1.5707963267949) + (x291.
value) + (((1.5707963267949) * (x292.
value))));
7462 sj2array[0] =
IKsin(j2array[0]);
7463 cj2array[0] =
IKcos(j2array[0]);
7464 if (j2array[0] >
IKPI)
7466 j2array[0] -=
IK2PI;
7468 else if (j2array[0] < -
IKPI)
7470 j2array[0] +=
IK2PI;
7473 for (
int ij2 = 0; ij2 < 1; ++ij2)
7481 for (
int iij2 = ij2 + 1; iij2 < 1; ++iij2)
7483 if (j2valid[iij2] &&
7487 j2valid[iij2] =
false;
7493 cj2 = cj2array[ij2];
7494 sj2 = sj2array[ij2];
7496 IkReal evalcond[12];
7497 IkReal x293 =
IKsin(j2);
7498 IkReal x294 =
IKcos(j2);
7499 IkReal x295 = ((1.0) * sj0);
7500 IkReal x296 = ((1.0) * sj1);
7501 IkReal x297 = (cj0 * new_r00);
7502 IkReal x298 = (cj1 * sj0);
7503 IkReal x299 = (cj0 * new_r01);
7504 IkReal x300 = (cj1 * x294);
7505 IkReal x301 = (cj1 * x293);
7506 evalcond[0] = (((sj1 * x293)) + new_r21);
7507 evalcond[1] = (new_r20 + (((-1.0) * x294 * x296)));
7508 evalcond[2] = (x293 + ((cj0 * new_r10)) + (((-1.0) * new_r00 * x295)));
7509 evalcond[3] = ((((-1.0) * new_r01 * x295)) + x294 + ((cj0 * new_r11)));
7510 evalcond[4] = (((new_r10 * sj0)) + x300 + x297);
7511 evalcond[5] = (((x294 * x298)) + new_r10 + ((cj0 * x293)));
7512 evalcond[6] = (((new_r11 * sj0)) + (((-1.0) * x301)) + x299);
7513 evalcond[7] = ((((-1.0) * x293 * x295)) + ((cj0 * x300)) + new_r00);
7514 evalcond[8] = ((((-1.0) * x295 * x301)) + new_r11 + ((cj0 * x294)));
7515 evalcond[9] = ((((-1.0) * cj0 * x301)) + new_r01 + (((-1.0) * x294 * x295)));
7517 ((((-1.0) * new_r20 * x296)) + ((cj1 * x297)) + ((new_r10 * x298)) + x294);
7518 evalcond[11] = ((((-1.0) * x293)) + (((-1.0) * new_r21 * x296)) +
7519 ((new_r11 * x298)) + ((cj1 * x299)));
7538 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
7539 vinfos[0].jointtype = 1;
7540 vinfos[0].foffset = j0;
7541 vinfos[0].indices[0] = _ij0[0];
7542 vinfos[0].indices[1] = _ij0[1];
7543 vinfos[0].maxsolutions = _nj0;
7544 vinfos[1].jointtype = 1;
7545 vinfos[1].foffset = j1;
7546 vinfos[1].indices[0] = _ij1[0];
7547 vinfos[1].indices[1] = _ij1[1];
7548 vinfos[1].maxsolutions = _nj1;
7549 vinfos[2].jointtype = 1;
7550 vinfos[2].foffset = j2;
7551 vinfos[2].indices[0] = _ij2[0];
7552 vinfos[2].indices[1] = _ij2[1];
7553 vinfos[2].maxsolutions = _nj2;
7554 vinfos[3].jointtype = 1;
7555 vinfos[3].foffset = j3;
7556 vinfos[3].indices[0] = _ij3[0];
7557 vinfos[3].indices[1] = _ij3[1];
7558 vinfos[3].maxsolutions = _nj3;
7559 vinfos[4].jointtype = 1;
7560 vinfos[4].foffset = j4;
7561 vinfos[4].indices[0] = _ij4[0];
7562 vinfos[4].indices[1] = _ij4[1];
7563 vinfos[4].maxsolutions = _nj4;
7564 vinfos[5].jointtype = 1;
7565 vinfos[5].foffset = j5;
7566 vinfos[5].indices[0] = _ij5[0];
7567 vinfos[5].indices[1] = _ij5[1];
7568 vinfos[5].maxsolutions = _nj5;
7569 vinfos[6].jointtype = 1;
7570 vinfos[6].foffset = j6;
7571 vinfos[6].indices[0] = _ij6[0];
7572 vinfos[6].indices[1] = _ij6[1];
7573 vinfos[6].maxsolutions = _nj6;
7574 std::vector<int> vfree(0);
7575 solutions.AddSolution(vinfos, vfree);
7589 IkReal j2array[1], cj2array[1], sj2array[1];
7590 bool j2valid[1] = {
false };
7603 j2array[0] = ((-1.5707963267949) + (x302.
value) + (((1.5707963267949) * (x303.
value))));
7604 sj2array[0] =
IKsin(j2array[0]);
7605 cj2array[0] =
IKcos(j2array[0]);
7606 if (j2array[0] >
IKPI)
7608 j2array[0] -=
IK2PI;
7610 else if (j2array[0] < -
IKPI)
7612 j2array[0] +=
IK2PI;
7615 for (
int ij2 = 0; ij2 < 1; ++ij2)
7623 for (
int iij2 = ij2 + 1; iij2 < 1; ++iij2)
7628 j2valid[iij2] =
false;
7634 cj2 = cj2array[ij2];
7635 sj2 = sj2array[ij2];
7638 evalcond[0] = (((sj1 * (
IKsin(j2)))) + new_r21);
7639 evalcond[1] = ((((-1.0) * sj1 * (
IKcos(j2)))) + new_r20);
7649 j0eval[1] = ((
IKabs(new_r12)) + (
IKabs(new_r02)));
7651 if (
IKabs(j0eval[0]) < 0.0000010000000000 ||
IKabs(j0eval[1]) < 0.0000010000000000 ||
7652 IKabs(j0eval[2]) < 0.0000010000000000)
7656 j0eval[0] = new_r00;
7658 if (
IKabs(j0eval[0]) < 0.0000010000000000 ||
IKabs(j0eval[1]) < 0.0000010000000000)
7662 bool bgotonextstatement =
true;
7665 evalcond[0] = ((-3.14159265358979) +
7666 (
IKfmod(((3.14159265358979) + (
IKabs(j1))), 6.28318530717959)));
7667 evalcond[1] = new_r21;
7668 evalcond[2] = new_r02;
7669 evalcond[3] = new_r12;
7670 evalcond[4] = new_r20;
7671 if (
IKabs(evalcond[0]) < 0.0000050000000000 &&
7672 IKabs(evalcond[1]) < 0.0000050000000000 &&
7673 IKabs(evalcond[2]) < 0.0000050000000000 &&
7674 IKabs(evalcond[3]) < 0.0000050000000000 &&
7675 IKabs(evalcond[4]) < 0.0000050000000000)
7677 bgotonextstatement =
false;
7683 IkReal x304 = ((1.0) * cj2);
7684 IkReal x305 = ((new_r10 * new_r10) + (new_r00 * new_r00));
7686 j0eval[1] = ((
IKabs((((new_r00 * sj2)) + (((-1.0) * new_r10 * x304))))) +
7687 (
IKabs(((((-1.0) * new_r10 * sj2)) + (((-1.0) * new_r00 * x304))))));
7688 j0eval[2] =
IKsign(x305);
7689 if (
IKabs(j0eval[0]) < 0.0000010000000000 ||
7690 IKabs(j0eval[1]) < 0.0000010000000000 ||
7691 IKabs(j0eval[2]) < 0.0000010000000000)
7698 IkReal x306 = ((1.0) * cj2);
7699 IkReal x307 = (((new_r10 * new_r11)) + ((new_r00 * new_r01)));
7702 ((
IKabs(((((-1.0) * new_r01 * x306)) + (((-1.0) * new_r10 * x306))))) +
7703 (
IKabs((((cj2 * new_r00)) + (((-1.0) * new_r11 * x306))))));
7704 j0eval[2] =
IKsign(x307);
7705 if (
IKabs(j0eval[0]) < 0.0000010000000000 ||
7706 IKabs(j0eval[1]) < 0.0000010000000000 ||
7707 IKabs(j0eval[2]) < 0.0000010000000000)
7714 IkReal x308 = ((1.0) * new_r10);
7715 IkReal x309 = ((((-1.0) * sj2 * x308)) + ((cj2 * new_r00)));
7717 j0eval[1] =
IKsign(x309);
7718 j0eval[2] = ((
IKabs(((((-1.0) * (cj2 * cj2))) + (new_r10 * new_r10)))) +
7719 (
IKabs((((cj2 * sj2)) + (((-1.0) * new_r00 * x308))))));
7720 if (
IKabs(j0eval[0]) < 0.0000010000000000 ||
7721 IKabs(j0eval[1]) < 0.0000010000000000 ||
7722 IKabs(j0eval[2]) < 0.0000010000000000)
7726 bool bgotonextstatement =
true;
7729 IkReal x312 = ((new_r10 * new_r10) + (new_r00 * new_r00));
7730 if (
IKabs(x312) == 0)
7734 IkReal x310 = pow(x312, -0.5);
7735 IkReal x311 = ((-1.0) * x310);
7738 IkReal(((-1.0) * new_r10)),
7744 IkReal gconst0 = ((-1.0) * (x313.
value));
7745 IkReal gconst1 = (new_r00 * x311);
7746 IkReal gconst2 = (new_r10 * x311);
7749 IkReal(((-1.0) * new_r10)),
7756 ((-3.14159265358979) +
7758 6.28318530717959)));
7759 if (
IKabs(evalcond[0]) < 0.0000050000000000)
7761 bgotonextstatement =
false;
7766 IkReal(((-1.0) * new_r10)),
7772 IkReal x315 = ((-1.0) * (x318.
value));
7774 IkReal x317 = ((-1.0) * x316);
7781 IkReal gconst0 = x315;
7782 IkReal gconst1 = (new_r00 * x317);
7783 IkReal gconst2 = (new_r10 * x317);
7784 IkReal x319 = ((new_r10 * new_r10) + (new_r00 * new_r00));
7786 j0eval[1] =
IKsign(x319);
7787 if (
IKabs(j0eval[0]) < 0.0000010000000000 ||
7788 IKabs(j0eval[1]) < 0.0000010000000000)
7794 IkReal(((-1.0) * new_r10)),
7800 IkReal x320 = ((-1.0) * (x323.
value));
7802 IkReal x322 = ((-1.0) * x321);
7809 IkReal gconst0 = x320;
7810 IkReal gconst1 = (new_r00 * x322);
7811 IkReal gconst2 = (new_r10 * x322);
7812 IkReal x324 = new_r10 * new_r10;
7814 (((new_r10 * new_r11)) + ((new_r00 * new_r01)));
7816 IkReal x327 = (new_r10 * x326);
7818 j0eval[1] =
IKsign(x325);
7820 ((
IKabs(((((-1.0) * new_r00 * x327)) +
7821 ((new_r11 * x327))))) +
7822 (
IKabs((((new_r01 * x327)) + ((x324 * x326))))));
7823 if (
IKabs(j0eval[0]) < 0.0000010000000000 ||
7824 IKabs(j0eval[1]) < 0.0000010000000000 ||
7825 IKabs(j0eval[2]) < 0.0000010000000000)
7831 IkReal(((-1.0) * new_r10)),
7837 IkReal x328 = ((-1.0) * (x331.
value));
7839 IkReal x330 = ((-1.0) * x329);
7846 IkReal gconst0 = x328;
7847 IkReal gconst1 = (new_r00 * x330);
7848 IkReal gconst2 = (new_r10 * x330);
7849 IkReal x332 = new_r10 * new_r10;
7850 IkReal x333 = new_r00 * new_r00;
7857 IkReal x334 = x340.
value;
7858 IkReal x335 = (x332 * x334);
7860 ((((-1.0) * x332)) + (((-1.0) * x333))), -1);
7865 IkReal x336 = x341.
value;
7866 IkReal x337 = ((1.0) * x336);
7867 IkReal x338 = (new_r00 * x337);
7868 IkReal x339 = (new_r10 * x337);
7870 ((
IKabs(((((-1.0) * new_r10 * x338)) +
7872 (new_r10 * new_r10 * new_r10))) +
7873 (((-1.0) * new_r10 * x338 *
7874 (new_r00 * new_r00)))))) +
7875 (
IKabs((((x334 * (x333 * x333))) +
7876 (((-1.0) * x335)) + ((x333 * x335))))));
7877 if (
IKabs(j0eval[0]) < 0.0000010000000000)
7884 IkReal j0array[1], cj0array[1], sj0array[1];
7885 bool j0valid[1] = {
false };
7888 IkReal(((((-1.0) * (gconst2 * gconst2))) +
7889 (new_r00 * new_r00))),
7890 IkReal(((((-1.0) * gconst1 * gconst2)) +
7891 (((-1.0) * new_r00 * new_r10)))),
7898 IKsign((((gconst2 * new_r10)) +
7899 ((gconst1 * new_r00)))),
7905 j0array[0] = ((-1.5707963267949) + (x342.
value) +
7906 (((1.5707963267949) * (x343.
value))));
7907 sj0array[0] =
IKsin(j0array[0]);
7908 cj0array[0] =
IKcos(j0array[0]);
7909 if (j0array[0] >
IKPI)
7911 j0array[0] -=
IK2PI;
7913 else if (j0array[0] < -
IKPI)
7915 j0array[0] +=
IK2PI;
7918 for (
int ij0 = 0; ij0 < 1; ++ij0)
7926 for (
int iij0 = ij0 + 1; iij0 < 1; ++iij0)
7928 if (j0valid[iij0] &&
7929 IKabs(cj0array[ij0] - cj0array[iij0]) <
7931 IKabs(sj0array[ij0] - sj0array[iij0]) <
7934 j0valid[iij0] =
false;
7940 cj0 = cj0array[ij0];
7941 sj0 = sj0array[ij0];
7944 IkReal x344 =
IKcos(j0);
7945 IkReal x345 =
IKsin(j0);
7946 IkReal x346 = ((1.0) * gconst1);
7947 IkReal x347 = (gconst2 * x344);
7948 IkReal x348 = (gconst1 * x344);
7949 IkReal x349 = (gconst2 * x345);
7950 IkReal x350 = ((1.0) * x345);
7951 IkReal x351 = (x345 * x346);
7952 evalcond[0] = (gconst2 + ((new_r00 * x344)) +
7953 ((new_r10 * x345)));
7954 evalcond[1] = (x348 + x349 + new_r10);
7955 evalcond[2] = (gconst1 + ((new_r10 * x344)) +
7956 (((-1.0) * new_r00 * x350)));
7957 evalcond[3] = (gconst2 + ((new_r11 * x344)) +
7958 (((-1.0) * new_r01 * x350)));
7960 ((((-1.0) * x351)) + x347 + new_r00);
7962 ((((-1.0) * x351)) + x347 + new_r11);
7964 (((new_r11 * x345)) + ((new_r01 * x344)) +
7966 evalcond[7] = ((((-1.0) * x344 * x346)) +
7967 new_r01 + (((-1.0) * x349)));
7968 if (
IKabs(evalcond[0]) >
7970 IKabs(evalcond[1]) >
7972 IKabs(evalcond[2]) >
7974 IKabs(evalcond[3]) >
7976 IKabs(evalcond[4]) >
7978 IKabs(evalcond[5]) >
7980 IKabs(evalcond[6]) >
7989 std::vector<IkSingleDOFSolutionBase<IkReal> >
7991 vinfos[0].jointtype = 1;
7992 vinfos[0].foffset = j0;
7993 vinfos[0].indices[0] = _ij0[0];
7994 vinfos[0].indices[1] = _ij0[1];
7995 vinfos[0].maxsolutions = _nj0;
7996 vinfos[1].jointtype = 1;
7997 vinfos[1].foffset = j1;
7998 vinfos[1].indices[0] = _ij1[0];
7999 vinfos[1].indices[1] = _ij1[1];
8000 vinfos[1].maxsolutions = _nj1;
8001 vinfos[2].jointtype = 1;
8002 vinfos[2].foffset = j2;
8003 vinfos[2].indices[0] = _ij2[0];
8004 vinfos[2].indices[1] = _ij2[1];
8005 vinfos[2].maxsolutions = _nj2;
8006 vinfos[3].jointtype = 1;
8007 vinfos[3].foffset = j3;
8008 vinfos[3].indices[0] = _ij3[0];
8009 vinfos[3].indices[1] = _ij3[1];
8010 vinfos[3].maxsolutions = _nj3;
8011 vinfos[4].jointtype = 1;
8012 vinfos[4].foffset = j4;
8013 vinfos[4].indices[0] = _ij4[0];
8014 vinfos[4].indices[1] = _ij4[1];
8015 vinfos[4].maxsolutions = _nj4;
8016 vinfos[5].jointtype = 1;
8017 vinfos[5].foffset = j5;
8018 vinfos[5].indices[0] = _ij5[0];
8019 vinfos[5].indices[1] = _ij5[1];
8020 vinfos[5].maxsolutions = _nj5;
8021 vinfos[6].jointtype = 1;
8022 vinfos[6].foffset = j6;
8023 vinfos[6].indices[0] = _ij6[0];
8024 vinfos[6].indices[1] = _ij6[1];
8025 vinfos[6].maxsolutions = _nj6;
8026 std::vector<int> vfree(0);
8027 solutions.AddSolution(vinfos, vfree);
8037 IkReal j0array[1], cj0array[1], sj0array[1];
8038 bool j0valid[1] = {
false };
8040 IkReal x352 = ((1.0) * gconst2);
8042 IkReal((((gconst2 * new_r00)) +
8043 (((-1.0) * new_r11 * x352)))),
8044 IkReal(((((-1.0) * new_r01 * x352)) +
8045 (((-1.0) * new_r10 * x352)))),
8052 IKsign((((new_r10 * new_r11)) +
8053 ((new_r00 * new_r01)))),
8059 j0array[0] = ((-1.5707963267949) + (x353.
value) +
8060 (((1.5707963267949) * (x354.
value))));
8061 sj0array[0] =
IKsin(j0array[0]);
8062 cj0array[0] =
IKcos(j0array[0]);
8063 if (j0array[0] >
IKPI)
8065 j0array[0] -=
IK2PI;
8067 else if (j0array[0] < -
IKPI)
8069 j0array[0] +=
IK2PI;
8072 for (
int ij0 = 0; ij0 < 1; ++ij0)
8080 for (
int iij0 = ij0 + 1; iij0 < 1; ++iij0)
8082 if (j0valid[iij0] &&
8083 IKabs(cj0array[ij0] - cj0array[iij0]) <
8085 IKabs(sj0array[ij0] - sj0array[iij0]) <
8088 j0valid[iij0] =
false;
8094 cj0 = cj0array[ij0];
8095 sj0 = sj0array[ij0];
8098 IkReal x355 =
IKcos(j0);
8099 IkReal x356 =
IKsin(j0);
8100 IkReal x357 = ((1.0) * gconst1);
8101 IkReal x358 = (gconst2 * x355);
8102 IkReal x359 = (gconst1 * x355);
8103 IkReal x360 = (gconst2 * x356);
8104 IkReal x361 = ((1.0) * x356);
8105 IkReal x362 = (x356 * x357);
8106 evalcond[0] = (gconst2 + ((new_r10 * x356)) +
8107 ((new_r00 * x355)));
8108 evalcond[1] = (x359 + x360 + new_r10);
8109 evalcond[2] = ((((-1.0) * new_r00 * x361)) +
8110 gconst1 + ((new_r10 * x355)));
8111 evalcond[3] = (gconst2 + ((new_r11 * x355)) +
8112 (((-1.0) * new_r01 * x361)));
8113 evalcond[4] = ((((-1.0) * x362)) + x358 + new_r00);
8114 evalcond[5] = ((((-1.0) * x362)) + x358 + new_r11);
8116 (((new_r01 * x355)) + (((-1.0) * x357)) +
8117 ((new_r11 * x356)));
8118 evalcond[7] = ((((-1.0) * x360)) + new_r01 +
8119 (((-1.0) * x355 * x357)));
8134 std::vector<IkSingleDOFSolutionBase<IkReal> >
8136 vinfos[0].jointtype = 1;
8137 vinfos[0].foffset = j0;
8138 vinfos[0].indices[0] = _ij0[0];
8139 vinfos[0].indices[1] = _ij0[1];
8140 vinfos[0].maxsolutions = _nj0;
8141 vinfos[1].jointtype = 1;
8142 vinfos[1].foffset = j1;
8143 vinfos[1].indices[0] = _ij1[0];
8144 vinfos[1].indices[1] = _ij1[1];
8145 vinfos[1].maxsolutions = _nj1;
8146 vinfos[2].jointtype = 1;
8147 vinfos[2].foffset = j2;
8148 vinfos[2].indices[0] = _ij2[0];
8149 vinfos[2].indices[1] = _ij2[1];
8150 vinfos[2].maxsolutions = _nj2;
8151 vinfos[3].jointtype = 1;
8152 vinfos[3].foffset = j3;
8153 vinfos[3].indices[0] = _ij3[0];
8154 vinfos[3].indices[1] = _ij3[1];
8155 vinfos[3].maxsolutions = _nj3;
8156 vinfos[4].jointtype = 1;
8157 vinfos[4].foffset = j4;
8158 vinfos[4].indices[0] = _ij4[0];
8159 vinfos[4].indices[1] = _ij4[1];
8160 vinfos[4].maxsolutions = _nj4;
8161 vinfos[5].jointtype = 1;
8162 vinfos[5].foffset = j5;
8163 vinfos[5].indices[0] = _ij5[0];
8164 vinfos[5].indices[1] = _ij5[1];
8165 vinfos[5].maxsolutions = _nj5;
8166 vinfos[6].jointtype = 1;
8167 vinfos[6].foffset = j6;
8168 vinfos[6].indices[0] = _ij6[0];
8169 vinfos[6].indices[1] = _ij6[1];
8170 vinfos[6].maxsolutions = _nj6;
8171 std::vector<int> vfree(0);
8172 solutions.AddSolution(vinfos, vfree);
8182 IkReal j0array[1], cj0array[1], sj0array[1];
8183 bool j0valid[1] = {
false };
8185 IkReal x363 = ((1.0) * new_r10);
8187 IKsign(((new_r10 * new_r10) + (new_r00 * new_r00))),
8194 IkReal((((gconst1 * new_r00)) +
8195 (((-1.0) * gconst2 * x363)))),
8196 IkReal(((((-1.0) * gconst1 * x363)) +
8197 (((-1.0) * gconst2 * new_r00)))),
8204 ((-1.5707963267949) +
8205 (((1.5707963267949) * (x364.
value))) + (x365.
value));
8206 sj0array[0] =
IKsin(j0array[0]);
8207 cj0array[0] =
IKcos(j0array[0]);
8208 if (j0array[0] >
IKPI)
8210 j0array[0] -=
IK2PI;
8212 else if (j0array[0] < -
IKPI)
8214 j0array[0] +=
IK2PI;
8217 for (
int ij0 = 0; ij0 < 1; ++ij0)
8225 for (
int iij0 = ij0 + 1; iij0 < 1; ++iij0)
8227 if (j0valid[iij0] &&
8228 IKabs(cj0array[ij0] - cj0array[iij0]) <
8230 IKabs(sj0array[ij0] - sj0array[iij0]) <
8233 j0valid[iij0] =
false;
8239 cj0 = cj0array[ij0];
8240 sj0 = sj0array[ij0];
8243 IkReal x366 =
IKcos(j0);
8244 IkReal x367 =
IKsin(j0);
8245 IkReal x368 = ((1.0) * gconst1);
8246 IkReal x369 = (gconst2 * x366);
8247 IkReal x370 = (gconst1 * x366);
8248 IkReal x371 = (gconst2 * x367);
8249 IkReal x372 = ((1.0) * x367);
8250 IkReal x373 = (x367 * x368);
8252 (gconst2 + ((new_r00 * x366)) + ((new_r10 * x367)));
8253 evalcond[1] = (x371 + x370 + new_r10);
8254 evalcond[2] = ((((-1.0) * new_r00 * x372)) + gconst1 +
8255 ((new_r10 * x366)));
8256 evalcond[3] = (gconst2 + (((-1.0) * new_r01 * x372)) +
8257 ((new_r11 * x366)));
8258 evalcond[4] = ((((-1.0) * x373)) + x369 + new_r00);
8259 evalcond[5] = ((((-1.0) * x373)) + x369 + new_r11);
8260 evalcond[6] = ((((-1.0) * x368)) + ((new_r01 * x366)) +
8261 ((new_r11 * x367)));
8262 evalcond[7] = ((((-1.0) * x371)) +
8263 (((-1.0) * x366 * x368)) + new_r01);
8278 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
8279 vinfos[0].jointtype = 1;
8280 vinfos[0].foffset = j0;
8281 vinfos[0].indices[0] = _ij0[0];
8282 vinfos[0].indices[1] = _ij0[1];
8283 vinfos[0].maxsolutions = _nj0;
8284 vinfos[1].jointtype = 1;
8285 vinfos[1].foffset = j1;
8286 vinfos[1].indices[0] = _ij1[0];
8287 vinfos[1].indices[1] = _ij1[1];
8288 vinfos[1].maxsolutions = _nj1;
8289 vinfos[2].jointtype = 1;
8290 vinfos[2].foffset = j2;
8291 vinfos[2].indices[0] = _ij2[0];
8292 vinfos[2].indices[1] = _ij2[1];
8293 vinfos[2].maxsolutions = _nj2;
8294 vinfos[3].jointtype = 1;
8295 vinfos[3].foffset = j3;
8296 vinfos[3].indices[0] = _ij3[0];
8297 vinfos[3].indices[1] = _ij3[1];
8298 vinfos[3].maxsolutions = _nj3;
8299 vinfos[4].jointtype = 1;
8300 vinfos[4].foffset = j4;
8301 vinfos[4].indices[0] = _ij4[0];
8302 vinfos[4].indices[1] = _ij4[1];
8303 vinfos[4].maxsolutions = _nj4;
8304 vinfos[5].jointtype = 1;
8305 vinfos[5].foffset = j5;
8306 vinfos[5].indices[0] = _ij5[0];
8307 vinfos[5].indices[1] = _ij5[1];
8308 vinfos[5].maxsolutions = _nj5;
8309 vinfos[6].jointtype = 1;
8310 vinfos[6].foffset = j6;
8311 vinfos[6].indices[0] = _ij6[0];
8312 vinfos[6].indices[1] = _ij6[1];
8313 vinfos[6].maxsolutions = _nj6;
8314 std::vector<int> vfree(0);
8315 solutions.AddSolution(vinfos, vfree);
8323 if (bgotonextstatement)
8325 bool bgotonextstatement =
true;
8328 IkReal x376 = ((new_r10 * new_r10) + (new_r00 * new_r00));
8329 if (
IKabs(x376) == 0)
8333 IkReal x374 = pow(x376, -0.5);
8334 IkReal x375 = ((1.0) * x374);
8337 IkReal(((-1.0) * new_r10)),
8343 IkReal gconst3 = ((3.14159265358979) + (((-1.0) * (x377.
value))));
8344 IkReal gconst4 = (new_r00 * x375);
8345 IkReal gconst5 = (new_r10 * x375);
8348 IkReal(((-1.0) * new_r10)),
8355 ((-3.14159265358979) +
8356 (
IKfmod(((3.14159265358979) +
8357 (
IKabs(((-3.14159265358979) + (x378.
value) + j2)))),
8358 6.28318530717959)));
8359 if (
IKabs(evalcond[0]) < 0.0000050000000000)
8361 bgotonextstatement =
false;
8366 IkReal(((-1.0) * new_r10)),
8372 IkReal x379 = ((1.0) * (x382.
value));
8374 IkReal x381 = ((1.0) * x380);
8380 j2 = ((3.14159265) + (((-1.0) * x379)));
8381 IkReal gconst3 = ((3.14159265358979) + (((-1.0) * x379)));
8382 IkReal gconst4 = (new_r00 * x381);
8383 IkReal gconst5 = (new_r10 * x381);
8384 IkReal x383 = ((new_r10 * new_r10) + (new_r00 * new_r00));
8386 j0eval[1] =
IKsign(x383);
8387 if (
IKabs(j0eval[0]) < 0.0000010000000000 ||
8388 IKabs(j0eval[1]) < 0.0000010000000000)
8394 IkReal(((-1.0) * new_r10)),
8400 IkReal x384 = ((1.0) * (x387.
value));
8402 IkReal x386 = ((1.0) * x385);
8408 j2 = ((3.14159265) + (((-1.0) * x384)));
8409 IkReal gconst3 = ((3.14159265358979) + (((-1.0) * x384)));
8410 IkReal gconst4 = (new_r00 * x386);
8411 IkReal gconst5 = (new_r10 * x386);
8412 IkReal x388 = new_r10 * new_r10;
8413 IkReal x389 = (new_r10 * new_r11);
8414 IkReal x390 = (((new_r00 * new_r01)) + x389);
8416 IkReal x392 = ((1.0) * x391);
8419 ((
IKabs(((((-1.0) * new_r01 * new_r10 * x392)) +
8420 (((-1.0) * x388 * x392))))) +
8421 (
IKabs(((((-1.0) * x389 * x392)) +
8422 ((new_r00 * new_r10 * x391))))));
8423 j0eval[2] =
IKsign(x390);
8424 if (
IKabs(j0eval[0]) < 0.0000010000000000 ||
8425 IKabs(j0eval[1]) < 0.0000010000000000 ||
8426 IKabs(j0eval[2]) < 0.0000010000000000)
8432 IkReal(((-1.0) * new_r10)),
8438 IkReal x393 = ((1.0) * (x396.
value));
8440 IkReal x395 = ((1.0) * x394);
8446 j2 = ((3.14159265) + (((-1.0) * x393)));
8448 ((3.14159265358979) + (((-1.0) * x393)));
8449 IkReal gconst4 = (new_r00 * x395);
8450 IkReal gconst5 = (new_r10 * x395);
8451 IkReal x397 = new_r10 * new_r10;
8452 IkReal x398 = new_r00 * new_r00;
8459 IkReal x399 = x405.
value;
8460 IkReal x400 = (x397 * x399);
8462 ((((-1.0) * x398)) + (((-1.0) * x397))), -1);
8467 IkReal x401 = x406.
value;
8468 IkReal x402 = ((1.0) * x401);
8469 IkReal x403 = (new_r00 * x402);
8470 IkReal x404 = (new_r10 * x402);
8472 ((
IKabs((((x399 * (x398 * x398))) +
8473 ((x398 * x400)) + (((-1.0) * x400))))) +
8474 (
IKabs(((((-1.0) * x403 *
8475 (new_r10 * new_r10 * new_r10))) +
8476 (((-1.0) * new_r10 * x403)) +
8477 (((-1.0) * new_r10 * x403 *
8478 (new_r00 * new_r00)))))));
8479 if (
IKabs(j0eval[0]) < 0.0000010000000000)
8486 IkReal j0array[1], cj0array[1], sj0array[1];
8487 bool j0valid[1] = {
false };
8490 IKsign((((gconst4 * new_r00)) +
8491 ((gconst5 * new_r10)))),
8498 IkReal(((((-1.0) * (gconst5 * gconst5))) +
8499 (new_r00 * new_r00))),
8500 IkReal(((((-1.0) * gconst4 * gconst5)) +
8501 (((-1.0) * new_r00 * new_r10)))),
8508 ((-1.5707963267949) +
8509 (((1.5707963267949) * (x407.
value))) +
8511 sj0array[0] =
IKsin(j0array[0]);
8512 cj0array[0] =
IKcos(j0array[0]);
8513 if (j0array[0] >
IKPI)
8515 j0array[0] -=
IK2PI;
8517 else if (j0array[0] < -
IKPI)
8519 j0array[0] +=
IK2PI;
8522 for (
int ij0 = 0; ij0 < 1; ++ij0)
8530 for (
int iij0 = ij0 + 1; iij0 < 1; ++iij0)
8532 if (j0valid[iij0] &&
8533 IKabs(cj0array[ij0] - cj0array[iij0]) <
8535 IKabs(sj0array[ij0] - sj0array[iij0]) <
8538 j0valid[iij0] =
false;
8544 cj0 = cj0array[ij0];
8545 sj0 = sj0array[ij0];
8548 IkReal x409 =
IKcos(j0);
8549 IkReal x410 =
IKsin(j0);
8550 IkReal x411 = ((1.0) * gconst4);
8551 IkReal x412 = (gconst5 * x409);
8552 IkReal x413 = ((1.0) * x410);
8553 IkReal x414 = (x410 * x411);
8554 evalcond[0] = (gconst5 + ((new_r10 * x410)) +
8555 ((new_r00 * x409)));
8556 evalcond[1] = (((gconst5 * x410)) +
8557 ((gconst4 * x409)) + new_r10);
8558 evalcond[2] = (gconst4 + ((new_r10 * x409)) +
8559 (((-1.0) * new_r00 * x413)));
8560 evalcond[3] = (gconst5 + ((new_r11 * x409)) +
8561 (((-1.0) * new_r01 * x413)));
8563 (x412 + new_r00 + (((-1.0) * x414)));
8565 (x412 + new_r11 + (((-1.0) * x414)));
8567 (((new_r11 * x410)) + ((new_r01 * x409)) +
8570 ((((-1.0) * gconst5 * x413)) + new_r01 +
8571 (((-1.0) * x409 * x411)));
8572 if (
IKabs(evalcond[0]) >
8574 IKabs(evalcond[1]) >
8576 IKabs(evalcond[2]) >
8578 IKabs(evalcond[3]) >
8580 IKabs(evalcond[4]) >
8582 IKabs(evalcond[5]) >
8584 IKabs(evalcond[6]) >
8586 IKabs(evalcond[7]) >
8594 std::vector<IkSingleDOFSolutionBase<IkReal> >
8596 vinfos[0].jointtype = 1;
8597 vinfos[0].foffset = j0;
8598 vinfos[0].indices[0] = _ij0[0];
8599 vinfos[0].indices[1] = _ij0[1];
8600 vinfos[0].maxsolutions = _nj0;
8601 vinfos[1].jointtype = 1;
8602 vinfos[1].foffset = j1;
8603 vinfos[1].indices[0] = _ij1[0];
8604 vinfos[1].indices[1] = _ij1[1];
8605 vinfos[1].maxsolutions = _nj1;
8606 vinfos[2].jointtype = 1;
8607 vinfos[2].foffset = j2;
8608 vinfos[2].indices[0] = _ij2[0];
8609 vinfos[2].indices[1] = _ij2[1];
8610 vinfos[2].maxsolutions = _nj2;
8611 vinfos[3].jointtype = 1;
8612 vinfos[3].foffset = j3;
8613 vinfos[3].indices[0] = _ij3[0];
8614 vinfos[3].indices[1] = _ij3[1];
8615 vinfos[3].maxsolutions = _nj3;
8616 vinfos[4].jointtype = 1;
8617 vinfos[4].foffset = j4;
8618 vinfos[4].indices[0] = _ij4[0];
8619 vinfos[4].indices[1] = _ij4[1];
8620 vinfos[4].maxsolutions = _nj4;
8621 vinfos[5].jointtype = 1;
8622 vinfos[5].foffset = j5;
8623 vinfos[5].indices[0] = _ij5[0];
8624 vinfos[5].indices[1] = _ij5[1];
8625 vinfos[5].maxsolutions = _nj5;
8626 vinfos[6].jointtype = 1;
8627 vinfos[6].foffset = j6;
8628 vinfos[6].indices[0] = _ij6[0];
8629 vinfos[6].indices[1] = _ij6[1];
8630 vinfos[6].maxsolutions = _nj6;
8631 std::vector<int> vfree(0);
8632 solutions.AddSolution(vinfos, vfree);
8642 IkReal j0array[1], cj0array[1], sj0array[1];
8643 bool j0valid[1] = {
false };
8645 IkReal x415 = ((1.0) * gconst5);
8647 IkReal((((gconst5 * new_r00)) +
8648 (((-1.0) * new_r11 * x415)))),
8649 IkReal(((((-1.0) * new_r10 * x415)) +
8650 (((-1.0) * new_r01 * x415)))),
8657 IKsign((((new_r10 * new_r11)) +
8658 ((new_r00 * new_r01)))),
8664 j0array[0] = ((-1.5707963267949) + (x416.
value) +
8665 (((1.5707963267949) * (x417.
value))));
8666 sj0array[0] =
IKsin(j0array[0]);
8667 cj0array[0] =
IKcos(j0array[0]);
8668 if (j0array[0] >
IKPI)
8670 j0array[0] -=
IK2PI;
8672 else if (j0array[0] < -
IKPI)
8674 j0array[0] +=
IK2PI;
8677 for (
int ij0 = 0; ij0 < 1; ++ij0)
8685 for (
int iij0 = ij0 + 1; iij0 < 1; ++iij0)
8687 if (j0valid[iij0] &&
8688 IKabs(cj0array[ij0] - cj0array[iij0]) <
8690 IKabs(sj0array[ij0] - sj0array[iij0]) <
8693 j0valid[iij0] =
false;
8699 cj0 = cj0array[ij0];
8700 sj0 = sj0array[ij0];
8703 IkReal x418 =
IKcos(j0);
8704 IkReal x419 =
IKsin(j0);
8705 IkReal x420 = ((1.0) * gconst4);
8706 IkReal x421 = (gconst5 * x418);
8707 IkReal x422 = ((1.0) * x419);
8708 IkReal x423 = (x419 * x420);
8709 evalcond[0] = (gconst5 + ((new_r10 * x419)) +
8710 ((new_r00 * x418)));
8711 evalcond[1] = (((gconst5 * x419)) + new_r10 +
8712 ((gconst4 * x418)));
8713 evalcond[2] = ((((-1.0) * new_r00 * x422)) +
8714 gconst4 + ((new_r10 * x418)));
8715 evalcond[3] = (gconst5 + ((new_r11 * x418)) +
8716 (((-1.0) * new_r01 * x422)));
8718 ((((-1.0) * x423)) + x421 + new_r00);
8720 ((((-1.0) * x423)) + x421 + new_r11);
8722 ((((-1.0) * x420)) + ((new_r11 * x419)) +
8723 ((new_r01 * x418)));
8725 ((((-1.0) * x418 * x420)) + new_r01 +
8726 (((-1.0) * gconst5 * x422)));
8741 std::vector<IkSingleDOFSolutionBase<IkReal> >
8743 vinfos[0].jointtype = 1;
8744 vinfos[0].foffset = j0;
8745 vinfos[0].indices[0] = _ij0[0];
8746 vinfos[0].indices[1] = _ij0[1];
8747 vinfos[0].maxsolutions = _nj0;
8748 vinfos[1].jointtype = 1;
8749 vinfos[1].foffset = j1;
8750 vinfos[1].indices[0] = _ij1[0];
8751 vinfos[1].indices[1] = _ij1[1];
8752 vinfos[1].maxsolutions = _nj1;
8753 vinfos[2].jointtype = 1;
8754 vinfos[2].foffset = j2;
8755 vinfos[2].indices[0] = _ij2[0];
8756 vinfos[2].indices[1] = _ij2[1];
8757 vinfos[2].maxsolutions = _nj2;
8758 vinfos[3].jointtype = 1;
8759 vinfos[3].foffset = j3;
8760 vinfos[3].indices[0] = _ij3[0];
8761 vinfos[3].indices[1] = _ij3[1];
8762 vinfos[3].maxsolutions = _nj3;
8763 vinfos[4].jointtype = 1;
8764 vinfos[4].foffset = j4;
8765 vinfos[4].indices[0] = _ij4[0];
8766 vinfos[4].indices[1] = _ij4[1];
8767 vinfos[4].maxsolutions = _nj4;
8768 vinfos[5].jointtype = 1;
8769 vinfos[5].foffset = j5;
8770 vinfos[5].indices[0] = _ij5[0];
8771 vinfos[5].indices[1] = _ij5[1];
8772 vinfos[5].maxsolutions = _nj5;
8773 vinfos[6].jointtype = 1;
8774 vinfos[6].foffset = j6;
8775 vinfos[6].indices[0] = _ij6[0];
8776 vinfos[6].indices[1] = _ij6[1];
8777 vinfos[6].maxsolutions = _nj6;
8778 std::vector<int> vfree(0);
8779 solutions.AddSolution(vinfos, vfree);
8789 IkReal j0array[1], cj0array[1], sj0array[1];
8790 bool j0valid[1] = {
false };
8792 IkReal x424 = ((1.0) * new_r10);
8794 IkReal((((gconst4 * new_r00)) +
8795 (((-1.0) * gconst5 * x424)))),
8796 IkReal(((((-1.0) * gconst4 * x424)) +
8797 (((-1.0) * gconst5 * new_r00)))),
8804 IKsign(((new_r10 * new_r10) + (new_r00 * new_r00))),
8810 j0array[0] = ((-1.5707963267949) + (x425.
value) +
8811 (((1.5707963267949) * (x426.
value))));
8812 sj0array[0] =
IKsin(j0array[0]);
8813 cj0array[0] =
IKcos(j0array[0]);
8814 if (j0array[0] >
IKPI)
8816 j0array[0] -=
IK2PI;
8818 else if (j0array[0] < -
IKPI)
8820 j0array[0] +=
IK2PI;
8823 for (
int ij0 = 0; ij0 < 1; ++ij0)
8831 for (
int iij0 = ij0 + 1; iij0 < 1; ++iij0)
8833 if (j0valid[iij0] &&
8834 IKabs(cj0array[ij0] - cj0array[iij0]) <
8836 IKabs(sj0array[ij0] - sj0array[iij0]) <
8839 j0valid[iij0] =
false;
8845 cj0 = cj0array[ij0];
8846 sj0 = sj0array[ij0];
8849 IkReal x427 =
IKcos(j0);
8850 IkReal x428 =
IKsin(j0);
8851 IkReal x429 = ((1.0) * gconst4);
8852 IkReal x430 = (gconst5 * x427);
8853 IkReal x431 = ((1.0) * x428);
8854 IkReal x432 = (x428 * x429);
8855 evalcond[0] = (gconst5 + ((new_r10 * x428)) +
8856 ((new_r00 * x427)));
8857 evalcond[1] = (((gconst4 * x427)) +
8858 ((gconst5 * x428)) + new_r10);
8859 evalcond[2] = ((((-1.0) * new_r00 * x431)) + gconst4 +
8860 ((new_r10 * x427)));
8861 evalcond[3] = ((((-1.0) * new_r01 * x431)) + gconst5 +
8862 ((new_r11 * x427)));
8863 evalcond[4] = ((((-1.0) * x432)) + x430 + new_r00);
8864 evalcond[5] = ((((-1.0) * x432)) + x430 + new_r11);
8866 ((((-1.0) * x429)) + ((new_r11 * x428)) +
8867 ((new_r01 * x427)));
8868 evalcond[7] = ((((-1.0) * x427 * x429)) +
8869 (((-1.0) * gconst5 * x431)) + new_r01);
8884 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(
8886 vinfos[0].jointtype = 1;
8887 vinfos[0].foffset = j0;
8888 vinfos[0].indices[0] = _ij0[0];
8889 vinfos[0].indices[1] = _ij0[1];
8890 vinfos[0].maxsolutions = _nj0;
8891 vinfos[1].jointtype = 1;
8892 vinfos[1].foffset = j1;
8893 vinfos[1].indices[0] = _ij1[0];
8894 vinfos[1].indices[1] = _ij1[1];
8895 vinfos[1].maxsolutions = _nj1;
8896 vinfos[2].jointtype = 1;
8897 vinfos[2].foffset = j2;
8898 vinfos[2].indices[0] = _ij2[0];
8899 vinfos[2].indices[1] = _ij2[1];
8900 vinfos[2].maxsolutions = _nj2;
8901 vinfos[3].jointtype = 1;
8902 vinfos[3].foffset = j3;
8903 vinfos[3].indices[0] = _ij3[0];
8904 vinfos[3].indices[1] = _ij3[1];
8905 vinfos[3].maxsolutions = _nj3;
8906 vinfos[4].jointtype = 1;
8907 vinfos[4].foffset = j4;
8908 vinfos[4].indices[0] = _ij4[0];
8909 vinfos[4].indices[1] = _ij4[1];
8910 vinfos[4].maxsolutions = _nj4;
8911 vinfos[5].jointtype = 1;
8912 vinfos[5].foffset = j5;
8913 vinfos[5].indices[0] = _ij5[0];
8914 vinfos[5].indices[1] = _ij5[1];
8915 vinfos[5].maxsolutions = _nj5;
8916 vinfos[6].jointtype = 1;
8917 vinfos[6].foffset = j6;
8918 vinfos[6].indices[0] = _ij6[0];
8919 vinfos[6].indices[1] = _ij6[1];
8920 vinfos[6].maxsolutions = _nj6;
8921 std::vector<int> vfree(0);
8922 solutions.AddSolution(vinfos, vfree);
8930 if (bgotonextstatement)
8932 bool bgotonextstatement =
true;
8935 evalcond[0] = ((-3.14159265358979) +
8936 (
IKfmod(((3.14159265358979) +
8937 (
IKabs(((-1.5707963267949) + j2)))),
8938 6.28318530717959)));
8939 if (
IKabs(evalcond[0]) < 0.0000050000000000)
8941 bgotonextstatement =
false;
8943 IkReal j0array[1], cj0array[1], sj0array[1];
8944 bool j0valid[1] = {
false };
8951 j0array[0] =
IKatan2(new_r00, ((-1.0) * new_r10));
8952 sj0array[0] =
IKsin(j0array[0]);
8953 cj0array[0] =
IKcos(j0array[0]);
8954 if (j0array[0] >
IKPI)
8956 j0array[0] -=
IK2PI;
8958 else if (j0array[0] < -
IKPI)
8960 j0array[0] +=
IK2PI;
8963 for (
int ij0 = 0; ij0 < 1; ++ij0)
8971 for (
int iij0 = ij0 + 1; iij0 < 1; ++iij0)
8973 if (j0valid[iij0] &&
8974 IKabs(cj0array[ij0] - cj0array[iij0]) <
8976 IKabs(sj0array[ij0] - sj0array[iij0]) <
8979 j0valid[iij0] =
false;
8985 cj0 = cj0array[ij0];
8986 sj0 = sj0array[ij0];
8989 IkReal x433 =
IKcos(j0);
8990 IkReal x434 =
IKsin(j0);
8991 IkReal x435 = ((1.0) * x434);
8992 evalcond[0] = (x433 + new_r10);
8993 evalcond[1] = ((((-1.0) * x435)) + new_r00);
8994 evalcond[2] = ((((-1.0) * x435)) + new_r11);
8995 evalcond[3] = ((((-1.0) * x433)) + new_r01);
8996 evalcond[4] = (((new_r00 * x433)) + ((new_r10 * x434)));
8998 ((((-1.0) * new_r01 * x435)) + ((new_r11 * x433)));
9000 ((-1.0) + ((new_r01 * x433)) + ((new_r11 * x434)));
9001 evalcond[7] = ((1.0) + (((-1.0) * new_r00 * x435)) +
9002 ((new_r10 * x433)));
9017 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
9018 vinfos[0].jointtype = 1;
9019 vinfos[0].foffset = j0;
9020 vinfos[0].indices[0] = _ij0[0];
9021 vinfos[0].indices[1] = _ij0[1];
9022 vinfos[0].maxsolutions = _nj0;
9023 vinfos[1].jointtype = 1;
9024 vinfos[1].foffset = j1;
9025 vinfos[1].indices[0] = _ij1[0];
9026 vinfos[1].indices[1] = _ij1[1];
9027 vinfos[1].maxsolutions = _nj1;
9028 vinfos[2].jointtype = 1;
9029 vinfos[2].foffset = j2;
9030 vinfos[2].indices[0] = _ij2[0];
9031 vinfos[2].indices[1] = _ij2[1];
9032 vinfos[2].maxsolutions = _nj2;
9033 vinfos[3].jointtype = 1;
9034 vinfos[3].foffset = j3;
9035 vinfos[3].indices[0] = _ij3[0];
9036 vinfos[3].indices[1] = _ij3[1];
9037 vinfos[3].maxsolutions = _nj3;
9038 vinfos[4].jointtype = 1;
9039 vinfos[4].foffset = j4;
9040 vinfos[4].indices[0] = _ij4[0];
9041 vinfos[4].indices[1] = _ij4[1];
9042 vinfos[4].maxsolutions = _nj4;
9043 vinfos[5].jointtype = 1;
9044 vinfos[5].foffset = j5;
9045 vinfos[5].indices[0] = _ij5[0];
9046 vinfos[5].indices[1] = _ij5[1];
9047 vinfos[5].maxsolutions = _nj5;
9048 vinfos[6].jointtype = 1;
9049 vinfos[6].foffset = j6;
9050 vinfos[6].indices[0] = _ij6[0];
9051 vinfos[6].indices[1] = _ij6[1];
9052 vinfos[6].maxsolutions = _nj6;
9053 std::vector<int> vfree(0);
9054 solutions.AddSolution(vinfos, vfree);
9060 if (bgotonextstatement)
9062 bool bgotonextstatement =
true;
9065 evalcond[0] = ((-3.14159265358979) +
9066 (
IKfmod(((3.14159265358979) +
9067 (
IKabs(((1.5707963267949) + j2)))),
9068 6.28318530717959)));
9069 if (
IKabs(evalcond[0]) < 0.0000050000000000)
9071 bgotonextstatement =
false;
9073 IkReal j0array[1], cj0array[1], sj0array[1];
9074 bool j0valid[1] = {
false };
9079 IKsqr(((-1.0) * new_r01)) - 1) <=
9083 IKatan2(((-1.0) * new_r00), ((-1.0) * new_r01));
9084 sj0array[0] =
IKsin(j0array[0]);
9085 cj0array[0] =
IKcos(j0array[0]);
9086 if (j0array[0] >
IKPI)
9088 j0array[0] -=
IK2PI;
9090 else if (j0array[0] < -
IKPI)
9092 j0array[0] +=
IK2PI;
9095 for (
int ij0 = 0; ij0 < 1; ++ij0)
9103 for (
int iij0 = ij0 + 1; iij0 < 1; ++iij0)
9105 if (j0valid[iij0] &&
9106 IKabs(cj0array[ij0] - cj0array[iij0]) <
9108 IKabs(sj0array[ij0] - sj0array[iij0]) <
9111 j0valid[iij0] =
false;
9117 cj0 = cj0array[ij0];
9118 sj0 = sj0array[ij0];
9121 IkReal x436 =
IKsin(j0);
9122 IkReal x437 =
IKcos(j0);
9123 IkReal x438 = ((1.0) * x436);
9124 evalcond[0] = (x436 + new_r00);
9125 evalcond[1] = (x436 + new_r11);
9126 evalcond[2] = (x437 + new_r01);
9127 evalcond[3] = ((((-1.0) * x437)) + new_r10);
9129 (((new_r00 * x437)) + ((new_r10 * x436)));
9130 evalcond[5] = ((((-1.0) * new_r01 * x438)) +
9131 ((new_r11 * x437)));
9133 ((1.0) + ((new_r01 * x437)) + ((new_r11 * x436)));
9134 evalcond[7] = ((-1.0) + (((-1.0) * new_r00 * x438)) +
9135 ((new_r10 * x437)));
9150 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(
9152 vinfos[0].jointtype = 1;
9153 vinfos[0].foffset = j0;
9154 vinfos[0].indices[0] = _ij0[0];
9155 vinfos[0].indices[1] = _ij0[1];
9156 vinfos[0].maxsolutions = _nj0;
9157 vinfos[1].jointtype = 1;
9158 vinfos[1].foffset = j1;
9159 vinfos[1].indices[0] = _ij1[0];
9160 vinfos[1].indices[1] = _ij1[1];
9161 vinfos[1].maxsolutions = _nj1;
9162 vinfos[2].jointtype = 1;
9163 vinfos[2].foffset = j2;
9164 vinfos[2].indices[0] = _ij2[0];
9165 vinfos[2].indices[1] = _ij2[1];
9166 vinfos[2].maxsolutions = _nj2;
9167 vinfos[3].jointtype = 1;
9168 vinfos[3].foffset = j3;
9169 vinfos[3].indices[0] = _ij3[0];
9170 vinfos[3].indices[1] = _ij3[1];
9171 vinfos[3].maxsolutions = _nj3;
9172 vinfos[4].jointtype = 1;
9173 vinfos[4].foffset = j4;
9174 vinfos[4].indices[0] = _ij4[0];
9175 vinfos[4].indices[1] = _ij4[1];
9176 vinfos[4].maxsolutions = _nj4;
9177 vinfos[5].jointtype = 1;
9178 vinfos[5].foffset = j5;
9179 vinfos[5].indices[0] = _ij5[0];
9180 vinfos[5].indices[1] = _ij5[1];
9181 vinfos[5].maxsolutions = _nj5;
9182 vinfos[6].jointtype = 1;
9183 vinfos[6].foffset = j6;
9184 vinfos[6].indices[0] = _ij6[0];
9185 vinfos[6].indices[1] = _ij6[1];
9186 vinfos[6].maxsolutions = _nj6;
9187 std::vector<int> vfree(0);
9188 solutions.AddSolution(vinfos, vfree);
9194 if (bgotonextstatement)
9196 bool bgotonextstatement =
true;
9199 evalcond[0] = ((new_r10 * new_r10) + (new_r00 * new_r00));
9200 if (
IKabs(evalcond[0]) < 0.0000050000000000)
9202 bgotonextstatement =
false;
9210 j0eval[0] = ((
IKabs(new_r11)) + (
IKabs(new_r01)));
9211 if (
IKabs(j0eval[0]) < 0.0000010000000000)
9218 IkReal j0array[2], cj0array[2], sj0array[2];
9219 bool j0valid[2] = {
false };
9229 IkReal x439 = x440.
value;
9230 j0array[0] = ((-1.0) * x439);
9231 sj0array[0] =
IKsin(j0array[0]);
9232 cj0array[0] =
IKcos(j0array[0]);
9234 ((3.14159265358979) + (((-1.0) * x439)));
9235 sj0array[1] =
IKsin(j0array[1]);
9236 cj0array[1] =
IKcos(j0array[1]);
9237 if (j0array[0] >
IKPI)
9239 j0array[0] -=
IK2PI;
9241 else if (j0array[0] < -
IKPI)
9243 j0array[0] +=
IK2PI;
9246 if (j0array[1] >
IKPI)
9248 j0array[1] -=
IK2PI;
9250 else if (j0array[1] < -
IKPI)
9252 j0array[1] +=
IK2PI;
9255 for (
int ij0 = 0; ij0 < 2; ++ij0)
9263 for (
int iij0 = ij0 + 1; iij0 < 2; ++iij0)
9265 if (j0valid[iij0] &&
9266 IKabs(cj0array[ij0] - cj0array[iij0]) <
9268 IKabs(sj0array[ij0] - sj0array[iij0]) <
9271 j0valid[iij0] =
false;
9277 cj0 = cj0array[ij0];
9278 sj0 = sj0array[ij0];
9282 (((new_r11 * (
IKcos(j0)))) +
9283 (((-1.0) * new_r01 * (
IKsin(j0)))));
9291 std::vector<IkSingleDOFSolutionBase<IkReal> >
9293 vinfos[0].jointtype = 1;
9294 vinfos[0].foffset = j0;
9295 vinfos[0].indices[0] = _ij0[0];
9296 vinfos[0].indices[1] = _ij0[1];
9297 vinfos[0].maxsolutions = _nj0;
9298 vinfos[1].jointtype = 1;
9299 vinfos[1].foffset = j1;
9300 vinfos[1].indices[0] = _ij1[0];
9301 vinfos[1].indices[1] = _ij1[1];
9302 vinfos[1].maxsolutions = _nj1;
9303 vinfos[2].jointtype = 1;
9304 vinfos[2].foffset = j2;
9305 vinfos[2].indices[0] = _ij2[0];
9306 vinfos[2].indices[1] = _ij2[1];
9307 vinfos[2].maxsolutions = _nj2;
9308 vinfos[3].jointtype = 1;
9309 vinfos[3].foffset = j3;
9310 vinfos[3].indices[0] = _ij3[0];
9311 vinfos[3].indices[1] = _ij3[1];
9312 vinfos[3].maxsolutions = _nj3;
9313 vinfos[4].jointtype = 1;
9314 vinfos[4].foffset = j4;
9315 vinfos[4].indices[0] = _ij4[0];
9316 vinfos[4].indices[1] = _ij4[1];
9317 vinfos[4].maxsolutions = _nj4;
9318 vinfos[5].jointtype = 1;
9319 vinfos[5].foffset = j5;
9320 vinfos[5].indices[0] = _ij5[0];
9321 vinfos[5].indices[1] = _ij5[1];
9322 vinfos[5].maxsolutions = _nj5;
9323 vinfos[6].jointtype = 1;
9324 vinfos[6].foffset = j6;
9325 vinfos[6].indices[0] = _ij6[0];
9326 vinfos[6].indices[1] = _ij6[1];
9327 vinfos[6].maxsolutions = _nj6;
9328 std::vector<int> vfree(0);
9329 solutions.AddSolution(vinfos, vfree);
9337 if (bgotonextstatement)
9339 bool bgotonextstatement =
true;
9342 evalcond[0] = ((
IKabs(new_r10)) + (
IKabs(new_r00)));
9343 if (
IKabs(evalcond[0]) < 0.0000050000000000)
9345 bgotonextstatement =
false;
9355 j0eval[0] = ((
IKabs(new_r11)) + (
IKabs(new_r01)));
9356 if (
IKabs(j0eval[0]) < 0.0000010000000000)
9363 IkReal j0array[2], cj0array[2], sj0array[2];
9364 bool j0valid[2] = {
false };
9374 IkReal x441 = x442.
value;
9375 j0array[0] = ((-1.0) * x441);
9376 sj0array[0] =
IKsin(j0array[0]);
9377 cj0array[0] =
IKcos(j0array[0]);
9379 ((3.14159265358979) + (((-1.0) * x441)));
9380 sj0array[1] =
IKsin(j0array[1]);
9381 cj0array[1] =
IKcos(j0array[1]);
9382 if (j0array[0] >
IKPI)
9384 j0array[0] -=
IK2PI;
9386 else if (j0array[0] < -
IKPI)
9388 j0array[0] +=
IK2PI;
9391 if (j0array[1] >
IKPI)
9393 j0array[1] -=
IK2PI;
9395 else if (j0array[1] < -
IKPI)
9397 j0array[1] +=
IK2PI;
9400 for (
int ij0 = 0; ij0 < 2; ++ij0)
9408 for (
int iij0 = ij0 + 1; iij0 < 2; ++iij0)
9410 if (j0valid[iij0] &&
9411 IKabs(cj0array[ij0] - cj0array[iij0]) <
9413 IKabs(sj0array[ij0] - sj0array[iij0]) <
9416 j0valid[iij0] =
false;
9422 cj0 = cj0array[ij0];
9423 sj0 = sj0array[ij0];
9427 (((new_r11 * (
IKcos(j0)))) +
9428 (((-1.0) * new_r01 * (
IKsin(j0)))));
9429 if (
IKabs(evalcond[0]) >
9437 std::vector<IkSingleDOFSolutionBase<IkReal> >
9439 vinfos[0].jointtype = 1;
9440 vinfos[0].foffset = j0;
9441 vinfos[0].indices[0] = _ij0[0];
9442 vinfos[0].indices[1] = _ij0[1];
9443 vinfos[0].maxsolutions = _nj0;
9444 vinfos[1].jointtype = 1;
9445 vinfos[1].foffset = j1;
9446 vinfos[1].indices[0] = _ij1[0];
9447 vinfos[1].indices[1] = _ij1[1];
9448 vinfos[1].maxsolutions = _nj1;
9449 vinfos[2].jointtype = 1;
9450 vinfos[2].foffset = j2;
9451 vinfos[2].indices[0] = _ij2[0];
9452 vinfos[2].indices[1] = _ij2[1];
9453 vinfos[2].maxsolutions = _nj2;
9454 vinfos[3].jointtype = 1;
9455 vinfos[3].foffset = j3;
9456 vinfos[3].indices[0] = _ij3[0];
9457 vinfos[3].indices[1] = _ij3[1];
9458 vinfos[3].maxsolutions = _nj3;
9459 vinfos[4].jointtype = 1;
9460 vinfos[4].foffset = j4;
9461 vinfos[4].indices[0] = _ij4[0];
9462 vinfos[4].indices[1] = _ij4[1];
9463 vinfos[4].maxsolutions = _nj4;
9464 vinfos[5].jointtype = 1;
9465 vinfos[5].foffset = j5;
9466 vinfos[5].indices[0] = _ij5[0];
9467 vinfos[5].indices[1] = _ij5[1];
9468 vinfos[5].maxsolutions = _nj5;
9469 vinfos[6].jointtype = 1;
9470 vinfos[6].foffset = j6;
9471 vinfos[6].indices[0] = _ij6[0];
9472 vinfos[6].indices[1] = _ij6[1];
9473 vinfos[6].maxsolutions = _nj6;
9474 std::vector<int> vfree(0);
9475 solutions.AddSolution(vinfos, vfree);
9483 if (bgotonextstatement)
9485 bool bgotonextstatement =
true;
9490 bgotonextstatement =
false;
9494 if (bgotonextstatement)
9508 IkReal j0array[1], cj0array[1], sj0array[1];
9509 bool j0valid[1] = {
false };
9511 IkReal x443 = ((1.0) * new_r10);
9513 IkReal((((cj2 * sj2)) + (((-1.0) * new_r00 * x443)))),
9514 IkReal(((((-1.0) * (cj2 * cj2))) + (new_r10 * new_r10))),
9521 IKsign(((((-1.0) * sj2 * x443)) + ((cj2 * new_r00)))), -1);
9526 j0array[0] = ((-1.5707963267949) + (x444.
value) +
9527 (((1.5707963267949) * (x445.
value))));
9528 sj0array[0] =
IKsin(j0array[0]);
9529 cj0array[0] =
IKcos(j0array[0]);
9530 if (j0array[0] >
IKPI)
9532 j0array[0] -=
IK2PI;
9534 else if (j0array[0] < -
IKPI)
9536 j0array[0] +=
IK2PI;
9539 for (
int ij0 = 0; ij0 < 1; ++ij0)
9547 for (
int iij0 = ij0 + 1; iij0 < 1; ++iij0)
9549 if (j0valid[iij0] &&
9550 IKabs(cj0array[ij0] - cj0array[iij0]) <
9552 IKabs(sj0array[ij0] - sj0array[iij0]) <
9555 j0valid[iij0] =
false;
9561 cj0 = cj0array[ij0];
9562 sj0 = sj0array[ij0];
9565 IkReal x446 =
IKcos(j0);
9566 IkReal x447 =
IKsin(j0);
9567 IkReal x448 = ((1.0) * sj2);
9568 IkReal x449 = (cj2 * x446);
9569 IkReal x450 = ((1.0) * x447);
9570 IkReal x451 = (x447 * x448);
9571 evalcond[0] = (((new_r00 * x446)) + cj2 + ((new_r10 * x447)));
9572 evalcond[1] = (((cj2 * x447)) + ((sj2 * x446)) + new_r10);
9574 (sj2 + (((-1.0) * new_r00 * x450)) + ((new_r10 * x446)));
9576 (cj2 + (((-1.0) * new_r01 * x450)) + ((new_r11 * x446)));
9577 evalcond[4] = ((((-1.0) * x451)) + x449 + new_r00);
9578 evalcond[5] = ((((-1.0) * x451)) + x449 + new_r11);
9580 ((((-1.0) * x448)) + ((new_r01 * x446)) + ((new_r11 * x447)));
9581 evalcond[7] = (new_r01 + (((-1.0) * cj2 * x450)) +
9582 (((-1.0) * x446 * x448)));
9597 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
9598 vinfos[0].jointtype = 1;
9599 vinfos[0].foffset = j0;
9600 vinfos[0].indices[0] = _ij0[0];
9601 vinfos[0].indices[1] = _ij0[1];
9602 vinfos[0].maxsolutions = _nj0;
9603 vinfos[1].jointtype = 1;
9604 vinfos[1].foffset = j1;
9605 vinfos[1].indices[0] = _ij1[0];
9606 vinfos[1].indices[1] = _ij1[1];
9607 vinfos[1].maxsolutions = _nj1;
9608 vinfos[2].jointtype = 1;
9609 vinfos[2].foffset = j2;
9610 vinfos[2].indices[0] = _ij2[0];
9611 vinfos[2].indices[1] = _ij2[1];
9612 vinfos[2].maxsolutions = _nj2;
9613 vinfos[3].jointtype = 1;
9614 vinfos[3].foffset = j3;
9615 vinfos[3].indices[0] = _ij3[0];
9616 vinfos[3].indices[1] = _ij3[1];
9617 vinfos[3].maxsolutions = _nj3;
9618 vinfos[4].jointtype = 1;
9619 vinfos[4].foffset = j4;
9620 vinfos[4].indices[0] = _ij4[0];
9621 vinfos[4].indices[1] = _ij4[1];
9622 vinfos[4].maxsolutions = _nj4;
9623 vinfos[5].jointtype = 1;
9624 vinfos[5].foffset = j5;
9625 vinfos[5].indices[0] = _ij5[0];
9626 vinfos[5].indices[1] = _ij5[1];
9627 vinfos[5].maxsolutions = _nj5;
9628 vinfos[6].jointtype = 1;
9629 vinfos[6].foffset = j6;
9630 vinfos[6].indices[0] = _ij6[0];
9631 vinfos[6].indices[1] = _ij6[1];
9632 vinfos[6].maxsolutions = _nj6;
9633 std::vector<int> vfree(0);
9634 solutions.AddSolution(vinfos, vfree);
9644 IkReal j0array[1], cj0array[1], sj0array[1];
9645 bool j0valid[1] = {
false };
9647 IkReal x452 = ((1.0) * cj2);
9649 IkReal(((((-1.0) * new_r11 * x452)) + ((cj2 * new_r00)))),
9650 IkReal(((((-1.0) * new_r10 * x452)) + (((-1.0) * new_r01 * x452)))),
9657 IKsign((((new_r10 * new_r11)) + ((new_r00 * new_r01)))), -1);
9662 j0array[0] = ((-1.5707963267949) + (x453.
value) +
9663 (((1.5707963267949) * (x454.
value))));
9664 sj0array[0] =
IKsin(j0array[0]);
9665 cj0array[0] =
IKcos(j0array[0]);
9666 if (j0array[0] >
IKPI)
9668 j0array[0] -=
IK2PI;
9670 else if (j0array[0] < -
IKPI)
9672 j0array[0] +=
IK2PI;
9675 for (
int ij0 = 0; ij0 < 1; ++ij0)
9683 for (
int iij0 = ij0 + 1; iij0 < 1; ++iij0)
9685 if (j0valid[iij0] &&
9689 j0valid[iij0] =
false;
9695 cj0 = cj0array[ij0];
9696 sj0 = sj0array[ij0];
9699 IkReal x455 =
IKcos(j0);
9700 IkReal x456 =
IKsin(j0);
9701 IkReal x457 = ((1.0) * sj2);
9702 IkReal x458 = (cj2 * x455);
9703 IkReal x459 = ((1.0) * x456);
9704 IkReal x460 = (x456 * x457);
9705 evalcond[0] = (((new_r10 * x456)) + cj2 + ((new_r00 * x455)));
9706 evalcond[1] = (((sj2 * x455)) + ((cj2 * x456)) + new_r10);
9708 (((new_r10 * x455)) + sj2 + (((-1.0) * new_r00 * x459)));
9710 (((new_r11 * x455)) + cj2 + (((-1.0) * new_r01 * x459)));
9711 evalcond[4] = ((((-1.0) * x460)) + x458 + new_r00);
9712 evalcond[5] = ((((-1.0) * x460)) + x458 + new_r11);
9714 (((new_r11 * x456)) + ((new_r01 * x455)) + (((-1.0) * x457)));
9716 ((((-1.0) * x455 * x457)) + new_r01 + (((-1.0) * cj2 * x459)));
9731 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
9732 vinfos[0].jointtype = 1;
9733 vinfos[0].foffset = j0;
9734 vinfos[0].indices[0] = _ij0[0];
9735 vinfos[0].indices[1] = _ij0[1];
9736 vinfos[0].maxsolutions = _nj0;
9737 vinfos[1].jointtype = 1;
9738 vinfos[1].foffset = j1;
9739 vinfos[1].indices[0] = _ij1[0];
9740 vinfos[1].indices[1] = _ij1[1];
9741 vinfos[1].maxsolutions = _nj1;
9742 vinfos[2].jointtype = 1;
9743 vinfos[2].foffset = j2;
9744 vinfos[2].indices[0] = _ij2[0];
9745 vinfos[2].indices[1] = _ij2[1];
9746 vinfos[2].maxsolutions = _nj2;
9747 vinfos[3].jointtype = 1;
9748 vinfos[3].foffset = j3;
9749 vinfos[3].indices[0] = _ij3[0];
9750 vinfos[3].indices[1] = _ij3[1];
9751 vinfos[3].maxsolutions = _nj3;
9752 vinfos[4].jointtype = 1;
9753 vinfos[4].foffset = j4;
9754 vinfos[4].indices[0] = _ij4[0];
9755 vinfos[4].indices[1] = _ij4[1];
9756 vinfos[4].maxsolutions = _nj4;
9757 vinfos[5].jointtype = 1;
9758 vinfos[5].foffset = j5;
9759 vinfos[5].indices[0] = _ij5[0];
9760 vinfos[5].indices[1] = _ij5[1];
9761 vinfos[5].maxsolutions = _nj5;
9762 vinfos[6].jointtype = 1;
9763 vinfos[6].foffset = j6;
9764 vinfos[6].indices[0] = _ij6[0];
9765 vinfos[6].indices[1] = _ij6[1];
9766 vinfos[6].maxsolutions = _nj6;
9767 std::vector<int> vfree(0);
9768 solutions.AddSolution(vinfos, vfree);
9778 IkReal j0array[1], cj0array[1], sj0array[1];
9779 bool j0valid[1] = {
false };
9781 IkReal x461 = ((1.0) * cj2);
9783 IKsign(((new_r10 * new_r10) + (new_r00 * new_r00))), -1);
9789 IkReal(((((-1.0) * new_r10 * x461)) + ((new_r00 * sj2)))),
9790 IkReal(((((-1.0) * new_r00 * x461)) + (((-1.0) * new_r10 * sj2)))),
9796 j0array[0] = ((-1.5707963267949) + (((1.5707963267949) * (x462.
value))) +
9798 sj0array[0] =
IKsin(j0array[0]);
9799 cj0array[0] =
IKcos(j0array[0]);
9800 if (j0array[0] >
IKPI)
9802 j0array[0] -=
IK2PI;
9804 else if (j0array[0] < -
IKPI)
9806 j0array[0] +=
IK2PI;
9809 for (
int ij0 = 0; ij0 < 1; ++ij0)
9817 for (
int iij0 = ij0 + 1; iij0 < 1; ++iij0)
9819 if (j0valid[iij0] &&
9823 j0valid[iij0] =
false;
9829 cj0 = cj0array[ij0];
9830 sj0 = sj0array[ij0];
9833 IkReal x464 =
IKcos(j0);
9834 IkReal x465 =
IKsin(j0);
9835 IkReal x466 = ((1.0) * sj2);
9836 IkReal x467 = (cj2 * x464);
9837 IkReal x468 = ((1.0) * x465);
9838 IkReal x469 = (x465 * x466);
9839 evalcond[0] = (((new_r10 * x465)) + cj2 + ((new_r00 * x464)));
9840 evalcond[1] = (((cj2 * x465)) + new_r10 + ((sj2 * x464)));
9841 evalcond[2] = (sj2 + ((new_r10 * x464)) + (((-1.0) * new_r00 * x468)));
9842 evalcond[3] = (((new_r11 * x464)) + cj2 + (((-1.0) * new_r01 * x468)));
9843 evalcond[4] = ((((-1.0) * x469)) + x467 + new_r00);
9844 evalcond[5] = ((((-1.0) * x469)) + x467 + new_r11);
9846 (((new_r11 * x465)) + ((new_r01 * x464)) + (((-1.0) * x466)));
9848 ((((-1.0) * x464 * x466)) + new_r01 + (((-1.0) * cj2 * x468)));
9863 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
9864 vinfos[0].jointtype = 1;
9865 vinfos[0].foffset = j0;
9866 vinfos[0].indices[0] = _ij0[0];
9867 vinfos[0].indices[1] = _ij0[1];
9868 vinfos[0].maxsolutions = _nj0;
9869 vinfos[1].jointtype = 1;
9870 vinfos[1].foffset = j1;
9871 vinfos[1].indices[0] = _ij1[0];
9872 vinfos[1].indices[1] = _ij1[1];
9873 vinfos[1].maxsolutions = _nj1;
9874 vinfos[2].jointtype = 1;
9875 vinfos[2].foffset = j2;
9876 vinfos[2].indices[0] = _ij2[0];
9877 vinfos[2].indices[1] = _ij2[1];
9878 vinfos[2].maxsolutions = _nj2;
9879 vinfos[3].jointtype = 1;
9880 vinfos[3].foffset = j3;
9881 vinfos[3].indices[0] = _ij3[0];
9882 vinfos[3].indices[1] = _ij3[1];
9883 vinfos[3].maxsolutions = _nj3;
9884 vinfos[4].jointtype = 1;
9885 vinfos[4].foffset = j4;
9886 vinfos[4].indices[0] = _ij4[0];
9887 vinfos[4].indices[1] = _ij4[1];
9888 vinfos[4].maxsolutions = _nj4;
9889 vinfos[5].jointtype = 1;
9890 vinfos[5].foffset = j5;
9891 vinfos[5].indices[0] = _ij5[0];
9892 vinfos[5].indices[1] = _ij5[1];
9893 vinfos[5].maxsolutions = _nj5;
9894 vinfos[6].jointtype = 1;
9895 vinfos[6].foffset = j6;
9896 vinfos[6].indices[0] = _ij6[0];
9897 vinfos[6].indices[1] = _ij6[1];
9898 vinfos[6].maxsolutions = _nj6;
9899 std::vector<int> vfree(0);
9900 solutions.AddSolution(vinfos, vfree);
9908 if (bgotonextstatement)
9910 bool bgotonextstatement =
true;
9913 evalcond[0] = ((-3.14159265358979) +
9914 (
IKfmod(((3.14159265358979) + (
IKabs(((-3.14159265358979) + j1)))),
9915 6.28318530717959)));
9916 evalcond[1] = new_r21;
9917 evalcond[2] = new_r02;
9918 evalcond[3] = new_r12;
9919 evalcond[4] = new_r20;
9920 if (
IKabs(evalcond[0]) < 0.0000050000000000 &&
9921 IKabs(evalcond[1]) < 0.0000050000000000 &&
9922 IKabs(evalcond[2]) < 0.0000050000000000 &&
9923 IKabs(evalcond[3]) < 0.0000050000000000 &&
9924 IKabs(evalcond[4]) < 0.0000050000000000)
9926 bgotonextstatement =
false;
9931 j1 = 3.14159265358979;
9932 IkReal x470 = ((1.0) * sj2);
9933 IkReal x471 = (((new_r10 * new_r11)) + ((new_r00 * new_r01)));
9936 ((
IKabs(((((-1.0) * new_r00 * x470)) + (((-1.0) * new_r11 * x470))))) +
9937 (
IKabs((((new_r01 * sj2)) + (((-1.0) * new_r10 * x470))))));
9938 j0eval[2] =
IKsign(x471);
9939 if (
IKabs(j0eval[0]) < 0.0000010000000000 ||
9940 IKabs(j0eval[1]) < 0.0000010000000000 ||
9941 IKabs(j0eval[2]) < 0.0000010000000000)
9947 j1 = 3.14159265358979;
9948 IkReal x472 = ((1.0) * new_r11);
9949 IkReal x473 = ((new_r01 * new_r01) + (new_r11 * new_r11));
9952 ((
IKabs(((((-1.0) * sj2 * x472)) + ((cj2 * new_r01))))) +
9953 (
IKabs(((((-1.0) * new_r01 * sj2)) + (((-1.0) * cj2 * x472))))));
9954 j0eval[2] =
IKsign(x473);
9955 if (
IKabs(j0eval[0]) < 0.0000010000000000 ||
9956 IKabs(j0eval[1]) < 0.0000010000000000 ||
9957 IKabs(j0eval[2]) < 0.0000010000000000)
9963 j1 = 3.14159265358979;
9964 IkReal x474 = (((new_r11 * sj2)) + ((cj2 * new_r01)));
9966 j0eval[1] =
IKsign(x474);
9967 j0eval[2] = ((
IKabs(((((-1.0) * cj2 * sj2)) +
9968 (((-1.0) * new_r10 * new_r11))))) +
9969 (
IKabs(((-1.0) + (cj2 * cj2) + ((new_r01 * new_r10))))));
9970 if (
IKabs(j0eval[0]) < 0.0000010000000000 ||
9971 IKabs(j0eval[1]) < 0.0000010000000000 ||
9972 IKabs(j0eval[2]) < 0.0000010000000000)
9976 bool bgotonextstatement =
true;
9979 IkReal x476 = ((new_r01 * new_r01) + (new_r11 * new_r11));
9980 if (
IKabs(x476) == 0)
9984 IkReal x475 = pow(x476, -0.5);
9991 IkReal gconst6 = ((-1.0) * (x477.
value));
9992 IkReal gconst7 = ((-1.0) * new_r01 * x475);
9993 IkReal gconst8 = (new_r11 * x475);
10001 ((-3.14159265358979) +
10003 6.28318530717959)));
10004 if (
IKabs(evalcond[0]) < 0.0000050000000000)
10006 bgotonextstatement =
false;
10015 IkReal x479 = ((-1.0) * (x481.
value));
10016 IkReal x480 = x475;
10019 j1 = 3.14159265358979;
10023 IkReal gconst6 = x479;
10024 IkReal gconst7 = ((-1.0) * new_r01 * x480);
10025 IkReal gconst8 = (new_r11 * x480);
10026 IkReal x482 = new_r01 * new_r01;
10027 IkReal x483 = (new_r00 * new_r01);
10028 IkReal x484 = (((new_r10 * new_r11)) + x483);
10029 IkReal x485 = x475;
10030 IkReal x486 = (new_r01 * x485);
10032 j0eval[1] =
IKsign(x484);
10033 j0eval[2] = ((
IKabs((((new_r10 * x486)) +
10034 (((-1.0) * x482 * x485))))) +
10035 (
IKabs((((x483 * x485)) + ((new_r11 * x486))))));
10036 if (
IKabs(j0eval[0]) < 0.0000010000000000 ||
10037 IKabs(j0eval[1]) < 0.0000010000000000 ||
10038 IKabs(j0eval[2]) < 0.0000010000000000)
10050 IkReal x487 = ((-1.0) * (x489.
value));
10051 IkReal x488 = x475;
10054 j1 = 3.14159265358979;
10058 IkReal gconst6 = x487;
10059 IkReal gconst7 = ((-1.0) * new_r01 * x488);
10060 IkReal gconst8 = (new_r11 * x488);
10061 IkReal x490 = ((new_r01 * new_r01) + (new_r11 * new_r11));
10063 j0eval[1] =
IKsign(x490);
10064 if (
IKabs(j0eval[0]) < 0.0000010000000000 ||
10065 IKabs(j0eval[1]) < 0.0000010000000000)
10077 IkReal x491 = ((-1.0) * (x493.
value));
10078 IkReal x492 = x475;
10081 j1 = 3.14159265358979;
10085 IkReal gconst6 = x491;
10086 IkReal gconst7 = ((-1.0) * new_r01 * x492);
10087 IkReal gconst8 = (new_r11 * x492);
10088 IkReal x494 = new_r01 * new_r01;
10089 IkReal x495 = new_r11 * new_r11;
10090 IkReal x496 = ((1.0) * x494);
10097 IkReal x497 = x502.
value;
10099 ((((-1.0) * x496)) + (((-1.0) * x495))), -1);
10104 IkReal x498 = x503.
value;
10105 IkReal x499 = ((1.0) * x498);
10106 IkReal x500 = (new_r11 * x499);
10107 IkReal x501 = (new_r01 * x499);
10109 ((
IKabs((((x494 * x495 * x497)) +
10110 (((-1.0) * x496 * x497)) +
10111 ((x497 * (x495 * x495)))))) +
10112 (
IKabs(((((-1.0) * new_r01 * x500)) +
10114 (new_r01 * new_r01 * new_r01))) +
10115 (((-1.0) * new_r01 * x500 *
10116 (new_r11 * new_r11)))))));
10117 if (
IKabs(j0eval[0]) < 0.0000010000000000)
10120 IkReal evalcond[3];
10121 bool bgotonextstatement =
true;
10126 if (
IKabs(evalcond[0]) < 0.0000050000000000)
10128 bgotonextstatement =
false;
10139 IkReal x504 = ((-1.0) * (x505.
value));
10142 j1 = 3.14159265358979;
10148 IkReal gconst6 = x504;
10149 IkReal x506 = new_r01 * new_r01;
10150 if (
IKabs(x506) == 0)
10155 ((-1.0) * new_r01 * (pow(x506, -0.5)));
10156 IkReal gconst8 = 0;
10157 j0eval[0] = new_r10;
10158 if (
IKabs(j0eval[0]) < 0.0000010000000000)
10161 IkReal j0array[2], cj0array[2],
10163 bool j0valid[2] = {
false };
10172 ((-1.0) * new_r10 * (x507.
value));
10178 j0valid[0] = j0valid[1] =
true;
10179 j0array[0] =
IKacos(cj0array[0]);
10180 sj0array[0] =
IKsin(j0array[0]);
10181 cj0array[1] = cj0array[0];
10182 j0array[1] = -j0array[0];
10183 sj0array[1] = -sj0array[0];
10185 else if (isnan(cj0array[0]))
10193 for (
int ij0 = 0; ij0 < 2; ++ij0)
10201 for (
int iij0 = ij0 + 1; iij0 < 2;
10204 if (j0valid[iij0] &&
10205 IKabs(cj0array[ij0] -
10208 IKabs(sj0array[ij0] -
10212 j0valid[iij0] =
false;
10218 cj0 = cj0array[ij0];
10219 sj0 = sj0array[ij0];
10221 IkReal evalcond[6];
10222 IkReal x508 =
IKsin(j0);
10223 IkReal x509 =
IKcos(j0);
10224 IkReal x510 = ((-1.0) * x508);
10225 evalcond[0] = (new_r10 * x508);
10226 evalcond[1] = (new_r01 * x510);
10227 evalcond[2] = (gconst7 * x510);
10229 (gconst7 + ((new_r10 * x509)));
10231 (gconst7 + ((new_r01 * x509)));
10233 (((gconst7 * x509)) + new_r01);
10234 if (
IKabs(evalcond[0]) >
10236 IKabs(evalcond[1]) >
10238 IKabs(evalcond[2]) >
10240 IKabs(evalcond[3]) >
10242 IKabs(evalcond[4]) >
10244 IKabs(evalcond[5]) >
10255 vinfos[0].jointtype = 1;
10256 vinfos[0].foffset = j0;
10257 vinfos[0].indices[0] = _ij0[0];
10258 vinfos[0].indices[1] = _ij0[1];
10259 vinfos[0].maxsolutions = _nj0;
10260 vinfos[1].jointtype = 1;
10261 vinfos[1].foffset = j1;
10262 vinfos[1].indices[0] = _ij1[0];
10263 vinfos[1].indices[1] = _ij1[1];
10264 vinfos[1].maxsolutions = _nj1;
10265 vinfos[2].jointtype = 1;
10266 vinfos[2].foffset = j2;
10267 vinfos[2].indices[0] = _ij2[0];
10268 vinfos[2].indices[1] = _ij2[1];
10269 vinfos[2].maxsolutions = _nj2;
10270 vinfos[3].jointtype = 1;
10271 vinfos[3].foffset = j3;
10272 vinfos[3].indices[0] = _ij3[0];
10273 vinfos[3].indices[1] = _ij3[1];
10274 vinfos[3].maxsolutions = _nj3;
10275 vinfos[4].jointtype = 1;
10276 vinfos[4].foffset = j4;
10277 vinfos[4].indices[0] = _ij4[0];
10278 vinfos[4].indices[1] = _ij4[1];
10279 vinfos[4].maxsolutions = _nj4;
10280 vinfos[5].jointtype = 1;
10281 vinfos[5].foffset = j5;
10282 vinfos[5].indices[0] = _ij5[0];
10283 vinfos[5].indices[1] = _ij5[1];
10284 vinfos[5].maxsolutions = _nj5;
10285 vinfos[6].jointtype = 1;
10286 vinfos[6].foffset = j6;
10287 vinfos[6].indices[0] = _ij6[0];
10288 vinfos[6].indices[1] = _ij6[1];
10289 vinfos[6].maxsolutions = _nj6;
10290 std::vector<int> vfree(0);
10291 solutions.AddSolution(vinfos,
10300 IkReal j0array[2], cj0array[2],
10302 bool j0valid[2] = {
false };
10311 ((-1.0) * gconst7 * (x511.
value));
10317 j0valid[0] = j0valid[1] =
true;
10318 j0array[0] =
IKacos(cj0array[0]);
10319 sj0array[0] =
IKsin(j0array[0]);
10320 cj0array[1] = cj0array[0];
10321 j0array[1] = -j0array[0];
10322 sj0array[1] = -sj0array[0];
10324 else if (isnan(cj0array[0]))
10332 for (
int ij0 = 0; ij0 < 2; ++ij0)
10340 for (
int iij0 = ij0 + 1; iij0 < 2;
10343 if (j0valid[iij0] &&
10344 IKabs(cj0array[ij0] -
10347 IKabs(sj0array[ij0] -
10351 j0valid[iij0] =
false;
10357 cj0 = cj0array[ij0];
10358 sj0 = sj0array[ij0];
10360 IkReal evalcond[6];
10361 IkReal x512 =
IKsin(j0);
10362 IkReal x513 =
IKcos(j0);
10363 IkReal x514 = (gconst7 * x513);
10364 IkReal x515 = ((-1.0) * x512);
10365 evalcond[0] = (new_r10 * x512);
10366 evalcond[1] = (new_r01 * x515);
10367 evalcond[2] = (gconst7 * x515);
10368 evalcond[3] = (x514 + new_r10);
10370 (((new_r01 * x513)) + gconst7);
10371 evalcond[5] = (x514 + new_r01);
10372 if (
IKabs(evalcond[0]) >
10374 IKabs(evalcond[1]) >
10376 IKabs(evalcond[2]) >
10378 IKabs(evalcond[3]) >
10380 IKabs(evalcond[4]) >
10382 IKabs(evalcond[5]) >
10393 vinfos[0].jointtype = 1;
10394 vinfos[0].foffset = j0;
10395 vinfos[0].indices[0] = _ij0[0];
10396 vinfos[0].indices[1] = _ij0[1];
10397 vinfos[0].maxsolutions = _nj0;
10398 vinfos[1].jointtype = 1;
10399 vinfos[1].foffset = j1;
10400 vinfos[1].indices[0] = _ij1[0];
10401 vinfos[1].indices[1] = _ij1[1];
10402 vinfos[1].maxsolutions = _nj1;
10403 vinfos[2].jointtype = 1;
10404 vinfos[2].foffset = j2;
10405 vinfos[2].indices[0] = _ij2[0];
10406 vinfos[2].indices[1] = _ij2[1];
10407 vinfos[2].maxsolutions = _nj2;
10408 vinfos[3].jointtype = 1;
10409 vinfos[3].foffset = j3;
10410 vinfos[3].indices[0] = _ij3[0];
10411 vinfos[3].indices[1] = _ij3[1];
10412 vinfos[3].maxsolutions = _nj3;
10413 vinfos[4].jointtype = 1;
10414 vinfos[4].foffset = j4;
10415 vinfos[4].indices[0] = _ij4[0];
10416 vinfos[4].indices[1] = _ij4[1];
10417 vinfos[4].maxsolutions = _nj4;
10418 vinfos[5].jointtype = 1;
10419 vinfos[5].foffset = j5;
10420 vinfos[5].indices[0] = _ij5[0];
10421 vinfos[5].indices[1] = _ij5[1];
10422 vinfos[5].maxsolutions = _nj5;
10423 vinfos[6].jointtype = 1;
10424 vinfos[6].foffset = j6;
10425 vinfos[6].indices[0] = _ij6[0];
10426 vinfos[6].indices[1] = _ij6[1];
10427 vinfos[6].maxsolutions = _nj6;
10428 std::vector<int> vfree(0);
10429 solutions.AddSolution(vinfos,
10438 if (bgotonextstatement)
10440 bool bgotonextstatement =
true;
10445 evalcond[1] = gconst7;
10446 evalcond[2] = gconst8;
10447 if (
IKabs(evalcond[0]) < 0.0000050000000000 &&
10448 IKabs(evalcond[1]) < 0.0000050000000000 &&
10449 IKabs(evalcond[2]) < 0.0000050000000000)
10451 bgotonextstatement =
false;
10463 IkReal x516 = ((-1.0) * (x517.
value));
10466 j1 = 3.14159265358979;
10474 IkReal gconst6 = x516;
10475 IkReal gconst7 = ((-1.0) * new_r01);
10476 IkReal gconst8 = new_r11;
10479 ((
IKabs((new_r01 * new_r11))) +
10482 (new_r01 * new_r01)))))));
10484 if (
IKabs(j0eval[0]) <
10485 0.0000010000000000 ||
10487 0.0000010000000000 ||
10488 IKabs(j0eval[2]) < 0.0000010000000000)
10501 IkReal x518 = ((-1.0) * (x519.
value));
10504 j1 = 3.14159265358979;
10512 IkReal gconst6 = x518;
10513 IkReal gconst7 = ((-1.0) * new_r01);
10514 IkReal gconst8 = new_r11;
10517 ((
IKabs((new_r01 * new_r11))) +
10521 (new_r01 * new_r01)))))));
10523 if (
IKabs(j0eval[0]) <
10524 0.0000010000000000 ||
10526 0.0000010000000000 ||
10528 0.0000010000000000)
10542 ((-1.0) * (x521.
value));
10545 j1 = 3.14159265358979;
10553 IkReal gconst6 = x520;
10555 ((-1.0) * new_r01);
10556 IkReal gconst8 = new_r11;
10566 (new_r01 * new_r11))));
10568 if (
IKabs(j0eval[0]) <
10569 0.0000010000000000 ||
10571 0.0000010000000000 ||
10573 0.0000010000000000)
10581 cj0array[1], sj0array[1];
10582 bool j0valid[1] = {
false };
10588 IkReal((((gconst8 *
10616 ((-1.5707963267949) +
10618 (((1.5707963267949) *
10624 if (j0array[0] >
IKPI)
10626 j0array[0] -=
IK2PI;
10628 else if (j0array[0] < -
IKPI)
10630 j0array[0] +=
IK2PI;
10633 for (
int ij0 = 0; ij0 < 1;
10642 for (
int iij0 = ij0 + 1;
10646 if (j0valid[iij0] &&
10656 j0valid[iij0] =
false;
10662 cj0 = cj0array[ij0];
10663 sj0 = sj0array[ij0];
10665 IkReal evalcond[6];
10666 IkReal x525 =
IKsin(j0);
10667 IkReal x526 =
IKcos(j0);
10677 ((((-1.0) * x530)) +
10680 (((new_r01 * x526)) +
10682 ((new_r11 * x525)));
10684 (((gconst7 * x525)) +
10688 ((new_r11 * x526)) +
10689 (((-1.0) * new_r01 *
10692 ((((-1.0) * x529)) +
10693 (((-1.0) * gconst7 *
10696 ((((-1.0) * x530)) +
10698 if (
IKabs(evalcond[0]) >
10700 IKabs(evalcond[1]) >
10702 IKabs(evalcond[2]) >
10704 IKabs(evalcond[3]) >
10706 IKabs(evalcond[4]) >
10708 IKabs(evalcond[5]) >
10720 vinfos[0].jointtype = 1;
10721 vinfos[0].foffset = j0;
10722 vinfos[0].indices[0] =
10724 vinfos[0].indices[1] =
10726 vinfos[0].maxsolutions =
10728 vinfos[1].jointtype = 1;
10729 vinfos[1].foffset = j1;
10730 vinfos[1].indices[0] =
10732 vinfos[1].indices[1] =
10734 vinfos[1].maxsolutions =
10736 vinfos[2].jointtype = 1;
10737 vinfos[2].foffset = j2;
10738 vinfos[2].indices[0] =
10740 vinfos[2].indices[1] =
10742 vinfos[2].maxsolutions =
10744 vinfos[3].jointtype = 1;
10745 vinfos[3].foffset = j3;
10746 vinfos[3].indices[0] =
10748 vinfos[3].indices[1] =
10750 vinfos[3].maxsolutions =
10752 vinfos[4].jointtype = 1;
10753 vinfos[4].foffset = j4;
10754 vinfos[4].indices[0] =
10756 vinfos[4].indices[1] =
10758 vinfos[4].maxsolutions =
10760 vinfos[5].jointtype = 1;
10761 vinfos[5].foffset = j5;
10762 vinfos[5].indices[0] =
10764 vinfos[5].indices[1] =
10766 vinfos[5].maxsolutions =
10768 vinfos[6].jointtype = 1;
10769 vinfos[6].foffset = j6;
10770 vinfos[6].indices[0] =
10772 vinfos[6].indices[1] =
10774 vinfos[6].maxsolutions =
10776 std::vector<int> vfree(0);
10777 solutions.AddSolution(
10788 IkReal j0array[1], cj0array[1],
10790 bool j0valid[1] = {
false };
10795 (gconst7 * new_r11)),
10797 (gconst8 * new_r11)),
10817 ((-1.5707963267949) +
10819 (((1.5707963267949) *
10821 sj0array[0] =
IKsin(j0array[0]);
10822 cj0array[0] =
IKcos(j0array[0]);
10823 if (j0array[0] >
IKPI)
10825 j0array[0] -=
IK2PI;
10827 else if (j0array[0] < -
IKPI)
10829 j0array[0] +=
IK2PI;
10832 for (
int ij0 = 0; ij0 < 1; ++ij0)
10840 for (
int iij0 = ij0 + 1;
10844 if (j0valid[iij0] &&
10845 IKabs(cj0array[ij0] -
10848 IKabs(sj0array[ij0] -
10852 j0valid[iij0] =
false;
10858 cj0 = cj0array[ij0];
10859 sj0 = sj0array[ij0];
10861 IkReal evalcond[6];
10862 IkReal x533 =
IKsin(j0);
10863 IkReal x534 =
IKcos(j0);
10866 IkReal x536 = ((1.0) * x533);
10872 ((((-1.0) * x538)) +
10875 (((new_r01 * x534)) +
10877 ((new_r11 * x533)));
10879 (((gconst7 * x533)) +
10883 ((new_r11 * x534)) +
10884 (((-1.0) * new_r01 *
10887 ((((-1.0) * x537)) +
10888 (((-1.0) * gconst7 *
10891 ((((-1.0) * x538)) +
10893 if (
IKabs(evalcond[0]) >
10895 IKabs(evalcond[1]) >
10897 IKabs(evalcond[2]) >
10899 IKabs(evalcond[3]) >
10901 IKabs(evalcond[4]) >
10903 IKabs(evalcond[5]) >
10915 vinfos[0].jointtype = 1;
10916 vinfos[0].foffset = j0;
10917 vinfos[0].indices[0] =
10919 vinfos[0].indices[1] =
10921 vinfos[0].maxsolutions = _nj0;
10922 vinfos[1].jointtype = 1;
10923 vinfos[1].foffset = j1;
10924 vinfos[1].indices[0] =
10926 vinfos[1].indices[1] =
10928 vinfos[1].maxsolutions = _nj1;
10929 vinfos[2].jointtype = 1;
10930 vinfos[2].foffset = j2;
10931 vinfos[2].indices[0] =
10933 vinfos[2].indices[1] =
10935 vinfos[2].maxsolutions = _nj2;
10936 vinfos[3].jointtype = 1;
10937 vinfos[3].foffset = j3;
10938 vinfos[3].indices[0] =
10940 vinfos[3].indices[1] =
10942 vinfos[3].maxsolutions = _nj3;
10943 vinfos[4].jointtype = 1;
10944 vinfos[4].foffset = j4;
10945 vinfos[4].indices[0] =
10947 vinfos[4].indices[1] =
10949 vinfos[4].maxsolutions = _nj4;
10950 vinfos[5].jointtype = 1;
10951 vinfos[5].foffset = j5;
10952 vinfos[5].indices[0] =
10954 vinfos[5].indices[1] =
10956 vinfos[5].maxsolutions = _nj5;
10957 vinfos[6].jointtype = 1;
10958 vinfos[6].foffset = j6;
10959 vinfos[6].indices[0] =
10961 vinfos[6].indices[1] =
10963 vinfos[6].maxsolutions = _nj6;
10964 std::vector<int> vfree(0);
10965 solutions.AddSolution(vinfos,
10976 IkReal j0array[1], cj0array[1],
10978 bool j0valid[1] = {
false };
10982 IkReal((gconst7 * gconst8)),
10983 IkReal(gconst8 * gconst8),
10992 ((((-1.0) * gconst8 *
10994 ((gconst7 * new_r01)))),
11000 j0array[0] = ((-1.5707963267949) +
11002 (((1.5707963267949) *
11004 sj0array[0] =
IKsin(j0array[0]);
11005 cj0array[0] =
IKcos(j0array[0]);
11006 if (j0array[0] >
IKPI)
11008 j0array[0] -=
IK2PI;
11010 else if (j0array[0] < -
IKPI)
11012 j0array[0] +=
IK2PI;
11015 for (
int ij0 = 0; ij0 < 1; ++ij0)
11023 for (
int iij0 = ij0 + 1; iij0 < 1;
11026 if (j0valid[iij0] &&
11027 IKabs(cj0array[ij0] -
11030 IKabs(sj0array[ij0] -
11034 j0valid[iij0] =
false;
11040 cj0 = cj0array[ij0];
11041 sj0 = sj0array[ij0];
11043 IkReal evalcond[6];
11044 IkReal x541 =
IKsin(j0);
11045 IkReal x542 =
IKcos(j0);
11046 IkReal x543 = (gconst7 * x542);
11047 IkReal x544 = ((1.0) * x541);
11048 IkReal x545 = (gconst8 * x542);
11049 IkReal x546 = (gconst8 * x544);
11051 ((((-1.0) * x546)) + x543);
11054 ((new_r11 * x541)) +
11055 ((new_r01 * x542)));
11057 (x545 + ((gconst7 * x541)) +
11061 ((new_r11 * x542)) +
11062 (((-1.0) * new_r01 * x544)));
11064 ((((-1.0) * x545)) +
11065 (((-1.0) * gconst7 * x544)));
11066 evalcond[5] = ((((-1.0) * x546)) +
11068 if (
IKabs(evalcond[0]) >
11070 IKabs(evalcond[1]) >
11072 IKabs(evalcond[2]) >
11074 IKabs(evalcond[3]) >
11076 IKabs(evalcond[4]) >
11078 IKabs(evalcond[5]) >
11090 vinfos[0].jointtype = 1;
11091 vinfos[0].foffset = j0;
11092 vinfos[0].indices[0] = _ij0[0];
11093 vinfos[0].indices[1] = _ij0[1];
11094 vinfos[0].maxsolutions = _nj0;
11095 vinfos[1].jointtype = 1;
11096 vinfos[1].foffset = j1;
11097 vinfos[1].indices[0] = _ij1[0];
11098 vinfos[1].indices[1] = _ij1[1];
11099 vinfos[1].maxsolutions = _nj1;
11100 vinfos[2].jointtype = 1;
11101 vinfos[2].foffset = j2;
11102 vinfos[2].indices[0] = _ij2[0];
11103 vinfos[2].indices[1] = _ij2[1];
11104 vinfos[2].maxsolutions = _nj2;
11105 vinfos[3].jointtype = 1;
11106 vinfos[3].foffset = j3;
11107 vinfos[3].indices[0] = _ij3[0];
11108 vinfos[3].indices[1] = _ij3[1];
11109 vinfos[3].maxsolutions = _nj3;
11110 vinfos[4].jointtype = 1;
11111 vinfos[4].foffset = j4;
11112 vinfos[4].indices[0] = _ij4[0];
11113 vinfos[4].indices[1] = _ij4[1];
11114 vinfos[4].maxsolutions = _nj4;
11115 vinfos[5].jointtype = 1;
11116 vinfos[5].foffset = j5;
11117 vinfos[5].indices[0] = _ij5[0];
11118 vinfos[5].indices[1] = _ij5[1];
11119 vinfos[5].maxsolutions = _nj5;
11120 vinfos[6].jointtype = 1;
11121 vinfos[6].foffset = j6;
11122 vinfos[6].indices[0] = _ij6[0];
11123 vinfos[6].indices[1] = _ij6[1];
11124 vinfos[6].maxsolutions = _nj6;
11125 std::vector<int> vfree(0);
11126 solutions.AddSolution(vinfos,
11135 if (bgotonextstatement)
11137 bool bgotonextstatement =
true;
11142 if (
IKabs(evalcond[0]) < 0.0000050000000000)
11144 bgotonextstatement =
false;
11146 IkReal j0array[2], cj0array[2],
11148 bool j0valid[2] = {
false };
11156 cj0array[0] = (new_r00 * (x547.
value));
11162 j0valid[0] = j0valid[1] =
true;
11163 j0array[0] =
IKacos(cj0array[0]);
11164 sj0array[0] =
IKsin(j0array[0]);
11165 cj0array[1] = cj0array[0];
11166 j0array[1] = -j0array[0];
11167 sj0array[1] = -sj0array[0];
11169 else if (isnan(cj0array[0]))
11177 for (
int ij0 = 0; ij0 < 2; ++ij0)
11185 for (
int iij0 = ij0 + 1; iij0 < 2;
11188 if (j0valid[iij0] &&
11189 IKabs(cj0array[ij0] -
11192 IKabs(sj0array[ij0] -
11196 j0valid[iij0] =
false;
11202 cj0 = cj0array[ij0];
11203 sj0 = sj0array[ij0];
11205 IkReal evalcond[6];
11206 IkReal x548 =
IKsin(j0);
11207 IkReal x549 =
IKcos(j0);
11208 IkReal x550 = ((-1.0) * x548);
11209 evalcond[0] = (new_r11 * x548);
11210 evalcond[1] = (new_r00 * x550);
11211 evalcond[2] = (gconst8 * x550);
11213 (gconst8 + ((new_r11 * x549)));
11215 (((gconst8 * x549)) + new_r11);
11217 (((new_r00 * x549)) +
11218 (((-1.0) * gconst8)));
11219 if (
IKabs(evalcond[0]) >
11221 IKabs(evalcond[1]) >
11223 IKabs(evalcond[2]) >
11225 IKabs(evalcond[3]) >
11227 IKabs(evalcond[4]) >
11229 IKabs(evalcond[5]) >
11240 vinfos[0].jointtype = 1;
11241 vinfos[0].foffset = j0;
11242 vinfos[0].indices[0] = _ij0[0];
11243 vinfos[0].indices[1] = _ij0[1];
11244 vinfos[0].maxsolutions = _nj0;
11245 vinfos[1].jointtype = 1;
11246 vinfos[1].foffset = j1;
11247 vinfos[1].indices[0] = _ij1[0];
11248 vinfos[1].indices[1] = _ij1[1];
11249 vinfos[1].maxsolutions = _nj1;
11250 vinfos[2].jointtype = 1;
11251 vinfos[2].foffset = j2;
11252 vinfos[2].indices[0] = _ij2[0];
11253 vinfos[2].indices[1] = _ij2[1];
11254 vinfos[2].maxsolutions = _nj2;
11255 vinfos[3].jointtype = 1;
11256 vinfos[3].foffset = j3;
11257 vinfos[3].indices[0] = _ij3[0];
11258 vinfos[3].indices[1] = _ij3[1];
11259 vinfos[3].maxsolutions = _nj3;
11260 vinfos[4].jointtype = 1;
11261 vinfos[4].foffset = j4;
11262 vinfos[4].indices[0] = _ij4[0];
11263 vinfos[4].indices[1] = _ij4[1];
11264 vinfos[4].maxsolutions = _nj4;
11265 vinfos[5].jointtype = 1;
11266 vinfos[5].foffset = j5;
11267 vinfos[5].indices[0] = _ij5[0];
11268 vinfos[5].indices[1] = _ij5[1];
11269 vinfos[5].maxsolutions = _nj5;
11270 vinfos[6].jointtype = 1;
11271 vinfos[6].foffset = j6;
11272 vinfos[6].indices[0] = _ij6[0];
11273 vinfos[6].indices[1] = _ij6[1];
11274 vinfos[6].maxsolutions = _nj6;
11275 std::vector<int> vfree(0);
11276 solutions.AddSolution(vinfos,
11283 if (bgotonextstatement)
11285 bool bgotonextstatement =
true;
11290 if (
IKabs(evalcond[0]) <
11291 0.0000050000000000)
11293 bgotonextstatement =
false;
11305 IkReal x551 = ((-1.0) * (x552.
value));
11308 j1 = 3.14159265358979;
11316 IkReal gconst6 = x551;
11317 IkReal gconst7 = 0;
11319 ((1.0) + (((-1.0) *
11320 (new_r10 * new_r10))));
11321 if (
IKabs(x553) == 0)
11326 (new_r11 * (pow(x553, -0.5)));
11327 j0eval[0] = ((
IKabs(new_r11)) +
11329 if (
IKabs(j0eval[0]) <
11330 0.0000010000000000)
11344 ((-1.0) * (x555.
value));
11347 j1 = 3.14159265358979;
11355 IkReal gconst6 = x554;
11356 IkReal gconst7 = 0;
11360 (new_r10 * new_r10))));
11361 if (
IKabs(x556) == 0)
11366 (new_r11 * (pow(x556, -0.5)));
11367 j0eval[0] = new_r11;
11368 if (
IKabs(j0eval[0]) <
11369 0.0000010000000000)
11383 ((-1.0) * (x558.
value));
11386 j1 = 3.14159265358979;
11394 IkReal gconst6 = x557;
11395 IkReal gconst7 = 0;
11399 (new_r10 * new_r10))));
11400 if (
IKabs(x559) == 0)
11406 (pow(x559, -0.5)));
11407 j0eval[0] = new_r10;
11408 j0eval[1] = new_r11;
11409 if (
IKabs(j0eval[0]) <
11410 0.0000010000000000 ||
11412 0.0000010000000000)
11423 bool j0valid[1] = {
11463 ((-1.0) * gconst8 *
11469 if (j0array[0] >
IKPI)
11471 j0array[0] -=
IK2PI;
11473 else if (j0array[0] <
11476 j0array[0] +=
IK2PI;
11479 for (
int ij0 = 0; ij0 < 1;
11488 for (
int iij0 = ij0 + 1;
11492 if (j0valid[iij0] &&
11513 cj0 = cj0array[ij0];
11514 sj0 = sj0array[ij0];
11516 IkReal evalcond[8];
11582 vinfos[0].jointtype =
11584 vinfos[0].foffset =
11586 vinfos[0].indices[0] =
11588 vinfos[0].indices[1] =
11593 vinfos[1].jointtype =
11595 vinfos[1].foffset =
11597 vinfos[1].indices[0] =
11599 vinfos[1].indices[1] =
11604 vinfos[2].jointtype =
11606 vinfos[2].foffset =
11608 vinfos[2].indices[0] =
11610 vinfos[2].indices[1] =
11615 vinfos[3].jointtype =
11617 vinfos[3].foffset =
11619 vinfos[3].indices[0] =
11621 vinfos[3].indices[1] =
11626 vinfos[4].jointtype =
11628 vinfos[4].foffset =
11630 vinfos[4].indices[0] =
11632 vinfos[4].indices[1] =
11637 vinfos[5].jointtype =
11639 vinfos[5].foffset =
11641 vinfos[5].indices[0] =
11643 vinfos[5].indices[1] =
11648 vinfos[6].jointtype =
11650 vinfos[6].foffset =
11652 vinfos[6].indices[0] =
11654 vinfos[6].indices[1] =
11661 solutions.AddSolution(
11673 cj0array[1], sj0array[1];
11674 bool j0valid[1] = {
false };
11690 if (
IKabs((new_r10 *
11693 IKabs(((-1.0) * gconst8 *
11707 (new_r10 * (x566.
value)),
11708 ((-1.0) * gconst8 *
11714 if (j0array[0] >
IKPI)
11716 j0array[0] -=
IK2PI;
11718 else if (j0array[0] < -
IKPI)
11720 j0array[0] +=
IK2PI;
11723 for (
int ij0 = 0; ij0 < 1;
11732 for (
int iij0 = ij0 + 1;
11736 if (j0valid[iij0] &&
11746 j0valid[iij0] =
false;
11752 cj0 = cj0array[ij0];
11753 sj0 = sj0array[ij0];
11755 IkReal evalcond[8];
11756 IkReal x568 =
IKcos(j0);
11757 IkReal x569 =
IKsin(j0);
11772 ((new_r11 * x568)));
11776 ((((-1.0) * x570)) +
11781 ((new_r10 * x569)));
11782 if (
IKabs(evalcond[0]) >
11784 IKabs(evalcond[1]) >
11786 IKabs(evalcond[2]) >
11788 IKabs(evalcond[3]) >
11790 IKabs(evalcond[4]) >
11792 IKabs(evalcond[5]) >
11794 IKabs(evalcond[6]) >
11796 IKabs(evalcond[7]) >
11808 vinfos[0].jointtype = 1;
11809 vinfos[0].foffset = j0;
11810 vinfos[0].indices[0] =
11812 vinfos[0].indices[1] =
11814 vinfos[0].maxsolutions =
11816 vinfos[1].jointtype = 1;
11817 vinfos[1].foffset = j1;
11818 vinfos[1].indices[0] =
11820 vinfos[1].indices[1] =
11822 vinfos[1].maxsolutions =
11824 vinfos[2].jointtype = 1;
11825 vinfos[2].foffset = j2;
11826 vinfos[2].indices[0] =
11828 vinfos[2].indices[1] =
11830 vinfos[2].maxsolutions =
11832 vinfos[3].jointtype = 1;
11833 vinfos[3].foffset = j3;
11834 vinfos[3].indices[0] =
11836 vinfos[3].indices[1] =
11838 vinfos[3].maxsolutions =
11840 vinfos[4].jointtype = 1;
11841 vinfos[4].foffset = j4;
11842 vinfos[4].indices[0] =
11844 vinfos[4].indices[1] =
11846 vinfos[4].maxsolutions =
11848 vinfos[5].jointtype = 1;
11849 vinfos[5].foffset = j5;
11850 vinfos[5].indices[0] =
11852 vinfos[5].indices[1] =
11854 vinfos[5].maxsolutions =
11856 vinfos[6].jointtype = 1;
11857 vinfos[6].foffset = j6;
11858 vinfos[6].indices[0] =
11860 vinfos[6].indices[1] =
11862 vinfos[6].maxsolutions =
11864 std::vector<int> vfree(0);
11865 solutions.AddSolution(
11876 IkReal j0array[1], cj0array[1],
11878 bool j0valid[1] = {
false };
11884 ((-1.0) * new_r11)),
11898 ((-1.5707963267949) +
11900 (((1.5707963267949) *
11902 sj0array[0] =
IKsin(j0array[0]);
11903 cj0array[0] =
IKcos(j0array[0]);
11904 if (j0array[0] >
IKPI)
11906 j0array[0] -=
IK2PI;
11908 else if (j0array[0] < -
IKPI)
11910 j0array[0] +=
IK2PI;
11913 for (
int ij0 = 0; ij0 < 1; ++ij0)
11921 for (
int iij0 = ij0 + 1;
11925 if (j0valid[iij0] &&
11926 IKabs(cj0array[ij0] -
11929 IKabs(sj0array[ij0] -
11933 j0valid[iij0] =
false;
11939 cj0 = cj0array[ij0];
11940 sj0 = sj0array[ij0];
11942 IkReal evalcond[8];
11943 IkReal x574 =
IKcos(j0);
11944 IkReal x575 =
IKsin(j0);
11953 evalcond[2] = ((-1.0) * x577);
11954 evalcond[3] = ((-1.0) * x576);
11956 (((new_r11 * x574)) +
11961 ((((-1.0) * x576)) +
11964 (((new_r10 * x575)) +
11965 (((-1.0) * gconst8)));
11966 if (
IKabs(evalcond[0]) >
11968 IKabs(evalcond[1]) >
11970 IKabs(evalcond[2]) >
11972 IKabs(evalcond[3]) >
11974 IKabs(evalcond[4]) >
11976 IKabs(evalcond[5]) >
11978 IKabs(evalcond[6]) >
11980 IKabs(evalcond[7]) >
11992 vinfos[0].jointtype = 1;
11993 vinfos[0].foffset = j0;
11994 vinfos[0].indices[0] =
11996 vinfos[0].indices[1] =
11998 vinfos[0].maxsolutions = _nj0;
11999 vinfos[1].jointtype = 1;
12000 vinfos[1].foffset = j1;
12001 vinfos[1].indices[0] =
12003 vinfos[1].indices[1] =
12005 vinfos[1].maxsolutions = _nj1;
12006 vinfos[2].jointtype = 1;
12007 vinfos[2].foffset = j2;
12008 vinfos[2].indices[0] =
12010 vinfos[2].indices[1] =
12012 vinfos[2].maxsolutions = _nj2;
12013 vinfos[3].jointtype = 1;
12014 vinfos[3].foffset = j3;
12015 vinfos[3].indices[0] =
12017 vinfos[3].indices[1] =
12019 vinfos[3].maxsolutions = _nj3;
12020 vinfos[4].jointtype = 1;
12021 vinfos[4].foffset = j4;
12022 vinfos[4].indices[0] =
12024 vinfos[4].indices[1] =
12026 vinfos[4].maxsolutions = _nj4;
12027 vinfos[5].jointtype = 1;
12028 vinfos[5].foffset = j5;
12029 vinfos[5].indices[0] =
12031 vinfos[5].indices[1] =
12033 vinfos[5].maxsolutions = _nj5;
12034 vinfos[6].jointtype = 1;
12035 vinfos[6].foffset = j6;
12036 vinfos[6].indices[0] =
12038 vinfos[6].indices[1] =
12040 vinfos[6].maxsolutions = _nj6;
12041 std::vector<int> vfree(0);
12042 solutions.AddSolution(vinfos,
12051 if (bgotonextstatement)
12053 bool bgotonextstatement =
true;
12056 evalcond[0] =
IKabs(new_r01);
12057 if (
IKabs(evalcond[0]) <
12058 0.0000050000000000)
12060 bgotonextstatement =
false;
12073 ((-1.0) * (x579.
value));
12076 j1 = 3.14159265358979;
12081 IkReal gconst6 = x578;
12082 IkReal gconst7 = 0;
12083 IkReal x580 = new_r11 * new_r11;
12084 if (
IKabs(x580) == 0)
12089 (new_r11 * (pow(x580, -0.5)));
12090 j0eval[0] = ((
IKabs(new_r10)) +
12092 if (
IKabs(j0eval[0]) <
12093 0.0000010000000000)
12107 ((-1.0) * (x582.
value));
12110 j1 = 3.14159265358979;
12115 IkReal gconst6 = x581;
12116 IkReal gconst7 = 0;
12117 IkReal x583 = new_r11 * new_r11;
12118 if (
IKabs(x583) == 0)
12124 (pow(x583, -0.5)));
12125 j0eval[0] = ((
IKabs(new_r11)) +
12127 if (
IKabs(j0eval[0]) <
12128 0.0000010000000000)
12142 ((-1.0) * (x585.
value));
12145 j1 = 3.14159265358979;
12150 IkReal gconst6 = x584;
12151 IkReal gconst7 = 0;
12154 if (
IKabs(x586) == 0)
12160 (pow(x586, -0.5)));
12161 j0eval[0] = new_r11;
12162 if (
IKabs(j0eval[0]) <
12163 0.0000010000000000)
12174 bool j0valid[1] = {
12215 ((-1.0) * gconst8 *
12221 if (j0array[0] >
IKPI)
12223 j0array[0] -=
IK2PI;
12225 else if (j0array[0] <
12228 j0array[0] +=
IK2PI;
12246 if (j0valid[iij0] &&
12267 cj0 = cj0array[ij0];
12268 sj0 = sj0array[ij0];
12270 IkReal evalcond[8];
12354 vinfos[0].foffset =
12367 vinfos[1].foffset =
12380 vinfos[2].foffset =
12393 vinfos[3].foffset =
12406 vinfos[4].foffset =
12419 vinfos[5].foffset =
12432 vinfos[6].foffset =
12461 bool j0valid[1] = {
false };
12482 ((-1.5707963267949) +
12484 (((1.5707963267949) *
12490 if (j0array[0] >
IKPI)
12492 j0array[0] -=
IK2PI;
12494 else if (j0array[0] < -
IKPI)
12496 j0array[0] +=
IK2PI;
12499 for (
int ij0 = 0; ij0 < 1;
12508 for (
int iij0 = ij0 + 1;
12512 if (j0valid[iij0] &&
12524 j0valid[iij0] =
false;
12530 cj0 = cj0array[ij0];
12531 sj0 = sj0array[ij0];
12533 IkReal evalcond[8];
12534 IkReal x595 =
IKsin(j0);
12535 IkReal x596 =
IKcos(j0);
12543 ((-1.0) * gconst8 *
12572 (((-1.0) * x597)));
12573 if (
IKabs(evalcond[0]) >
12575 IKabs(evalcond[1]) >
12577 IKabs(evalcond[2]) >
12579 IKabs(evalcond[3]) >
12581 IKabs(evalcond[4]) >
12583 IKabs(evalcond[5]) >
12585 IKabs(evalcond[6]) >
12587 IKabs(evalcond[7]) >
12599 vinfos[0].jointtype = 1;
12600 vinfos[0].foffset = j0;
12601 vinfos[0].indices[0] =
12603 vinfos[0].indices[1] =
12605 vinfos[0].maxsolutions =
12607 vinfos[1].jointtype = 1;
12608 vinfos[1].foffset = j1;
12609 vinfos[1].indices[0] =
12611 vinfos[1].indices[1] =
12613 vinfos[1].maxsolutions =
12615 vinfos[2].jointtype = 1;
12616 vinfos[2].foffset = j2;
12617 vinfos[2].indices[0] =
12619 vinfos[2].indices[1] =
12621 vinfos[2].maxsolutions =
12623 vinfos[3].jointtype = 1;
12624 vinfos[3].foffset = j3;
12625 vinfos[3].indices[0] =
12627 vinfos[3].indices[1] =
12629 vinfos[3].maxsolutions =
12631 vinfos[4].jointtype = 1;
12632 vinfos[4].foffset = j4;
12633 vinfos[4].indices[0] =
12635 vinfos[4].indices[1] =
12637 vinfos[4].maxsolutions =
12639 vinfos[5].jointtype = 1;
12640 vinfos[5].foffset = j5;
12641 vinfos[5].indices[0] =
12643 vinfos[5].indices[1] =
12645 vinfos[5].maxsolutions =
12647 vinfos[6].jointtype = 1;
12648 vinfos[6].foffset = j6;
12649 vinfos[6].indices[0] =
12651 vinfos[6].indices[1] =
12653 vinfos[6].maxsolutions =
12655 std::vector<int> vfree(
12657 solutions.AddSolution(
12668 IkReal j0array[1], cj0array[1],
12670 bool j0valid[1] = {
false };
12689 ((-1.5707963267949) +
12690 (((1.5707963267949) *
12693 sj0array[0] =
IKsin(j0array[0]);
12694 cj0array[0] =
IKcos(j0array[0]);
12695 if (j0array[0] >
IKPI)
12697 j0array[0] -=
IK2PI;
12699 else if (j0array[0] < -
IKPI)
12701 j0array[0] +=
IK2PI;
12704 for (
int ij0 = 0; ij0 < 1;
12713 for (
int iij0 = ij0 + 1;
12717 if (j0valid[iij0] &&
12718 IKabs(cj0array[ij0] -
12721 IKabs(sj0array[ij0] -
12725 j0valid[iij0] =
false;
12731 cj0 = cj0array[ij0];
12732 sj0 = sj0array[ij0];
12734 IkReal evalcond[8];
12735 IkReal x601 =
IKsin(j0);
12736 IkReal x602 =
IKcos(j0);
12744 ((-1.0) * gconst8 *
12748 ((new_r11 * x602)));
12750 (((gconst8 * x602)) +
12761 (((new_r10 * x602)) +
12762 (((-1.0) * new_r00 *
12765 (((new_r10 * x601)) +
12766 ((new_r00 * x602)) +
12767 (((-1.0) * x603)));
12768 if (
IKabs(evalcond[0]) >
12770 IKabs(evalcond[1]) >
12772 IKabs(evalcond[2]) >
12774 IKabs(evalcond[3]) >
12776 IKabs(evalcond[4]) >
12778 IKabs(evalcond[5]) >
12780 IKabs(evalcond[6]) >
12782 IKabs(evalcond[7]) >
12794 vinfos[0].jointtype = 1;
12795 vinfos[0].foffset = j0;
12796 vinfos[0].indices[0] =
12798 vinfos[0].indices[1] =
12800 vinfos[0].maxsolutions =
12802 vinfos[1].jointtype = 1;
12803 vinfos[1].foffset = j1;
12804 vinfos[1].indices[0] =
12806 vinfos[1].indices[1] =
12808 vinfos[1].maxsolutions =
12810 vinfos[2].jointtype = 1;
12811 vinfos[2].foffset = j2;
12812 vinfos[2].indices[0] =
12814 vinfos[2].indices[1] =
12816 vinfos[2].maxsolutions =
12818 vinfos[3].jointtype = 1;
12819 vinfos[3].foffset = j3;
12820 vinfos[3].indices[0] =
12822 vinfos[3].indices[1] =
12824 vinfos[3].maxsolutions =
12826 vinfos[4].jointtype = 1;
12827 vinfos[4].foffset = j4;
12828 vinfos[4].indices[0] =
12830 vinfos[4].indices[1] =
12832 vinfos[4].maxsolutions =
12834 vinfos[5].jointtype = 1;
12835 vinfos[5].foffset = j5;
12836 vinfos[5].indices[0] =
12838 vinfos[5].indices[1] =
12840 vinfos[5].maxsolutions =
12842 vinfos[6].jointtype = 1;
12843 vinfos[6].foffset = j6;
12844 vinfos[6].indices[0] =
12846 vinfos[6].indices[1] =
12848 vinfos[6].maxsolutions =
12850 std::vector<int> vfree(0);
12851 solutions.AddSolution(
12860 if (bgotonextstatement)
12862 bool bgotonextstatement =
true;
12867 bgotonextstatement =
false;
12871 if (bgotonextstatement)
12884 IkReal j0array[1], cj0array[1], sj0array[1];
12885 bool j0valid[1] = {
false };
12887 IkReal x605 = ((1.0) * new_r11);
12889 IkReal(((((-1.0) * new_r01 * x605)) +
12890 ((gconst7 * gconst8)))),
12891 IkReal(((((-1.0) * (gconst7 * gconst7))) +
12892 (new_r11 * new_r11))),
12899 IKsign(((((-1.0) * gconst8 * x605)) +
12900 ((gconst7 * new_r01)))),
12907 ((-1.5707963267949) + (x606.
value) +
12908 (((1.5707963267949) * (x607.
value))));
12909 sj0array[0] =
IKsin(j0array[0]);
12910 cj0array[0] =
IKcos(j0array[0]);
12911 if (j0array[0] >
IKPI)
12913 j0array[0] -=
IK2PI;
12915 else if (j0array[0] < -
IKPI)
12917 j0array[0] +=
IK2PI;
12920 for (
int ij0 = 0; ij0 < 1; ++ij0)
12928 for (
int iij0 = ij0 + 1; iij0 < 1; ++iij0)
12930 if (j0valid[iij0] &&
12931 IKabs(cj0array[ij0] - cj0array[iij0]) <
12933 IKabs(sj0array[ij0] - sj0array[iij0]) <
12936 j0valid[iij0] =
false;
12942 cj0 = cj0array[ij0];
12943 sj0 = sj0array[ij0];
12945 IkReal evalcond[8];
12946 IkReal x608 =
IKcos(j0);
12947 IkReal x609 =
IKsin(j0);
12948 IkReal x610 = (gconst7 * x608);
12949 IkReal x611 = ((1.0) * x609);
12950 IkReal x612 = (gconst8 * x608);
12951 IkReal x613 = (gconst8 * x611);
12952 evalcond[0] = (gconst7 + ((new_r11 * x609)) +
12953 ((new_r01 * x608)));
12955 (((gconst7 * x609)) + x612 + new_r11);
12956 evalcond[2] = (gconst7 + ((new_r10 * x608)) +
12957 (((-1.0) * new_r00 * x611)));
12958 evalcond[3] = (gconst8 + ((new_r11 * x608)) +
12959 (((-1.0) * new_r01 * x611)));
12961 ((((-1.0) * x613)) + x610 + new_r10);
12963 ((((-1.0) * x613)) + x610 + new_r01);
12965 ((((-1.0) * gconst8)) +
12966 ((new_r10 * x609)) + ((new_r00 * x608)));
12967 evalcond[7] = ((((-1.0) * x612)) + new_r00 +
12968 (((-1.0) * gconst7 * x611)));
12969 if (
IKabs(evalcond[0]) >
12971 IKabs(evalcond[1]) >
12973 IKabs(evalcond[2]) >
12975 IKabs(evalcond[3]) >
12977 IKabs(evalcond[4]) >
12979 IKabs(evalcond[5]) >
12981 IKabs(evalcond[6]) >
12983 IKabs(evalcond[7]) >
12991 std::vector<IkSingleDOFSolutionBase<IkReal> >
12993 vinfos[0].jointtype = 1;
12994 vinfos[0].foffset = j0;
12995 vinfos[0].indices[0] = _ij0[0];
12996 vinfos[0].indices[1] = _ij0[1];
12997 vinfos[0].maxsolutions = _nj0;
12998 vinfos[1].jointtype = 1;
12999 vinfos[1].foffset = j1;
13000 vinfos[1].indices[0] = _ij1[0];
13001 vinfos[1].indices[1] = _ij1[1];
13002 vinfos[1].maxsolutions = _nj1;
13003 vinfos[2].jointtype = 1;
13004 vinfos[2].foffset = j2;
13005 vinfos[2].indices[0] = _ij2[0];
13006 vinfos[2].indices[1] = _ij2[1];
13007 vinfos[2].maxsolutions = _nj2;
13008 vinfos[3].jointtype = 1;
13009 vinfos[3].foffset = j3;
13010 vinfos[3].indices[0] = _ij3[0];
13011 vinfos[3].indices[1] = _ij3[1];
13012 vinfos[3].maxsolutions = _nj3;
13013 vinfos[4].jointtype = 1;
13014 vinfos[4].foffset = j4;
13015 vinfos[4].indices[0] = _ij4[0];
13016 vinfos[4].indices[1] = _ij4[1];
13017 vinfos[4].maxsolutions = _nj4;
13018 vinfos[5].jointtype = 1;
13019 vinfos[5].foffset = j5;
13020 vinfos[5].indices[0] = _ij5[0];
13021 vinfos[5].indices[1] = _ij5[1];
13022 vinfos[5].maxsolutions = _nj5;
13023 vinfos[6].jointtype = 1;
13024 vinfos[6].foffset = j6;
13025 vinfos[6].indices[0] = _ij6[0];
13026 vinfos[6].indices[1] = _ij6[1];
13027 vinfos[6].maxsolutions = _nj6;
13028 std::vector<int> vfree(0);
13029 solutions.AddSolution(vinfos, vfree);
13039 IkReal j0array[1], cj0array[1], sj0array[1];
13040 bool j0valid[1] = {
false };
13042 IkReal x614 = ((1.0) * new_r11);
13045 ((new_r01 * new_r01) + (new_r11 * new_r11))),
13052 IkReal((((gconst8 * new_r01)) +
13053 (((-1.0) * gconst7 * x614)))),
13054 IkReal(((((-1.0) * gconst7 * new_r01)) +
13055 (((-1.0) * gconst8 * x614)))),
13061 j0array[0] = ((-1.5707963267949) +
13062 (((1.5707963267949) * (x615.
value))) +
13064 sj0array[0] =
IKsin(j0array[0]);
13065 cj0array[0] =
IKcos(j0array[0]);
13066 if (j0array[0] >
IKPI)
13068 j0array[0] -=
IK2PI;
13070 else if (j0array[0] < -
IKPI)
13072 j0array[0] +=
IK2PI;
13075 for (
int ij0 = 0; ij0 < 1; ++ij0)
13083 for (
int iij0 = ij0 + 1; iij0 < 1; ++iij0)
13085 if (j0valid[iij0] &&
13086 IKabs(cj0array[ij0] - cj0array[iij0]) <
13088 IKabs(sj0array[ij0] - sj0array[iij0]) <
13091 j0valid[iij0] =
false;
13097 cj0 = cj0array[ij0];
13098 sj0 = sj0array[ij0];
13100 IkReal evalcond[8];
13101 IkReal x617 =
IKcos(j0);
13102 IkReal x618 =
IKsin(j0);
13103 IkReal x619 = (gconst7 * x617);
13104 IkReal x620 = ((1.0) * x618);
13105 IkReal x621 = (gconst8 * x617);
13106 IkReal x622 = (gconst8 * x620);
13107 evalcond[0] = (gconst7 + ((new_r11 * x618)) +
13108 ((new_r01 * x617)));
13110 (((gconst7 * x618)) + x621 + new_r11);
13111 evalcond[2] = ((((-1.0) * new_r00 * x620)) +
13112 gconst7 + ((new_r10 * x617)));
13113 evalcond[3] = ((((-1.0) * new_r01 * x620)) +
13114 gconst8 + ((new_r11 * x617)));
13116 ((((-1.0) * x622)) + x619 + new_r10);
13118 ((((-1.0) * x622)) + x619 + new_r01);
13120 ((((-1.0) * gconst8)) + ((new_r10 * x618)) +
13121 ((new_r00 * x617)));
13122 evalcond[7] = ((((-1.0) * gconst7 * x620)) +
13123 (((-1.0) * x621)) + new_r00);
13138 std::vector<IkSingleDOFSolutionBase<IkReal> >
13140 vinfos[0].jointtype = 1;
13141 vinfos[0].foffset = j0;
13142 vinfos[0].indices[0] = _ij0[0];
13143 vinfos[0].indices[1] = _ij0[1];
13144 vinfos[0].maxsolutions = _nj0;
13145 vinfos[1].jointtype = 1;
13146 vinfos[1].foffset = j1;
13147 vinfos[1].indices[0] = _ij1[0];
13148 vinfos[1].indices[1] = _ij1[1];
13149 vinfos[1].maxsolutions = _nj1;
13150 vinfos[2].jointtype = 1;
13151 vinfos[2].foffset = j2;
13152 vinfos[2].indices[0] = _ij2[0];
13153 vinfos[2].indices[1] = _ij2[1];
13154 vinfos[2].maxsolutions = _nj2;
13155 vinfos[3].jointtype = 1;
13156 vinfos[3].foffset = j3;
13157 vinfos[3].indices[0] = _ij3[0];
13158 vinfos[3].indices[1] = _ij3[1];
13159 vinfos[3].maxsolutions = _nj3;
13160 vinfos[4].jointtype = 1;
13161 vinfos[4].foffset = j4;
13162 vinfos[4].indices[0] = _ij4[0];
13163 vinfos[4].indices[1] = _ij4[1];
13164 vinfos[4].maxsolutions = _nj4;
13165 vinfos[5].jointtype = 1;
13166 vinfos[5].foffset = j5;
13167 vinfos[5].indices[0] = _ij5[0];
13168 vinfos[5].indices[1] = _ij5[1];
13169 vinfos[5].maxsolutions = _nj5;
13170 vinfos[6].jointtype = 1;
13171 vinfos[6].foffset = j6;
13172 vinfos[6].indices[0] = _ij6[0];
13173 vinfos[6].indices[1] = _ij6[1];
13174 vinfos[6].maxsolutions = _nj6;
13175 std::vector<int> vfree(0);
13176 solutions.AddSolution(vinfos, vfree);
13186 IkReal j0array[1], cj0array[1], sj0array[1];
13187 bool j0valid[1] = {
false };
13189 IkReal x623 = ((1.0) * gconst7);
13191 IkReal(((((-1.0) * new_r10 * x623)) +
13192 ((gconst7 * new_r01)))),
13193 IkReal(((((-1.0) * new_r00 * x623)) +
13194 (((-1.0) * new_r11 * x623)))),
13202 ((new_r00 * new_r01)))),
13208 j0array[0] = ((-1.5707963267949) + (x624.
value) +
13209 (((1.5707963267949) * (x625.
value))));
13210 sj0array[0] =
IKsin(j0array[0]);
13211 cj0array[0] =
IKcos(j0array[0]);
13212 if (j0array[0] >
IKPI)
13214 j0array[0] -=
IK2PI;
13216 else if (j0array[0] < -
IKPI)
13218 j0array[0] +=
IK2PI;
13221 for (
int ij0 = 0; ij0 < 1; ++ij0)
13229 for (
int iij0 = ij0 + 1; iij0 < 1; ++iij0)
13231 if (j0valid[iij0] &&
13232 IKabs(cj0array[ij0] - cj0array[iij0]) <
13234 IKabs(sj0array[ij0] - sj0array[iij0]) <
13237 j0valid[iij0] =
false;
13243 cj0 = cj0array[ij0];
13244 sj0 = sj0array[ij0];
13246 IkReal evalcond[8];
13247 IkReal x626 =
IKcos(j0);
13248 IkReal x627 =
IKsin(j0);
13249 IkReal x628 = (gconst7 * x626);
13250 IkReal x629 = ((1.0) * x627);
13251 IkReal x630 = (gconst8 * x626);
13252 IkReal x631 = (gconst8 * x629);
13253 evalcond[0] = (gconst7 + ((new_r01 * x626)) +
13254 ((new_r11 * x627)));
13255 evalcond[1] = (x630 + new_r11 + ((gconst7 * x627)));
13256 evalcond[2] = ((((-1.0) * new_r00 * x629)) + gconst7 +
13257 ((new_r10 * x626)));
13258 evalcond[3] = ((((-1.0) * new_r01 * x629)) + gconst8 +
13259 ((new_r11 * x626)));
13260 evalcond[4] = ((((-1.0) * x631)) + x628 + new_r10);
13261 evalcond[5] = ((((-1.0) * x631)) + x628 + new_r01);
13263 ((((-1.0) * gconst8)) + ((new_r00 * x626)) +
13264 ((new_r10 * x627)));
13265 evalcond[7] = ((((-1.0) * gconst7 * x629)) +
13266 (((-1.0) * x630)) + new_r00);
13281 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(
13283 vinfos[0].jointtype = 1;
13284 vinfos[0].foffset = j0;
13285 vinfos[0].indices[0] = _ij0[0];
13286 vinfos[0].indices[1] = _ij0[1];
13287 vinfos[0].maxsolutions = _nj0;
13288 vinfos[1].jointtype = 1;
13289 vinfos[1].foffset = j1;
13290 vinfos[1].indices[0] = _ij1[0];
13291 vinfos[1].indices[1] = _ij1[1];
13292 vinfos[1].maxsolutions = _nj1;
13293 vinfos[2].jointtype = 1;
13294 vinfos[2].foffset = j2;
13295 vinfos[2].indices[0] = _ij2[0];
13296 vinfos[2].indices[1] = _ij2[1];
13297 vinfos[2].maxsolutions = _nj2;
13298 vinfos[3].jointtype = 1;
13299 vinfos[3].foffset = j3;
13300 vinfos[3].indices[0] = _ij3[0];
13301 vinfos[3].indices[1] = _ij3[1];
13302 vinfos[3].maxsolutions = _nj3;
13303 vinfos[4].jointtype = 1;
13304 vinfos[4].foffset = j4;
13305 vinfos[4].indices[0] = _ij4[0];
13306 vinfos[4].indices[1] = _ij4[1];
13307 vinfos[4].maxsolutions = _nj4;
13308 vinfos[5].jointtype = 1;
13309 vinfos[5].foffset = j5;
13310 vinfos[5].indices[0] = _ij5[0];
13311 vinfos[5].indices[1] = _ij5[1];
13312 vinfos[5].maxsolutions = _nj5;
13313 vinfos[6].jointtype = 1;
13314 vinfos[6].foffset = j6;
13315 vinfos[6].indices[0] = _ij6[0];
13316 vinfos[6].indices[1] = _ij6[1];
13317 vinfos[6].maxsolutions = _nj6;
13318 std::vector<int> vfree(0);
13319 solutions.AddSolution(vinfos, vfree);
13327 if (bgotonextstatement)
13329 bool bgotonextstatement =
true;
13332 IkReal x633 = ((new_r01 * new_r01) + (new_r11 * new_r11));
13333 if (
IKabs(x633) == 0)
13337 IkReal x632 = pow(x633, -0.5);
13345 ((3.14159265358979) + (((-1.0) * (x634.
value))));
13346 IkReal gconst10 = ((1.0) * new_r01 * x632);
13347 IkReal gconst11 = ((-1.0) * new_r11 * x632);
13355 ((-3.14159265358979) +
13357 ((3.14159265358979) +
13358 (
IKabs(((-3.14159265358979) + (x635.
value) + j2)))),
13359 6.28318530717959)));
13360 if (
IKabs(evalcond[0]) < 0.0000050000000000)
13362 bgotonextstatement =
false;
13373 IkReal x636 = ((1.0) * (x638.
value));
13374 IkReal x637 = x632;
13377 j1 = 3.14159265358979;
13380 j2 = ((3.14159265) + (((-1.0) * x636)));
13381 IkReal gconst9 = ((3.14159265358979) + (((-1.0) * x636)));
13382 IkReal gconst10 = ((1.0) * new_r01 * x637);
13383 IkReal gconst11 = ((-1.0) * new_r11 * x637);
13384 IkReal x639 = new_r01 * new_r01;
13386 (((new_r10 * new_r11)) + ((new_r00 * new_r01)));
13387 IkReal x641 = x632;
13388 IkReal x642 = ((1.0) * new_r01 * x641);
13390 j0eval[1] = ((
IKabs((((x639 * x641)) +
13391 (((-1.0) * new_r10 * x642))))) +
13392 (
IKabs(((((-1.0) * new_r11 * x642)) +
13393 (((-1.0) * new_r00 * x642))))));
13394 j0eval[2] =
IKsign(x640);
13395 if (
IKabs(j0eval[0]) < 0.0000010000000000 ||
13396 IKabs(j0eval[1]) < 0.0000010000000000 ||
13397 IKabs(j0eval[2]) < 0.0000010000000000)
13409 IkReal x643 = ((1.0) * (x645.
value));
13410 IkReal x644 = x632;
13413 j1 = 3.14159265358979;
13416 j2 = ((3.14159265) + (((-1.0) * x643)));
13418 ((3.14159265358979) + (((-1.0) * x643)));
13419 IkReal gconst10 = ((1.0) * new_r01 * x644);
13420 IkReal gconst11 = ((-1.0) * new_r11 * x644);
13422 ((new_r01 * new_r01) + (new_r11 * new_r11));
13424 j0eval[1] =
IKsign(x646);
13425 if (
IKabs(j0eval[0]) < 0.0000010000000000 ||
13426 IKabs(j0eval[1]) < 0.0000010000000000)
13438 IkReal x647 = ((1.0) * (x649.
value));
13439 IkReal x648 = x632;
13442 j1 = 3.14159265358979;
13445 j2 = ((3.14159265) + (((-1.0) * x647)));
13447 ((3.14159265358979) + (((-1.0) * x647)));
13448 IkReal gconst10 = ((1.0) * new_r01 * x648);
13449 IkReal gconst11 = ((-1.0) * new_r11 * x648);
13450 IkReal x650 = new_r01 * new_r01;
13451 IkReal x651 = new_r11 * new_r11;
13452 IkReal x652 = ((1.0) * x650);
13459 IkReal x653 = x658.
value;
13461 ((((-1.0) * x651)) + (((-1.0) * x652))), -1);
13466 IkReal x654 = x659.
value;
13467 IkReal x655 = ((1.0) * x654);
13468 IkReal x656 = (new_r11 * x655);
13469 IkReal x657 = (new_r01 * x655);
13471 ((
IKabs(((((-1.0) * new_r01 * x656)) +
13473 (new_r01 * new_r01 * new_r01))) +
13474 (((-1.0) * new_r01 * x656 *
13475 (new_r11 * new_r11)))))) +
13476 (
IKabs((((x650 * x651 * x653)) +
13477 ((x653 * (x651 * x651))) +
13478 (((-1.0) * x652 * x653))))));
13479 if (
IKabs(j0eval[0]) < 0.0000010000000000)
13482 IkReal evalcond[3];
13483 bool bgotonextstatement =
true;
13488 if (
IKabs(evalcond[0]) < 0.0000050000000000)
13490 bgotonextstatement =
false;
13502 IkReal x660 = ((1.0) * (x661.
value));
13505 j1 = 3.14159265358979;
13508 j2 = ((3.14159265) + (((-1.0) * x660)));
13511 IkReal gconst9 = ((3.14159265358979) +
13512 (((-1.0) * x660)));
13513 IkReal x662 = new_r01 * new_r01;
13514 if (
IKabs(x662) == 0)
13519 ((1.0) * new_r01 * (pow(x662, -0.5)));
13520 IkReal gconst11 = 0;
13521 j0eval[0] = new_r10;
13522 if (
IKabs(j0eval[0]) < 0.0000010000000000)
13525 IkReal j0array[2], cj0array[2],
13527 bool j0valid[2] = {
false };
13537 ((-1.0) * new_r10 * (x663.
value));
13543 j0valid[0] = j0valid[1] =
true;
13544 j0array[0] =
IKacos(cj0array[0]);
13545 sj0array[0] =
IKsin(j0array[0]);
13546 cj0array[1] = cj0array[0];
13547 j0array[1] = -j0array[0];
13548 sj0array[1] = -sj0array[0];
13550 else if (isnan(cj0array[0]))
13558 for (
int ij0 = 0; ij0 < 2; ++ij0)
13566 for (
int iij0 = ij0 + 1; iij0 < 2;
13569 if (j0valid[iij0] &&
13570 IKabs(cj0array[ij0] -
13573 IKabs(sj0array[ij0] -
13577 j0valid[iij0] =
false;
13583 cj0 = cj0array[ij0];
13584 sj0 = sj0array[ij0];
13586 IkReal evalcond[6];
13587 IkReal x664 =
IKsin(j0);
13588 IkReal x665 =
IKcos(j0);
13589 IkReal x666 = ((-1.0) * x664);
13590 evalcond[0] = (new_r10 * x664);
13591 evalcond[1] = (new_r01 * x666);
13592 evalcond[2] = (gconst10 * x666);
13595 ((new_r10 * x665)));
13598 ((new_r01 * x665)));
13601 ((gconst10 * x665)));
13602 if (
IKabs(evalcond[0]) >
13604 IKabs(evalcond[1]) >
13606 IKabs(evalcond[2]) >
13608 IKabs(evalcond[3]) >
13610 IKabs(evalcond[4]) >
13612 IKabs(evalcond[5]) >
13624 vinfos[0].jointtype = 1;
13625 vinfos[0].foffset = j0;
13626 vinfos[0].indices[0] = _ij0[0];
13627 vinfos[0].indices[1] = _ij0[1];
13628 vinfos[0].maxsolutions = _nj0;
13629 vinfos[1].jointtype = 1;
13630 vinfos[1].foffset = j1;
13631 vinfos[1].indices[0] = _ij1[0];
13632 vinfos[1].indices[1] = _ij1[1];
13633 vinfos[1].maxsolutions = _nj1;
13634 vinfos[2].jointtype = 1;
13635 vinfos[2].foffset = j2;
13636 vinfos[2].indices[0] = _ij2[0];
13637 vinfos[2].indices[1] = _ij2[1];
13638 vinfos[2].maxsolutions = _nj2;
13639 vinfos[3].jointtype = 1;
13640 vinfos[3].foffset = j3;
13641 vinfos[3].indices[0] = _ij3[0];
13642 vinfos[3].indices[1] = _ij3[1];
13643 vinfos[3].maxsolutions = _nj3;
13644 vinfos[4].jointtype = 1;
13645 vinfos[4].foffset = j4;
13646 vinfos[4].indices[0] = _ij4[0];
13647 vinfos[4].indices[1] = _ij4[1];
13648 vinfos[4].maxsolutions = _nj4;
13649 vinfos[5].jointtype = 1;
13650 vinfos[5].foffset = j5;
13651 vinfos[5].indices[0] = _ij5[0];
13652 vinfos[5].indices[1] = _ij5[1];
13653 vinfos[5].maxsolutions = _nj5;
13654 vinfos[6].jointtype = 1;
13655 vinfos[6].foffset = j6;
13656 vinfos[6].indices[0] = _ij6[0];
13657 vinfos[6].indices[1] = _ij6[1];
13658 vinfos[6].maxsolutions = _nj6;
13659 std::vector<int> vfree(0);
13660 solutions.AddSolution(vinfos,
13669 IkReal j0array[2], cj0array[2],
13671 bool j0valid[2] = {
false };
13680 cj0array[0] = ((-1.0) * gconst10 *
13687 j0valid[0] = j0valid[1] =
true;
13688 j0array[0] =
IKacos(cj0array[0]);
13689 sj0array[0] =
IKsin(j0array[0]);
13690 cj0array[1] = cj0array[0];
13691 j0array[1] = -j0array[0];
13692 sj0array[1] = -sj0array[0];
13694 else if (isnan(cj0array[0]))
13702 for (
int ij0 = 0; ij0 < 2; ++ij0)
13710 for (
int iij0 = ij0 + 1; iij0 < 2;
13713 if (j0valid[iij0] &&
13714 IKabs(cj0array[ij0] -
13717 IKabs(sj0array[ij0] -
13721 j0valid[iij0] =
false;
13727 cj0 = cj0array[ij0];
13728 sj0 = sj0array[ij0];
13730 IkReal evalcond[6];
13731 IkReal x668 =
IKsin(j0);
13732 IkReal x669 =
IKcos(j0);
13733 IkReal x670 = (gconst10 * x669);
13734 IkReal x671 = ((-1.0) * x668);
13735 evalcond[0] = (new_r10 * x668);
13736 evalcond[1] = (new_r01 * x671);
13737 evalcond[2] = (gconst10 * x671);
13738 evalcond[3] = (x670 + new_r10);
13741 ((new_r01 * x669)));
13742 evalcond[5] = (x670 + new_r01);
13743 if (
IKabs(evalcond[0]) >
13745 IKabs(evalcond[1]) >
13747 IKabs(evalcond[2]) >
13749 IKabs(evalcond[3]) >
13751 IKabs(evalcond[4]) >
13753 IKabs(evalcond[5]) >
13765 vinfos[0].jointtype = 1;
13766 vinfos[0].foffset = j0;
13767 vinfos[0].indices[0] = _ij0[0];
13768 vinfos[0].indices[1] = _ij0[1];
13769 vinfos[0].maxsolutions = _nj0;
13770 vinfos[1].jointtype = 1;
13771 vinfos[1].foffset = j1;
13772 vinfos[1].indices[0] = _ij1[0];
13773 vinfos[1].indices[1] = _ij1[1];
13774 vinfos[1].maxsolutions = _nj1;
13775 vinfos[2].jointtype = 1;
13776 vinfos[2].foffset = j2;
13777 vinfos[2].indices[0] = _ij2[0];
13778 vinfos[2].indices[1] = _ij2[1];
13779 vinfos[2].maxsolutions = _nj2;
13780 vinfos[3].jointtype = 1;
13781 vinfos[3].foffset = j3;
13782 vinfos[3].indices[0] = _ij3[0];
13783 vinfos[3].indices[1] = _ij3[1];
13784 vinfos[3].maxsolutions = _nj3;
13785 vinfos[4].jointtype = 1;
13786 vinfos[4].foffset = j4;
13787 vinfos[4].indices[0] = _ij4[0];
13788 vinfos[4].indices[1] = _ij4[1];
13789 vinfos[4].maxsolutions = _nj4;
13790 vinfos[5].jointtype = 1;
13791 vinfos[5].foffset = j5;
13792 vinfos[5].indices[0] = _ij5[0];
13793 vinfos[5].indices[1] = _ij5[1];
13794 vinfos[5].maxsolutions = _nj5;
13795 vinfos[6].jointtype = 1;
13796 vinfos[6].foffset = j6;
13797 vinfos[6].indices[0] = _ij6[0];
13798 vinfos[6].indices[1] = _ij6[1];
13799 vinfos[6].maxsolutions = _nj6;
13800 std::vector<int> vfree(0);
13801 solutions.AddSolution(vinfos,
13810 if (bgotonextstatement)
13812 bool bgotonextstatement =
true;
13817 evalcond[1] = gconst10;
13818 evalcond[2] = gconst11;
13819 if (
IKabs(evalcond[0]) <
13820 0.0000050000000000 &&
13821 IKabs(evalcond[1]) <
13822 0.0000050000000000 &&
13823 IKabs(evalcond[2]) < 0.0000050000000000)
13825 bgotonextstatement =
false;
13837 IkReal x672 = ((1.0) * (x673.
value));
13840 j1 = 3.14159265358979;
13843 j2 = ((3.14159265) + (((-1.0) * x672)));
13848 IkReal gconst9 = ((3.14159265358979) +
13849 (((-1.0) * x672)));
13850 IkReal gconst10 = ((1.0) * new_r01);
13851 IkReal gconst11 = ((-1.0) * new_r11);
13856 (((-1.0) * (new_r01 *
13859 ((1.0) * new_r01 * new_r11))));
13860 if (
IKabs(j0eval[0]) <
13861 0.0000010000000000 ||
13863 0.0000010000000000 ||
13865 0.0000010000000000)
13879 ((1.0) * (x675.
value));
13882 j1 = 3.14159265358979;
13885 j2 = ((3.14159265) +
13886 (((-1.0) * x674)));
13892 ((3.14159265358979) +
13893 (((-1.0) * x674)));
13894 IkReal gconst10 = ((1.0) * new_r01);
13896 ((-1.0) * new_r11);
13900 ((
IKabs(((-1.0) + (new_r01 *
13902 (
IKabs(((1.0) * new_r01 *
13904 if (
IKabs(j0eval[0]) <
13905 0.0000010000000000 ||
13907 0.0000010000000000 ||
13909 0.0000010000000000)
13923 ((1.0) * (x677.
value));
13926 j1 = 3.14159265358979;
13929 j2 = ((3.14159265) +
13930 (((-1.0) * x676)));
13936 ((3.14159265358979) +
13937 (((-1.0) * x676)));
13941 ((-1.0) * new_r11);
13945 ((
IKabs(((2.0) * new_r01 *
13951 if (
IKabs(j0eval[0]) <
13952 0.0000010000000000 ||
13954 0.0000010000000000 ||
13956 0.0000010000000000)
13966 bool j0valid[1] = {
false };
14002 ((-1.5707963267949) +
14004 (((1.5707963267949) *
14010 if (j0array[0] >
IKPI)
14012 j0array[0] -=
IK2PI;
14014 else if (j0array[0] < -
IKPI)
14016 j0array[0] +=
IK2PI;
14019 for (
int ij0 = 0; ij0 < 1;
14028 for (
int iij0 = ij0 + 1;
14032 if (j0valid[iij0] &&
14044 j0valid[iij0] =
false;
14050 cj0 = cj0array[ij0];
14051 sj0 = sj0array[ij0];
14053 IkReal evalcond[6];
14054 IkReal x681 =
IKsin(j0);
14055 IkReal x682 =
IKcos(j0);
14067 ((((-1.0) * x687)) +
14086 ((((-1.0) * x685)) +
14087 (((-1.0) * x684)));
14089 ((((-1.0) * x687)) +
14091 if (
IKabs(evalcond[0]) >
14093 IKabs(evalcond[1]) >
14095 IKabs(evalcond[2]) >
14097 IKabs(evalcond[3]) >
14099 IKabs(evalcond[4]) >
14101 IKabs(evalcond[5]) >
14113 vinfos[0].jointtype = 1;
14114 vinfos[0].foffset = j0;
14115 vinfos[0].indices[0] =
14117 vinfos[0].indices[1] =
14119 vinfos[0].maxsolutions =
14121 vinfos[1].jointtype = 1;
14122 vinfos[1].foffset = j1;
14123 vinfos[1].indices[0] =
14125 vinfos[1].indices[1] =
14127 vinfos[1].maxsolutions =
14129 vinfos[2].jointtype = 1;
14130 vinfos[2].foffset = j2;
14131 vinfos[2].indices[0] =
14133 vinfos[2].indices[1] =
14135 vinfos[2].maxsolutions =
14137 vinfos[3].jointtype = 1;
14138 vinfos[3].foffset = j3;
14139 vinfos[3].indices[0] =
14141 vinfos[3].indices[1] =
14143 vinfos[3].maxsolutions =
14145 vinfos[4].jointtype = 1;
14146 vinfos[4].foffset = j4;
14147 vinfos[4].indices[0] =
14149 vinfos[4].indices[1] =
14151 vinfos[4].maxsolutions =
14153 vinfos[5].jointtype = 1;
14154 vinfos[5].foffset = j5;
14155 vinfos[5].indices[0] =
14157 vinfos[5].indices[1] =
14159 vinfos[5].maxsolutions =
14161 vinfos[6].jointtype = 1;
14162 vinfos[6].foffset = j6;
14163 vinfos[6].indices[0] =
14165 vinfos[6].indices[1] =
14167 vinfos[6].maxsolutions =
14169 std::vector<int> vfree(
14171 solutions.AddSolution(
14182 IkReal j0array[1], cj0array[1],
14184 bool j0valid[1] = {
false };
14212 ((-1.5707963267949) +
14213 (((1.5707963267949) *
14216 sj0array[0] =
IKsin(j0array[0]);
14217 cj0array[0] =
IKcos(j0array[0]);
14218 if (j0array[0] >
IKPI)
14220 j0array[0] -=
IK2PI;
14222 else if (j0array[0] < -
IKPI)
14224 j0array[0] +=
IK2PI;
14227 for (
int ij0 = 0; ij0 < 1;
14236 for (
int iij0 = ij0 + 1;
14240 if (j0valid[iij0] &&
14241 IKabs(cj0array[ij0] -
14244 IKabs(sj0array[ij0] -
14248 j0valid[iij0] =
false;
14254 cj0 = cj0array[ij0];
14255 sj0 = sj0array[ij0];
14257 IkReal evalcond[6];
14258 IkReal x690 =
IKsin(j0);
14259 IkReal x691 =
IKcos(j0);
14272 (((-1.0) * x696)));
14275 ((new_r11 * x690)) +
14276 ((new_r01 * x691)));
14278 (x694 + x693 + new_r11);
14280 ((((-1.0) * new_r01 *
14283 ((new_r11 * x691)));
14285 ((((-1.0) * x693)) +
14286 (((-1.0) * x694)));
14289 (((-1.0) * x696)) +
14291 if (
IKabs(evalcond[0]) >
14293 IKabs(evalcond[1]) >
14295 IKabs(evalcond[2]) >
14297 IKabs(evalcond[3]) >
14299 IKabs(evalcond[4]) >
14301 IKabs(evalcond[5]) >
14313 vinfos[0].jointtype = 1;
14314 vinfos[0].foffset = j0;
14315 vinfos[0].indices[0] =
14317 vinfos[0].indices[1] =
14319 vinfos[0].maxsolutions =
14321 vinfos[1].jointtype = 1;
14322 vinfos[1].foffset = j1;
14323 vinfos[1].indices[0] =
14325 vinfos[1].indices[1] =
14327 vinfos[1].maxsolutions =
14329 vinfos[2].jointtype = 1;
14330 vinfos[2].foffset = j2;
14331 vinfos[2].indices[0] =
14333 vinfos[2].indices[1] =
14335 vinfos[2].maxsolutions =
14337 vinfos[3].jointtype = 1;
14338 vinfos[3].foffset = j3;
14339 vinfos[3].indices[0] =
14341 vinfos[3].indices[1] =
14343 vinfos[3].maxsolutions =
14345 vinfos[4].jointtype = 1;
14346 vinfos[4].foffset = j4;
14347 vinfos[4].indices[0] =
14349 vinfos[4].indices[1] =
14351 vinfos[4].maxsolutions =
14353 vinfos[5].jointtype = 1;
14354 vinfos[5].foffset = j5;
14355 vinfos[5].indices[0] =
14357 vinfos[5].indices[1] =
14359 vinfos[5].maxsolutions =
14361 vinfos[6].jointtype = 1;
14362 vinfos[6].foffset = j6;
14363 vinfos[6].indices[0] =
14365 vinfos[6].indices[1] =
14367 vinfos[6].maxsolutions =
14369 std::vector<int> vfree(0);
14370 solutions.AddSolution(
14381 IkReal j0array[1], cj0array[1],
14383 bool j0valid[1] = {
false };
14388 ((gconst10 * new_r01)) +
14389 (((-1.0) * gconst11 *
14399 (gconst10 * gconst11)),
14400 IkReal(gconst11 * gconst11),
14406 j0array[0] = ((-1.5707963267949) +
14407 (((1.5707963267949) *
14410 sj0array[0] =
IKsin(j0array[0]);
14411 cj0array[0] =
IKcos(j0array[0]);
14412 if (j0array[0] >
IKPI)
14414 j0array[0] -=
IK2PI;
14416 else if (j0array[0] < -
IKPI)
14418 j0array[0] +=
IK2PI;
14421 for (
int ij0 = 0; ij0 < 1; ++ij0)
14429 for (
int iij0 = ij0 + 1; iij0 < 1;
14432 if (j0valid[iij0] &&
14433 IKabs(cj0array[ij0] -
14436 IKabs(sj0array[ij0] -
14440 j0valid[iij0] =
false;
14446 cj0 = cj0array[ij0];
14447 sj0 = sj0array[ij0];
14449 IkReal evalcond[6];
14450 IkReal x699 =
IKsin(j0);
14451 IkReal x700 =
IKcos(j0);
14452 IkReal x701 = (gconst10 * x700);
14453 IkReal x702 = (gconst11 * x700);
14454 IkReal x703 = (gconst10 * x699);
14455 IkReal x704 = ((1.0) * x699);
14456 IkReal x705 = (gconst11 * x704);
14458 ((((-1.0) * x705)) + x701);
14460 (((new_r01 * x700)) +
14462 ((new_r11 * x699)));
14464 (x702 + x703 + new_r11);
14467 ((new_r11 * x700)) +
14468 (((-1.0) * new_r01 *
14471 ((((-1.0) * x702)) +
14472 (((-1.0) * x703)));
14474 ((((-1.0) * x705)) + x701 +
14476 if (
IKabs(evalcond[0]) >
14478 IKabs(evalcond[1]) >
14480 IKabs(evalcond[2]) >
14482 IKabs(evalcond[3]) >
14484 IKabs(evalcond[4]) >
14486 IKabs(evalcond[5]) >
14498 vinfos[0].jointtype = 1;
14499 vinfos[0].foffset = j0;
14500 vinfos[0].indices[0] = _ij0[0];
14501 vinfos[0].indices[1] = _ij0[1];
14502 vinfos[0].maxsolutions = _nj0;
14503 vinfos[1].jointtype = 1;
14504 vinfos[1].foffset = j1;
14505 vinfos[1].indices[0] = _ij1[0];
14506 vinfos[1].indices[1] = _ij1[1];
14507 vinfos[1].maxsolutions = _nj1;
14508 vinfos[2].jointtype = 1;
14509 vinfos[2].foffset = j2;
14510 vinfos[2].indices[0] = _ij2[0];
14511 vinfos[2].indices[1] = _ij2[1];
14512 vinfos[2].maxsolutions = _nj2;
14513 vinfos[3].jointtype = 1;
14514 vinfos[3].foffset = j3;
14515 vinfos[3].indices[0] = _ij3[0];
14516 vinfos[3].indices[1] = _ij3[1];
14517 vinfos[3].maxsolutions = _nj3;
14518 vinfos[4].jointtype = 1;
14519 vinfos[4].foffset = j4;
14520 vinfos[4].indices[0] = _ij4[0];
14521 vinfos[4].indices[1] = _ij4[1];
14522 vinfos[4].maxsolutions = _nj4;
14523 vinfos[5].jointtype = 1;
14524 vinfos[5].foffset = j5;
14525 vinfos[5].indices[0] = _ij5[0];
14526 vinfos[5].indices[1] = _ij5[1];
14527 vinfos[5].maxsolutions = _nj5;
14528 vinfos[6].jointtype = 1;
14529 vinfos[6].foffset = j6;
14530 vinfos[6].indices[0] = _ij6[0];
14531 vinfos[6].indices[1] = _ij6[1];
14532 vinfos[6].maxsolutions = _nj6;
14533 std::vector<int> vfree(0);
14534 solutions.AddSolution(vinfos,
14543 if (bgotonextstatement)
14545 bool bgotonextstatement =
true;
14550 if (
IKabs(evalcond[0]) <
14551 0.0000050000000000)
14553 bgotonextstatement =
false;
14555 IkReal j0array[2], cj0array[2],
14557 bool j0valid[2] = {
false };
14567 (new_r00 * (x706.
value));
14573 j0valid[0] = j0valid[1] =
true;
14574 j0array[0] =
IKacos(cj0array[0]);
14575 sj0array[0] =
IKsin(j0array[0]);
14576 cj0array[1] = cj0array[0];
14577 j0array[1] = -j0array[0];
14578 sj0array[1] = -sj0array[0];
14580 else if (isnan(cj0array[0]))
14588 for (
int ij0 = 0; ij0 < 2; ++ij0)
14596 for (
int iij0 = ij0 + 1; iij0 < 2;
14599 if (j0valid[iij0] &&
14600 IKabs(cj0array[ij0] -
14603 IKabs(sj0array[ij0] -
14607 j0valid[iij0] =
false;
14613 cj0 = cj0array[ij0];
14614 sj0 = sj0array[ij0];
14616 IkReal evalcond[6];
14617 IkReal x707 =
IKsin(j0);
14618 IkReal x708 =
IKcos(j0);
14619 IkReal x709 = ((-1.0) * x707);
14620 evalcond[0] = (new_r11 * x707);
14621 evalcond[1] = (new_r00 * x709);
14622 evalcond[2] = (gconst11 * x709);
14625 ((new_r11 * x708)));
14628 ((gconst11 * x708)));
14630 (((new_r00 * x708)) +
14631 (((-1.0) * gconst11)));
14632 if (
IKabs(evalcond[0]) >
14634 IKabs(evalcond[1]) >
14636 IKabs(evalcond[2]) >
14638 IKabs(evalcond[3]) >
14640 IKabs(evalcond[4]) >
14642 IKabs(evalcond[5]) >
14654 vinfos[0].jointtype = 1;
14655 vinfos[0].foffset = j0;
14656 vinfos[0].indices[0] = _ij0[0];
14657 vinfos[0].indices[1] = _ij0[1];
14658 vinfos[0].maxsolutions = _nj0;
14659 vinfos[1].jointtype = 1;
14660 vinfos[1].foffset = j1;
14661 vinfos[1].indices[0] = _ij1[0];
14662 vinfos[1].indices[1] = _ij1[1];
14663 vinfos[1].maxsolutions = _nj1;
14664 vinfos[2].jointtype = 1;
14665 vinfos[2].foffset = j2;
14666 vinfos[2].indices[0] = _ij2[0];
14667 vinfos[2].indices[1] = _ij2[1];
14668 vinfos[2].maxsolutions = _nj2;
14669 vinfos[3].jointtype = 1;
14670 vinfos[3].foffset = j3;
14671 vinfos[3].indices[0] = _ij3[0];
14672 vinfos[3].indices[1] = _ij3[1];
14673 vinfos[3].maxsolutions = _nj3;
14674 vinfos[4].jointtype = 1;
14675 vinfos[4].foffset = j4;
14676 vinfos[4].indices[0] = _ij4[0];
14677 vinfos[4].indices[1] = _ij4[1];
14678 vinfos[4].maxsolutions = _nj4;
14679 vinfos[5].jointtype = 1;
14680 vinfos[5].foffset = j5;
14681 vinfos[5].indices[0] = _ij5[0];
14682 vinfos[5].indices[1] = _ij5[1];
14683 vinfos[5].maxsolutions = _nj5;
14684 vinfos[6].jointtype = 1;
14685 vinfos[6].foffset = j6;
14686 vinfos[6].indices[0] = _ij6[0];
14687 vinfos[6].indices[1] = _ij6[1];
14688 vinfos[6].maxsolutions = _nj6;
14689 std::vector<int> vfree(0);
14690 solutions.AddSolution(vinfos,
14697 if (bgotonextstatement)
14699 bool bgotonextstatement =
true;
14702 evalcond[0] = ((
IKabs(new_r00)) +
14704 if (
IKabs(evalcond[0]) <
14705 0.0000050000000000)
14707 bgotonextstatement =
false;
14720 ((1.0) * (x711.
value));
14723 j1 = 3.14159265358979;
14726 j2 = ((3.14159265) +
14727 (((-1.0) * x710)));
14733 ((3.14159265358979) +
14734 (((-1.0) * x710)));
14735 IkReal gconst10 = 0;
14739 (new_r10 * new_r10))));
14740 if (
IKabs(x712) == 0)
14745 ((-1.0) * new_r11 *
14746 (pow(x712, -0.5)));
14747 j0eval[0] = ((
IKabs(new_r11)) +
14749 if (
IKabs(j0eval[0]) <
14750 0.0000010000000000)
14764 ((1.0) * (x714.
value));
14767 j1 = 3.14159265358979;
14770 j2 = ((3.14159265) +
14771 (((-1.0) * x713)));
14777 ((3.14159265358979) +
14778 (((-1.0) * x713)));
14779 IkReal gconst10 = 0;
14783 (new_r10 * new_r10))));
14784 if (
IKabs(x715) == 0)
14789 ((-1.0) * new_r11 *
14790 (pow(x715, -0.5)));
14791 j0eval[0] = new_r11;
14792 if (
IKabs(j0eval[0]) <
14793 0.0000010000000000)
14807 ((1.0) * (x717.
value));
14810 j1 = 3.14159265358979;
14813 j2 = ((3.14159265) +
14814 (((-1.0) * x716)));
14820 ((3.14159265358979) +
14821 (((-1.0) * x716)));
14822 IkReal gconst10 = 0;
14824 ((1.0) + (((-1.0) *
14827 if (
IKabs(x718) == 0)
14832 ((-1.0) * new_r11 *
14833 (pow(x718, -0.5)));
14834 j0eval[0] = new_r10;
14835 j0eval[1] = new_r11;
14836 if (
IKabs(j0eval[0]) <
14837 0.0000010000000000 ||
14839 0.0000010000000000)
14850 bool j0valid[1] = {
14891 ((-1.0) * gconst11 *
14897 if (j0array[0] >
IKPI)
14899 j0array[0] -=
IK2PI;
14901 else if (j0array[0] <
14904 j0array[0] +=
IK2PI;
14922 if (j0valid[iij0] &&
14943 cj0 = cj0array[ij0];
14944 sj0 = sj0array[ij0];
14946 IkReal evalcond[8];
15021 vinfos[0].foffset =
15034 vinfos[1].foffset =
15047 vinfos[2].foffset =
15060 vinfos[3].foffset =
15073 vinfos[4].foffset =
15086 vinfos[5].foffset =
15099 vinfos[6].foffset =
15128 bool j0valid[1] = {
false };
15144 if (
IKabs((new_r10 *
15148 ((-1.0) * gconst11 *
15165 ((-1.0) * gconst11 *
15171 if (j0array[0] >
IKPI)
15173 j0array[0] -=
IK2PI;
15175 else if (j0array[0] < -
IKPI)
15177 j0array[0] +=
IK2PI;
15180 for (
int ij0 = 0; ij0 < 1;
15189 for (
int iij0 = ij0 + 1;
15193 if (j0valid[iij0] &&
15205 j0valid[iij0] =
false;
15211 cj0 = cj0array[ij0];
15212 sj0 = sj0array[ij0];
15214 IkReal evalcond[8];
15215 IkReal x727 =
IKcos(j0);
15216 IkReal x728 =
IKsin(j0);
15218 ((1.0) * gconst11);
15220 ((-1.0) * gconst11);
15242 ((((-1.0) * x729)) +
15245 if (
IKabs(evalcond[0]) >
15247 IKabs(evalcond[1]) >
15249 IKabs(evalcond[2]) >
15251 IKabs(evalcond[3]) >
15253 IKabs(evalcond[4]) >
15255 IKabs(evalcond[5]) >
15257 IKabs(evalcond[6]) >
15259 IKabs(evalcond[7]) >
15271 vinfos[0].jointtype = 1;
15272 vinfos[0].foffset = j0;
15273 vinfos[0].indices[0] =
15275 vinfos[0].indices[1] =
15277 vinfos[0].maxsolutions =
15279 vinfos[1].jointtype = 1;
15280 vinfos[1].foffset = j1;
15281 vinfos[1].indices[0] =
15283 vinfos[1].indices[1] =
15285 vinfos[1].maxsolutions =
15287 vinfos[2].jointtype = 1;
15288 vinfos[2].foffset = j2;
15289 vinfos[2].indices[0] =
15291 vinfos[2].indices[1] =
15293 vinfos[2].maxsolutions =
15295 vinfos[3].jointtype = 1;
15296 vinfos[3].foffset = j3;
15297 vinfos[3].indices[0] =
15299 vinfos[3].indices[1] =
15301 vinfos[3].maxsolutions =
15303 vinfos[4].jointtype = 1;
15304 vinfos[4].foffset = j4;
15305 vinfos[4].indices[0] =
15307 vinfos[4].indices[1] =
15309 vinfos[4].maxsolutions =
15311 vinfos[5].jointtype = 1;
15312 vinfos[5].foffset = j5;
15313 vinfos[5].indices[0] =
15315 vinfos[5].indices[1] =
15317 vinfos[5].maxsolutions =
15319 vinfos[6].jointtype = 1;
15320 vinfos[6].foffset = j6;
15321 vinfos[6].indices[0] =
15323 vinfos[6].indices[1] =
15325 vinfos[6].maxsolutions =
15327 std::vector<int> vfree(
15329 solutions.AddSolution(
15340 IkReal j0array[1], cj0array[1],
15342 bool j0valid[1] = {
false };
15355 ((-1.0) * new_r11)),
15362 ((-1.5707963267949) +
15363 (((1.5707963267949) *
15366 sj0array[0] =
IKsin(j0array[0]);
15367 cj0array[0] =
IKcos(j0array[0]);
15368 if (j0array[0] >
IKPI)
15370 j0array[0] -=
IK2PI;
15372 else if (j0array[0] < -
IKPI)
15374 j0array[0] +=
IK2PI;
15377 for (
int ij0 = 0; ij0 < 1;
15386 for (
int iij0 = ij0 + 1;
15390 if (j0valid[iij0] &&
15391 IKabs(cj0array[ij0] -
15394 IKabs(sj0array[ij0] -
15398 j0valid[iij0] =
false;
15404 cj0 = cj0array[ij0];
15405 sj0 = sj0array[ij0];
15407 IkReal evalcond[8];
15408 IkReal x733 =
IKcos(j0);
15409 IkReal x734 =
IKsin(j0);
15411 ((1.0) * gconst11);
15413 ((-1.0) * gconst11);
15418 evalcond[2] = (x733 * x736);
15419 evalcond[3] = (x734 * x736);
15422 ((new_r11 * x733)));
15425 ((gconst11 * x733)));
15431 ((((-1.0) * x735)) +
15432 ((new_r10 * x734)));
15433 if (
IKabs(evalcond[0]) >
15435 IKabs(evalcond[1]) >
15437 IKabs(evalcond[2]) >
15439 IKabs(evalcond[3]) >
15441 IKabs(evalcond[4]) >
15443 IKabs(evalcond[5]) >
15445 IKabs(evalcond[6]) >
15447 IKabs(evalcond[7]) >
15459 vinfos[0].jointtype = 1;
15460 vinfos[0].foffset = j0;
15461 vinfos[0].indices[0] =
15463 vinfos[0].indices[1] =
15465 vinfos[0].maxsolutions =
15467 vinfos[1].jointtype = 1;
15468 vinfos[1].foffset = j1;
15469 vinfos[1].indices[0] =
15471 vinfos[1].indices[1] =
15473 vinfos[1].maxsolutions =
15475 vinfos[2].jointtype = 1;
15476 vinfos[2].foffset = j2;
15477 vinfos[2].indices[0] =
15479 vinfos[2].indices[1] =
15481 vinfos[2].maxsolutions =
15483 vinfos[3].jointtype = 1;
15484 vinfos[3].foffset = j3;
15485 vinfos[3].indices[0] =
15487 vinfos[3].indices[1] =
15489 vinfos[3].maxsolutions =
15491 vinfos[4].jointtype = 1;
15492 vinfos[4].foffset = j4;
15493 vinfos[4].indices[0] =
15495 vinfos[4].indices[1] =
15497 vinfos[4].maxsolutions =
15499 vinfos[5].jointtype = 1;
15500 vinfos[5].foffset = j5;
15501 vinfos[5].indices[0] =
15503 vinfos[5].indices[1] =
15505 vinfos[5].maxsolutions =
15507 vinfos[6].jointtype = 1;
15508 vinfos[6].foffset = j6;
15509 vinfos[6].indices[0] =
15511 vinfos[6].indices[1] =
15513 vinfos[6].maxsolutions =
15515 std::vector<int> vfree(0);
15516 solutions.AddSolution(
15525 if (bgotonextstatement)
15527 bool bgotonextstatement =
true;
15530 evalcond[0] =
IKabs(new_r01);
15531 if (
IKabs(evalcond[0]) <
15532 0.0000050000000000)
15534 bgotonextstatement =
false;
15547 ((1.0) * (x738.
value));
15550 j1 = 3.14159265358979;
15553 j2 = ((3.14159265) +
15554 (((-1.0) * x737)));
15557 ((3.14159265358979) +
15558 (((-1.0) * x737)));
15559 IkReal gconst10 = 0;
15560 IkReal x739 = new_r11 * new_r11;
15561 if (
IKabs(x739) == 0)
15566 ((-1.0) * new_r11 *
15567 (pow(x739, -0.5)));
15568 j0eval[0] = ((
IKabs(new_r10)) +
15570 if (
IKabs(j0eval[0]) <
15571 0.0000010000000000)
15585 ((1.0) * (x741.
value));
15588 j1 = 3.14159265358979;
15591 j2 = ((3.14159265) +
15592 (((-1.0) * x740)));
15595 ((3.14159265358979) +
15596 (((-1.0) * x740)));
15597 IkReal gconst10 = 0;
15600 if (
IKabs(x742) == 0)
15605 ((-1.0) * new_r11 *
15606 (pow(x742, -0.5)));
15608 ((
IKabs(new_r11)) +
15610 if (
IKabs(j0eval[0]) <
15611 0.0000010000000000)
15629 j1 = 3.14159265358979;
15632 j2 = ((3.14159265) +
15633 (((-1.0) * x743)));
15636 ((3.14159265358979) +
15637 (((-1.0) * x743)));
15638 IkReal gconst10 = 0;
15641 if (
IKabs(x745) == 0)
15646 ((-1.0) * new_r11 *
15647 (pow(x745, -0.5)));
15648 j0eval[0] = new_r11;
15649 if (
IKabs(j0eval[0]) <
15650 0.0000010000000000)
15661 bool j0valid[1] = {
15709 if (j0array[0] >
IKPI)
15711 j0array[0] -=
IK2PI;
15713 else if (j0array[0] <
15716 j0array[0] +=
IK2PI;
15756 cj0 = cj0array[ij0];
15757 sj0 = sj0array[ij0];
15963 bool j0valid[1] = {
15986 ((-1.5707963267949) +
15987 (((1.5707963267949) *
15994 if (j0array[0] >
IKPI)
15996 j0array[0] -=
IK2PI;
15998 else if (j0array[0] <
16001 j0array[0] +=
IK2PI;
16004 for (
int ij0 = 0; ij0 < 1;
16013 for (
int iij0 = ij0 + 1;
16017 if (j0valid[iij0] &&
16038 cj0 = cj0array[ij0];
16039 sj0 = sj0array[ij0];
16041 IkReal evalcond[8];
16115 vinfos[0].jointtype =
16117 vinfos[0].foffset =
16119 vinfos[0].indices[0] =
16121 vinfos[0].indices[1] =
16126 vinfos[1].jointtype =
16128 vinfos[1].foffset =
16130 vinfos[1].indices[0] =
16132 vinfos[1].indices[1] =
16137 vinfos[2].jointtype =
16139 vinfos[2].foffset =
16141 vinfos[2].indices[0] =
16143 vinfos[2].indices[1] =
16148 vinfos[3].jointtype =
16150 vinfos[3].foffset =
16152 vinfos[3].indices[0] =
16154 vinfos[3].indices[1] =
16159 vinfos[4].jointtype =
16161 vinfos[4].foffset =
16163 vinfos[4].indices[0] =
16165 vinfos[4].indices[1] =
16170 vinfos[5].jointtype =
16172 vinfos[5].foffset =
16174 vinfos[5].indices[0] =
16176 vinfos[5].indices[1] =
16181 vinfos[6].jointtype =
16183 vinfos[6].foffset =
16185 vinfos[6].indices[0] =
16187 vinfos[6].indices[1] =
16194 solutions.AddSolution(
16206 cj0array[1], sj0array[1];
16207 bool j0valid[1] = {
false };
16226 ((-1.5707963267949) +
16227 (((1.5707963267949) *
16234 if (j0array[0] >
IKPI)
16236 j0array[0] -=
IK2PI;
16238 else if (j0array[0] < -
IKPI)
16240 j0array[0] +=
IK2PI;
16243 for (
int ij0 = 0; ij0 < 1;
16252 for (
int iij0 = ij0 + 1;
16256 if (j0valid[iij0] &&
16266 j0valid[iij0] =
false;
16272 cj0 = cj0array[ij0];
16273 sj0 = sj0array[ij0];
16275 IkReal evalcond[8];
16276 IkReal x760 =
IKsin(j0);
16277 IkReal x761 =
IKcos(j0);
16287 (((new_r11 * x761)) +
16292 ((((-1.0) * x762)) +
16295 ((((-1.0) * x763)) +
16298 (((new_r10 * x761)) +
16299 (((-1.0) * new_r00 *
16302 (((new_r10 * x760)) +
16303 ((new_r00 * x761)) +
16306 if (
IKabs(evalcond[0]) >
16308 IKabs(evalcond[1]) >
16310 IKabs(evalcond[2]) >
16312 IKabs(evalcond[3]) >
16314 IKabs(evalcond[4]) >
16316 IKabs(evalcond[5]) >
16318 IKabs(evalcond[6]) >
16320 IKabs(evalcond[7]) >
16332 vinfos[0].jointtype = 1;
16333 vinfos[0].foffset = j0;
16334 vinfos[0].indices[0] =
16336 vinfos[0].indices[1] =
16338 vinfos[0].maxsolutions =
16340 vinfos[1].jointtype = 1;
16341 vinfos[1].foffset = j1;
16342 vinfos[1].indices[0] =
16344 vinfos[1].indices[1] =
16346 vinfos[1].maxsolutions =
16348 vinfos[2].jointtype = 1;
16349 vinfos[2].foffset = j2;
16350 vinfos[2].indices[0] =
16352 vinfos[2].indices[1] =
16354 vinfos[2].maxsolutions =
16356 vinfos[3].jointtype = 1;
16357 vinfos[3].foffset = j3;
16358 vinfos[3].indices[0] =
16360 vinfos[3].indices[1] =
16362 vinfos[3].maxsolutions =
16364 vinfos[4].jointtype = 1;
16365 vinfos[4].foffset = j4;
16366 vinfos[4].indices[0] =
16368 vinfos[4].indices[1] =
16370 vinfos[4].maxsolutions =
16372 vinfos[5].jointtype = 1;
16373 vinfos[5].foffset = j5;
16374 vinfos[5].indices[0] =
16376 vinfos[5].indices[1] =
16378 vinfos[5].maxsolutions =
16380 vinfos[6].jointtype = 1;
16381 vinfos[6].foffset = j6;
16382 vinfos[6].indices[0] =
16384 vinfos[6].indices[1] =
16386 vinfos[6].maxsolutions =
16388 std::vector<int> vfree(0);
16389 solutions.AddSolution(
16398 if (bgotonextstatement)
16400 bool bgotonextstatement =
true;
16405 bgotonextstatement =
false;
16409 if (bgotonextstatement)
16422 IkReal j0array[1], cj0array[1], sj0array[1];
16423 bool j0valid[1] = {
false };
16425 IkReal x764 = ((1.0) * new_r11);
16427 IKsign(((((-1.0) * gconst11 * x764)) +
16428 ((gconst10 * new_r01)))),
16435 IkReal((((gconst10 * gconst11)) +
16436 (((-1.0) * new_r01 * x764)))),
16438 ((new_r11 * new_r11) +
16439 (((-1.0) * (gconst10 * gconst10))))),
16446 ((-1.5707963267949) +
16447 (((1.5707963267949) * (x765.
value))) +
16449 sj0array[0] =
IKsin(j0array[0]);
16450 cj0array[0] =
IKcos(j0array[0]);
16451 if (j0array[0] >
IKPI)
16453 j0array[0] -=
IK2PI;
16455 else if (j0array[0] < -
IKPI)
16457 j0array[0] +=
IK2PI;
16460 for (
int ij0 = 0; ij0 < 1; ++ij0)
16468 for (
int iij0 = ij0 + 1; iij0 < 1; ++iij0)
16470 if (j0valid[iij0] &&
16471 IKabs(cj0array[ij0] - cj0array[iij0]) <
16473 IKabs(sj0array[ij0] - sj0array[iij0]) <
16476 j0valid[iij0] =
false;
16482 cj0 = cj0array[ij0];
16483 sj0 = sj0array[ij0];
16485 IkReal evalcond[8];
16486 IkReal x767 =
IKcos(j0);
16487 IkReal x768 =
IKsin(j0);
16488 IkReal x769 = (gconst10 * x767);
16489 IkReal x770 = (gconst11 * x767);
16490 IkReal x771 = ((1.0) * x768);
16491 IkReal x772 = (gconst11 * x771);
16493 (((new_r11 * x768)) + gconst10 +
16494 ((new_r01 * x767)));
16496 (((gconst10 * x768)) + x770 + new_r11);
16497 evalcond[2] = (((new_r10 * x767)) +
16498 (((-1.0) * new_r00 * x771)) +
16500 evalcond[3] = (((new_r11 * x767)) +
16501 (((-1.0) * new_r01 * x771)) +
16504 (x769 + (((-1.0) * x772)) + new_r10);
16506 (x769 + (((-1.0) * x772)) + new_r01);
16507 evalcond[6] = (((new_r10 * x768)) +
16508 ((new_r00 * x767)) +
16509 (((-1.0) * gconst11)));
16511 ((((-1.0) * gconst10 * x771)) +
16512 new_r00 + (((-1.0) * x770)));
16513 if (
IKabs(evalcond[0]) >
16515 IKabs(evalcond[1]) >
16517 IKabs(evalcond[2]) >
16519 IKabs(evalcond[3]) >
16521 IKabs(evalcond[4]) >
16523 IKabs(evalcond[5]) >
16525 IKabs(evalcond[6]) >
16527 IKabs(evalcond[7]) >
16538 vinfos[0].jointtype = 1;
16539 vinfos[0].foffset = j0;
16540 vinfos[0].indices[0] = _ij0[0];
16541 vinfos[0].indices[1] = _ij0[1];
16542 vinfos[0].maxsolutions = _nj0;
16543 vinfos[1].jointtype = 1;
16544 vinfos[1].foffset = j1;
16545 vinfos[1].indices[0] = _ij1[0];
16546 vinfos[1].indices[1] = _ij1[1];
16547 vinfos[1].maxsolutions = _nj1;
16548 vinfos[2].jointtype = 1;
16549 vinfos[2].foffset = j2;
16550 vinfos[2].indices[0] = _ij2[0];
16551 vinfos[2].indices[1] = _ij2[1];
16552 vinfos[2].maxsolutions = _nj2;
16553 vinfos[3].jointtype = 1;
16554 vinfos[3].foffset = j3;
16555 vinfos[3].indices[0] = _ij3[0];
16556 vinfos[3].indices[1] = _ij3[1];
16557 vinfos[3].maxsolutions = _nj3;
16558 vinfos[4].jointtype = 1;
16559 vinfos[4].foffset = j4;
16560 vinfos[4].indices[0] = _ij4[0];
16561 vinfos[4].indices[1] = _ij4[1];
16562 vinfos[4].maxsolutions = _nj4;
16563 vinfos[5].jointtype = 1;
16564 vinfos[5].foffset = j5;
16565 vinfos[5].indices[0] = _ij5[0];
16566 vinfos[5].indices[1] = _ij5[1];
16567 vinfos[5].maxsolutions = _nj5;
16568 vinfos[6].jointtype = 1;
16569 vinfos[6].foffset = j6;
16570 vinfos[6].indices[0] = _ij6[0];
16571 vinfos[6].indices[1] = _ij6[1];
16572 vinfos[6].maxsolutions = _nj6;
16573 std::vector<int> vfree(0);
16574 solutions.AddSolution(vinfos, vfree);
16584 IkReal j0array[1], cj0array[1], sj0array[1];
16585 bool j0valid[1] = {
false };
16587 IkReal x773 = ((1.0) * new_r11);
16589 IKsign(((new_r01 * new_r01) +
16590 (new_r11 * new_r11))),
16597 IkReal((((gconst11 * new_r01)) +
16598 (((-1.0) * gconst10 * x773)))),
16599 IkReal(((((-1.0) * gconst10 * new_r01)) +
16600 (((-1.0) * gconst11 * x773)))),
16606 j0array[0] = ((-1.5707963267949) +
16607 (((1.5707963267949) * (x774.
value))) +
16609 sj0array[0] =
IKsin(j0array[0]);
16610 cj0array[0] =
IKcos(j0array[0]);
16611 if (j0array[0] >
IKPI)
16613 j0array[0] -=
IK2PI;
16615 else if (j0array[0] < -
IKPI)
16617 j0array[0] +=
IK2PI;
16620 for (
int ij0 = 0; ij0 < 1; ++ij0)
16628 for (
int iij0 = ij0 + 1; iij0 < 1; ++iij0)
16630 if (j0valid[iij0] &&
16631 IKabs(cj0array[ij0] - cj0array[iij0]) <
16633 IKabs(sj0array[ij0] - sj0array[iij0]) <
16636 j0valid[iij0] =
false;
16642 cj0 = cj0array[ij0];
16643 sj0 = sj0array[ij0];
16645 IkReal evalcond[8];
16646 IkReal x776 =
IKcos(j0);
16647 IkReal x777 =
IKsin(j0);
16648 IkReal x778 = (gconst10 * x776);
16649 IkReal x779 = (gconst11 * x776);
16650 IkReal x780 = ((1.0) * x777);
16651 IkReal x781 = (gconst11 * x780);
16652 evalcond[0] = (gconst10 + ((new_r11 * x777)) +
16653 ((new_r01 * x776)));
16655 (x779 + new_r11 + ((gconst10 * x777)));
16656 evalcond[2] = (gconst10 + ((new_r10 * x776)) +
16657 (((-1.0) * new_r00 * x780)));
16658 evalcond[3] = ((((-1.0) * new_r01 * x780)) +
16659 gconst11 + ((new_r11 * x776)));
16661 ((((-1.0) * x781)) + x778 + new_r10);
16663 ((((-1.0) * x781)) + x778 + new_r01);
16665 (((new_r00 * x776)) + ((new_r10 * x777)) +
16666 (((-1.0) * gconst11)));
16667 evalcond[7] = (new_r00 + (((-1.0) * x779)) +
16668 (((-1.0) * gconst10 * x780)));
16669 if (
IKabs(evalcond[0]) >
16671 IKabs(evalcond[1]) >
16673 IKabs(evalcond[2]) >
16675 IKabs(evalcond[3]) >
16677 IKabs(evalcond[4]) >
16679 IKabs(evalcond[5]) >
16681 IKabs(evalcond[6]) >
16690 std::vector<IkSingleDOFSolutionBase<IkReal> >
16692 vinfos[0].jointtype = 1;
16693 vinfos[0].foffset = j0;
16694 vinfos[0].indices[0] = _ij0[0];
16695 vinfos[0].indices[1] = _ij0[1];
16696 vinfos[0].maxsolutions = _nj0;
16697 vinfos[1].jointtype = 1;
16698 vinfos[1].foffset = j1;
16699 vinfos[1].indices[0] = _ij1[0];
16700 vinfos[1].indices[1] = _ij1[1];
16701 vinfos[1].maxsolutions = _nj1;
16702 vinfos[2].jointtype = 1;
16703 vinfos[2].foffset = j2;
16704 vinfos[2].indices[0] = _ij2[0];
16705 vinfos[2].indices[1] = _ij2[1];
16706 vinfos[2].maxsolutions = _nj2;
16707 vinfos[3].jointtype = 1;
16708 vinfos[3].foffset = j3;
16709 vinfos[3].indices[0] = _ij3[0];
16710 vinfos[3].indices[1] = _ij3[1];
16711 vinfos[3].maxsolutions = _nj3;
16712 vinfos[4].jointtype = 1;
16713 vinfos[4].foffset = j4;
16714 vinfos[4].indices[0] = _ij4[0];
16715 vinfos[4].indices[1] = _ij4[1];
16716 vinfos[4].maxsolutions = _nj4;
16717 vinfos[5].jointtype = 1;
16718 vinfos[5].foffset = j5;
16719 vinfos[5].indices[0] = _ij5[0];
16720 vinfos[5].indices[1] = _ij5[1];
16721 vinfos[5].maxsolutions = _nj5;
16722 vinfos[6].jointtype = 1;
16723 vinfos[6].foffset = j6;
16724 vinfos[6].indices[0] = _ij6[0];
16725 vinfos[6].indices[1] = _ij6[1];
16726 vinfos[6].maxsolutions = _nj6;
16727 std::vector<int> vfree(0);
16728 solutions.AddSolution(vinfos, vfree);
16738 IkReal j0array[1], cj0array[1], sj0array[1];
16739 bool j0valid[1] = {
false };
16741 IkReal x782 = ((1.0) * gconst10);
16743 IkReal(((((-1.0) * new_r10 * x782)) +
16744 ((gconst10 * new_r01)))),
16745 IkReal(((((-1.0) * new_r11 * x782)) +
16746 (((-1.0) * new_r00 * x782)))),
16753 IKsign((((new_r10 * new_r11)) +
16754 ((new_r00 * new_r01)))),
16760 j0array[0] = ((-1.5707963267949) + (x783.
value) +
16761 (((1.5707963267949) * (x784.
value))));
16762 sj0array[0] =
IKsin(j0array[0]);
16763 cj0array[0] =
IKcos(j0array[0]);
16764 if (j0array[0] >
IKPI)
16766 j0array[0] -=
IK2PI;
16768 else if (j0array[0] < -
IKPI)
16770 j0array[0] +=
IK2PI;
16773 for (
int ij0 = 0; ij0 < 1; ++ij0)
16781 for (
int iij0 = ij0 + 1; iij0 < 1; ++iij0)
16783 if (j0valid[iij0] &&
16784 IKabs(cj0array[ij0] - cj0array[iij0]) <
16786 IKabs(sj0array[ij0] - sj0array[iij0]) <
16789 j0valid[iij0] =
false;
16795 cj0 = cj0array[ij0];
16796 sj0 = sj0array[ij0];
16798 IkReal evalcond[8];
16799 IkReal x785 =
IKcos(j0);
16800 IkReal x786 =
IKsin(j0);
16801 IkReal x787 = (gconst10 * x785);
16802 IkReal x788 = (gconst11 * x785);
16803 IkReal x789 = ((1.0) * x786);
16804 IkReal x790 = (gconst11 * x789);
16805 evalcond[0] = (((new_r11 * x786)) + gconst10 +
16806 ((new_r01 * x785)));
16808 (((gconst10 * x786)) + x788 + new_r11);
16809 evalcond[2] = (((new_r10 * x785)) + gconst10 +
16810 (((-1.0) * new_r00 * x789)));
16811 evalcond[3] = ((((-1.0) * new_r01 * x789)) +
16812 ((new_r11 * x785)) + gconst11);
16813 evalcond[4] = ((((-1.0) * x790)) + x787 + new_r10);
16814 evalcond[5] = ((((-1.0) * x790)) + x787 + new_r01);
16816 (((new_r10 * x786)) + ((new_r00 * x785)) +
16817 (((-1.0) * gconst11)));
16818 evalcond[7] = ((((-1.0) * x788)) + new_r00 +
16819 (((-1.0) * gconst10 * x789)));
16834 std::vector<IkSingleDOFSolutionBase<IkReal> >
16836 vinfos[0].jointtype = 1;
16837 vinfos[0].foffset = j0;
16838 vinfos[0].indices[0] = _ij0[0];
16839 vinfos[0].indices[1] = _ij0[1];
16840 vinfos[0].maxsolutions = _nj0;
16841 vinfos[1].jointtype = 1;
16842 vinfos[1].foffset = j1;
16843 vinfos[1].indices[0] = _ij1[0];
16844 vinfos[1].indices[1] = _ij1[1];
16845 vinfos[1].maxsolutions = _nj1;
16846 vinfos[2].jointtype = 1;
16847 vinfos[2].foffset = j2;
16848 vinfos[2].indices[0] = _ij2[0];
16849 vinfos[2].indices[1] = _ij2[1];
16850 vinfos[2].maxsolutions = _nj2;
16851 vinfos[3].jointtype = 1;
16852 vinfos[3].foffset = j3;
16853 vinfos[3].indices[0] = _ij3[0];
16854 vinfos[3].indices[1] = _ij3[1];
16855 vinfos[3].maxsolutions = _nj3;
16856 vinfos[4].jointtype = 1;
16857 vinfos[4].foffset = j4;
16858 vinfos[4].indices[0] = _ij4[0];
16859 vinfos[4].indices[1] = _ij4[1];
16860 vinfos[4].maxsolutions = _nj4;
16861 vinfos[5].jointtype = 1;
16862 vinfos[5].foffset = j5;
16863 vinfos[5].indices[0] = _ij5[0];
16864 vinfos[5].indices[1] = _ij5[1];
16865 vinfos[5].maxsolutions = _nj5;
16866 vinfos[6].jointtype = 1;
16867 vinfos[6].foffset = j6;
16868 vinfos[6].indices[0] = _ij6[0];
16869 vinfos[6].indices[1] = _ij6[1];
16870 vinfos[6].maxsolutions = _nj6;
16871 std::vector<int> vfree(0);
16872 solutions.AddSolution(vinfos, vfree);
16880 if (bgotonextstatement)
16882 bool bgotonextstatement =
true;
16885 evalcond[0] = ((new_r01 * new_r01) + (new_r11 * new_r11));
16886 if (
IKabs(evalcond[0]) < 0.0000050000000000)
16888 bgotonextstatement =
false;
16893 j1 = 3.14159265358979;
16896 j0eval[0] = ((
IKabs(new_r10)) + (
IKabs(new_r00)));
16897 if (
IKabs(j0eval[0]) < 0.0000010000000000)
16904 IkReal j0array[2], cj0array[2], sj0array[2];
16905 bool j0valid[2] = {
false };
16915 IkReal x791 = x792.
value;
16916 j0array[0] = ((-1.0) * x791);
16917 sj0array[0] =
IKsin(j0array[0]);
16918 cj0array[0] =
IKcos(j0array[0]);
16919 j0array[1] = ((3.14159265358979) + (((-1.0) * x791)));
16920 sj0array[1] =
IKsin(j0array[1]);
16921 cj0array[1] =
IKcos(j0array[1]);
16922 if (j0array[0] >
IKPI)
16924 j0array[0] -=
IK2PI;
16926 else if (j0array[0] < -
IKPI)
16928 j0array[0] +=
IK2PI;
16931 if (j0array[1] >
IKPI)
16933 j0array[1] -=
IK2PI;
16935 else if (j0array[1] < -
IKPI)
16937 j0array[1] +=
IK2PI;
16940 for (
int ij0 = 0; ij0 < 2; ++ij0)
16948 for (
int iij0 = ij0 + 1; iij0 < 2; ++iij0)
16950 if (j0valid[iij0] &&
16951 IKabs(cj0array[ij0] - cj0array[iij0]) <
16953 IKabs(sj0array[ij0] - sj0array[iij0]) <
16956 j0valid[iij0] =
false;
16962 cj0 = cj0array[ij0];
16963 sj0 = sj0array[ij0];
16965 IkReal evalcond[1];
16967 ((((-1.0) * new_r00 * (
IKsin(j0)))) +
16968 ((new_r10 * (
IKcos(j0)))));
16976 std::vector<IkSingleDOFSolutionBase<IkReal> >
16978 vinfos[0].jointtype = 1;
16979 vinfos[0].foffset = j0;
16980 vinfos[0].indices[0] = _ij0[0];
16981 vinfos[0].indices[1] = _ij0[1];
16982 vinfos[0].maxsolutions = _nj0;
16983 vinfos[1].jointtype = 1;
16984 vinfos[1].foffset = j1;
16985 vinfos[1].indices[0] = _ij1[0];
16986 vinfos[1].indices[1] = _ij1[1];
16987 vinfos[1].maxsolutions = _nj1;
16988 vinfos[2].jointtype = 1;
16989 vinfos[2].foffset = j2;
16990 vinfos[2].indices[0] = _ij2[0];
16991 vinfos[2].indices[1] = _ij2[1];
16992 vinfos[2].maxsolutions = _nj2;
16993 vinfos[3].jointtype = 1;
16994 vinfos[3].foffset = j3;
16995 vinfos[3].indices[0] = _ij3[0];
16996 vinfos[3].indices[1] = _ij3[1];
16997 vinfos[3].maxsolutions = _nj3;
16998 vinfos[4].jointtype = 1;
16999 vinfos[4].foffset = j4;
17000 vinfos[4].indices[0] = _ij4[0];
17001 vinfos[4].indices[1] = _ij4[1];
17002 vinfos[4].maxsolutions = _nj4;
17003 vinfos[5].jointtype = 1;
17004 vinfos[5].foffset = j5;
17005 vinfos[5].indices[0] = _ij5[0];
17006 vinfos[5].indices[1] = _ij5[1];
17007 vinfos[5].maxsolutions = _nj5;
17008 vinfos[6].jointtype = 1;
17009 vinfos[6].foffset = j6;
17010 vinfos[6].indices[0] = _ij6[0];
17011 vinfos[6].indices[1] = _ij6[1];
17012 vinfos[6].maxsolutions = _nj6;
17013 std::vector<int> vfree(0);
17014 solutions.AddSolution(vinfos, vfree);
17022 if (bgotonextstatement)
17024 bool bgotonextstatement =
true;
17027 evalcond[0] = ((-3.14159265358979) +
17029 6.28318530717959)));
17030 if (
IKabs(evalcond[0]) < 0.0000050000000000)
17032 bgotonextstatement =
false;
17034 IkReal j0array[1], cj0array[1], sj0array[1];
17035 bool j0valid[1] = {
false };
17038 IKabs(((-1.0) * new_r11)) <
17043 j0array[0] =
IKatan2(new_r10, ((-1.0) * new_r11));
17044 sj0array[0] =
IKsin(j0array[0]);
17045 cj0array[0] =
IKcos(j0array[0]);
17046 if (j0array[0] >
IKPI)
17048 j0array[0] -=
IK2PI;
17050 else if (j0array[0] < -
IKPI)
17052 j0array[0] +=
IK2PI;
17055 for (
int ij0 = 0; ij0 < 1; ++ij0)
17063 for (
int iij0 = ij0 + 1; iij0 < 1; ++iij0)
17065 if (j0valid[iij0] &&
17066 IKabs(cj0array[ij0] - cj0array[iij0]) <
17068 IKabs(sj0array[ij0] - sj0array[iij0]) <
17071 j0valid[iij0] =
false;
17077 cj0 = cj0array[ij0];
17078 sj0 = sj0array[ij0];
17080 IkReal evalcond[8];
17081 IkReal x793 =
IKcos(j0);
17082 IkReal x794 =
IKsin(j0);
17083 IkReal x795 = ((1.0) * x794);
17084 evalcond[0] = (x793 + new_r11);
17085 evalcond[1] = ((((-1.0) * x795)) + new_r10);
17086 evalcond[2] = ((((-1.0) * x793)) + new_r00);
17087 evalcond[3] = ((((-1.0) * x795)) + new_r01);
17089 (((new_r11 * x794)) + ((new_r01 * x793)));
17090 evalcond[5] = (((new_r10 * x793)) +
17091 (((-1.0) * new_r00 * x795)));
17092 evalcond[6] = ((-1.0) + ((new_r10 * x794)) +
17093 ((new_r00 * x793)));
17094 evalcond[7] = ((1.0) + (((-1.0) * new_r01 * x795)) +
17095 ((new_r11 * x793)));
17110 std::vector<IkSingleDOFSolutionBase<IkReal> >
17112 vinfos[0].jointtype = 1;
17113 vinfos[0].foffset = j0;
17114 vinfos[0].indices[0] = _ij0[0];
17115 vinfos[0].indices[1] = _ij0[1];
17116 vinfos[0].maxsolutions = _nj0;
17117 vinfos[1].jointtype = 1;
17118 vinfos[1].foffset = j1;
17119 vinfos[1].indices[0] = _ij1[0];
17120 vinfos[1].indices[1] = _ij1[1];
17121 vinfos[1].maxsolutions = _nj1;
17122 vinfos[2].jointtype = 1;
17123 vinfos[2].foffset = j2;
17124 vinfos[2].indices[0] = _ij2[0];
17125 vinfos[2].indices[1] = _ij2[1];
17126 vinfos[2].maxsolutions = _nj2;
17127 vinfos[3].jointtype = 1;
17128 vinfos[3].foffset = j3;
17129 vinfos[3].indices[0] = _ij3[0];
17130 vinfos[3].indices[1] = _ij3[1];
17131 vinfos[3].maxsolutions = _nj3;
17132 vinfos[4].jointtype = 1;
17133 vinfos[4].foffset = j4;
17134 vinfos[4].indices[0] = _ij4[0];
17135 vinfos[4].indices[1] = _ij4[1];
17136 vinfos[4].maxsolutions = _nj4;
17137 vinfos[5].jointtype = 1;
17138 vinfos[5].foffset = j5;
17139 vinfos[5].indices[0] = _ij5[0];
17140 vinfos[5].indices[1] = _ij5[1];
17141 vinfos[5].maxsolutions = _nj5;
17142 vinfos[6].jointtype = 1;
17143 vinfos[6].foffset = j6;
17144 vinfos[6].indices[0] = _ij6[0];
17145 vinfos[6].indices[1] = _ij6[1];
17146 vinfos[6].maxsolutions = _nj6;
17147 std::vector<int> vfree(0);
17148 solutions.AddSolution(vinfos, vfree);
17154 if (bgotonextstatement)
17156 bool bgotonextstatement =
true;
17160 ((-3.14159265358979) +
17161 (
IKfmod(((3.14159265358979) +
17162 (
IKabs(((-3.14159265358979) + j2)))),
17163 6.28318530717959)));
17164 if (
IKabs(evalcond[0]) < 0.0000050000000000)
17166 bgotonextstatement =
false;
17168 IkReal j0array[1], cj0array[1], sj0array[1];
17169 bool j0valid[1] = {
false };
17171 if (
IKabs(((-1.0) * new_r10)) <
17173 IKabs(((-1.0) * new_r00)) <
17176 IKsqr(((-1.0) * new_r00)) - 1) <=
17180 IKatan2(((-1.0) * new_r10), ((-1.0) * new_r00));
17181 sj0array[0] =
IKsin(j0array[0]);
17182 cj0array[0] =
IKcos(j0array[0]);
17183 if (j0array[0] >
IKPI)
17185 j0array[0] -=
IK2PI;
17187 else if (j0array[0] < -
IKPI)
17189 j0array[0] +=
IK2PI;
17192 for (
int ij0 = 0; ij0 < 1; ++ij0)
17200 for (
int iij0 = ij0 + 1; iij0 < 1; ++iij0)
17202 if (j0valid[iij0] &&
17203 IKabs(cj0array[ij0] - cj0array[iij0]) <
17205 IKabs(sj0array[ij0] - sj0array[iij0]) <
17208 j0valid[iij0] =
false;
17214 cj0 = cj0array[ij0];
17215 sj0 = sj0array[ij0];
17217 IkReal evalcond[8];
17218 IkReal x796 =
IKsin(j0);
17219 IkReal x797 =
IKcos(j0);
17220 IkReal x798 = ((1.0) * x796);
17221 evalcond[0] = (x796 + new_r10);
17222 evalcond[1] = (x797 + new_r00);
17223 evalcond[2] = (x796 + new_r01);
17224 evalcond[3] = ((((-1.0) * x797)) + new_r11);
17226 (((new_r11 * x796)) + ((new_r01 * x797)));
17227 evalcond[5] = (((new_r10 * x797)) +
17228 (((-1.0) * new_r00 * x798)));
17229 evalcond[6] = ((1.0) + ((new_r10 * x796)) +
17230 ((new_r00 * x797)));
17232 ((-1.0) + (((-1.0) * new_r01 * x798)) +
17233 ((new_r11 * x797)));
17248 std::vector<IkSingleDOFSolutionBase<IkReal> >
17250 vinfos[0].jointtype = 1;
17251 vinfos[0].foffset = j0;
17252 vinfos[0].indices[0] = _ij0[0];
17253 vinfos[0].indices[1] = _ij0[1];
17254 vinfos[0].maxsolutions = _nj0;
17255 vinfos[1].jointtype = 1;
17256 vinfos[1].foffset = j1;
17257 vinfos[1].indices[0] = _ij1[0];
17258 vinfos[1].indices[1] = _ij1[1];
17259 vinfos[1].maxsolutions = _nj1;
17260 vinfos[2].jointtype = 1;
17261 vinfos[2].foffset = j2;
17262 vinfos[2].indices[0] = _ij2[0];
17263 vinfos[2].indices[1] = _ij2[1];
17264 vinfos[2].maxsolutions = _nj2;
17265 vinfos[3].jointtype = 1;
17266 vinfos[3].foffset = j3;
17267 vinfos[3].indices[0] = _ij3[0];
17268 vinfos[3].indices[1] = _ij3[1];
17269 vinfos[3].maxsolutions = _nj3;
17270 vinfos[4].jointtype = 1;
17271 vinfos[4].foffset = j4;
17272 vinfos[4].indices[0] = _ij4[0];
17273 vinfos[4].indices[1] = _ij4[1];
17274 vinfos[4].maxsolutions = _nj4;
17275 vinfos[5].jointtype = 1;
17276 vinfos[5].foffset = j5;
17277 vinfos[5].indices[0] = _ij5[0];
17278 vinfos[5].indices[1] = _ij5[1];
17279 vinfos[5].maxsolutions = _nj5;
17280 vinfos[6].jointtype = 1;
17281 vinfos[6].foffset = j6;
17282 vinfos[6].indices[0] = _ij6[0];
17283 vinfos[6].indices[1] = _ij6[1];
17284 vinfos[6].maxsolutions = _nj6;
17285 std::vector<int> vfree(0);
17286 solutions.AddSolution(vinfos, vfree);
17292 if (bgotonextstatement)
17294 bool bgotonextstatement =
true;
17297 evalcond[0] = ((
IKabs(new_r11)) + (
IKabs(new_r00)));
17298 if (
IKabs(evalcond[0]) < 0.0000050000000000)
17300 bgotonextstatement =
false;
17305 j1 = 3.14159265358979;
17308 j0eval[0] = new_r01;
17309 j0eval[1] =
IKsign(new_r01);
17311 if (
IKabs(j0eval[0]) < 0.0000010000000000 ||
17312 IKabs(j0eval[1]) < 0.0000010000000000 ||
17313 IKabs(j0eval[2]) < 0.0000010000000000)
17319 j1 = 3.14159265358979;
17322 j0eval[0] = new_r10;
17324 j0eval[2] =
IKsign(new_r10);
17325 if (
IKabs(j0eval[0]) < 0.0000010000000000 ||
17326 IKabs(j0eval[1]) < 0.0000010000000000 ||
17327 IKabs(j0eval[2]) < 0.0000010000000000)
17333 j1 = 3.14159265358979;
17336 j0eval[0] = new_r01;
17337 j0eval[1] = new_r10;
17338 if (
IKabs(j0eval[0]) < 0.0000010000000000 ||
17339 IKabs(j0eval[1]) < 0.0000010000000000)
17346 IkReal j0array[1], cj0array[1],
17348 bool j0valid[1] = {
false };
17365 ((-1.0) * sj2 * (x800.
value))) <
17368 IKsqr(((-1.0) * sj2 *
17373 (cj2 * (x799.
value)),
17374 ((-1.0) * sj2 * (x800.
value)));
17375 sj0array[0] =
IKsin(j0array[0]);
17376 cj0array[0] =
IKcos(j0array[0]);
17377 if (j0array[0] >
IKPI)
17379 j0array[0] -=
IK2PI;
17381 else if (j0array[0] < -
IKPI)
17383 j0array[0] +=
IK2PI;
17386 for (
int ij0 = 0; ij0 < 1; ++ij0)
17394 for (
int iij0 = ij0 + 1; iij0 < 1;
17397 if (j0valid[iij0] &&
17398 IKabs(cj0array[ij0] -
17401 IKabs(sj0array[ij0] -
17405 j0valid[iij0] =
false;
17411 cj0 = cj0array[ij0];
17412 sj0 = sj0array[ij0];
17414 IkReal evalcond[7];
17415 IkReal x801 =
IKcos(j0);
17416 IkReal x802 =
IKsin(j0);
17417 IkReal x803 = ((1.0) * cj2);
17418 IkReal x804 = (sj2 * x801);
17419 IkReal x805 = ((1.0) * x802);
17420 IkReal x806 = (x802 * x803);
17422 (sj2 + ((new_r10 * x801)));
17424 (sj2 + ((new_r01 * x801)));
17426 ((((-1.0) * new_r01 * x805)) +
17428 evalcond[3] = (((new_r10 * x802)) +
17429 (((-1.0) * x803)));
17430 evalcond[4] = (new_r10 + x804 +
17431 (((-1.0) * x806)));
17433 ((((-1.0) * sj2 * x805)) +
17434 (((-1.0) * x801 * x803)));
17435 evalcond[6] = (new_r01 + x804 +
17436 (((-1.0) * x806)));
17437 if (
IKabs(evalcond[0]) >
17439 IKabs(evalcond[1]) >
17441 IKabs(evalcond[2]) >
17443 IKabs(evalcond[3]) >
17445 IKabs(evalcond[4]) >
17447 IKabs(evalcond[5]) >
17449 IKabs(evalcond[6]) >
17460 vinfos[0].jointtype = 1;
17461 vinfos[0].foffset = j0;
17462 vinfos[0].indices[0] = _ij0[0];
17463 vinfos[0].indices[1] = _ij0[1];
17464 vinfos[0].maxsolutions = _nj0;
17465 vinfos[1].jointtype = 1;
17466 vinfos[1].foffset = j1;
17467 vinfos[1].indices[0] = _ij1[0];
17468 vinfos[1].indices[1] = _ij1[1];
17469 vinfos[1].maxsolutions = _nj1;
17470 vinfos[2].jointtype = 1;
17471 vinfos[2].foffset = j2;
17472 vinfos[2].indices[0] = _ij2[0];
17473 vinfos[2].indices[1] = _ij2[1];
17474 vinfos[2].maxsolutions = _nj2;
17475 vinfos[3].jointtype = 1;
17476 vinfos[3].foffset = j3;
17477 vinfos[3].indices[0] = _ij3[0];
17478 vinfos[3].indices[1] = _ij3[1];
17479 vinfos[3].maxsolutions = _nj3;
17480 vinfos[4].jointtype = 1;
17481 vinfos[4].foffset = j4;
17482 vinfos[4].indices[0] = _ij4[0];
17483 vinfos[4].indices[1] = _ij4[1];
17484 vinfos[4].maxsolutions = _nj4;
17485 vinfos[5].jointtype = 1;
17486 vinfos[5].foffset = j5;
17487 vinfos[5].indices[0] = _ij5[0];
17488 vinfos[5].indices[1] = _ij5[1];
17489 vinfos[5].maxsolutions = _nj5;
17490 vinfos[6].jointtype = 1;
17491 vinfos[6].foffset = j6;
17492 vinfos[6].indices[0] = _ij6[0];
17493 vinfos[6].indices[1] = _ij6[1];
17494 vinfos[6].maxsolutions = _nj6;
17495 std::vector<int> vfree(0);
17496 solutions.AddSolution(vinfos,
17507 IkReal j0array[1], cj0array[1], sj0array[1];
17508 bool j0valid[1] = {
false };
17519 IkReal(((-1.0) * sj2)),
17526 ((-1.5707963267949) +
17527 (((1.5707963267949) * (x807.
value))) +
17529 sj0array[0] =
IKsin(j0array[0]);
17530 cj0array[0] =
IKcos(j0array[0]);
17531 if (j0array[0] >
IKPI)
17533 j0array[0] -=
IK2PI;
17535 else if (j0array[0] < -
IKPI)
17537 j0array[0] +=
IK2PI;
17540 for (
int ij0 = 0; ij0 < 1; ++ij0)
17548 for (
int iij0 = ij0 + 1; iij0 < 1; ++iij0)
17550 if (j0valid[iij0] &&
17551 IKabs(cj0array[ij0] -
17554 IKabs(sj0array[ij0] -
17558 j0valid[iij0] =
false;
17564 cj0 = cj0array[ij0];
17565 sj0 = sj0array[ij0];
17567 IkReal evalcond[7];
17568 IkReal x809 =
IKcos(j0);
17569 IkReal x810 =
IKsin(j0);
17570 IkReal x811 = ((1.0) * cj2);
17571 IkReal x812 = (sj2 * x809);
17572 IkReal x813 = ((1.0) * x810);
17573 IkReal x814 = (x810 * x811);
17575 (sj2 + ((new_r10 * x809)));
17577 (sj2 + ((new_r01 * x809)));
17579 (cj2 + (((-1.0) * new_r01 * x813)));
17580 evalcond[3] = (((new_r10 * x810)) +
17581 (((-1.0) * x811)));
17582 evalcond[4] = ((((-1.0) * x814)) +
17585 ((((-1.0) * x809 * x811)) +
17586 (((-1.0) * sj2 * x813)));
17587 evalcond[6] = ((((-1.0) * x814)) +
17589 if (
IKabs(evalcond[0]) >
17591 IKabs(evalcond[1]) >
17593 IKabs(evalcond[2]) >
17595 IKabs(evalcond[3]) >
17597 IKabs(evalcond[4]) >
17599 IKabs(evalcond[5]) >
17601 IKabs(evalcond[6]) >
17612 vinfos[0].jointtype = 1;
17613 vinfos[0].foffset = j0;
17614 vinfos[0].indices[0] = _ij0[0];
17615 vinfos[0].indices[1] = _ij0[1];
17616 vinfos[0].maxsolutions = _nj0;
17617 vinfos[1].jointtype = 1;
17618 vinfos[1].foffset = j1;
17619 vinfos[1].indices[0] = _ij1[0];
17620 vinfos[1].indices[1] = _ij1[1];
17621 vinfos[1].maxsolutions = _nj1;
17622 vinfos[2].jointtype = 1;
17623 vinfos[2].foffset = j2;
17624 vinfos[2].indices[0] = _ij2[0];
17625 vinfos[2].indices[1] = _ij2[1];
17626 vinfos[2].maxsolutions = _nj2;
17627 vinfos[3].jointtype = 1;
17628 vinfos[3].foffset = j3;
17629 vinfos[3].indices[0] = _ij3[0];
17630 vinfos[3].indices[1] = _ij3[1];
17631 vinfos[3].maxsolutions = _nj3;
17632 vinfos[4].jointtype = 1;
17633 vinfos[4].foffset = j4;
17634 vinfos[4].indices[0] = _ij4[0];
17635 vinfos[4].indices[1] = _ij4[1];
17636 vinfos[4].maxsolutions = _nj4;
17637 vinfos[5].jointtype = 1;
17638 vinfos[5].foffset = j5;
17639 vinfos[5].indices[0] = _ij5[0];
17640 vinfos[5].indices[1] = _ij5[1];
17641 vinfos[5].maxsolutions = _nj5;
17642 vinfos[6].jointtype = 1;
17643 vinfos[6].foffset = j6;
17644 vinfos[6].indices[0] = _ij6[0];
17645 vinfos[6].indices[1] = _ij6[1];
17646 vinfos[6].maxsolutions = _nj6;
17647 std::vector<int> vfree(0);
17648 solutions.AddSolution(vinfos, vfree);
17658 IkReal j0array[1], cj0array[1], sj0array[1];
17659 bool j0valid[1] = {
false };
17669 IkReal(((-1.0) * sj2)),
17676 ((-1.5707963267949) +
17677 (((1.5707963267949) * (x815.
value))) +
17679 sj0array[0] =
IKsin(j0array[0]);
17680 cj0array[0] =
IKcos(j0array[0]);
17681 if (j0array[0] >
IKPI)
17683 j0array[0] -=
IK2PI;
17685 else if (j0array[0] < -
IKPI)
17687 j0array[0] +=
IK2PI;
17690 for (
int ij0 = 0; ij0 < 1; ++ij0)
17698 for (
int iij0 = ij0 + 1; iij0 < 1; ++iij0)
17700 if (j0valid[iij0] &&
17701 IKabs(cj0array[ij0] - cj0array[iij0]) <
17703 IKabs(sj0array[ij0] - sj0array[iij0]) <
17706 j0valid[iij0] =
false;
17712 cj0 = cj0array[ij0];
17713 sj0 = sj0array[ij0];
17715 IkReal evalcond[7];
17716 IkReal x817 =
IKcos(j0);
17717 IkReal x818 =
IKsin(j0);
17718 IkReal x819 = ((1.0) * cj2);
17719 IkReal x820 = (sj2 * x817);
17720 IkReal x821 = ((1.0) * x818);
17721 IkReal x822 = (x818 * x819);
17722 evalcond[0] = (sj2 + ((new_r10 * x817)));
17723 evalcond[1] = (sj2 + ((new_r01 * x817)));
17725 (cj2 + (((-1.0) * new_r01 * x821)));
17726 evalcond[3] = (((new_r10 * x818)) +
17727 (((-1.0) * x819)));
17729 ((((-1.0) * x822)) + new_r10 + x820);
17730 evalcond[5] = ((((-1.0) * x817 * x819)) +
17731 (((-1.0) * sj2 * x821)));
17733 ((((-1.0) * x822)) + new_r01 + x820);
17734 if (
IKabs(evalcond[0]) >
17736 IKabs(evalcond[1]) >
17738 IKabs(evalcond[2]) >
17740 IKabs(evalcond[3]) >
17742 IKabs(evalcond[4]) >
17744 IKabs(evalcond[5]) >
17746 IKabs(evalcond[6]) >
17757 vinfos[0].jointtype = 1;
17758 vinfos[0].foffset = j0;
17759 vinfos[0].indices[0] = _ij0[0];
17760 vinfos[0].indices[1] = _ij0[1];
17761 vinfos[0].maxsolutions = _nj0;
17762 vinfos[1].jointtype = 1;
17763 vinfos[1].foffset = j1;
17764 vinfos[1].indices[0] = _ij1[0];
17765 vinfos[1].indices[1] = _ij1[1];
17766 vinfos[1].maxsolutions = _nj1;
17767 vinfos[2].jointtype = 1;
17768 vinfos[2].foffset = j2;
17769 vinfos[2].indices[0] = _ij2[0];
17770 vinfos[2].indices[1] = _ij2[1];
17771 vinfos[2].maxsolutions = _nj2;
17772 vinfos[3].jointtype = 1;
17773 vinfos[3].foffset = j3;
17774 vinfos[3].indices[0] = _ij3[0];
17775 vinfos[3].indices[1] = _ij3[1];
17776 vinfos[3].maxsolutions = _nj3;
17777 vinfos[4].jointtype = 1;
17778 vinfos[4].foffset = j4;
17779 vinfos[4].indices[0] = _ij4[0];
17780 vinfos[4].indices[1] = _ij4[1];
17781 vinfos[4].maxsolutions = _nj4;
17782 vinfos[5].jointtype = 1;
17783 vinfos[5].foffset = j5;
17784 vinfos[5].indices[0] = _ij5[0];
17785 vinfos[5].indices[1] = _ij5[1];
17786 vinfos[5].maxsolutions = _nj5;
17787 vinfos[6].jointtype = 1;
17788 vinfos[6].foffset = j6;
17789 vinfos[6].indices[0] = _ij6[0];
17790 vinfos[6].indices[1] = _ij6[1];
17791 vinfos[6].maxsolutions = _nj6;
17792 std::vector<int> vfree(0);
17793 solutions.AddSolution(vinfos, vfree);
17801 if (bgotonextstatement)
17803 bool bgotonextstatement =
true;
17806 evalcond[0] = ((
IKabs(new_r11)) + (
IKabs(new_r01)));
17807 if (
IKabs(evalcond[0]) < 0.0000050000000000)
17809 bgotonextstatement =
false;
17814 j1 = 3.14159265358979;
17819 j0eval[0] = ((
IKabs(new_r10)) + (
IKabs(new_r00)));
17820 if (
IKabs(j0eval[0]) < 0.0000010000000000)
17827 IkReal j0array[2], cj0array[2], sj0array[2];
17828 bool j0valid[2] = {
false };
17838 IkReal x823 = x824.
value;
17839 j0array[0] = ((-1.0) * x823);
17840 sj0array[0] =
IKsin(j0array[0]);
17841 cj0array[0] =
IKcos(j0array[0]);
17843 ((3.14159265358979) + (((-1.0) * x823)));
17844 sj0array[1] =
IKsin(j0array[1]);
17845 cj0array[1] =
IKcos(j0array[1]);
17846 if (j0array[0] >
IKPI)
17848 j0array[0] -=
IK2PI;
17850 else if (j0array[0] < -
IKPI)
17852 j0array[0] +=
IK2PI;
17855 if (j0array[1] >
IKPI)
17857 j0array[1] -=
IK2PI;
17859 else if (j0array[1] < -
IKPI)
17861 j0array[1] +=
IK2PI;
17864 for (
int ij0 = 0; ij0 < 2; ++ij0)
17872 for (
int iij0 = ij0 + 1; iij0 < 2; ++iij0)
17874 if (j0valid[iij0] &&
17875 IKabs(cj0array[ij0] -
17878 IKabs(sj0array[ij0] -
17882 j0valid[iij0] =
false;
17888 cj0 = cj0array[ij0];
17889 sj0 = sj0array[ij0];
17891 IkReal evalcond[1];
17893 ((((-1.0) * new_r00 * (
IKsin(j0)))) +
17894 ((new_r10 * (
IKcos(j0)))));
17895 if (
IKabs(evalcond[0]) >
17906 vinfos[0].jointtype = 1;
17907 vinfos[0].foffset = j0;
17908 vinfos[0].indices[0] = _ij0[0];
17909 vinfos[0].indices[1] = _ij0[1];
17910 vinfos[0].maxsolutions = _nj0;
17911 vinfos[1].jointtype = 1;
17912 vinfos[1].foffset = j1;
17913 vinfos[1].indices[0] = _ij1[0];
17914 vinfos[1].indices[1] = _ij1[1];
17915 vinfos[1].maxsolutions = _nj1;
17916 vinfos[2].jointtype = 1;
17917 vinfos[2].foffset = j2;
17918 vinfos[2].indices[0] = _ij2[0];
17919 vinfos[2].indices[1] = _ij2[1];
17920 vinfos[2].maxsolutions = _nj2;
17921 vinfos[3].jointtype = 1;
17922 vinfos[3].foffset = j3;
17923 vinfos[3].indices[0] = _ij3[0];
17924 vinfos[3].indices[1] = _ij3[1];
17925 vinfos[3].maxsolutions = _nj3;
17926 vinfos[4].jointtype = 1;
17927 vinfos[4].foffset = j4;
17928 vinfos[4].indices[0] = _ij4[0];
17929 vinfos[4].indices[1] = _ij4[1];
17930 vinfos[4].maxsolutions = _nj4;
17931 vinfos[5].jointtype = 1;
17932 vinfos[5].foffset = j5;
17933 vinfos[5].indices[0] = _ij5[0];
17934 vinfos[5].indices[1] = _ij5[1];
17935 vinfos[5].maxsolutions = _nj5;
17936 vinfos[6].jointtype = 1;
17937 vinfos[6].foffset = j6;
17938 vinfos[6].indices[0] = _ij6[0];
17939 vinfos[6].indices[1] = _ij6[1];
17940 vinfos[6].maxsolutions = _nj6;
17941 std::vector<int> vfree(0);
17942 solutions.AddSolution(vinfos, vfree);
17950 if (bgotonextstatement)
17952 bool bgotonextstatement =
true;
17955 evalcond[0] = ((
IKabs(new_r10)) + (
IKabs(new_r00)));
17956 if (
IKabs(evalcond[0]) < 0.0000050000000000)
17958 bgotonextstatement =
false;
17963 j1 = 3.14159265358979;
17970 if (
IKabs(j0eval[0]) < 0.0000010000000000)
17977 IkReal j0array[2], cj0array[2], sj0array[2];
17978 bool j0valid[2] = {
false };
17988 IkReal x825 = x826.
value;
17989 j0array[0] = ((-1.0) * x825);
17990 sj0array[0] =
IKsin(j0array[0]);
17991 cj0array[0] =
IKcos(j0array[0]);
17992 j0array[1] = ((3.14159265358979) +
17993 (((-1.0) * x825)));
17994 sj0array[1] =
IKsin(j0array[1]);
17995 cj0array[1] =
IKcos(j0array[1]);
17996 if (j0array[0] >
IKPI)
17998 j0array[0] -=
IK2PI;
18000 else if (j0array[0] < -
IKPI)
18002 j0array[0] +=
IK2PI;
18005 if (j0array[1] >
IKPI)
18007 j0array[1] -=
IK2PI;
18009 else if (j0array[1] < -
IKPI)
18011 j0array[1] +=
IK2PI;
18014 for (
int ij0 = 0; ij0 < 2; ++ij0)
18022 for (
int iij0 = ij0 + 1; iij0 < 2; ++iij0)
18024 if (j0valid[iij0] &&
18025 IKabs(cj0array[ij0] -
18028 IKabs(sj0array[ij0] -
18032 j0valid[iij0] =
false;
18038 cj0 = cj0array[ij0];
18039 sj0 = sj0array[ij0];
18041 IkReal evalcond[1];
18043 (((new_r11 * (
IKcos(j0)))) +
18044 (((-1.0) * new_r01 *
18046 if (
IKabs(evalcond[0]) >
18057 vinfos[0].jointtype = 1;
18058 vinfos[0].foffset = j0;
18059 vinfos[0].indices[0] = _ij0[0];
18060 vinfos[0].indices[1] = _ij0[1];
18061 vinfos[0].maxsolutions = _nj0;
18062 vinfos[1].jointtype = 1;
18063 vinfos[1].foffset = j1;
18064 vinfos[1].indices[0] = _ij1[0];
18065 vinfos[1].indices[1] = _ij1[1];
18066 vinfos[1].maxsolutions = _nj1;
18067 vinfos[2].jointtype = 1;
18068 vinfos[2].foffset = j2;
18069 vinfos[2].indices[0] = _ij2[0];
18070 vinfos[2].indices[1] = _ij2[1];
18071 vinfos[2].maxsolutions = _nj2;
18072 vinfos[3].jointtype = 1;
18073 vinfos[3].foffset = j3;
18074 vinfos[3].indices[0] = _ij3[0];
18075 vinfos[3].indices[1] = _ij3[1];
18076 vinfos[3].maxsolutions = _nj3;
18077 vinfos[4].jointtype = 1;
18078 vinfos[4].foffset = j4;
18079 vinfos[4].indices[0] = _ij4[0];
18080 vinfos[4].indices[1] = _ij4[1];
18081 vinfos[4].maxsolutions = _nj4;
18082 vinfos[5].jointtype = 1;
18083 vinfos[5].foffset = j5;
18084 vinfos[5].indices[0] = _ij5[0];
18085 vinfos[5].indices[1] = _ij5[1];
18086 vinfos[5].maxsolutions = _nj5;
18087 vinfos[6].jointtype = 1;
18088 vinfos[6].foffset = j6;
18089 vinfos[6].indices[0] = _ij6[0];
18090 vinfos[6].indices[1] = _ij6[1];
18091 vinfos[6].maxsolutions = _nj6;
18092 std::vector<int> vfree(0);
18093 solutions.AddSolution(vinfos, vfree);
18101 if (bgotonextstatement)
18103 bool bgotonextstatement =
true;
18108 if (
IKabs(evalcond[0]) < 0.0000050000000000)
18110 bgotonextstatement =
false;
18115 j1 = 3.14159265358979;
18118 j0eval[0] = new_r11;
18119 j0eval[1] =
IKsign(new_r11);
18121 if (
IKabs(j0eval[0]) < 0.0000010000000000 ||
18122 IKabs(j0eval[1]) < 0.0000010000000000 ||
18123 IKabs(j0eval[2]) < 0.0000010000000000)
18129 j1 = 3.14159265358979;
18132 j0eval[0] = new_r00;
18133 j0eval[1] = new_r11;
18134 if (
IKabs(j0eval[0]) <
18135 0.0000010000000000 ||
18136 IKabs(j0eval[1]) < 0.0000010000000000)
18143 IkReal j0array[1], cj0array[1],
18145 bool j0valid[1] = {
false };
18163 IKabs(((-1.0) * cj2 *
18168 IKsqr(((-1.0) * cj2 *
18173 (sj2 * (x827.
value)),
18174 ((-1.0) * cj2 * (x828.
value)));
18175 sj0array[0] =
IKsin(j0array[0]);
18176 cj0array[0] =
IKcos(j0array[0]);
18177 if (j0array[0] >
IKPI)
18179 j0array[0] -=
IK2PI;
18181 else if (j0array[0] < -
IKPI)
18183 j0array[0] +=
IK2PI;
18186 for (
int ij0 = 0; ij0 < 1; ++ij0)
18194 for (
int iij0 = ij0 + 1; iij0 < 1;
18197 if (j0valid[iij0] &&
18198 IKabs(cj0array[ij0] -
18201 IKabs(sj0array[ij0] -
18205 j0valid[iij0] =
false;
18211 cj0 = cj0array[ij0];
18212 sj0 = sj0array[ij0];
18214 IkReal evalcond[7];
18215 IkReal x829 =
IKsin(j0);
18216 IkReal x830 =
IKcos(j0);
18217 IkReal x831 = ((1.0) * cj2);
18218 IkReal x832 = (sj2 * x829);
18220 (((new_r11 * x830)) + cj2);
18222 (sj2 + ((new_r11 * x829)));
18225 (((-1.0) * new_r00 * x829)));
18227 (((new_r00 * x830)) +
18228 (((-1.0) * x831)));
18231 (((-1.0) * x829 * x831)));
18232 evalcond[5] = (new_r11 + x832 +
18235 ((((-1.0) * x830 * x831)) +
18236 (((-1.0) * x832)) + new_r00);
18237 if (
IKabs(evalcond[0]) >
18239 IKabs(evalcond[1]) >
18241 IKabs(evalcond[2]) >
18243 IKabs(evalcond[3]) >
18245 IKabs(evalcond[4]) >
18247 IKabs(evalcond[5]) >
18249 IKabs(evalcond[6]) >
18261 vinfos[0].jointtype = 1;
18262 vinfos[0].foffset = j0;
18263 vinfos[0].indices[0] = _ij0[0];
18264 vinfos[0].indices[1] = _ij0[1];
18265 vinfos[0].maxsolutions = _nj0;
18266 vinfos[1].jointtype = 1;
18267 vinfos[1].foffset = j1;
18268 vinfos[1].indices[0] = _ij1[0];
18269 vinfos[1].indices[1] = _ij1[1];
18270 vinfos[1].maxsolutions = _nj1;
18271 vinfos[2].jointtype = 1;
18272 vinfos[2].foffset = j2;
18273 vinfos[2].indices[0] = _ij2[0];
18274 vinfos[2].indices[1] = _ij2[1];
18275 vinfos[2].maxsolutions = _nj2;
18276 vinfos[3].jointtype = 1;
18277 vinfos[3].foffset = j3;
18278 vinfos[3].indices[0] = _ij3[0];
18279 vinfos[3].indices[1] = _ij3[1];
18280 vinfos[3].maxsolutions = _nj3;
18281 vinfos[4].jointtype = 1;
18282 vinfos[4].foffset = j4;
18283 vinfos[4].indices[0] = _ij4[0];
18284 vinfos[4].indices[1] = _ij4[1];
18285 vinfos[4].maxsolutions = _nj4;
18286 vinfos[5].jointtype = 1;
18287 vinfos[5].foffset = j5;
18288 vinfos[5].indices[0] = _ij5[0];
18289 vinfos[5].indices[1] = _ij5[1];
18290 vinfos[5].maxsolutions = _nj5;
18291 vinfos[6].jointtype = 1;
18292 vinfos[6].foffset = j6;
18293 vinfos[6].indices[0] = _ij6[0];
18294 vinfos[6].indices[1] = _ij6[1];
18295 vinfos[6].maxsolutions = _nj6;
18296 std::vector<int> vfree(0);
18297 solutions.AddSolution(vinfos,
18308 IkReal j0array[1], cj0array[1],
18310 bool j0valid[1] = {
false };
18321 IkReal(((-1.0) * sj2)),
18322 IkReal(((-1.0) * cj2)),
18328 j0array[0] = ((-1.5707963267949) +
18329 (((1.5707963267949) *
18332 sj0array[0] =
IKsin(j0array[0]);
18333 cj0array[0] =
IKcos(j0array[0]);
18334 if (j0array[0] >
IKPI)
18336 j0array[0] -=
IK2PI;
18338 else if (j0array[0] < -
IKPI)
18340 j0array[0] +=
IK2PI;
18343 for (
int ij0 = 0; ij0 < 1; ++ij0)
18351 for (
int iij0 = ij0 + 1; iij0 < 1;
18354 if (j0valid[iij0] &&
18355 IKabs(cj0array[ij0] -
18358 IKabs(sj0array[ij0] -
18362 j0valid[iij0] =
false;
18368 cj0 = cj0array[ij0];
18369 sj0 = sj0array[ij0];
18371 IkReal evalcond[7];
18372 IkReal x835 =
IKsin(j0);
18373 IkReal x836 =
IKcos(j0);
18374 IkReal x837 = ((1.0) * cj2);
18375 IkReal x838 = (sj2 * x835);
18377 (((new_r11 * x836)) + cj2);
18379 (((new_r11 * x835)) + sj2);
18382 (((-1.0) * new_r00 * x835)));
18383 evalcond[3] = (((new_r00 * x836)) +
18384 (((-1.0) * x837)));
18386 ((((-1.0) * x835 * x837)) +
18389 (new_r11 + x838 + ((cj2 * x836)));
18391 ((((-1.0) * x836 * x837)) +
18392 (((-1.0) * x838)) + new_r00);
18393 if (
IKabs(evalcond[0]) >
18395 IKabs(evalcond[1]) >
18397 IKabs(evalcond[2]) >
18399 IKabs(evalcond[3]) >
18401 IKabs(evalcond[4]) >
18403 IKabs(evalcond[5]) >
18405 IKabs(evalcond[6]) >
18416 vinfos[0].jointtype = 1;
18417 vinfos[0].foffset = j0;
18418 vinfos[0].indices[0] = _ij0[0];
18419 vinfos[0].indices[1] = _ij0[1];
18420 vinfos[0].maxsolutions = _nj0;
18421 vinfos[1].jointtype = 1;
18422 vinfos[1].foffset = j1;
18423 vinfos[1].indices[0] = _ij1[0];
18424 vinfos[1].indices[1] = _ij1[1];
18425 vinfos[1].maxsolutions = _nj1;
18426 vinfos[2].jointtype = 1;
18427 vinfos[2].foffset = j2;
18428 vinfos[2].indices[0] = _ij2[0];
18429 vinfos[2].indices[1] = _ij2[1];
18430 vinfos[2].maxsolutions = _nj2;
18431 vinfos[3].jointtype = 1;
18432 vinfos[3].foffset = j3;
18433 vinfos[3].indices[0] = _ij3[0];
18434 vinfos[3].indices[1] = _ij3[1];
18435 vinfos[3].maxsolutions = _nj3;
18436 vinfos[4].jointtype = 1;
18437 vinfos[4].foffset = j4;
18438 vinfos[4].indices[0] = _ij4[0];
18439 vinfos[4].indices[1] = _ij4[1];
18440 vinfos[4].maxsolutions = _nj4;
18441 vinfos[5].jointtype = 1;
18442 vinfos[5].foffset = j5;
18443 vinfos[5].indices[0] = _ij5[0];
18444 vinfos[5].indices[1] = _ij5[1];
18445 vinfos[5].maxsolutions = _nj5;
18446 vinfos[6].jointtype = 1;
18447 vinfos[6].foffset = j6;
18448 vinfos[6].indices[0] = _ij6[0];
18449 vinfos[6].indices[1] = _ij6[1];
18450 vinfos[6].maxsolutions = _nj6;
18451 std::vector<int> vfree(0);
18452 solutions.AddSolution(vinfos, vfree);
18460 if (bgotonextstatement)
18462 bool bgotonextstatement =
true;
18467 bgotonextstatement =
false;
18471 if (bgotonextstatement)
18488 IkReal j0array[1], cj0array[1], sj0array[1];
18489 bool j0valid[1] = {
false };
18492 IKsign((((new_r11 * sj2)) + ((cj2 * new_r01)))), -1);
18498 IkReal(((-1.0) + (cj2 * cj2) + ((new_r01 * new_r10)))),
18500 ((((-1.0) * cj2 * sj2)) + (((-1.0) * new_r10 * new_r11)))),
18506 j0array[0] = ((-1.5707963267949) +
18507 (((1.5707963267949) * (x839.
value))) + (x840.
value));
18508 sj0array[0] =
IKsin(j0array[0]);
18509 cj0array[0] =
IKcos(j0array[0]);
18510 if (j0array[0] >
IKPI)
18512 j0array[0] -=
IK2PI;
18514 else if (j0array[0] < -
IKPI)
18516 j0array[0] +=
IK2PI;
18519 for (
int ij0 = 0; ij0 < 1; ++ij0)
18527 for (
int iij0 = ij0 + 1; iij0 < 1; ++iij0)
18529 if (j0valid[iij0] &&
18530 IKabs(cj0array[ij0] - cj0array[iij0]) <
18532 IKabs(sj0array[ij0] - sj0array[iij0]) <
18535 j0valid[iij0] =
false;
18541 cj0 = cj0array[ij0];
18542 sj0 = sj0array[ij0];
18544 IkReal evalcond[8];
18545 IkReal x841 =
IKcos(j0);
18546 IkReal x842 =
IKsin(j0);
18547 IkReal x843 = ((1.0) * cj2);
18548 IkReal x844 = (sj2 * x841);
18549 IkReal x845 = (sj2 * x842);
18550 IkReal x846 = ((1.0) * x842);
18551 IkReal x847 = (x842 * x843);
18552 evalcond[0] = (sj2 + ((new_r01 * x841)) + ((new_r11 * x842)));
18553 evalcond[1] = (((cj2 * x841)) + new_r11 + x845);
18555 (((new_r10 * x841)) + sj2 + (((-1.0) * new_r00 * x846)));
18557 (cj2 + (((-1.0) * new_r01 * x846)) + ((new_r11 * x841)));
18558 evalcond[4] = ((((-1.0) * x847)) + new_r10 + x844);
18559 evalcond[5] = ((((-1.0) * x847)) + new_r01 + x844);
18560 evalcond[6] = (((new_r10 * x842)) + ((new_r00 * x841)) +
18561 (((-1.0) * x843)));
18563 ((((-1.0) * x841 * x843)) + (((-1.0) * x845)) + new_r00);
18578 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
18579 vinfos[0].jointtype = 1;
18580 vinfos[0].foffset = j0;
18581 vinfos[0].indices[0] = _ij0[0];
18582 vinfos[0].indices[1] = _ij0[1];
18583 vinfos[0].maxsolutions = _nj0;
18584 vinfos[1].jointtype = 1;
18585 vinfos[1].foffset = j1;
18586 vinfos[1].indices[0] = _ij1[0];
18587 vinfos[1].indices[1] = _ij1[1];
18588 vinfos[1].maxsolutions = _nj1;
18589 vinfos[2].jointtype = 1;
18590 vinfos[2].foffset = j2;
18591 vinfos[2].indices[0] = _ij2[0];
18592 vinfos[2].indices[1] = _ij2[1];
18593 vinfos[2].maxsolutions = _nj2;
18594 vinfos[3].jointtype = 1;
18595 vinfos[3].foffset = j3;
18596 vinfos[3].indices[0] = _ij3[0];
18597 vinfos[3].indices[1] = _ij3[1];
18598 vinfos[3].maxsolutions = _nj3;
18599 vinfos[4].jointtype = 1;
18600 vinfos[4].foffset = j4;
18601 vinfos[4].indices[0] = _ij4[0];
18602 vinfos[4].indices[1] = _ij4[1];
18603 vinfos[4].maxsolutions = _nj4;
18604 vinfos[5].jointtype = 1;
18605 vinfos[5].foffset = j5;
18606 vinfos[5].indices[0] = _ij5[0];
18607 vinfos[5].indices[1] = _ij5[1];
18608 vinfos[5].maxsolutions = _nj5;
18609 vinfos[6].jointtype = 1;
18610 vinfos[6].foffset = j6;
18611 vinfos[6].indices[0] = _ij6[0];
18612 vinfos[6].indices[1] = _ij6[1];
18613 vinfos[6].maxsolutions = _nj6;
18614 std::vector<int> vfree(0);
18615 solutions.AddSolution(vinfos, vfree);
18625 IkReal j0array[1], cj0array[1], sj0array[1];
18626 bool j0valid[1] = {
false };
18628 IkReal x848 = ((1.0) * new_r11);
18630 IKsign(((new_r01 * new_r01) + (new_r11 * new_r11))), -1);
18636 IkReal(((((-1.0) * sj2 * x848)) + ((cj2 * new_r01)))),
18637 IkReal(((((-1.0) * new_r01 * sj2)) + (((-1.0) * cj2 * x848)))),
18643 j0array[0] = ((-1.5707963267949) +
18644 (((1.5707963267949) * (x849.
value))) + (x850.
value));
18645 sj0array[0] =
IKsin(j0array[0]);
18646 cj0array[0] =
IKcos(j0array[0]);
18647 if (j0array[0] >
IKPI)
18649 j0array[0] -=
IK2PI;
18651 else if (j0array[0] < -
IKPI)
18653 j0array[0] +=
IK2PI;
18656 for (
int ij0 = 0; ij0 < 1; ++ij0)
18664 for (
int iij0 = ij0 + 1; iij0 < 1; ++iij0)
18666 if (j0valid[iij0] &&
18667 IKabs(cj0array[ij0] - cj0array[iij0]) <
18671 j0valid[iij0] =
false;
18677 cj0 = cj0array[ij0];
18678 sj0 = sj0array[ij0];
18680 IkReal evalcond[8];
18681 IkReal x851 =
IKcos(j0);
18682 IkReal x852 =
IKsin(j0);
18683 IkReal x853 = ((1.0) * cj2);
18684 IkReal x854 = (sj2 * x851);
18685 IkReal x855 = (sj2 * x852);
18686 IkReal x856 = ((1.0) * x852);
18687 IkReal x857 = (x852 * x853);
18688 evalcond[0] = (sj2 + ((new_r11 * x852)) + ((new_r01 * x851)));
18689 evalcond[1] = (((cj2 * x851)) + new_r11 + x855);
18691 (sj2 + (((-1.0) * new_r00 * x856)) + ((new_r10 * x851)));
18693 (cj2 + (((-1.0) * new_r01 * x856)) + ((new_r11 * x851)));
18694 evalcond[4] = ((((-1.0) * x857)) + new_r10 + x854);
18695 evalcond[5] = ((((-1.0) * x857)) + new_r01 + x854);
18697 ((((-1.0) * x853)) + ((new_r10 * x852)) + ((new_r00 * x851)));
18699 ((((-1.0) * x855)) + new_r00 + (((-1.0) * x851 * x853)));
18714 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
18715 vinfos[0].jointtype = 1;
18716 vinfos[0].foffset = j0;
18717 vinfos[0].indices[0] = _ij0[0];
18718 vinfos[0].indices[1] = _ij0[1];
18719 vinfos[0].maxsolutions = _nj0;
18720 vinfos[1].jointtype = 1;
18721 vinfos[1].foffset = j1;
18722 vinfos[1].indices[0] = _ij1[0];
18723 vinfos[1].indices[1] = _ij1[1];
18724 vinfos[1].maxsolutions = _nj1;
18725 vinfos[2].jointtype = 1;
18726 vinfos[2].foffset = j2;
18727 vinfos[2].indices[0] = _ij2[0];
18728 vinfos[2].indices[1] = _ij2[1];
18729 vinfos[2].maxsolutions = _nj2;
18730 vinfos[3].jointtype = 1;
18731 vinfos[3].foffset = j3;
18732 vinfos[3].indices[0] = _ij3[0];
18733 vinfos[3].indices[1] = _ij3[1];
18734 vinfos[3].maxsolutions = _nj3;
18735 vinfos[4].jointtype = 1;
18736 vinfos[4].foffset = j4;
18737 vinfos[4].indices[0] = _ij4[0];
18738 vinfos[4].indices[1] = _ij4[1];
18739 vinfos[4].maxsolutions = _nj4;
18740 vinfos[5].jointtype = 1;
18741 vinfos[5].foffset = j5;
18742 vinfos[5].indices[0] = _ij5[0];
18743 vinfos[5].indices[1] = _ij5[1];
18744 vinfos[5].maxsolutions = _nj5;
18745 vinfos[6].jointtype = 1;
18746 vinfos[6].foffset = j6;
18747 vinfos[6].indices[0] = _ij6[0];
18748 vinfos[6].indices[1] = _ij6[1];
18749 vinfos[6].maxsolutions = _nj6;
18750 std::vector<int> vfree(0);
18751 solutions.AddSolution(vinfos, vfree);
18761 IkReal j0array[1], cj0array[1], sj0array[1];
18762 bool j0valid[1] = {
false };
18764 IkReal x858 = ((1.0) * sj2);
18766 IkReal((((new_r01 * sj2)) + (((-1.0) * new_r10 * x858)))),
18767 IkReal(((((-1.0) * new_r00 * x858)) + (((-1.0) * new_r11 * x858)))),
18774 IKsign((((new_r10 * new_r11)) + ((new_r00 * new_r01)))), -1);
18779 j0array[0] = ((-1.5707963267949) + (x859.
value) +
18780 (((1.5707963267949) * (x860.
value))));
18781 sj0array[0] =
IKsin(j0array[0]);
18782 cj0array[0] =
IKcos(j0array[0]);
18783 if (j0array[0] >
IKPI)
18785 j0array[0] -=
IK2PI;
18787 else if (j0array[0] < -
IKPI)
18789 j0array[0] +=
IK2PI;
18792 for (
int ij0 = 0; ij0 < 1; ++ij0)
18800 for (
int iij0 = ij0 + 1; iij0 < 1; ++iij0)
18802 if (j0valid[iij0] &&
18806 j0valid[iij0] =
false;
18812 cj0 = cj0array[ij0];
18813 sj0 = sj0array[ij0];
18815 IkReal evalcond[8];
18816 IkReal x861 =
IKcos(j0);
18817 IkReal x862 =
IKsin(j0);
18818 IkReal x863 = ((1.0) * cj2);
18819 IkReal x864 = (sj2 * x861);
18820 IkReal x865 = (sj2 * x862);
18821 IkReal x866 = ((1.0) * x862);
18822 IkReal x867 = (x862 * x863);
18823 evalcond[0] = (((new_r01 * x861)) + sj2 + ((new_r11 * x862)));
18824 evalcond[1] = (((cj2 * x861)) + new_r11 + x865);
18825 evalcond[2] = (sj2 + (((-1.0) * new_r00 * x866)) + ((new_r10 * x861)));
18826 evalcond[3] = (cj2 + (((-1.0) * new_r01 * x866)) + ((new_r11 * x861)));
18827 evalcond[4] = ((((-1.0) * x867)) + new_r10 + x864);
18828 evalcond[5] = ((((-1.0) * x867)) + new_r01 + x864);
18830 ((((-1.0) * x863)) + ((new_r00 * x861)) + ((new_r10 * x862)));
18831 evalcond[7] = ((((-1.0) * x865)) + (((-1.0) * x861 * x863)) + new_r00);
18846 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
18847 vinfos[0].jointtype = 1;
18848 vinfos[0].foffset = j0;
18849 vinfos[0].indices[0] = _ij0[0];
18850 vinfos[0].indices[1] = _ij0[1];
18851 vinfos[0].maxsolutions = _nj0;
18852 vinfos[1].jointtype = 1;
18853 vinfos[1].foffset = j1;
18854 vinfos[1].indices[0] = _ij1[0];
18855 vinfos[1].indices[1] = _ij1[1];
18856 vinfos[1].maxsolutions = _nj1;
18857 vinfos[2].jointtype = 1;
18858 vinfos[2].foffset = j2;
18859 vinfos[2].indices[0] = _ij2[0];
18860 vinfos[2].indices[1] = _ij2[1];
18861 vinfos[2].maxsolutions = _nj2;
18862 vinfos[3].jointtype = 1;
18863 vinfos[3].foffset = j3;
18864 vinfos[3].indices[0] = _ij3[0];
18865 vinfos[3].indices[1] = _ij3[1];
18866 vinfos[3].maxsolutions = _nj3;
18867 vinfos[4].jointtype = 1;
18868 vinfos[4].foffset = j4;
18869 vinfos[4].indices[0] = _ij4[0];
18870 vinfos[4].indices[1] = _ij4[1];
18871 vinfos[4].maxsolutions = _nj4;
18872 vinfos[5].jointtype = 1;
18873 vinfos[5].foffset = j5;
18874 vinfos[5].indices[0] = _ij5[0];
18875 vinfos[5].indices[1] = _ij5[1];
18876 vinfos[5].maxsolutions = _nj5;
18877 vinfos[6].jointtype = 1;
18878 vinfos[6].foffset = j6;
18879 vinfos[6].indices[0] = _ij6[0];
18880 vinfos[6].indices[1] = _ij6[1];
18881 vinfos[6].maxsolutions = _nj6;
18882 std::vector<int> vfree(0);
18883 solutions.AddSolution(vinfos, vfree);
18891 if (bgotonextstatement)
18893 bool bgotonextstatement =
true;
18896 evalcond[0] = ((
IKabs(new_r12)) + (
IKabs(new_r02)));
18897 if (
IKabs(evalcond[0]) < 0.0000050000000000)
18899 bgotonextstatement =
false;
18906 j0eval[0] = ((
IKabs(new_r10)) + (
IKabs(new_r00)));
18907 if (
IKabs(j0eval[0]) < 0.0000010000000000)
18915 j0eval[0] = ((
IKabs(new_r11)) + (
IKabs(new_r01)));
18916 if (
IKabs(j0eval[0]) < 0.0000010000000000)
18925 ((
IKabs((new_r10 * new_r22))) + (
IKabs((new_r00 * new_r22))));
18926 if (
IKabs(j0eval[0]) < 0.0000010000000000)
18933 IkReal j0array[2], cj0array[2], sj0array[2];
18934 bool j0valid[2] = {
false };
18938 IkReal((new_r10 * new_r22)),
18944 IkReal x868 = x869.
value;
18945 j0array[0] = ((-1.0) * x868);
18946 sj0array[0] =
IKsin(j0array[0]);
18947 cj0array[0] =
IKcos(j0array[0]);
18948 j0array[1] = ((3.14159265358979) + (((-1.0) * x868)));
18949 sj0array[1] =
IKsin(j0array[1]);
18950 cj0array[1] =
IKcos(j0array[1]);
18951 if (j0array[0] >
IKPI)
18953 j0array[0] -=
IK2PI;
18955 else if (j0array[0] < -
IKPI)
18957 j0array[0] +=
IK2PI;
18960 if (j0array[1] >
IKPI)
18962 j0array[1] -=
IK2PI;
18964 else if (j0array[1] < -
IKPI)
18966 j0array[1] +=
IK2PI;
18969 for (
int ij0 = 0; ij0 < 2; ++ij0)
18977 for (
int iij0 = ij0 + 1; iij0 < 2; ++iij0)
18979 if (j0valid[iij0] &&
18980 IKabs(cj0array[ij0] - cj0array[iij0]) <
18982 IKabs(sj0array[ij0] - sj0array[iij0]) <
18985 j0valid[iij0] =
false;
18991 cj0 = cj0array[ij0];
18992 sj0 = sj0array[ij0];
18994 IkReal evalcond[5];
18995 IkReal x870 =
IKsin(j0);
18996 IkReal x871 =
IKcos(j0);
18997 IkReal x872 = ((1.0) * x870);
18998 IkReal x873 = (new_r11 * x870);
18999 IkReal x874 = (new_r01 * x871);
19000 evalcond[0] = (((new_r00 * x871)) + ((new_r10 * x870)));
19001 evalcond[1] = (x873 + x874);
19003 ((((-1.0) * new_r00 * x872)) + ((new_r10 * x871)));
19005 ((((-1.0) * new_r01 * x872)) + ((new_r11 * x871)));
19006 evalcond[4] = (((new_r22 * x874)) + ((new_r22 * x873)));
19018 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
19019 vinfos[0].jointtype = 1;
19020 vinfos[0].foffset = j0;
19021 vinfos[0].indices[0] = _ij0[0];
19022 vinfos[0].indices[1] = _ij0[1];
19023 vinfos[0].maxsolutions = _nj0;
19024 vinfos[1].jointtype = 1;
19025 vinfos[1].foffset = j1;
19026 vinfos[1].indices[0] = _ij1[0];
19027 vinfos[1].indices[1] = _ij1[1];
19028 vinfos[1].maxsolutions = _nj1;
19029 vinfos[2].jointtype = 1;
19030 vinfos[2].foffset = j2;
19031 vinfos[2].indices[0] = _ij2[0];
19032 vinfos[2].indices[1] = _ij2[1];
19033 vinfos[2].maxsolutions = _nj2;
19034 vinfos[3].jointtype = 1;
19035 vinfos[3].foffset = j3;
19036 vinfos[3].indices[0] = _ij3[0];
19037 vinfos[3].indices[1] = _ij3[1];
19038 vinfos[3].maxsolutions = _nj3;
19039 vinfos[4].jointtype = 1;
19040 vinfos[4].foffset = j4;
19041 vinfos[4].indices[0] = _ij4[0];
19042 vinfos[4].indices[1] = _ij4[1];
19043 vinfos[4].maxsolutions = _nj4;
19044 vinfos[5].jointtype = 1;
19045 vinfos[5].foffset = j5;
19046 vinfos[5].indices[0] = _ij5[0];
19047 vinfos[5].indices[1] = _ij5[1];
19048 vinfos[5].maxsolutions = _nj5;
19049 vinfos[6].jointtype = 1;
19050 vinfos[6].foffset = j6;
19051 vinfos[6].indices[0] = _ij6[0];
19052 vinfos[6].indices[1] = _ij6[1];
19053 vinfos[6].maxsolutions = _nj6;
19054 std::vector<int> vfree(0);
19055 solutions.AddSolution(vinfos, vfree);
19065 IkReal j0array[2], cj0array[2], sj0array[2];
19066 bool j0valid[2] = {
false };
19074 IkReal x875 = x876.
value;
19075 j0array[0] = ((-1.0) * x875);
19076 sj0array[0] =
IKsin(j0array[0]);
19077 cj0array[0] =
IKcos(j0array[0]);
19078 j0array[1] = ((3.14159265358979) + (((-1.0) * x875)));
19079 sj0array[1] =
IKsin(j0array[1]);
19080 cj0array[1] =
IKcos(j0array[1]);
19081 if (j0array[0] >
IKPI)
19083 j0array[0] -=
IK2PI;
19085 else if (j0array[0] < -
IKPI)
19087 j0array[0] +=
IK2PI;
19090 if (j0array[1] >
IKPI)
19092 j0array[1] -=
IK2PI;
19094 else if (j0array[1] < -
IKPI)
19096 j0array[1] +=
IK2PI;
19099 for (
int ij0 = 0; ij0 < 2; ++ij0)
19107 for (
int iij0 = ij0 + 1; iij0 < 2; ++iij0)
19109 if (j0valid[iij0] &&
19110 IKabs(cj0array[ij0] - cj0array[iij0]) <
19112 IKabs(sj0array[ij0] - sj0array[iij0]) <
19115 j0valid[iij0] =
false;
19121 cj0 = cj0array[ij0];
19122 sj0 = sj0array[ij0];
19124 IkReal evalcond[5];
19125 IkReal x877 =
IKcos(j0);
19126 IkReal x878 =
IKsin(j0);
19127 IkReal x879 = (new_r10 * x878);
19128 IkReal x880 = ((1.0) * x878);
19129 IkReal x881 = (new_r00 * x877);
19130 evalcond[0] = (x879 + x881);
19131 evalcond[1] = ((((-1.0) * new_r00 * x880)) + ((new_r10 * x877)));
19132 evalcond[2] = ((((-1.0) * new_r01 * x880)) + ((new_r11 * x877)));
19133 evalcond[3] = (((new_r22 * x881)) + ((new_r22 * x879)));
19135 (((new_r11 * new_r22 * x878)) + ((new_r01 * new_r22 * x877)));
19147 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
19148 vinfos[0].jointtype = 1;
19149 vinfos[0].foffset = j0;
19150 vinfos[0].indices[0] = _ij0[0];
19151 vinfos[0].indices[1] = _ij0[1];
19152 vinfos[0].maxsolutions = _nj0;
19153 vinfos[1].jointtype = 1;
19154 vinfos[1].foffset = j1;
19155 vinfos[1].indices[0] = _ij1[0];
19156 vinfos[1].indices[1] = _ij1[1];
19157 vinfos[1].maxsolutions = _nj1;
19158 vinfos[2].jointtype = 1;
19159 vinfos[2].foffset = j2;
19160 vinfos[2].indices[0] = _ij2[0];
19161 vinfos[2].indices[1] = _ij2[1];
19162 vinfos[2].maxsolutions = _nj2;
19163 vinfos[3].jointtype = 1;
19164 vinfos[3].foffset = j3;
19165 vinfos[3].indices[0] = _ij3[0];
19166 vinfos[3].indices[1] = _ij3[1];
19167 vinfos[3].maxsolutions = _nj3;
19168 vinfos[4].jointtype = 1;
19169 vinfos[4].foffset = j4;
19170 vinfos[4].indices[0] = _ij4[0];
19171 vinfos[4].indices[1] = _ij4[1];
19172 vinfos[4].maxsolutions = _nj4;
19173 vinfos[5].jointtype = 1;
19174 vinfos[5].foffset = j5;
19175 vinfos[5].indices[0] = _ij5[0];
19176 vinfos[5].indices[1] = _ij5[1];
19177 vinfos[5].maxsolutions = _nj5;
19178 vinfos[6].jointtype = 1;
19179 vinfos[6].foffset = j6;
19180 vinfos[6].indices[0] = _ij6[0];
19181 vinfos[6].indices[1] = _ij6[1];
19182 vinfos[6].maxsolutions = _nj6;
19183 std::vector<int> vfree(0);
19184 solutions.AddSolution(vinfos, vfree);
19194 IkReal j0array[2], cj0array[2], sj0array[2];
19195 bool j0valid[2] = {
false };
19203 IkReal x882 = x883.
value;
19204 j0array[0] = ((-1.0) * x882);
19205 sj0array[0] =
IKsin(j0array[0]);
19206 cj0array[0] =
IKcos(j0array[0]);
19207 j0array[1] = ((3.14159265358979) + (((-1.0) * x882)));
19208 sj0array[1] =
IKsin(j0array[1]);
19209 cj0array[1] =
IKcos(j0array[1]);
19210 if (j0array[0] >
IKPI)
19212 j0array[0] -=
IK2PI;
19214 else if (j0array[0] < -
IKPI)
19216 j0array[0] +=
IK2PI;
19219 if (j0array[1] >
IKPI)
19221 j0array[1] -=
IK2PI;
19223 else if (j0array[1] < -
IKPI)
19225 j0array[1] +=
IK2PI;
19228 for (
int ij0 = 0; ij0 < 2; ++ij0)
19236 for (
int iij0 = ij0 + 1; iij0 < 2; ++iij0)
19238 if (j0valid[iij0] &&
19242 j0valid[iij0] =
false;
19248 cj0 = cj0array[ij0];
19249 sj0 = sj0array[ij0];
19251 IkReal evalcond[5];
19252 IkReal x884 =
IKcos(j0);
19253 IkReal x885 =
IKsin(j0);
19254 IkReal x886 = ((1.0) * x885);
19255 IkReal x887 = (new_r11 * x885);
19256 IkReal x888 = (new_r22 * x884);
19257 evalcond[0] = (((new_r01 * x884)) + x887);
19258 evalcond[1] = (((new_r10 * x884)) + (((-1.0) * new_r00 * x886)));
19259 evalcond[2] = (((new_r11 * x884)) + (((-1.0) * new_r01 * x886)));
19260 evalcond[3] = (((new_r00 * x888)) + ((new_r10 * new_r22 * x885)));
19261 evalcond[4] = (((new_r01 * x888)) + ((new_r22 * x887)));
19273 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
19274 vinfos[0].jointtype = 1;
19275 vinfos[0].foffset = j0;
19276 vinfos[0].indices[0] = _ij0[0];
19277 vinfos[0].indices[1] = _ij0[1];
19278 vinfos[0].maxsolutions = _nj0;
19279 vinfos[1].jointtype = 1;
19280 vinfos[1].foffset = j1;
19281 vinfos[1].indices[0] = _ij1[0];
19282 vinfos[1].indices[1] = _ij1[1];
19283 vinfos[1].maxsolutions = _nj1;
19284 vinfos[2].jointtype = 1;
19285 vinfos[2].foffset = j2;
19286 vinfos[2].indices[0] = _ij2[0];
19287 vinfos[2].indices[1] = _ij2[1];
19288 vinfos[2].maxsolutions = _nj2;
19289 vinfos[3].jointtype = 1;
19290 vinfos[3].foffset = j3;
19291 vinfos[3].indices[0] = _ij3[0];
19292 vinfos[3].indices[1] = _ij3[1];
19293 vinfos[3].maxsolutions = _nj3;
19294 vinfos[4].jointtype = 1;
19295 vinfos[4].foffset = j4;
19296 vinfos[4].indices[0] = _ij4[0];
19297 vinfos[4].indices[1] = _ij4[1];
19298 vinfos[4].maxsolutions = _nj4;
19299 vinfos[5].jointtype = 1;
19300 vinfos[5].foffset = j5;
19301 vinfos[5].indices[0] = _ij5[0];
19302 vinfos[5].indices[1] = _ij5[1];
19303 vinfos[5].maxsolutions = _nj5;
19304 vinfos[6].jointtype = 1;
19305 vinfos[6].foffset = j6;
19306 vinfos[6].indices[0] = _ij6[0];
19307 vinfos[6].indices[1] = _ij6[1];
19308 vinfos[6].maxsolutions = _nj6;
19309 std::vector<int> vfree(0);
19310 solutions.AddSolution(vinfos, vfree);
19318 if (bgotonextstatement)
19320 bool bgotonextstatement =
true;
19325 bgotonextstatement =
false;
19329 if (bgotonextstatement)
19340 IkReal j0array[1], cj0array[1], sj0array[1];
19341 bool j0valid[1] = {
false };
19348 IkReal x889 = x890.
value;
19354 if (
IKabs((x889 * (x891.
value) * ((((sj1 * sj2)) + ((new_r02 * new_r10)))))) <
19357 IKabs(
IKsqr((x889 * (x891.
value) * ((((sj1 * sj2)) + ((new_r02 * new_r10)))))) +
19360 j0array[0] =
IKatan2((x889 * (x891.
value) * ((((sj1 * sj2)) + ((new_r02 * new_r10))))),
19362 sj0array[0] =
IKsin(j0array[0]);
19363 cj0array[0] =
IKcos(j0array[0]);
19364 if (j0array[0] >
IKPI)
19366 j0array[0] -=
IK2PI;
19368 else if (j0array[0] < -
IKPI)
19370 j0array[0] +=
IK2PI;
19373 for (
int ij0 = 0; ij0 < 1; ++ij0)
19381 for (
int iij0 = ij0 + 1; iij0 < 1; ++iij0)
19383 if (j0valid[iij0] &&
19387 j0valid[iij0] =
false;
19393 cj0 = cj0array[ij0];
19394 sj0 = sj0array[ij0];
19396 IkReal evalcond[18];
19397 IkReal x892 =
IKcos(j0);
19398 IkReal x893 =
IKsin(j0);
19399 IkReal x894 = ((1.0) * sj1);
19400 IkReal x895 = ((1.0) * sj2);
19401 IkReal x896 = ((1.0) * cj1);
19402 IkReal x897 = (new_r10 * x893);
19403 IkReal x898 = (cj1 * x892);
19404 IkReal x899 = (cj1 * x893);
19405 IkReal x900 = (new_r00 * x892);
19406 IkReal x901 = ((1.0) * x893);
19407 IkReal x902 = (new_r11 * x893);
19408 IkReal x903 = (new_r12 * x893);
19409 IkReal x904 = (new_r02 * x892);
19410 IkReal x905 = (new_r01 * x892);
19411 evalcond[0] = ((((-1.0) * x892 * x894)) + new_r02);
19412 evalcond[1] = ((((-1.0) * x893 * x894)) + new_r12);
19413 evalcond[2] = ((((-1.0) * new_r02 * x901)) + ((new_r12 * x892)));
19414 evalcond[3] = (sj2 + ((new_r10 * x892)) + (((-1.0) * new_r00 * x901)));
19415 evalcond[4] = (((new_r11 * x892)) + cj2 + (((-1.0) * new_r01 * x901)));
19416 evalcond[5] = (((cj2 * x899)) + ((sj2 * x892)) + new_r10);
19417 evalcond[6] = ((((-1.0) * x894)) + x904 + x903);
19418 evalcond[7] = (((cj1 * cj2)) + x897 + x900);
19419 evalcond[8] = (((cj2 * x898)) + (((-1.0) * x893 * x895)) + new_r00);
19420 evalcond[9] = (((cj2 * x892)) + (((-1.0) * x895 * x899)) + new_r11);
19421 evalcond[10] = ((((-1.0) * cj1 * x895)) + x905 + x902);
19422 evalcond[11] = ((((-1.0) * x895 * x898)) + new_r01 + (((-1.0) * cj2 * x901)));
19424 (((new_r12 * x899)) + ((new_r02 * x898)) + (((-1.0) * new_r22 * x894)));
19426 (cj2 + ((new_r00 * x898)) + (((-1.0) * new_r20 * x894)) + ((cj1 * x897)));
19427 evalcond[14] = ((((-1.0) * x894 * x900)) + (((-1.0) * new_r20 * x896)) +
19428 (((-1.0) * x894 * x897)));
19429 evalcond[15] = ((((-1.0) * x894 * x902)) + (((-1.0) * x894 * x905)) +
19430 (((-1.0) * new_r21 * x896)));
19431 evalcond[16] = ((1.0) + (((-1.0) * x894 * x903)) + (((-1.0) * x894 * x904)) +
19432 (((-1.0) * new_r22 * x896)));
19433 evalcond[17] = (((new_r11 * x899)) + ((new_r01 * x898)) +
19434 (((-1.0) * new_r21 * x894)) + (((-1.0) * x895)));
19459 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
19460 vinfos[0].jointtype = 1;
19461 vinfos[0].foffset = j0;
19462 vinfos[0].indices[0] = _ij0[0];
19463 vinfos[0].indices[1] = _ij0[1];
19464 vinfos[0].maxsolutions = _nj0;
19465 vinfos[1].jointtype = 1;
19466 vinfos[1].foffset = j1;
19467 vinfos[1].indices[0] = _ij1[0];
19468 vinfos[1].indices[1] = _ij1[1];
19469 vinfos[1].maxsolutions = _nj1;
19470 vinfos[2].jointtype = 1;
19471 vinfos[2].foffset = j2;
19472 vinfos[2].indices[0] = _ij2[0];
19473 vinfos[2].indices[1] = _ij2[1];
19474 vinfos[2].maxsolutions = _nj2;
19475 vinfos[3].jointtype = 1;
19476 vinfos[3].foffset = j3;
19477 vinfos[3].indices[0] = _ij3[0];
19478 vinfos[3].indices[1] = _ij3[1];
19479 vinfos[3].maxsolutions = _nj3;
19480 vinfos[4].jointtype = 1;
19481 vinfos[4].foffset = j4;
19482 vinfos[4].indices[0] = _ij4[0];
19483 vinfos[4].indices[1] = _ij4[1];
19484 vinfos[4].maxsolutions = _nj4;
19485 vinfos[5].jointtype = 1;
19486 vinfos[5].foffset = j5;
19487 vinfos[5].indices[0] = _ij5[0];
19488 vinfos[5].indices[1] = _ij5[1];
19489 vinfos[5].maxsolutions = _nj5;
19490 vinfos[6].jointtype = 1;
19491 vinfos[6].foffset = j6;
19492 vinfos[6].indices[0] = _ij6[0];
19493 vinfos[6].indices[1] = _ij6[1];
19494 vinfos[6].maxsolutions = _nj6;
19495 std::vector<int> vfree(0);
19496 solutions.AddSolution(vinfos, vfree);
19506 IkReal j0array[1], cj0array[1], sj0array[1];
19507 bool j0valid[1] = {
false };
19520 j0array[0] = ((-1.5707963267949) + (((1.5707963267949) * (x906.
value))) + (x907.
value));
19521 sj0array[0] =
IKsin(j0array[0]);
19522 cj0array[0] =
IKcos(j0array[0]);
19523 if (j0array[0] >
IKPI)
19525 j0array[0] -=
IK2PI;
19527 else if (j0array[0] < -
IKPI)
19529 j0array[0] +=
IK2PI;
19532 for (
int ij0 = 0; ij0 < 1; ++ij0)
19540 for (
int iij0 = ij0 + 1; iij0 < 1; ++iij0)
19545 j0valid[iij0] =
false;
19551 cj0 = cj0array[ij0];
19552 sj0 = sj0array[ij0];
19554 IkReal evalcond[18];
19555 IkReal x908 =
IKcos(j0);
19556 IkReal x909 =
IKsin(j0);
19557 IkReal x910 = ((1.0) * sj1);
19558 IkReal x911 = ((1.0) * sj2);
19559 IkReal x912 = ((1.0) * cj1);
19560 IkReal x913 = (new_r10 * x909);
19561 IkReal x914 = (cj1 * x908);
19562 IkReal x915 = (cj1 * x909);
19563 IkReal x916 = (new_r00 * x908);
19564 IkReal x917 = ((1.0) * x909);
19565 IkReal x918 = (new_r11 * x909);
19566 IkReal x919 = (new_r12 * x909);
19567 IkReal x920 = (new_r02 * x908);
19568 IkReal x921 = (new_r01 * x908);
19569 evalcond[0] = ((((-1.0) * x908 * x910)) + new_r02);
19570 evalcond[1] = (new_r12 + (((-1.0) * x909 * x910)));
19571 evalcond[2] = ((((-1.0) * new_r02 * x917)) + ((new_r12 * x908)));
19572 evalcond[3] = (sj2 + ((new_r10 * x908)) + (((-1.0) * new_r00 * x917)));
19573 evalcond[4] = (cj2 + ((new_r11 * x908)) + (((-1.0) * new_r01 * x917)));
19574 evalcond[5] = (((sj2 * x908)) + ((cj2 * x915)) + new_r10);
19575 evalcond[6] = ((((-1.0) * x910)) + x920 + x919);
19576 evalcond[7] = (((cj1 * cj2)) + x913 + x916);
19577 evalcond[8] = (((cj2 * x914)) + new_r00 + (((-1.0) * x909 * x911)));
19578 evalcond[9] = (((cj2 * x908)) + new_r11 + (((-1.0) * x911 * x915)));
19579 evalcond[10] = ((((-1.0) * cj1 * x911)) + x921 + x918);
19580 evalcond[11] = (new_r01 + (((-1.0) * x911 * x914)) + (((-1.0) * cj2 * x917)));
19581 evalcond[12] = ((((-1.0) * new_r22 * x910)) + ((new_r12 * x915)) + ((new_r02 * x914)));
19583 (cj2 + (((-1.0) * new_r20 * x910)) + ((new_r00 * x914)) + ((cj1 * x913)));
19585 ((((-1.0) * new_r20 * x912)) + (((-1.0) * x910 * x913)) + (((-1.0) * x910 * x916)));
19587 ((((-1.0) * new_r21 * x912)) + (((-1.0) * x910 * x918)) + (((-1.0) * x910 * x921)));
19588 evalcond[16] = ((1.0) + (((-1.0) * new_r22 * x912)) + (((-1.0) * x910 * x919)) +
19589 (((-1.0) * x910 * x920)));
19590 evalcond[17] = ((((-1.0) * new_r21 * x910)) + ((new_r11 * x915)) + (((-1.0) * x911)) +
19591 ((new_r01 * x914)));
19616 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
19617 vinfos[0].jointtype = 1;
19618 vinfos[0].foffset = j0;
19619 vinfos[0].indices[0] = _ij0[0];
19620 vinfos[0].indices[1] = _ij0[1];
19621 vinfos[0].maxsolutions = _nj0;
19622 vinfos[1].jointtype = 1;
19623 vinfos[1].foffset = j1;
19624 vinfos[1].indices[0] = _ij1[0];
19625 vinfos[1].indices[1] = _ij1[1];
19626 vinfos[1].maxsolutions = _nj1;
19627 vinfos[2].jointtype = 1;
19628 vinfos[2].foffset = j2;
19629 vinfos[2].indices[0] = _ij2[0];
19630 vinfos[2].indices[1] = _ij2[1];
19631 vinfos[2].maxsolutions = _nj2;
19632 vinfos[3].jointtype = 1;
19633 vinfos[3].foffset = j3;
19634 vinfos[3].indices[0] = _ij3[0];
19635 vinfos[3].indices[1] = _ij3[1];
19636 vinfos[3].maxsolutions = _nj3;
19637 vinfos[4].jointtype = 1;
19638 vinfos[4].foffset = j4;
19639 vinfos[4].indices[0] = _ij4[0];
19640 vinfos[4].indices[1] = _ij4[1];
19641 vinfos[4].maxsolutions = _nj4;
19642 vinfos[5].jointtype = 1;
19643 vinfos[5].foffset = j5;
19644 vinfos[5].indices[0] = _ij5[0];
19645 vinfos[5].indices[1] = _ij5[1];
19646 vinfos[5].maxsolutions = _nj5;
19647 vinfos[6].jointtype = 1;
19648 vinfos[6].foffset = j6;
19649 vinfos[6].indices[0] = _ij6[0];
19650 vinfos[6].indices[1] = _ij6[1];
19651 vinfos[6].maxsolutions = _nj6;
19652 std::vector<int> vfree(0);
19653 solutions.AddSolution(vinfos, vfree);
19667 IkReal j0array[1], cj0array[1], sj0array[1];
19668 bool j0valid[1] = {
false };
19680 j0array[0] = ((-1.5707963267949) + (((1.5707963267949) * (x922.
value))) + (x923.
value));
19681 sj0array[0] =
IKsin(j0array[0]);
19682 cj0array[0] =
IKcos(j0array[0]);
19683 if (j0array[0] >
IKPI)
19685 j0array[0] -=
IK2PI;
19687 else if (j0array[0] < -
IKPI)
19689 j0array[0] +=
IK2PI;
19692 for (
int ij0 = 0; ij0 < 1; ++ij0)
19700 for (
int iij0 = ij0 + 1; iij0 < 1; ++iij0)
19705 j0valid[iij0] =
false;
19711 cj0 = cj0array[ij0];
19712 sj0 = sj0array[ij0];
19714 IkReal evalcond[8];
19715 IkReal x924 =
IKcos(j0);
19716 IkReal x925 =
IKsin(j0);
19717 IkReal x926 = ((1.0) * cj1);
19718 IkReal x927 = ((1.0) * sj1);
19719 IkReal x928 = (new_r12 * x925);
19720 IkReal x929 = (new_r02 * x924);
19721 evalcond[0] = ((((-1.0) * x924 * x927)) + new_r02);
19722 evalcond[1] = ((((-1.0) * x925 * x927)) + new_r12);
19723 evalcond[2] = ((((-1.0) * new_r02 * x925)) + ((new_r12 * x924)));
19724 evalcond[3] = ((((-1.0) * x927)) + x928 + x929);
19725 evalcond[4] = ((((-1.0) * new_r22 * x927)) + ((cj1 * x929)) + ((cj1 * x928)));
19726 evalcond[5] = ((((-1.0) * new_r10 * x925 * x927)) + (((-1.0) * new_r00 * x924 * x927)) +
19727 (((-1.0) * new_r20 * x926)));
19728 evalcond[6] = ((((-1.0) * new_r21 * x926)) + (((-1.0) * new_r01 * x924 * x927)) +
19729 (((-1.0) * new_r11 * x925 * x927)));
19731 ((1.0) + (((-1.0) * x927 * x928)) + (((-1.0) * x927 * x929)) + (((-1.0) * new_r22 * x926)));
19744 j2eval[1] =
IKsign(sj1);
19745 j2eval[2] = ((
IKabs(new_r20)) + (
IKabs(new_r21)));
19746 if (
IKabs(j2eval[0]) < 0.0000010000000000 ||
IKabs(j2eval[1]) < 0.0000010000000000 ||
19747 IKabs(j2eval[2]) < 0.0000010000000000)
19753 if (
IKabs(j2eval[0]) < 0.0000010000000000 ||
IKabs(j2eval[1]) < 0.0000010000000000)
19760 if (
IKabs(j2eval[0]) < 0.0000010000000000 ||
IKabs(j2eval[1]) < 0.0000010000000000 ||
19761 IKabs(j2eval[2]) < 0.0000010000000000)
19764 IkReal evalcond[5];
19765 bool bgotonextstatement =
true;
19768 evalcond[0] = ((-3.14159265358979) +
19769 (
IKfmod(((3.14159265358979) + (
IKabs(j1))), 6.28318530717959)));
19770 evalcond[1] = new_r21;
19771 evalcond[2] = new_r02;
19772 evalcond[3] = new_r12;
19773 evalcond[4] = new_r20;
19774 if (
IKabs(evalcond[0]) < 0.0000050000000000 &&
19775 IKabs(evalcond[1]) < 0.0000050000000000 &&
19776 IKabs(evalcond[2]) < 0.0000050000000000 &&
19777 IKabs(evalcond[3]) < 0.0000050000000000 &&
19778 IKabs(evalcond[4]) < 0.0000050000000000)
19780 bgotonextstatement =
false;
19782 IkReal j2array[1], cj2array[1], sj2array[1];
19783 bool j2valid[1] = {
false };
19785 IkReal x930 = ((1.0) * cj0);
19786 if (
IKabs((((new_r00 * sj0)) + (((-1.0) * new_r10 * x930)))) <
19788 IKabs(((((-1.0) * new_r00 * x930)) + (((-1.0) * new_r10 * sj0)))) <
19790 IKabs(
IKsqr((((new_r00 * sj0)) + (((-1.0) * new_r10 * x930)))) +
19791 IKsqr(((((-1.0) * new_r00 * x930)) + (((-1.0) * new_r10 * sj0)))) -
19794 j2array[0] =
IKatan2((((new_r00 * sj0)) + (((-1.0) * new_r10 * x930))),
19795 ((((-1.0) * new_r00 * x930)) + (((-1.0) * new_r10 * sj0))));
19796 sj2array[0] =
IKsin(j2array[0]);
19797 cj2array[0] =
IKcos(j2array[0]);
19798 if (j2array[0] >
IKPI)
19800 j2array[0] -=
IK2PI;
19802 else if (j2array[0] < -
IKPI)
19804 j2array[0] +=
IK2PI;
19807 for (
int ij2 = 0; ij2 < 1; ++ij2)
19815 for (
int iij2 = ij2 + 1; iij2 < 1; ++iij2)
19817 if (j2valid[iij2] &&
19821 j2valid[iij2] =
false;
19827 cj2 = cj2array[ij2];
19828 sj2 = sj2array[ij2];
19830 IkReal evalcond[8];
19831 IkReal x931 =
IKcos(j2);
19832 IkReal x932 =
IKsin(j2);
19833 IkReal x933 = ((1.0) * sj0);
19834 IkReal x934 = (cj0 * x931);
19835 IkReal x935 = (cj0 * x932);
19836 IkReal x936 = (x932 * x933);
19837 evalcond[0] = (((new_r10 * sj0)) + ((cj0 * new_r00)) + x931);
19838 evalcond[1] = ((((-1.0) * new_r00 * x933)) + ((cj0 * new_r10)) + x932);
19839 evalcond[2] = ((((-1.0) * new_r01 * x933)) + ((cj0 * new_r11)) + x931);
19840 evalcond[3] = (((sj0 * x931)) + new_r10 + x935);
19841 evalcond[4] = (((new_r11 * sj0)) + (((-1.0) * x932)) + ((cj0 * new_r01)));
19842 evalcond[5] = (new_r00 + x934 + (((-1.0) * x936)));
19843 evalcond[6] = (new_r11 + x934 + (((-1.0) * x936)));
19844 evalcond[7] = ((((-1.0) * x931 * x933)) + (((-1.0) * x935)) + new_r01);
19859 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
19860 vinfos[0].jointtype = 1;
19861 vinfos[0].foffset = j0;
19862 vinfos[0].indices[0] = _ij0[0];
19863 vinfos[0].indices[1] = _ij0[1];
19864 vinfos[0].maxsolutions = _nj0;
19865 vinfos[1].jointtype = 1;
19866 vinfos[1].foffset = j1;
19867 vinfos[1].indices[0] = _ij1[0];
19868 vinfos[1].indices[1] = _ij1[1];
19869 vinfos[1].maxsolutions = _nj1;
19870 vinfos[2].jointtype = 1;
19871 vinfos[2].foffset = j2;
19872 vinfos[2].indices[0] = _ij2[0];
19873 vinfos[2].indices[1] = _ij2[1];
19874 vinfos[2].maxsolutions = _nj2;
19875 vinfos[3].jointtype = 1;
19876 vinfos[3].foffset = j3;
19877 vinfos[3].indices[0] = _ij3[0];
19878 vinfos[3].indices[1] = _ij3[1];
19879 vinfos[3].maxsolutions = _nj3;
19880 vinfos[4].jointtype = 1;
19881 vinfos[4].foffset = j4;
19882 vinfos[4].indices[0] = _ij4[0];
19883 vinfos[4].indices[1] = _ij4[1];
19884 vinfos[4].maxsolutions = _nj4;
19885 vinfos[5].jointtype = 1;
19886 vinfos[5].foffset = j5;
19887 vinfos[5].indices[0] = _ij5[0];
19888 vinfos[5].indices[1] = _ij5[1];
19889 vinfos[5].maxsolutions = _nj5;
19890 vinfos[6].jointtype = 1;
19891 vinfos[6].foffset = j6;
19892 vinfos[6].indices[0] = _ij6[0];
19893 vinfos[6].indices[1] = _ij6[1];
19894 vinfos[6].maxsolutions = _nj6;
19895 std::vector<int> vfree(0);
19896 solutions.AddSolution(vinfos, vfree);
19902 if (bgotonextstatement)
19904 bool bgotonextstatement =
true;
19907 evalcond[0] = ((-3.14159265358979) +
19908 (
IKfmod(((3.14159265358979) + (
IKabs(((-3.14159265358979) + j1)))),
19909 6.28318530717959)));
19910 evalcond[1] = new_r21;
19911 evalcond[2] = new_r02;
19912 evalcond[3] = new_r12;
19913 evalcond[4] = new_r20;
19914 if (
IKabs(evalcond[0]) < 0.0000050000000000 &&
19915 IKabs(evalcond[1]) < 0.0000050000000000 &&
19916 IKabs(evalcond[2]) < 0.0000050000000000 &&
19917 IKabs(evalcond[3]) < 0.0000050000000000 &&
19918 IKabs(evalcond[4]) < 0.0000050000000000)
19920 bgotonextstatement =
false;
19922 IkReal j2array[1], cj2array[1], sj2array[1];
19923 bool j2valid[1] = {
false };
19925 IkReal x937 = ((1.0) * cj0);
19926 if (
IKabs(((((-1.0) * new_r10 * x937)) + (((-1.0) * new_r11 * sj0)))) <
19928 IKabs((((new_r10 * sj0)) + (((-1.0) * new_r11 * x937)))) <
19930 IKabs(
IKsqr(((((-1.0) * new_r10 * x937)) + (((-1.0) * new_r11 * sj0)))) +
19931 IKsqr((((new_r10 * sj0)) + (((-1.0) * new_r11 * x937)))) - 1) <=
19934 j2array[0] =
IKatan2(((((-1.0) * new_r10 * x937)) + (((-1.0) * new_r11 * sj0))),
19935 (((new_r10 * sj0)) + (((-1.0) * new_r11 * x937))));
19936 sj2array[0] =
IKsin(j2array[0]);
19937 cj2array[0] =
IKcos(j2array[0]);
19938 if (j2array[0] >
IKPI)
19940 j2array[0] -=
IK2PI;
19942 else if (j2array[0] < -
IKPI)
19944 j2array[0] +=
IK2PI;
19947 for (
int ij2 = 0; ij2 < 1; ++ij2)
19955 for (
int iij2 = ij2 + 1; iij2 < 1; ++iij2)
19957 if (j2valid[iij2] &&
19961 j2valid[iij2] =
false;
19967 cj2 = cj2array[ij2];
19968 sj2 = sj2array[ij2];
19970 IkReal evalcond[8];
19971 IkReal x938 =
IKsin(j2);
19972 IkReal x939 =
IKcos(j2);
19973 IkReal x940 = ((1.0) * sj0);
19974 IkReal x941 = (cj0 * x938);
19975 IkReal x942 = ((1.0) * x939);
19976 IkReal x943 = (x939 * x940);
19977 evalcond[0] = (((new_r11 * sj0)) + ((cj0 * new_r01)) + x938);
19978 evalcond[1] = (((cj0 * new_r10)) + (((-1.0) * new_r00 * x940)) + x938);
19979 evalcond[2] = ((((-1.0) * new_r01 * x940)) + ((cj0 * new_r11)) + x939);
19980 evalcond[3] = ((((-1.0) * x942)) + ((new_r10 * sj0)) + ((cj0 * new_r00)));
19981 evalcond[4] = (((sj0 * x938)) + ((cj0 * x939)) + new_r11);
19982 evalcond[5] = ((((-1.0) * x943)) + new_r10 + x941);
19983 evalcond[6] = ((((-1.0) * x943)) + new_r01 + x941);
19985 ((((-1.0) * x938 * x940)) + (((-1.0) * cj0 * x942)) + new_r00);
20000 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
20001 vinfos[0].jointtype = 1;
20002 vinfos[0].foffset = j0;
20003 vinfos[0].indices[0] = _ij0[0];
20004 vinfos[0].indices[1] = _ij0[1];
20005 vinfos[0].maxsolutions = _nj0;
20006 vinfos[1].jointtype = 1;
20007 vinfos[1].foffset = j1;
20008 vinfos[1].indices[0] = _ij1[0];
20009 vinfos[1].indices[1] = _ij1[1];
20010 vinfos[1].maxsolutions = _nj1;
20011 vinfos[2].jointtype = 1;
20012 vinfos[2].foffset = j2;
20013 vinfos[2].indices[0] = _ij2[0];
20014 vinfos[2].indices[1] = _ij2[1];
20015 vinfos[2].maxsolutions = _nj2;
20016 vinfos[3].jointtype = 1;
20017 vinfos[3].foffset = j3;
20018 vinfos[3].indices[0] = _ij3[0];
20019 vinfos[3].indices[1] = _ij3[1];
20020 vinfos[3].maxsolutions = _nj3;
20021 vinfos[4].jointtype = 1;
20022 vinfos[4].foffset = j4;
20023 vinfos[4].indices[0] = _ij4[0];
20024 vinfos[4].indices[1] = _ij4[1];
20025 vinfos[4].maxsolutions = _nj4;
20026 vinfos[5].jointtype = 1;
20027 vinfos[5].foffset = j5;
20028 vinfos[5].indices[0] = _ij5[0];
20029 vinfos[5].indices[1] = _ij5[1];
20030 vinfos[5].maxsolutions = _nj5;
20031 vinfos[6].jointtype = 1;
20032 vinfos[6].foffset = j6;
20033 vinfos[6].indices[0] = _ij6[0];
20034 vinfos[6].indices[1] = _ij6[1];
20035 vinfos[6].maxsolutions = _nj6;
20036 std::vector<int> vfree(0);
20037 solutions.AddSolution(vinfos, vfree);
20043 if (bgotonextstatement)
20045 bool bgotonextstatement =
true;
20048 evalcond[0] = ((-3.14159265358979) +
20049 (
IKfmod(((3.14159265358979) + (
IKabs(((-1.5707963267949) + j1)))),
20050 6.28318530717959)));
20051 evalcond[1] = new_r22;
20052 if (
IKabs(evalcond[0]) < 0.0000050000000000 &&
20053 IKabs(evalcond[1]) < 0.0000050000000000)
20055 bgotonextstatement =
false;
20057 IkReal j2array[1], cj2array[1], sj2array[1];
20058 bool j2valid[1] = {
false };
20065 j2array[0] =
IKatan2(((-1.0) * new_r21), new_r20);
20066 sj2array[0] =
IKsin(j2array[0]);
20067 cj2array[0] =
IKcos(j2array[0]);
20068 if (j2array[0] >
IKPI)
20070 j2array[0] -=
IK2PI;
20072 else if (j2array[0] < -
IKPI)
20074 j2array[0] +=
IK2PI;
20077 for (
int ij2 = 0; ij2 < 1; ++ij2)
20085 for (
int iij2 = ij2 + 1; iij2 < 1; ++iij2)
20087 if (j2valid[iij2] &&
20091 j2valid[iij2] =
false;
20097 cj2 = cj2array[ij2];
20098 sj2 = sj2array[ij2];
20100 IkReal evalcond[8];
20101 IkReal x944 =
IKsin(j2);
20102 IkReal x945 =
IKcos(j2);
20103 IkReal x946 = ((1.0) * sj0);
20104 evalcond[0] = (new_r21 + x944);
20105 evalcond[1] = ((((-1.0) * x945)) + new_r20);
20106 evalcond[2] = (((new_r02 * x944)) + new_r10);
20107 evalcond[3] = (((cj0 * x945)) + new_r11);
20108 evalcond[4] = ((((-1.0) * x944 * x946)) + new_r00);
20109 evalcond[5] = ((((-1.0) * x945 * x946)) + new_r01);
20110 evalcond[6] = (((cj0 * new_r10)) + (((-1.0) * new_r00 * x946)) + x944);
20111 evalcond[7] = ((((-1.0) * new_r01 * x946)) + ((cj0 * new_r11)) + x945);
20126 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
20127 vinfos[0].jointtype = 1;
20128 vinfos[0].foffset = j0;
20129 vinfos[0].indices[0] = _ij0[0];
20130 vinfos[0].indices[1] = _ij0[1];
20131 vinfos[0].maxsolutions = _nj0;
20132 vinfos[1].jointtype = 1;
20133 vinfos[1].foffset = j1;
20134 vinfos[1].indices[0] = _ij1[0];
20135 vinfos[1].indices[1] = _ij1[1];
20136 vinfos[1].maxsolutions = _nj1;
20137 vinfos[2].jointtype = 1;
20138 vinfos[2].foffset = j2;
20139 vinfos[2].indices[0] = _ij2[0];
20140 vinfos[2].indices[1] = _ij2[1];
20141 vinfos[2].maxsolutions = _nj2;
20142 vinfos[3].jointtype = 1;
20143 vinfos[3].foffset = j3;
20144 vinfos[3].indices[0] = _ij3[0];
20145 vinfos[3].indices[1] = _ij3[1];
20146 vinfos[3].maxsolutions = _nj3;
20147 vinfos[4].jointtype = 1;
20148 vinfos[4].foffset = j4;
20149 vinfos[4].indices[0] = _ij4[0];
20150 vinfos[4].indices[1] = _ij4[1];
20151 vinfos[4].maxsolutions = _nj4;
20152 vinfos[5].jointtype = 1;
20153 vinfos[5].foffset = j5;
20154 vinfos[5].indices[0] = _ij5[0];
20155 vinfos[5].indices[1] = _ij5[1];
20156 vinfos[5].maxsolutions = _nj5;
20157 vinfos[6].jointtype = 1;
20158 vinfos[6].foffset = j6;
20159 vinfos[6].indices[0] = _ij6[0];
20160 vinfos[6].indices[1] = _ij6[1];
20161 vinfos[6].maxsolutions = _nj6;
20162 std::vector<int> vfree(0);
20163 solutions.AddSolution(vinfos, vfree);
20169 if (bgotonextstatement)
20171 bool bgotonextstatement =
true;
20174 evalcond[0] = ((-3.14159265358979) +
20175 (
IKfmod(((3.14159265358979) + (
IKabs(((1.5707963267949) + j1)))),
20176 6.28318530717959)));
20177 evalcond[1] = new_r22;
20178 if (
IKabs(evalcond[0]) < 0.0000050000000000 &&
20179 IKabs(evalcond[1]) < 0.0000050000000000)
20181 bgotonextstatement =
false;
20183 IkReal j2array[1], cj2array[1], sj2array[1];
20184 bool j2valid[1] = {
false };
20191 j2array[0] =
IKatan2(new_r21, ((-1.0) * new_r20));
20192 sj2array[0] =
IKsin(j2array[0]);
20193 cj2array[0] =
IKcos(j2array[0]);
20194 if (j2array[0] >
IKPI)
20196 j2array[0] -=
IK2PI;
20198 else if (j2array[0] < -
IKPI)
20200 j2array[0] +=
IK2PI;
20203 for (
int ij2 = 0; ij2 < 1; ++ij2)
20211 for (
int iij2 = ij2 + 1; iij2 < 1; ++iij2)
20213 if (j2valid[iij2] &&
20217 j2valid[iij2] =
false;
20223 cj2 = cj2array[ij2];
20224 sj2 = sj2array[ij2];
20226 IkReal evalcond[8];
20227 IkReal x947 =
IKcos(j2);
20228 IkReal x948 =
IKsin(j2);
20229 IkReal x949 = ((1.0) * sj0);
20230 IkReal x950 = ((1.0) * x948);
20231 evalcond[0] = (new_r20 + x947);
20232 evalcond[1] = (new_r21 + (((-1.0) * x950)));
20233 evalcond[2] = (((cj0 * x947)) + new_r11);
20234 evalcond[3] = (new_r10 + (((-1.0) * new_r02 * x950)));
20235 evalcond[4] = ((((-1.0) * x948 * x949)) + new_r00);
20236 evalcond[5] = ((((-1.0) * x947 * x949)) + new_r01);
20237 evalcond[6] = (((cj0 * new_r10)) + (((-1.0) * new_r00 * x949)) + x948);
20238 evalcond[7] = ((((-1.0) * new_r01 * x949)) + ((cj0 * new_r11)) + x947);
20253 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
20254 vinfos[0].jointtype = 1;
20255 vinfos[0].foffset = j0;
20256 vinfos[0].indices[0] = _ij0[0];
20257 vinfos[0].indices[1] = _ij0[1];
20258 vinfos[0].maxsolutions = _nj0;
20259 vinfos[1].jointtype = 1;
20260 vinfos[1].foffset = j1;
20261 vinfos[1].indices[0] = _ij1[0];
20262 vinfos[1].indices[1] = _ij1[1];
20263 vinfos[1].maxsolutions = _nj1;
20264 vinfos[2].jointtype = 1;
20265 vinfos[2].foffset = j2;
20266 vinfos[2].indices[0] = _ij2[0];
20267 vinfos[2].indices[1] = _ij2[1];
20268 vinfos[2].maxsolutions = _nj2;
20269 vinfos[3].jointtype = 1;
20270 vinfos[3].foffset = j3;
20271 vinfos[3].indices[0] = _ij3[0];
20272 vinfos[3].indices[1] = _ij3[1];
20273 vinfos[3].maxsolutions = _nj3;
20274 vinfos[4].jointtype = 1;
20275 vinfos[4].foffset = j4;
20276 vinfos[4].indices[0] = _ij4[0];
20277 vinfos[4].indices[1] = _ij4[1];
20278 vinfos[4].maxsolutions = _nj4;
20279 vinfos[5].jointtype = 1;
20280 vinfos[5].foffset = j5;
20281 vinfos[5].indices[0] = _ij5[0];
20282 vinfos[5].indices[1] = _ij5[1];
20283 vinfos[5].maxsolutions = _nj5;
20284 vinfos[6].jointtype = 1;
20285 vinfos[6].foffset = j6;
20286 vinfos[6].indices[0] = _ij6[0];
20287 vinfos[6].indices[1] = _ij6[1];
20288 vinfos[6].maxsolutions = _nj6;
20289 std::vector<int> vfree(0);
20290 solutions.AddSolution(vinfos, vfree);
20296 if (bgotonextstatement)
20298 bool bgotonextstatement =
true;
20302 ((-3.14159265358979) +
20303 (
IKfmod(((3.14159265358979) + (
IKabs(j0))), 6.28318530717959)));
20304 evalcond[1] = new_r12;
20305 if (
IKabs(evalcond[0]) < 0.0000050000000000 &&
20306 IKabs(evalcond[1]) < 0.0000050000000000)
20308 bgotonextstatement =
false;
20310 IkReal j2array[1], cj2array[1], sj2array[1];
20311 bool j2valid[1] = {
false };
20318 j2array[0] =
IKatan2(((-1.0) * new_r10), ((-1.0) * new_r11));
20319 sj2array[0] =
IKsin(j2array[0]);
20320 cj2array[0] =
IKcos(j2array[0]);
20321 if (j2array[0] >
IKPI)
20323 j2array[0] -=
IK2PI;
20325 else if (j2array[0] < -
IKPI)
20327 j2array[0] +=
IK2PI;
20330 for (
int ij2 = 0; ij2 < 1; ++ij2)
20338 for (
int iij2 = ij2 + 1; iij2 < 1; ++iij2)
20340 if (j2valid[iij2] &&
20344 j2valid[iij2] =
false;
20350 cj2 = cj2array[ij2];
20351 sj2 = sj2array[ij2];
20353 IkReal evalcond[8];
20354 IkReal x951 =
IKsin(j2);
20355 IkReal x952 =
IKcos(j2);
20356 IkReal x953 = ((1.0) * sj1);
20357 IkReal x954 = ((1.0) * x951);
20358 evalcond[0] = (new_r10 + x951);
20359 evalcond[1] = (new_r11 + x952);
20360 evalcond[2] = (((sj1 * x951)) + new_r21);
20361 evalcond[3] = (((cj1 * x952)) + new_r00);
20362 evalcond[4] = (new_r20 + (((-1.0) * x952 * x953)));
20363 evalcond[5] = ((((-1.0) * cj1 * x954)) + new_r01);
20365 (((cj1 * new_r00)) + x952 + (((-1.0) * new_r20 * x953)));
20366 evalcond[7] = ((((-1.0) * new_r21 * x953)) + ((cj1 * new_r01)) +
20367 (((-1.0) * x954)));
20382 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
20383 vinfos[0].jointtype = 1;
20384 vinfos[0].foffset = j0;
20385 vinfos[0].indices[0] = _ij0[0];
20386 vinfos[0].indices[1] = _ij0[1];
20387 vinfos[0].maxsolutions = _nj0;
20388 vinfos[1].jointtype = 1;
20389 vinfos[1].foffset = j1;
20390 vinfos[1].indices[0] = _ij1[0];
20391 vinfos[1].indices[1] = _ij1[1];
20392 vinfos[1].maxsolutions = _nj1;
20393 vinfos[2].jointtype = 1;
20394 vinfos[2].foffset = j2;
20395 vinfos[2].indices[0] = _ij2[0];
20396 vinfos[2].indices[1] = _ij2[1];
20397 vinfos[2].maxsolutions = _nj2;
20398 vinfos[3].jointtype = 1;
20399 vinfos[3].foffset = j3;
20400 vinfos[3].indices[0] = _ij3[0];
20401 vinfos[3].indices[1] = _ij3[1];
20402 vinfos[3].maxsolutions = _nj3;
20403 vinfos[4].jointtype = 1;
20404 vinfos[4].foffset = j4;
20405 vinfos[4].indices[0] = _ij4[0];
20406 vinfos[4].indices[1] = _ij4[1];
20407 vinfos[4].maxsolutions = _nj4;
20408 vinfos[5].jointtype = 1;
20409 vinfos[5].foffset = j5;
20410 vinfos[5].indices[0] = _ij5[0];
20411 vinfos[5].indices[1] = _ij5[1];
20412 vinfos[5].maxsolutions = _nj5;
20413 vinfos[6].jointtype = 1;
20414 vinfos[6].foffset = j6;
20415 vinfos[6].indices[0] = _ij6[0];
20416 vinfos[6].indices[1] = _ij6[1];
20417 vinfos[6].maxsolutions = _nj6;
20418 std::vector<int> vfree(0);
20419 solutions.AddSolution(vinfos, vfree);
20425 if (bgotonextstatement)
20427 bool bgotonextstatement =
true;
20431 ((-3.14159265358979) +
20432 (
IKfmod(((3.14159265358979) + (
IKabs(((-3.14159265358979) + j0)))),
20433 6.28318530717959)));
20434 evalcond[1] = new_r12;
20435 if (
IKabs(evalcond[0]) < 0.0000050000000000 &&
20436 IKabs(evalcond[1]) < 0.0000050000000000)
20438 bgotonextstatement =
false;
20440 IkReal j2array[1], cj2array[1], sj2array[1];
20441 bool j2valid[1] = {
false };
20447 j2array[0] =
IKatan2(new_r10, new_r11);
20448 sj2array[0] =
IKsin(j2array[0]);
20449 cj2array[0] =
IKcos(j2array[0]);
20450 if (j2array[0] >
IKPI)
20452 j2array[0] -=
IK2PI;
20454 else if (j2array[0] < -
IKPI)
20456 j2array[0] +=
IK2PI;
20459 for (
int ij2 = 0; ij2 < 1; ++ij2)
20467 for (
int iij2 = ij2 + 1; iij2 < 1; ++iij2)
20469 if (j2valid[iij2] &&
20470 IKabs(cj2array[ij2] - cj2array[iij2]) <
20474 j2valid[iij2] =
false;
20480 cj2 = cj2array[ij2];
20481 sj2 = sj2array[ij2];
20483 IkReal evalcond[8];
20484 IkReal x955 =
IKsin(j2);
20485 IkReal x956 =
IKcos(j2);
20486 IkReal x957 = ((1.0) * sj1);
20487 IkReal x958 = ((1.0) * new_r00);
20488 IkReal x959 = ((1.0) * new_r01);
20489 IkReal x960 = ((1.0) * x955);
20490 evalcond[0] = (((sj1 * x955)) + new_r21);
20491 evalcond[1] = ((((-1.0) * new_r10)) + x955);
20492 evalcond[2] = ((((-1.0) * new_r11)) + x956);
20493 evalcond[3] = ((((-1.0) * x956 * x957)) + new_r20);
20494 evalcond[4] = (((cj1 * x956)) + (((-1.0) * x958)));
20495 evalcond[5] = ((((-1.0) * cj1 * x960)) + (((-1.0) * x959)));
20497 ((((-1.0) * cj1 * x958)) + x956 + (((-1.0) * new_r20 * x957)));
20498 evalcond[7] = ((((-1.0) * new_r21 * x957)) +
20499 (((-1.0) * cj1 * x959)) + (((-1.0) * x960)));
20514 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
20515 vinfos[0].jointtype = 1;
20516 vinfos[0].foffset = j0;
20517 vinfos[0].indices[0] = _ij0[0];
20518 vinfos[0].indices[1] = _ij0[1];
20519 vinfos[0].maxsolutions = _nj0;
20520 vinfos[1].jointtype = 1;
20521 vinfos[1].foffset = j1;
20522 vinfos[1].indices[0] = _ij1[0];
20523 vinfos[1].indices[1] = _ij1[1];
20524 vinfos[1].maxsolutions = _nj1;
20525 vinfos[2].jointtype = 1;
20526 vinfos[2].foffset = j2;
20527 vinfos[2].indices[0] = _ij2[0];
20528 vinfos[2].indices[1] = _ij2[1];
20529 vinfos[2].maxsolutions = _nj2;
20530 vinfos[3].jointtype = 1;
20531 vinfos[3].foffset = j3;
20532 vinfos[3].indices[0] = _ij3[0];
20533 vinfos[3].indices[1] = _ij3[1];
20534 vinfos[3].maxsolutions = _nj3;
20535 vinfos[4].jointtype = 1;
20536 vinfos[4].foffset = j4;
20537 vinfos[4].indices[0] = _ij4[0];
20538 vinfos[4].indices[1] = _ij4[1];
20539 vinfos[4].maxsolutions = _nj4;
20540 vinfos[5].jointtype = 1;
20541 vinfos[5].foffset = j5;
20542 vinfos[5].indices[0] = _ij5[0];
20543 vinfos[5].indices[1] = _ij5[1];
20544 vinfos[5].maxsolutions = _nj5;
20545 vinfos[6].jointtype = 1;
20546 vinfos[6].foffset = j6;
20547 vinfos[6].indices[0] = _ij6[0];
20548 vinfos[6].indices[1] = _ij6[1];
20549 vinfos[6].maxsolutions = _nj6;
20550 std::vector<int> vfree(0);
20551 solutions.AddSolution(vinfos, vfree);
20557 if (bgotonextstatement)
20559 bool bgotonextstatement =
true;
20563 ((-3.14159265358979) +
20564 (
IKfmod(((3.14159265358979) + (
IKabs(((-1.5707963267949) + j0)))),
20565 6.28318530717959)));
20566 evalcond[1] = new_r02;
20567 if (
IKabs(evalcond[0]) < 0.0000050000000000 &&
20568 IKabs(evalcond[1]) < 0.0000050000000000)
20570 bgotonextstatement =
false;
20572 IkReal j2array[1], cj2array[1], sj2array[1];
20573 bool j2valid[1] = {
false };
20580 j2array[0] =
IKatan2(new_r00, new_r01);
20581 sj2array[0] =
IKsin(j2array[0]);
20582 cj2array[0] =
IKcos(j2array[0]);
20583 if (j2array[0] >
IKPI)
20585 j2array[0] -=
IK2PI;
20587 else if (j2array[0] < -
IKPI)
20589 j2array[0] +=
IK2PI;
20592 for (
int ij2 = 0; ij2 < 1; ++ij2)
20600 for (
int iij2 = ij2 + 1; iij2 < 1; ++iij2)
20602 if (j2valid[iij2] &&
20603 IKabs(cj2array[ij2] - cj2array[iij2]) <
20605 IKabs(sj2array[ij2] - sj2array[iij2]) <
20608 j2valid[iij2] =
false;
20614 cj2 = cj2array[ij2];
20615 sj2 = sj2array[ij2];
20617 IkReal evalcond[8];
20618 IkReal x961 =
IKsin(j2);
20619 IkReal x962 =
IKcos(j2);
20620 IkReal x963 = ((1.0) * sj1);
20621 IkReal x964 = ((1.0) * x961);
20622 evalcond[0] = (((sj1 * x961)) + new_r21);
20623 evalcond[1] = ((((-1.0) * new_r00)) + x961);
20624 evalcond[2] = ((((-1.0) * new_r01)) + x962);
20625 evalcond[3] = (((cj1 * x962)) + new_r10);
20626 evalcond[4] = ((((-1.0) * x962 * x963)) + new_r20);
20627 evalcond[5] = ((((-1.0) * cj1 * x964)) + new_r11);
20629 (((cj1 * new_r10)) + x962 + (((-1.0) * new_r20 * x963)));
20630 evalcond[7] = ((((-1.0) * new_r21 * x963)) + ((cj1 * new_r11)) +
20631 (((-1.0) * x964)));
20646 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
20647 vinfos[0].jointtype = 1;
20648 vinfos[0].foffset = j0;
20649 vinfos[0].indices[0] = _ij0[0];
20650 vinfos[0].indices[1] = _ij0[1];
20651 vinfos[0].maxsolutions = _nj0;
20652 vinfos[1].jointtype = 1;
20653 vinfos[1].foffset = j1;
20654 vinfos[1].indices[0] = _ij1[0];
20655 vinfos[1].indices[1] = _ij1[1];
20656 vinfos[1].maxsolutions = _nj1;
20657 vinfos[2].jointtype = 1;
20658 vinfos[2].foffset = j2;
20659 vinfos[2].indices[0] = _ij2[0];
20660 vinfos[2].indices[1] = _ij2[1];
20661 vinfos[2].maxsolutions = _nj2;
20662 vinfos[3].jointtype = 1;
20663 vinfos[3].foffset = j3;
20664 vinfos[3].indices[0] = _ij3[0];
20665 vinfos[3].indices[1] = _ij3[1];
20666 vinfos[3].maxsolutions = _nj3;
20667 vinfos[4].jointtype = 1;
20668 vinfos[4].foffset = j4;
20669 vinfos[4].indices[0] = _ij4[0];
20670 vinfos[4].indices[1] = _ij4[1];
20671 vinfos[4].maxsolutions = _nj4;
20672 vinfos[5].jointtype = 1;
20673 vinfos[5].foffset = j5;
20674 vinfos[5].indices[0] = _ij5[0];
20675 vinfos[5].indices[1] = _ij5[1];
20676 vinfos[5].maxsolutions = _nj5;
20677 vinfos[6].jointtype = 1;
20678 vinfos[6].foffset = j6;
20679 vinfos[6].indices[0] = _ij6[0];
20680 vinfos[6].indices[1] = _ij6[1];
20681 vinfos[6].maxsolutions = _nj6;
20682 std::vector<int> vfree(0);
20683 solutions.AddSolution(vinfos, vfree);
20689 if (bgotonextstatement)
20691 bool bgotonextstatement =
true;
20695 ((-3.14159265358979) +
20696 (
IKfmod(((3.14159265358979) + (
IKabs(((1.5707963267949) + j0)))),
20697 6.28318530717959)));
20698 evalcond[1] = new_r02;
20699 if (
IKabs(evalcond[0]) < 0.0000050000000000 &&
20700 IKabs(evalcond[1]) < 0.0000050000000000)
20702 bgotonextstatement =
false;
20704 IkReal j2array[1], cj2array[1], sj2array[1];
20705 bool j2valid[1] = {
false };
20712 j2array[0] =
IKatan2(((-1.0) * new_r00), ((-1.0) * new_r01));
20713 sj2array[0] =
IKsin(j2array[0]);
20714 cj2array[0] =
IKcos(j2array[0]);
20715 if (j2array[0] >
IKPI)
20717 j2array[0] -=
IK2PI;
20719 else if (j2array[0] < -
IKPI)
20721 j2array[0] +=
IK2PI;
20724 for (
int ij2 = 0; ij2 < 1; ++ij2)
20732 for (
int iij2 = ij2 + 1; iij2 < 1; ++iij2)
20734 if (j2valid[iij2] &&
20735 IKabs(cj2array[ij2] - cj2array[iij2]) <
20737 IKabs(sj2array[ij2] - sj2array[iij2]) <
20740 j2valid[iij2] =
false;
20746 cj2 = cj2array[ij2];
20747 sj2 = sj2array[ij2];
20749 IkReal evalcond[8];
20750 IkReal x965 =
IKsin(j2);
20751 IkReal x966 =
IKcos(j2);
20752 IkReal x967 = ((1.0) * new_r11);
20753 IkReal x968 = ((1.0) * sj1);
20754 IkReal x969 = ((1.0) * new_r10);
20755 IkReal x970 = ((1.0) * x965);
20756 evalcond[0] = (new_r00 + x965);
20757 evalcond[1] = (new_r01 + x966);
20758 evalcond[2] = (((sj1 * x965)) + new_r21);
20759 evalcond[3] = ((((-1.0) * x966 * x968)) + new_r20);
20760 evalcond[4] = (((cj1 * x966)) + (((-1.0) * x969)));
20761 evalcond[5] = ((((-1.0) * cj1 * x970)) + (((-1.0) * x967)));
20762 evalcond[6] = ((((-1.0) * cj1 * x969)) + x966 +
20763 (((-1.0) * new_r20 * x968)));
20764 evalcond[7] = ((((-1.0) * cj1 * x967)) +
20765 (((-1.0) * new_r21 * x968)) + (((-1.0) * x970)));
20780 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
20781 vinfos[0].jointtype = 1;
20782 vinfos[0].foffset = j0;
20783 vinfos[0].indices[0] = _ij0[0];
20784 vinfos[0].indices[1] = _ij0[1];
20785 vinfos[0].maxsolutions = _nj0;
20786 vinfos[1].jointtype = 1;
20787 vinfos[1].foffset = j1;
20788 vinfos[1].indices[0] = _ij1[0];
20789 vinfos[1].indices[1] = _ij1[1];
20790 vinfos[1].maxsolutions = _nj1;
20791 vinfos[2].jointtype = 1;
20792 vinfos[2].foffset = j2;
20793 vinfos[2].indices[0] = _ij2[0];
20794 vinfos[2].indices[1] = _ij2[1];
20795 vinfos[2].maxsolutions = _nj2;
20796 vinfos[3].jointtype = 1;
20797 vinfos[3].foffset = j3;
20798 vinfos[3].indices[0] = _ij3[0];
20799 vinfos[3].indices[1] = _ij3[1];
20800 vinfos[3].maxsolutions = _nj3;
20801 vinfos[4].jointtype = 1;
20802 vinfos[4].foffset = j4;
20803 vinfos[4].indices[0] = _ij4[0];
20804 vinfos[4].indices[1] = _ij4[1];
20805 vinfos[4].maxsolutions = _nj4;
20806 vinfos[5].jointtype = 1;
20807 vinfos[5].foffset = j5;
20808 vinfos[5].indices[0] = _ij5[0];
20809 vinfos[5].indices[1] = _ij5[1];
20810 vinfos[5].maxsolutions = _nj5;
20811 vinfos[6].jointtype = 1;
20812 vinfos[6].foffset = j6;
20813 vinfos[6].indices[0] = _ij6[0];
20814 vinfos[6].indices[1] = _ij6[1];
20815 vinfos[6].maxsolutions = _nj6;
20816 std::vector<int> vfree(0);
20817 solutions.AddSolution(vinfos, vfree);
20823 if (bgotonextstatement)
20825 bool bgotonextstatement =
true;
20828 evalcond[0] = ((
IKabs(new_r20)) + (
IKabs(new_r21)));
20829 if (
IKabs(evalcond[0]) < 0.0000050000000000)
20831 bgotonextstatement =
false;
20838 j2eval[0] =
IKabs(new_r22);
20839 if (
IKabs(j2eval[0]) < 0.0000000100000000)
20845 IkReal op[2 + 1], zeror[2];
20847 op[0] = ((-1.0) * new_r22);
20850 polyroots2(op, zeror, numroots);
20851 IkReal j2array[2], cj2array[2], sj2array[2], tempj2array[1];
20852 int numsolutions = 0;
20853 for (
int ij2 = 0; ij2 < numroots; ++ij2)
20855 IkReal htj2 = zeror[ij2];
20856 tempj2array[0] = ((2.0) * (atan(htj2)));
20857 for (
int kj2 = 0; kj2 < 1; ++kj2)
20859 j2array[numsolutions] = tempj2array[kj2];
20860 if (j2array[numsolutions] >
IKPI)
20862 j2array[numsolutions] -=
IK2PI;
20864 else if (j2array[numsolutions] < -
IKPI)
20866 j2array[numsolutions] +=
IK2PI;
20868 sj2array[numsolutions] =
IKsin(j2array[numsolutions]);
20869 cj2array[numsolutions] =
IKcos(j2array[numsolutions]);
20873 bool j2valid[2] = {
true,
true };
20875 for (
int ij2 = 0; ij2 < numsolutions; ++ij2)
20882 cj2 = cj2array[ij2];
20883 sj2 = sj2array[ij2];
20884 htj2 =
IKtan(j2 / 2);
20888 for (
int iij2 = ij2 + 1; iij2 < numsolutions; ++iij2)
20890 if (j2valid[iij2] &&
20891 IKabs(cj2array[ij2] - cj2array[iij2]) <
20893 IKabs(sj2array[ij2] - sj2array[iij2]) <
20896 j2valid[iij2] =
false;
20902 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
20903 vinfos[0].jointtype = 1;
20904 vinfos[0].foffset = j0;
20905 vinfos[0].indices[0] = _ij0[0];
20906 vinfos[0].indices[1] = _ij0[1];
20907 vinfos[0].maxsolutions = _nj0;
20908 vinfos[1].jointtype = 1;
20909 vinfos[1].foffset = j1;
20910 vinfos[1].indices[0] = _ij1[0];
20911 vinfos[1].indices[1] = _ij1[1];
20912 vinfos[1].maxsolutions = _nj1;
20913 vinfos[2].jointtype = 1;
20914 vinfos[2].foffset = j2;
20915 vinfos[2].indices[0] = _ij2[0];
20916 vinfos[2].indices[1] = _ij2[1];
20917 vinfos[2].maxsolutions = _nj2;
20918 vinfos[3].jointtype = 1;
20919 vinfos[3].foffset = j3;
20920 vinfos[3].indices[0] = _ij3[0];
20921 vinfos[3].indices[1] = _ij3[1];
20922 vinfos[3].maxsolutions = _nj3;
20923 vinfos[4].jointtype = 1;
20924 vinfos[4].foffset = j4;
20925 vinfos[4].indices[0] = _ij4[0];
20926 vinfos[4].indices[1] = _ij4[1];
20927 vinfos[4].maxsolutions = _nj4;
20928 vinfos[5].jointtype = 1;
20929 vinfos[5].foffset = j5;
20930 vinfos[5].indices[0] = _ij5[0];
20931 vinfos[5].indices[1] = _ij5[1];
20932 vinfos[5].maxsolutions = _nj5;
20933 vinfos[6].jointtype = 1;
20934 vinfos[6].foffset = j6;
20935 vinfos[6].indices[0] = _ij6[0];
20936 vinfos[6].indices[1] = _ij6[1];
20937 vinfos[6].maxsolutions = _nj6;
20938 std::vector<int> vfree(0);
20939 solutions.AddSolution(vinfos, vfree);
20946 if (bgotonextstatement)
20948 bool bgotonextstatement =
true;
20953 bgotonextstatement =
false;
20957 if (bgotonextstatement)
20974 IkReal j2array[1], cj2array[1], sj2array[1];
20975 bool j2valid[1] = {
false };
20982 IkReal x971 = x972.
value;
20995 ((((cj0 * new_r21)) + (((-1.0) * new_r10 * sj1)))))) <
20999 ((((cj0 * new_r21)) + (((-1.0) * new_r10 * sj1)))))) -
21002 j2array[0] =
IKatan2(((-1.0) * new_r21 * x971),
21004 ((((cj0 * new_r21)) + (((-1.0) * new_r10 * sj1))))));
21005 sj2array[0] =
IKsin(j2array[0]);
21006 cj2array[0] =
IKcos(j2array[0]);
21007 if (j2array[0] >
IKPI)
21009 j2array[0] -=
IK2PI;
21011 else if (j2array[0] < -
IKPI)
21013 j2array[0] +=
IK2PI;
21016 for (
int ij2 = 0; ij2 < 1; ++ij2)
21024 for (
int iij2 = ij2 + 1; iij2 < 1; ++iij2)
21026 if (j2valid[iij2] &&
21030 j2valid[iij2] =
false;
21036 cj2 = cj2array[ij2];
21037 sj2 = sj2array[ij2];
21039 IkReal evalcond[12];
21040 IkReal x975 =
IKsin(j2);
21041 IkReal x976 =
IKcos(j2);
21042 IkReal x977 = ((1.0) * sj0);
21043 IkReal x978 = ((1.0) * sj1);
21044 IkReal x979 = (cj0 * new_r00);
21045 IkReal x980 = (cj1 * sj0);
21046 IkReal x981 = (cj0 * new_r01);
21047 IkReal x982 = (cj1 * x976);
21048 IkReal x983 = (cj1 * x975);
21049 evalcond[0] = (((sj1 * x975)) + new_r21);
21050 evalcond[1] = ((((-1.0) * x976 * x978)) + new_r20);
21051 evalcond[2] = ((((-1.0) * new_r00 * x977)) + ((cj0 * new_r10)) + x975);
21052 evalcond[3] = ((((-1.0) * new_r01 * x977)) + ((cj0 * new_r11)) + x976);
21053 evalcond[4] = (((new_r10 * sj0)) + x982 + x979);
21054 evalcond[5] = (((x976 * x980)) + new_r10 + ((cj0 * x975)));
21055 evalcond[6] = ((((-1.0) * x983)) + ((new_r11 * sj0)) + x981);
21056 evalcond[7] = (new_r00 + ((cj0 * x982)) + (((-1.0) * x975 * x977)));
21057 evalcond[8] = ((((-1.0) * x977 * x983)) + new_r11 + ((cj0 * x976)));
21058 evalcond[9] = ((((-1.0) * x976 * x977)) + new_r01 + (((-1.0) * cj0 * x983)));
21060 ((((-1.0) * new_r20 * x978)) + ((cj1 * x979)) + ((new_r10 * x980)) + x976);
21061 evalcond[11] = (((cj1 * x981)) + (((-1.0) * x975)) + (((-1.0) * new_r21 * x978)) +
21062 ((new_r11 * x980)));
21081 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
21082 vinfos[0].jointtype = 1;
21083 vinfos[0].foffset = j0;
21084 vinfos[0].indices[0] = _ij0[0];
21085 vinfos[0].indices[1] = _ij0[1];
21086 vinfos[0].maxsolutions = _nj0;
21087 vinfos[1].jointtype = 1;
21088 vinfos[1].foffset = j1;
21089 vinfos[1].indices[0] = _ij1[0];
21090 vinfos[1].indices[1] = _ij1[1];
21091 vinfos[1].maxsolutions = _nj1;
21092 vinfos[2].jointtype = 1;
21093 vinfos[2].foffset = j2;
21094 vinfos[2].indices[0] = _ij2[0];
21095 vinfos[2].indices[1] = _ij2[1];
21096 vinfos[2].maxsolutions = _nj2;
21097 vinfos[3].jointtype = 1;
21098 vinfos[3].foffset = j3;
21099 vinfos[3].indices[0] = _ij3[0];
21100 vinfos[3].indices[1] = _ij3[1];
21101 vinfos[3].maxsolutions = _nj3;
21102 vinfos[4].jointtype = 1;
21103 vinfos[4].foffset = j4;
21104 vinfos[4].indices[0] = _ij4[0];
21105 vinfos[4].indices[1] = _ij4[1];
21106 vinfos[4].maxsolutions = _nj4;
21107 vinfos[5].jointtype = 1;
21108 vinfos[5].foffset = j5;
21109 vinfos[5].indices[0] = _ij5[0];
21110 vinfos[5].indices[1] = _ij5[1];
21111 vinfos[5].maxsolutions = _nj5;
21112 vinfos[6].jointtype = 1;
21113 vinfos[6].foffset = j6;
21114 vinfos[6].indices[0] = _ij6[0];
21115 vinfos[6].indices[1] = _ij6[1];
21116 vinfos[6].maxsolutions = _nj6;
21117 std::vector<int> vfree(0);
21118 solutions.AddSolution(vinfos, vfree);
21128 IkReal j2array[1], cj2array[1], sj2array[1];
21129 bool j2valid[1] = {
false };
21136 IkReal x984 = x985.
value;
21144 (((((-1.0) * cj1 * new_r21 * sj0)) + (((-1.0) * new_r11 * sj1)))))) <
21148 (((((-1.0) * cj1 * new_r21 * sj0)) + (((-1.0) * new_r11 * sj1)))))) -
21151 j2array[0] =
IKatan2(((-1.0) * new_r21 * x984),
21152 (x984 * (x986.
value) *
21153 (((((-1.0) * cj1 * new_r21 * sj0)) + (((-1.0) * new_r11 * sj1))))));
21154 sj2array[0] =
IKsin(j2array[0]);
21155 cj2array[0] =
IKcos(j2array[0]);
21156 if (j2array[0] >
IKPI)
21158 j2array[0] -=
IK2PI;
21160 else if (j2array[0] < -
IKPI)
21162 j2array[0] +=
IK2PI;
21165 for (
int ij2 = 0; ij2 < 1; ++ij2)
21173 for (
int iij2 = ij2 + 1; iij2 < 1; ++iij2)
21178 j2valid[iij2] =
false;
21184 cj2 = cj2array[ij2];
21185 sj2 = sj2array[ij2];
21187 IkReal evalcond[12];
21188 IkReal x987 =
IKsin(j2);
21189 IkReal x988 =
IKcos(j2);
21190 IkReal x989 = ((1.0) * sj0);
21191 IkReal x990 = ((1.0) * sj1);
21192 IkReal x991 = (cj0 * new_r00);
21193 IkReal x992 = (cj1 * sj0);
21194 IkReal x993 = (cj0 * new_r01);
21195 IkReal x994 = (cj1 * x988);
21196 IkReal x995 = (cj1 * x987);
21197 evalcond[0] = (((sj1 * x987)) + new_r21);
21198 evalcond[1] = (new_r20 + (((-1.0) * x988 * x990)));
21199 evalcond[2] = ((((-1.0) * new_r00 * x989)) + ((cj0 * new_r10)) + x987);
21200 evalcond[3] = ((((-1.0) * new_r01 * x989)) + ((cj0 * new_r11)) + x988);
21201 evalcond[4] = (((new_r10 * sj0)) + x991 + x994);
21202 evalcond[5] = (((x988 * x992)) + new_r10 + ((cj0 * x987)));
21203 evalcond[6] = ((((-1.0) * x995)) + ((new_r11 * sj0)) + x993);
21204 evalcond[7] = (((cj0 * x994)) + (((-1.0) * x987 * x989)) + new_r00);
21205 evalcond[8] = (new_r11 + (((-1.0) * x989 * x995)) + ((cj0 * x988)));
21206 evalcond[9] = ((((-1.0) * x988 * x989)) + (((-1.0) * cj0 * x995)) + new_r01);
21208 (((cj1 * x991)) + ((new_r10 * x992)) + (((-1.0) * new_r20 * x990)) + x988);
21209 evalcond[11] = (((cj1 * x993)) + (((-1.0) * x987)) + ((new_r11 * x992)) +
21210 (((-1.0) * new_r21 * x990)));
21229 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
21230 vinfos[0].jointtype = 1;
21231 vinfos[0].foffset = j0;
21232 vinfos[0].indices[0] = _ij0[0];
21233 vinfos[0].indices[1] = _ij0[1];
21234 vinfos[0].maxsolutions = _nj0;
21235 vinfos[1].jointtype = 1;
21236 vinfos[1].foffset = j1;
21237 vinfos[1].indices[0] = _ij1[0];
21238 vinfos[1].indices[1] = _ij1[1];
21239 vinfos[1].maxsolutions = _nj1;
21240 vinfos[2].jointtype = 1;
21241 vinfos[2].foffset = j2;
21242 vinfos[2].indices[0] = _ij2[0];
21243 vinfos[2].indices[1] = _ij2[1];
21244 vinfos[2].maxsolutions = _nj2;
21245 vinfos[3].jointtype = 1;
21246 vinfos[3].foffset = j3;
21247 vinfos[3].indices[0] = _ij3[0];
21248 vinfos[3].indices[1] = _ij3[1];
21249 vinfos[3].maxsolutions = _nj3;
21250 vinfos[4].jointtype = 1;
21251 vinfos[4].foffset = j4;
21252 vinfos[4].indices[0] = _ij4[0];
21253 vinfos[4].indices[1] = _ij4[1];
21254 vinfos[4].maxsolutions = _nj4;
21255 vinfos[5].jointtype = 1;
21256 vinfos[5].foffset = j5;
21257 vinfos[5].indices[0] = _ij5[0];
21258 vinfos[5].indices[1] = _ij5[1];
21259 vinfos[5].maxsolutions = _nj5;
21260 vinfos[6].jointtype = 1;
21261 vinfos[6].foffset = j6;
21262 vinfos[6].indices[0] = _ij6[0];
21263 vinfos[6].indices[1] = _ij6[1];
21264 vinfos[6].maxsolutions = _nj6;
21265 std::vector<int> vfree(0);
21266 solutions.AddSolution(vinfos, vfree);
21276 IkReal j2array[1], cj2array[1], sj2array[1];
21277 bool j2valid[1] = {
false };
21290 j2array[0] = ((-1.5707963267949) + (x996.
value) + (((1.5707963267949) * (x997.
value))));
21291 sj2array[0] =
IKsin(j2array[0]);
21292 cj2array[0] =
IKcos(j2array[0]);
21293 if (j2array[0] >
IKPI)
21295 j2array[0] -=
IK2PI;
21297 else if (j2array[0] < -
IKPI)
21299 j2array[0] +=
IK2PI;
21302 for (
int ij2 = 0; ij2 < 1; ++ij2)
21310 for (
int iij2 = ij2 + 1; iij2 < 1; ++iij2)
21315 j2valid[iij2] =
false;
21321 cj2 = cj2array[ij2];
21322 sj2 = sj2array[ij2];
21324 IkReal evalcond[12];
21325 IkReal x998 =
IKsin(j2);
21326 IkReal x999 =
IKcos(j2);
21327 IkReal x1000 = ((1.0) * sj0);
21328 IkReal x1001 = ((1.0) * sj1);
21329 IkReal x1002 = (cj0 * new_r00);
21330 IkReal x1003 = (cj1 * sj0);
21331 IkReal x1004 = (cj0 * new_r01);
21332 IkReal x1005 = (cj1 * x999);
21333 IkReal x1006 = (cj1 * x998);
21334 evalcond[0] = (new_r21 + ((sj1 * x998)));
21335 evalcond[1] = ((((-1.0) * x1001 * x999)) + new_r20);
21336 evalcond[2] = ((((-1.0) * new_r00 * x1000)) + ((cj0 * new_r10)) + x998);
21337 evalcond[3] = ((((-1.0) * new_r01 * x1000)) + ((cj0 * new_r11)) + x999);
21338 evalcond[4] = (x1005 + x1002 + ((new_r10 * sj0)));
21339 evalcond[5] = (((x1003 * x999)) + ((cj0 * x998)) + new_r10);
21340 evalcond[6] = ((((-1.0) * x1006)) + x1004 + ((new_r11 * sj0)));
21341 evalcond[7] = (((cj0 * x1005)) + (((-1.0) * x1000 * x998)) + new_r00);
21342 evalcond[8] = (((cj0 * x999)) + new_r11 + (((-1.0) * x1000 * x1006)));
21343 evalcond[9] = ((((-1.0) * cj0 * x1006)) + (((-1.0) * x1000 * x999)) + new_r01);
21345 (((new_r10 * x1003)) + (((-1.0) * new_r20 * x1001)) + ((cj1 * x1002)) + x999);
21346 evalcond[11] = ((((-1.0) * x998)) + ((new_r11 * x1003)) + (((-1.0) * new_r21 * x1001)) +
21366 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(7);
21367 vinfos[0].jointtype = 1;
21368 vinfos[0].foffset = j0;
21369 vinfos[0].indices[0] = _ij0[0];
21370 vinfos[0].indices[1] = _ij0[1];
21371 vinfos[0].maxsolutions = _nj0;
21372 vinfos[1].jointtype = 1;
21373 vinfos[1].foffset = j1;
21374 vinfos[1].indices[0] = _ij1[0];
21375 vinfos[1].indices[1] = _ij1[1];
21376 vinfos[1].maxsolutions = _nj1;
21377 vinfos[2].jointtype = 1;
21378 vinfos[2].foffset = j2;
21379 vinfos[2].indices[0] = _ij2[0];
21380 vinfos[2].indices[1] = _ij2[1];
21381 vinfos[2].maxsolutions = _nj2;
21382 vinfos[3].jointtype = 1;
21383 vinfos[3].foffset = j3;
21384 vinfos[3].indices[0] = _ij3[0];
21385 vinfos[3].indices[1] = _ij3[1];
21386 vinfos[3].maxsolutions = _nj3;
21387 vinfos[4].jointtype = 1;
21388 vinfos[4].foffset = j4;
21389 vinfos[4].indices[0] = _ij4[0];
21390 vinfos[4].indices[1] = _ij4[1];
21391 vinfos[4].maxsolutions = _nj4;
21392 vinfos[5].jointtype = 1;
21393 vinfos[5].foffset = j5;
21394 vinfos[5].indices[0] = _ij5[0];
21395 vinfos[5].indices[1] = _ij5[1];
21396 vinfos[5].maxsolutions = _nj5;
21397 vinfos[6].jointtype = 1;
21398 vinfos[6].foffset = j6;
21399 vinfos[6].indices[0] = _ij6[0];
21400 vinfos[6].indices[1] = _ij6[1];
21401 vinfos[6].maxsolutions = _nj6;
21402 std::vector<int> vfree(0);
21403 solutions.AddSolution(vinfos, vfree);
21417 static inline void polyroots3(IkReal rawcoeffs[3 + 1], IkReal rawroots[3],
int& numroots)
21419 using std::complex;
21420 if (rawcoeffs[0] == 0)
21423 polyroots2(&rawcoeffs[1], &rawroots[0], numroots);
21427 const IkReal tol = 128.0 * std::numeric_limits<IkReal>::epsilon();
21428 const IkReal tolsqrt = sqrt(std::numeric_limits<IkReal>::epsilon());
21429 complex<IkReal> coeffs[3];
21430 const int maxsteps = 110;
21431 for (
int i = 0; i < 3; ++i)
21433 coeffs[i] = complex<IkReal>(rawcoeffs[i + 1] / rawcoeffs[0]);
21435 complex<IkReal> roots[3];
21437 roots[0] = complex<IkReal>(1, 0);
21438 roots[1] = complex<IkReal>(0.4, 0.9);
21441 for (
int i = 2; i < 3; ++i)
21443 roots[i] = roots[i - 1] * roots[1];
21446 for (
int step = 0; step < maxsteps; ++step)
21448 bool changed =
false;
21449 for (
int i = 0; i < 3; ++i)
21455 complex<IkReal> x = roots[i] + coeffs[0];
21456 for (
int j = 1; j < 3; ++j)
21458 x = roots[i] * x + coeffs[j];
21460 for (
int j = 0; j < 3; ++j)
21464 if (roots[i] != roots[j])
21466 x /= (roots[i] - roots[j]);
21481 bool visited[3] = {
false };
21482 for (
int i = 0; i < 3; ++i)
21488 complex<IkReal> newroot = roots[i];
21490 for (
int j = i + 1; j < 3; ++j)
21493 if (abs(real(roots[i]) - real(roots[j])) < tolsqrt && abs(imag(roots[i]) - imag(roots[j])) < 0.002)
21495 newroot += roots[j];
21506 if (
IKabs(imag(newroot)) < tolsqrt)
21508 rawroots[numroots++] = real(newroot);
21513 static inline void polyroots2(IkReal rawcoeffs[2 + 1], IkReal rawroots[2],
int& numroots)
21515 IkReal det = rawcoeffs[1] * rawcoeffs[1] - 4 * rawcoeffs[0] * rawcoeffs[2];
21522 rawroots[0] = -0.5 * rawcoeffs[1] / rawcoeffs[0];
21528 rawroots[0] = (-rawcoeffs[1] + det) / (2 * rawcoeffs[0]);
21529 rawroots[1] = (-rawcoeffs[1] - det) / (2 * rawcoeffs[0]);
21533 static inline void polyroots4(IkReal rawcoeffs[4 + 1], IkReal rawroots[4],
int& numroots)
21535 using std::complex;
21536 if (rawcoeffs[0] == 0)
21539 polyroots3(&rawcoeffs[1], &rawroots[0], numroots);
21543 const IkReal tol = 128.0 * std::numeric_limits<IkReal>::epsilon();
21544 const IkReal tolsqrt = sqrt(std::numeric_limits<IkReal>::epsilon());
21545 complex<IkReal> coeffs[4];
21546 const int maxsteps = 110;
21547 for (
int i = 0; i < 4; ++i)
21549 coeffs[i] = complex<IkReal>(rawcoeffs[i + 1] / rawcoeffs[0]);
21551 complex<IkReal> roots[4];
21553 roots[0] = complex<IkReal>(1, 0);
21554 roots[1] = complex<IkReal>(0.4, 0.9);
21557 for (
int i = 2; i < 4; ++i)
21559 roots[i] = roots[i - 1] * roots[1];
21562 for (
int step = 0; step < maxsteps; ++step)
21564 bool changed =
false;
21565 for (
int i = 0; i < 4; ++i)
21571 complex<IkReal> x = roots[i] + coeffs[0];
21572 for (
int j = 1; j < 4; ++j)
21574 x = roots[i] * x + coeffs[j];
21576 for (
int j = 0; j < 4; ++j)
21580 if (roots[i] != roots[j])
21582 x /= (roots[i] - roots[j]);
21597 bool visited[4] = {
false };
21598 for (
int i = 0; i < 4; ++i)
21604 complex<IkReal> newroot = roots[i];
21606 for (
int j = i + 1; j < 4; ++j)
21609 if (abs(real(roots[i]) - real(roots[j])) < tolsqrt && abs(imag(roots[i]) - imag(roots[j])) < 0.002)
21611 newroot += roots[j];
21622 if (
IKabs(imag(newroot)) < tolsqrt)
21624 rawroots[numroots++] = real(newroot);
21637 return solver.
ComputeIk(eetrans, eerot, pfree, solutions);
21641 const IkReal* eerot,
21642 const IkReal* pfree,
21644 void* pOpenRAVEManip)
21647 return solver.
ComputeIk(eetrans, eerot, pfree, solutions);
21650 IKFAST_API
const char*
GetKinematicsHash() {
return "<robot:GenericRobot - iiwa7 (ad1a4bdb54d4d6b54bc346ee8087a8e6)>"; }
21654 #ifdef IKFAST_NAMESPACE
21658 #ifndef IKFAST_NO_MAIN
21660 #include <stdlib.h>
21661 #ifdef IKFAST_NAMESPACE
21662 using namespace IKFAST_NAMESPACE;
21664 int main(
int argc,
char** argv)
21668 printf(
"\nUsage: ./ik r00 r01 r02 t0 r10 r11 r12 t1 r20 r21 r22 t2 free0 ...\n\n"
21669 "Returns the ik solutions given the transformation of the end effector specified by\n"
21670 "a 3x3 rotation R (rXX), and a 3x1 translation (tX).\n"
21671 "There are %d free parameters that have to be specified.\n\n",
21678 IkReal eerot[9], eetrans[3];
21679 eerot[0] = atof(argv[1]);
21680 eerot[1] = atof(argv[2]);
21681 eerot[2] = atof(argv[3]);
21682 eetrans[0] = atof(argv[4]);
21683 eerot[3] = atof(argv[5]);
21684 eerot[4] = atof(argv[6]);
21685 eerot[5] = atof(argv[7]);
21686 eetrans[1] = atof(argv[8]);
21687 eerot[6] = atof(argv[9]);
21688 eerot[7] = atof(argv[10]);
21689 eerot[8] = atof(argv[11]);
21690 eetrans[2] = atof(argv[12]);
21691 for (std::size_t i = 0; i < vfree.size(); ++i)
21692 vfree[i] = atof(argv[13 + i]);
21693 bool bSuccess =
ComputeIk(eetrans, eerot, vfree.size() > 0 ? &vfree[0] : NULL, solutions);
21697 fprintf(stderr,
"Failed to get ik solution\n");
21701 printf(
"Found %d ik solutions:\n", (
int)solutions.
GetNumSolutions());
21706 printf(
"sol%d (free=%d): ", (
int)i, (
int)sol.
GetFree().size());
21707 std::vector<IkReal> vsolfree(sol.
GetFree().size());
21708 sol.
GetSolution(&solvalues[0], vsolfree.size() > 0 ? &vsolfree[0] : NULL);
21709 for (std::size_t j = 0; j < solvalues.size(); ++j)
21710 printf(
"%.15f, ", solvalues[j]);