24 #ifndef IKFAST_HAS_LIBRARY
25 #define IKFAST_NO_MAIN
31 #define IKFAST_COMPILE_ASSERT(x) extern int __dummy[(int)(x)]
39 #define IKFAST_STRINGIZE2(s) #s
40 #define IKFAST_STRINGIZE(s) IKFAST_STRINGIZE2(s)
49 #ifndef __PRETTY_FUNCTION__
50 #define __PRETTY_FUNCTION__ __FUNCDNAME__
54 #ifndef __PRETTY_FUNCTION__
55 #define __PRETTY_FUNCTION__ __func__
58 #define IKFAST_ASSERT(b) \
62 std::stringstream ss; \
63 ss << "ikfast exception: " << __FILE__ << ":" << __LINE__ << ": " << __PRETTY_FUNCTION__ << ": Assertion '" \
64 << #b << "' failed"; \
65 throw std::runtime_error(ss.str()); \
72 #define IKFAST_ALIGNED16(x) __declspec(align(16)) x
74 #define IKFAST_ALIGNED16(x) x __attribute((aligned(16)))
77 #define IK2PI ((IkReal)6.28318530717959)
78 #define IKPI ((IkReal)3.14159265358979)
79 #define IKPI_2 ((IkReal)1.57079632679490)
89 void dgetrf_(
const int* m,
const int* n,
double* a,
const int* lda,
int* ipiv,
int* info);
90 void zgetrf_(
const int* m,
const int* n, std::complex<double>* a,
const int* lda,
int* ipiv,
int* info);
91 void dgetri_(
const int* n,
const double* a,
const int* lda,
int* ipiv,
double* work,
const int* lwork,
int* info);
92 void dgesv_(
const int* n,
const int* nrhs,
double* a,
const int* lda,
int* ipiv,
double* b,
const int* ldb,
int* info);
102 void dgeev_(
const char* jobvl,
120 #ifdef IKFAST_NAMESPACE
121 namespace IKFAST_NAMESPACE
125 inline float IKabs(
float f) {
return fabsf(f); }
126 inline double IKabs(
double f) {
return fabs(f); }
128 inline float IKsqr(
float f) {
return f * f; }
129 inline double IKsqr(
double f) {
return f * f; }
131 inline float IKlog(
float f) {
return logf(f); }
132 inline double IKlog(
double f) {
return log(f); }
135 #ifndef IKFAST_SINCOS_THRESH
136 #define IKFAST_SINCOS_THRESH ((IkReal)0.000001)
140 #ifndef IKFAST_ATAN2_MAGTHRESH
141 #define IKFAST_ATAN2_MAGTHRESH ((IkReal)2e-6)
145 #ifndef IKFAST_SOLUTION_THRESH
146 #define IKFAST_SOLUTION_THRESH ((IkReal)1e-6)
210 inline float IKsin(
float f) {
return sinf(f); }
211 inline double IKsin(
double f) {
return sin(f); }
212 inline float IKcos(
float f) {
return cosf(f); }
213 inline double IKcos(
double f) {
return cos(f); }
214 inline float IKtan(
float f) {
return tanf(f); }
215 inline double IKtan(
double f) {
return tan(f); }
239 return atan2f(fy, fx);
252 return atan2(fy, fx);
283 IKFAST_API
void ComputeFk(
const IkReal* j, IkReal* eetrans, IkReal* eerot)
285 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,
286 x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46,
300 x12 = ((IkReal(0.0850000000000000)) * (x1));
301 x13 = ((IkReal(0.135000000000000)) * (x7));
302 x14 = ((IkReal(0.0850000000000000)) * (x3));
303 x15 = ((IkReal(1.00000000000000)) * (x7));
304 x16 = ((IkReal(1.00000000000000)) * (x2));
305 x17 = ((IkReal(0.0850000000000000)) * (x5));
306 x18 = ((IkReal(1.00000000000000)) * (x9));
307 x19 = ((IkReal(1.00000000000000)) * (x10));
308 x20 = ((IkReal(1.00000000000000)) * (x0));
309 x21 = ((IkReal(0.755000000000000)) * (x5));
310 x22 = ((IkReal(1.00000000000000)) * (x5));
318 x30 = ((x15) * (x6));
319 x31 = ((x20) * (x27));
320 x32 = ((x16) * (x27));
321 x33 = ((x27) + (((IkReal(-1.00000000000000)) * (x30))));
322 x34 = ((x30) + (((IkReal(-1.00000000000000)) * (x22) * (x4))));
323 x35 = ((((x22) * (x6))) + (((x15) * (x4))));
324 x36 = ((x1) * (x33));
325 x37 = ((x3) * (x34));
326 x38 = ((x10) * (x36));
327 x39 = ((((IkReal(-1.00000000000000)) * (x0) * (x30))) + (x31));
328 x40 = ((((IkReal(-1.00000000000000)) * (x2) * (x30))) + (x32));
329 x41 = ((((x15) * (x23))) + (((x20) * (x25))));
330 x42 = ((IkReal(-1.00000000000000)) * (x41));
331 x43 = ((((x15) * (x26))) + (((x16) * (x25))));
332 x44 = ((IkReal(-1.00000000000000)) * (x43));
333 x45 = ((((x1) * (x42))) + (((IkReal(-1.00000000000000)) * (x16) * (x3))));
334 x46 = ((((x3) * (x41))) + (((IkReal(-1.00000000000000)) * (x1) * (x16))));
335 x47 = ((((x3) * (x43))) + (((x0) * (x1))));
336 x48 = ((((x0) * (x3))) + (((x1) * (x44))));
337 x49 = ((x10) * (x45));
338 eerot[0] = ((((x46) * (x8))) + (((x11) * (((x49) + (((x39) * (x9))))))));
341 (((((IkReal(-1.00000000000000)) * (x18) * (x39))) + (((IkReal(-1.00000000000000)) * (x19) * (x45))))))) +
343 eerot[2] = ((((x45) * (x9))) + (((x10) * (((((IkReal(-1.00000000000000)) * (x31))) + (((x0) * (x24))))))));
344 IkReal x50 = ((x0) * (x24));
345 IkReal x51 = ((IkReal(1.00000000000000)) * (x23));
347 ((((IkReal(0.135000000000000)) * (x0) * (x25))) + (((IkReal(0.755000000000000)) * (x50))) +
348 (((IkReal(-1.00000000000000)) * (x21) * (x51))) +
349 (((x10) * (((((IkReal(0.0850000000000000)) * (x50))) + (((IkReal(-1.00000000000000)) * (x17) * (x51))))))) +
350 (((x13) * (x23))) + (((IkReal(0.100000000000000)) * (x0))) +
351 (((x9) * (((((x12) * (x42))) + (((IkReal(-1.00000000000000)) * (x14) * (x2))))))) +
352 (((IkReal(0.705000000000000)) * (x23))));
353 eerot[3] = ((((x47) * (x8))) + (((x11) * (((((x40) * (x9))) + (((x10) * (x48))))))));
354 eerot[4] = ((((x11) * (x47))) + (((x8) * (((((IkReal(-1.00000000000000)) * (x18) * (x40))) +
355 (((IkReal(-1.00000000000000)) * (x19) * (x48))))))));
356 eerot[5] = ((((x48) * (x9))) + (((x10) * (((((IkReal(-1.00000000000000)) * (x32))) + (((x2) * (x24))))))));
357 IkReal x52 = ((x2) * (x24));
358 IkReal x53 = ((IkReal(1.00000000000000)) * (x26));
360 ((((IkReal(0.755000000000000)) * (x52))) + (((x13) * (x26))) +
361 (((x10) * (((((IkReal(0.0850000000000000)) * (x52))) + (((IkReal(-1.00000000000000)) * (x17) * (x53))))))) +
362 (((x9) * (((((x0) * (x14))) + (((x12) * (x44))))))) + (((IkReal(0.100000000000000)) * (x2))) +
363 (((IkReal(-1.00000000000000)) * (x21) * (x53))) + (((IkReal(0.705000000000000)) * (x26))) +
364 (((IkReal(0.135000000000000)) * (x2) * (x25))));
365 eerot[6] = ((((x11) * (((((x35) * (x9))) + (x38))))) + (((x37) * (x8))));
366 eerot[7] = ((((x11) * (x37))) + (((x8) * (((((IkReal(-1.00000000000000)) * (x18) * (x35))) +
367 (((IkReal(-1.00000000000000)) * (x19) * (x36))))))));
368 eerot[8] = ((((IkReal(-1.00000000000000)) * (x10) * (x35))) + (((x28) * (x33))));
369 IkReal x54 = ((IkReal(1.00000000000000)) * (x6));
371 ((IkReal(0.615000000000000)) +
372 (((x10) * (((((IkReal(-0.0850000000000000)) * (x29))) + (((IkReal(-1.00000000000000)) * (x17) * (x54))))))) +
373 (((x13) * (x6))) + (((x28) * (((((IkReal(-0.0850000000000000)) * (x24))) + (((x17) * (x4))))))) +
374 (((IkReal(-1.00000000000000)) * (x21) * (x54))) + (((IkReal(0.705000000000000)) * (x6))) +
375 (((IkReal(-0.755000000000000)) * (x29))) + (((IkReal(-0.135000000000000)) * (x27))));
389 IkReal j0, cj0, sj0, htj0, j1, cj1, sj1, htj1, j2, cj2, sj2, htj2, j3, cj3, sj3, htj3, j4, cj4, sj4, htj4, j5, cj5,
390 sj5, htj5, new_r00, r00, rxp0_0, new_r01, r01, rxp0_1, new_r02, r02, rxp0_2, new_r10, r10, rxp1_0, new_r11, r11,
391 rxp1_1, new_r12, r12, rxp1_2, new_r20, r20, rxp2_0, new_r21, r21, rxp2_1, new_r22, r22, rxp2_2, new_px, px, npx,
392 new_py, py, npy, new_pz, pz, npz, pp;
393 unsigned char _ij0[2], _nj0, _ij1[2], _nj1, _ij2[2], _nj2, _ij3[2], _nj3, _ij4[2], _nj4, _ij5[2], _nj5;
397 j0 = numeric_limits<IkReal>::quiet_NaN();
401 j1 = numeric_limits<IkReal>::quiet_NaN();
405 j2 = numeric_limits<IkReal>::quiet_NaN();
409 j3 = numeric_limits<IkReal>::quiet_NaN();
413 j4 = numeric_limits<IkReal>::quiet_NaN();
417 j5 = numeric_limits<IkReal>::quiet_NaN();
421 for (
int dummyiter = 0; dummyiter < 1; ++dummyiter)
424 r00 = eerot[0 * 3 + 0];
425 r01 = eerot[0 * 3 + 1];
426 r02 = eerot[0 * 3 + 2];
427 r10 = eerot[1 * 3 + 0];
428 r11 = eerot[1 * 3 + 1];
429 r12 = eerot[1 * 3 + 2];
430 r20 = eerot[2 * 3 + 0];
431 r21 = eerot[2 * 3 + 1];
432 r22 = eerot[2 * 3 + 2];
440 new_px = ((((IkReal(-0.0850000000000000)) * (r02))) + (px));
444 new_py = ((((IkReal(-0.0850000000000000)) * (r12))) + (py));
448 new_pz = ((IkReal(-0.615000000000000)) + (((IkReal(-0.0850000000000000)) * (r22))) + (pz));
461 pp = (((px) * (px)) + ((pz) * (pz)) + ((py) * (py)));
462 npx = ((((py) * (r10))) + (((pz) * (r20))) + (((px) * (r00))));
463 npy = ((((px) * (r01))) + (((pz) * (r21))) + (((py) * (r11))));
464 npz = ((((py) * (r12))) + (((pz) * (r22))) + (((px) * (r02))));
465 rxp0_0 = ((((IkReal(-1.00000000000000)) * (py) * (r20))) + (((pz) * (r10))));
466 rxp0_1 = ((((px) * (r20))) + (((IkReal(-1.00000000000000)) * (pz) * (r00))));
467 rxp0_2 = ((((py) * (r00))) + (((IkReal(-1.00000000000000)) * (px) * (r10))));
468 rxp1_0 = ((((pz) * (r11))) + (((IkReal(-1.00000000000000)) * (py) * (r21))));
469 rxp1_1 = ((((IkReal(-1.00000000000000)) * (pz) * (r01))) + (((px) * (r21))));
470 rxp1_2 = ((((py) * (r01))) + (((IkReal(-1.00000000000000)) * (px) * (r11))));
471 rxp2_0 = ((((IkReal(-1.00000000000000)) * (py) * (r22))) + (((pz) * (r12))));
472 rxp2_1 = ((((px) * (r22))) + (((IkReal(-1.00000000000000)) * (pz) * (r02))));
473 rxp2_2 = ((((py) * (r02))) + (((IkReal(-1.00000000000000)) * (px) * (r12))));
475 IkReal j0array[2], cj0array[2], sj0array[2];
476 bool j0valid[2] = {
false };
480 IkReal x55 =
IKatan2(((IkReal(-1.00000000000000)) * (py)), px);
481 j0array[0] = ((IkReal(-1.00000000000000)) * (x55));
482 sj0array[0] =
IKsin(j0array[0]);
483 cj0array[0] =
IKcos(j0array[0]);
484 j0array[1] = ((IkReal(3.14159265358979)) + (((IkReal(-1.00000000000000)) * (x55))));
485 sj0array[1] =
IKsin(j0array[1]);
486 cj0array[1] =
IKcos(j0array[1]);
487 if (j0array[0] >
IKPI)
491 else if (j0array[0] < -
IKPI)
496 if (j0array[1] >
IKPI)
500 else if (j0array[1] < -
IKPI)
505 for (
int ij0 = 0; ij0 < 2; ++ij0)
513 for (
int iij0 = ij0 + 1; iij0 < 2; ++iij0)
518 j0valid[iij0] =
false;
528 IkReal j2array[2], cj2array[2], sj2array[2];
529 bool j2valid[2] = {
false };
531 if ((((IkReal(0.994304644497180)) + (((IkReal(0.184939600473773)) * (py) * (sj0))) +
532 (((IkReal(0.184939600473773)) * (cj0) * (px))) + (((IkReal(-0.924698002368864)) * (pp))))) <
534 (((IkReal(0.994304644497180)) + (((IkReal(0.184939600473773)) * (py) * (sj0))) +
535 (((IkReal(0.184939600473773)) * (cj0) * (px))) + (((IkReal(-0.924698002368864)) * (pp))))) >
539 IKasin(((IkReal(0.994304644497180)) + (((IkReal(0.184939600473773)) * (py) * (sj0))) +
540 (((IkReal(0.184939600473773)) * (cj0) * (px))) + (((IkReal(-0.924698002368864)) * (pp)))));
541 j2array[0] = ((IkReal(-2.96465459743209)) + (((IkReal(-1.00000000000000)) * (x56))));
542 sj2array[0] =
IKsin(j2array[0]);
543 cj2array[0] =
IKcos(j2array[0]);
544 j2array[1] = ((IkReal(0.176938056157703)) + (x56));
545 sj2array[1] =
IKsin(j2array[1]);
546 cj2array[1] =
IKcos(j2array[1]);
547 if (j2array[0] >
IKPI)
551 else if (j2array[0] < -
IKPI)
556 if (j2array[1] >
IKPI)
560 else if (j2array[1] < -
IKPI)
565 for (
int ij2 = 0; ij2 < 2; ++ij2)
573 for (
int iij2 = ij2 + 1; iij2 < 2; ++iij2)
578 j2valid[iij2] =
false;
590 IkReal x57 = ((IkReal(0.755000000000000)) * (cj2));
591 IkReal x58 = ((py) * (sj0));
592 IkReal x59 = ((cj0) * (px));
593 IkReal x60 = ((IkReal(0.135000000000000)) * (sj2));
595 ((((IkReal(0.705000000000000)) * (pz))) + (((IkReal(-1.00000000000000)) * (x58) * (x60))) +
596 (((IkReal(0.0755000000000000)) * (cj2))) + (((IkReal(-0.755000000000000)) * (pz) * (sj2))) +
597 (((IkReal(-1.00000000000000)) * (x57) * (x58))) + (((IkReal(-1.00000000000000)) * (x59) * (x60))) +
598 (((IkReal(-1.00000000000000)) * (x57) * (x59))) + (((IkReal(0.0135000000000000)) * (sj2))) +
599 (((IkReal(0.135000000000000)) * (cj2) * (pz)))));
600 IkReal x61 = ((IkReal(10.0000000000000)) * (sj2));
601 IkReal x62 = ((cj0) * (px));
602 IkReal x63 = ((py) * (sj0));
603 IkReal x64 = ((IkReal(55.9259259259259)) * (cj2));
605 ((((IkReal(52.2222222222222)) * (pz))) + (((IkReal(-1.00000000000000)) * (x62) * (x64))) + (sj2) +
606 (((IkReal(10.0000000000000)) * (cj2) * (pz))) + (((IkReal(-1.00000000000000)) * (x63) * (x64))) +
607 (((IkReal(-1.00000000000000)) * (x61) * (x62))) + (((IkReal(-1.00000000000000)) * (x61) * (x63))) +
608 (((IkReal(5.59259259259259)) * (cj2))) + (((IkReal(-55.9259259259259)) * (pz) * (sj2))));
609 if (
IKabs(dummyeval[0]) < 0.0000010000000000)
614 IkReal x65 = ((IkReal(0.755000000000000)) * (sj2));
615 IkReal x66 = ((cj0) * (px));
616 IkReal x67 = ((py) * (sj0));
617 IkReal x68 = ((IkReal(0.135000000000000)) * (cj2));
619 ((IkReal(0.0705000000000000)) + (((x65) * (x66))) + (((IkReal(-0.705000000000000)) * (x67))) +
620 (((x65) * (x67))) + (((IkReal(-0.755000000000000)) * (cj2) * (pz))) +
621 (((IkReal(-0.705000000000000)) * (x66))) + (((IkReal(-1.00000000000000)) * (x66) * (x68))) +
622 (((IkReal(-1.00000000000000)) * (x67) * (x68))) + (((IkReal(0.0135000000000000)) * (cj2))) +
623 (((IkReal(-0.135000000000000)) * (pz) * (sj2))) + (((IkReal(-0.0755000000000000)) * (sj2)))));
624 IkReal x69 = ((cj0) * (px));
625 IkReal x70 = ((IkReal(10.0000000000000)) * (cj2));
626 IkReal x71 = ((IkReal(55.9259259259259)) * (sj2));
627 IkReal x72 = ((py) * (sj0));
629 ((IkReal(5.22222222222222)) + (((IkReal(-1.00000000000000)) * (x70) * (x72))) +
630 (((x71) * (x72))) + (((IkReal(-52.2222222222222)) * (x72))) +
631 (((IkReal(-10.0000000000000)) * (pz) * (sj2))) + (cj2) +
632 (((IkReal(-52.2222222222222)) * (x69))) + (((IkReal(-1.00000000000000)) * (x69) * (x70))) +
633 (((IkReal(-5.59259259259259)) * (sj2))) + (((IkReal(-55.9259259259259)) * (cj2) * (pz))) +
635 if (
IKabs(dummyeval[0]) < 0.0000010000000000)
642 IkReal j1array[1], cj1array[1], sj1array[1];
643 bool j1valid[1] = {
false };
645 IkReal x73 = (sj2) * (sj2);
646 IkReal x74 = (cj2) * (cj2);
647 IkReal x75 = ((cj2) * (sj2));
648 IkReal x76 = ((IkReal(1.00000000000000)) * (pz));
651 (((IkReal(-0.497025000000000)) + (((IkReal(-0.190350000000000)) * (cj2))) +
652 ((pz) * (pz)) + (((IkReal(1.06455000000000)) * (sj2))) +
653 (((IkReal(0.203850000000000)) * (x75))) + (((IkReal(-0.570025000000000)) * (x73))) +
657 (((((IkReal(0.101925000000000)) * (x73))) + (((IkReal(-0.101925000000000)) * (x74))) +
658 (((IkReal(0.100000000000000)) * (pz))) + (((IkReal(0.551800000000000)) * (x75))) +
659 (((IkReal(-1.00000000000000)) * (py) * (sj0) * (x76))) +
660 (((IkReal(-0.532275000000000)) * (cj2))) + (((IkReal(-0.0951750000000000)) * (sj2))) +
665 (((IkReal(-0.497025000000000)) + (((IkReal(-0.190350000000000)) * (cj2))) + ((pz) * (pz)) +
666 (((IkReal(1.06455000000000)) * (sj2))) + (((IkReal(0.203850000000000)) * (x75))) +
667 (((IkReal(-0.570025000000000)) * (x73))) + (((IkReal(-0.0182250000000000)) * (x74)))))),
669 (((((IkReal(0.101925000000000)) * (x73))) + (((IkReal(-0.101925000000000)) * (x74))) +
670 (((IkReal(0.100000000000000)) * (pz))) + (((IkReal(0.551800000000000)) * (x75))) +
671 (((IkReal(-1.00000000000000)) * (py) * (sj0) * (x76))) +
672 (((IkReal(-0.532275000000000)) * (cj2))) + (((IkReal(-0.0951750000000000)) * (sj2))) +
673 (((IkReal(-1.00000000000000)) * (cj0) * (px) * (x76)))))));
674 sj1array[0] =
IKsin(j1array[0]);
675 cj1array[0] =
IKcos(j1array[0]);
676 if (j1array[0] >
IKPI)
680 else if (j1array[0] < -
IKPI)
685 for (
int ij1 = 0; ij1 < 1; ++ij1)
693 for (
int iij1 = ij1 + 1; iij1 < 1; ++iij1)
698 j1valid[iij1] =
false;
708 IkReal x77 =
IKsin(j1);
709 IkReal x78 =
IKcos(j1);
710 IkReal x79 = ((IkReal(0.135000000000000)) * (sj2));
711 IkReal x80 = ((cj0) * (px));
712 IkReal x81 = ((IkReal(0.755000000000000)) * (sj2));
713 IkReal x82 = ((py) * (sj0));
714 IkReal x83 = ((IkReal(0.755000000000000)) * (cj2));
715 IkReal x84 = ((IkReal(0.135000000000000)) * (cj2));
716 IkReal x85 = ((IkReal(0.135000000000000)) * (x78));
717 IkReal x86 = ((IkReal(1.00000000000000)) * (x78));
718 IkReal x87 = ((IkReal(1.41000000000000)) * (x77));
719 IkReal x88 = ((pz) * (x78));
720 evalcond[0] = ((IkReal(-0.705000000000000)) + (((x77) * (x80))) + (((x77) * (x82))) +
721 (((IkReal(-0.100000000000000)) * (x77))) +
722 (((IkReal(-1.00000000000000)) * (x84))) + (x88) + (x81));
723 evalcond[1] = ((((IkReal(0.100000000000000)) * (x78))) +
724 (((IkReal(-1.00000000000000)) * (x80) * (x86))) + (x79) +
725 (((IkReal(-1.00000000000000)) * (x82) * (x86))) + (x83) + (((pz) * (x77))));
726 evalcond[2] = ((((IkReal(-0.705000000000000)) * (x78))) +
727 (((IkReal(-1.00000000000000)) * (x78) * (x84))) + (((x77) * (x79))) + (pz) +
728 (((x78) * (x81))) + (((x77) * (x83))));
730 ((IkReal(0.0812250000000000)) + (((IkReal(-0.141000000000000)) * (x77))) +
731 (((IkReal(-1.00000000000000)) * (pp))) + (((x82) * (x87))) +
732 (((IkReal(0.200000000000000)) * (x82))) + (((IkReal(1.41000000000000)) * (x88))) +
733 (((x80) * (x87))) + (((IkReal(0.200000000000000)) * (x80))));
735 ((IkReal(0.100000000000000)) + (((IkReal(-1.00000000000000)) * (x82))) +
736 (((x77) * (x84))) + (((IkReal(-1.00000000000000)) * (x77) * (x81))) +
737 (((x78) * (x83))) + (((x78) * (x79))) + (((IkReal(0.705000000000000)) * (x77))) +
738 (((IkReal(-1.00000000000000)) * (x80))));
739 if (
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 ||
740 IKabs(evalcond[2]) > 0.000001 ||
IKabs(evalcond[3]) > 0.000001 ||
741 IKabs(evalcond[4]) > 0.000001)
747 rotationfunction0(solutions);
756 IkReal j1array[1], cj1array[1], sj1array[1];
757 bool j1valid[1] = {
false };
759 IkReal x228 = (sj2) * (sj2);
760 IkReal x229 = (cj2) * (cj2);
761 IkReal x230 = ((cj2) * (sj2));
762 if (
IKabs(((gconst1) *
763 (((((IkReal(0.551800000000000)) * (x230))) + (((IkReal(0.101925000000000)) * (x228))) +
764 (((IkReal(-0.100000000000000)) * (pz))) + (((IkReal(-0.101925000000000)) * (x229))) +
765 (((cj0) * (px) * (pz))) + (((IkReal(-0.532275000000000)) * (cj2))) +
766 (((IkReal(-0.0951750000000000)) * (sj2))) + (((py) * (pz) * (sj0))))))) <
768 IKabs(((gconst1) * (((((IkReal(-0.0182250000000000)) * (x228))) + ((pz) * (pz)) +
769 (((IkReal(-0.203850000000000)) * (x230))) +
774 (((((IkReal(0.551800000000000)) * (x230))) + (((IkReal(0.101925000000000)) * (x228))) +
775 (((IkReal(-0.100000000000000)) * (pz))) + (((IkReal(-0.101925000000000)) * (x229))) +
776 (((cj0) * (px) * (pz))) + (((IkReal(-0.532275000000000)) * (cj2))) +
777 (((IkReal(-0.0951750000000000)) * (sj2))) + (((py) * (pz) * (sj0)))))),
778 ((gconst1) * (((((IkReal(-0.0182250000000000)) * (x228))) + ((pz) * (pz)) +
779 (((IkReal(-0.203850000000000)) * (x230))) +
780 (((IkReal(-0.570025000000000)) * (x229)))))));
781 sj1array[0] =
IKsin(j1array[0]);
782 cj1array[0] =
IKcos(j1array[0]);
783 if (j1array[0] >
IKPI)
787 else if (j1array[0] < -
IKPI)
792 for (
int ij1 = 0; ij1 < 1; ++ij1)
800 for (
int iij1 = ij1 + 1; iij1 < 1; ++iij1)
805 j1valid[iij1] =
false;
815 IkReal x231 =
IKsin(j1);
816 IkReal x232 =
IKcos(j1);
817 IkReal x233 = ((IkReal(0.135000000000000)) * (sj2));
818 IkReal x234 = ((cj0) * (px));
819 IkReal x235 = ((IkReal(0.755000000000000)) * (sj2));
820 IkReal x236 = ((py) * (sj0));
821 IkReal x237 = ((IkReal(0.755000000000000)) * (cj2));
822 IkReal x238 = ((IkReal(0.135000000000000)) * (cj2));
823 IkReal x239 = ((IkReal(0.135000000000000)) * (x232));
824 IkReal x240 = ((IkReal(1.00000000000000)) * (x232));
825 IkReal x241 = ((IkReal(1.41000000000000)) * (x231));
826 IkReal x242 = ((pz) * (x232));
827 evalcond[0] = ((IkReal(-0.705000000000000)) + (((IkReal(-1.00000000000000)) * (x238))) +
828 (x235) + (((x231) * (x236))) + (x242) +
829 (((IkReal(-0.100000000000000)) * (x231))) + (((x231) * (x234))));
830 evalcond[1] = ((((IkReal(0.100000000000000)) * (x232))) + (((pz) * (x231))) + (x233) + (x237) +
831 (((IkReal(-1.00000000000000)) * (x234) * (x240))) +
832 (((IkReal(-1.00000000000000)) * (x236) * (x240))));
834 ((((IkReal(-0.705000000000000)) * (x232))) + (((x231) * (x237))) + (((x231) * (x233))) +
835 (pz) + (((x232) * (x235))) + (((IkReal(-1.00000000000000)) * (x232) * (x238))));
837 ((IkReal(0.0812250000000000)) + (((x236) * (x241))) +
838 (((IkReal(0.200000000000000)) * (x236))) + (((IkReal(0.200000000000000)) * (x234))) +
839 (((IkReal(-1.00000000000000)) * (pp))) + (((x234) * (x241))) +
840 (((IkReal(1.41000000000000)) * (x242))) + (((IkReal(-0.141000000000000)) * (x231))));
842 ((IkReal(0.100000000000000)) + (((IkReal(-1.00000000000000)) * (x231) * (x235))) +
843 (((IkReal(0.705000000000000)) * (x231))) + (((IkReal(-1.00000000000000)) * (x236))) +
844 (((x231) * (x238))) + (((x232) * (x233))) + (((x232) * (x237))) +
845 (((IkReal(-1.00000000000000)) * (x234))));
846 if (
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 ||
847 IKabs(evalcond[2]) > 0.000001 ||
IKabs(evalcond[3]) > 0.000001 ||
848 IKabs(evalcond[4]) > 0.000001)
854 rotationfunction0(solutions);
868 for (
int rotationiter = 0; rotationiter < 1; ++rotationiter)
870 IkReal x89 = ((cj0) * (r00));
871 IkReal x90 = ((cj0) * (r01));
872 IkReal x91 = ((sj1) * (sj2));
873 IkReal x92 = ((IkReal(1.00000000000000)) * (sj0));
874 IkReal x93 = ((r10) * (sj0));
875 IkReal x94 = ((IkReal(1.00000000000000)) * (cj2));
876 IkReal x95 = ((r12) * (sj0));
877 IkReal x96 = ((cj0) * (r02));
878 IkReal x97 = ((r11) * (sj0));
879 IkReal x98 = ((((IkReal(-1.00000000000000)) * (cj1) * (x94))) + (x91));
880 IkReal x99 = ((((IkReal(-1.00000000000000)) * (x91))) + (((cj1) * (cj2))));
881 IkReal x100 = ((cj0) * (x99));
882 IkReal x101 = ((((IkReal(-1.00000000000000)) * (sj1) * (x94))) + (((IkReal(-1.00000000000000)) * (cj1) * (sj2))));
883 IkReal x102 = ((sj0) * (x101));
884 new_r00 = ((((r20) * (x98))) + (((x101) * (x89))) + (((x101) * (x93))));
885 new_r01 = ((((x101) * (x90))) + (((x101) * (x97))) + (((r21) * (x98))));
886 new_r02 = ((((x101) * (x95))) + (((r22) * (x98))) + (((x101) * (x96))));
887 new_r10 = ((((IkReal(-1.00000000000000)) * (r00) * (x92))) + (((cj0) * (r10))));
888 new_r11 = ((((IkReal(-1.00000000000000)) * (r01) * (x92))) + (((cj0) * (r11))));
889 new_r12 = ((((IkReal(-1.00000000000000)) * (r02) * (x92))) + (((cj0) * (r12))));
890 new_r20 = ((((x93) * (x99))) + (((x89) * (x99))) + (((r20) * (x101))));
891 new_r21 = ((((r21) * (x101))) + (((x97) * (x99))) + (((x90) * (x99))));
892 new_r22 = ((((x96) * (x99))) + (((r22) * (x101))) + (((x95) * (x99))));
894 IkReal j4array[2], cj4array[2], sj4array[2];
895 bool j4valid[2] = {
false };
897 cj4array[0] = new_r22;
900 j4valid[0] = j4valid[1] =
true;
901 j4array[0] =
IKacos(cj4array[0]);
902 sj4array[0] =
IKsin(j4array[0]);
903 cj4array[1] = cj4array[0];
904 j4array[1] = -j4array[0];
905 sj4array[1] = -sj4array[0];
907 else if (isnan(cj4array[0]))
915 for (
int ij4 = 0; ij4 < 2; ++ij4)
923 for (
int iij4 = ij4 + 1; iij4 < 2; ++iij4)
928 j4valid[iij4] =
false;
942 if (
IKabs(dummyeval[0]) < 0.0000010000000000)
947 gconst2 =
IKsign((((new_r12) * (new_r12)) + ((new_r02) * (new_r02))));
948 dummyeval[0] = (((new_r12) * (new_r12)) + ((new_r02) * (new_r02)));
949 if (
IKabs(dummyeval[0]) < 0.0000010000000000)
954 gconst3 =
IKsign(((((new_r10) * (new_r12) * (sj4))) + (((new_r00) * (new_r02) * (sj4)))));
955 dummyeval[0] = ((((new_r10) * (new_r12) * (sj4))) + (((new_r00) * (new_r02) * (sj4))));
956 if (
IKabs(dummyeval[0]) < 0.0000010000000000)
960 IkReal x103 = ((IkReal(-1.00000000000000)) + (new_r22));
961 evalcond[0] = ((IkReal(-3.14159265358979)) +
962 (
IKfmod(((IkReal(3.14159265358979)) + (j4)), IkReal(6.28318530717959))));
964 evalcond[2] = new_r20;
965 evalcond[3] = new_r21;
966 evalcond[4] = new_r20;
967 evalcond[5] = new_r21;
969 if (
IKabs(evalcond[0]) < 0.0000010000000000 &&
IKabs(evalcond[1]) < 0.0000010000000000 &&
970 IKabs(evalcond[2]) < 0.0000010000000000 &&
IKabs(evalcond[3]) < 0.0000010000000000 &&
971 IKabs(evalcond[4]) < 0.0000010000000000 &&
IKabs(evalcond[5]) < 0.0000010000000000 &&
972 IKabs(evalcond[6]) < 0.0000010000000000)
975 IkReal j3array[2], cj3array[2], sj3array[2];
976 bool j3valid[2] = {
false };
980 IkReal x104 =
IKatan2(new_r02, new_r12);
981 j3array[0] = ((IkReal(-1.00000000000000)) * (x104));
982 sj3array[0] =
IKsin(j3array[0]);
983 cj3array[0] =
IKcos(j3array[0]);
984 j3array[1] = ((IkReal(3.14159265358979)) + (((IkReal(-1.00000000000000)) * (x104))));
985 sj3array[1] =
IKsin(j3array[1]);
986 cj3array[1] =
IKcos(j3array[1]);
987 if (j3array[0] >
IKPI)
991 else if (j3array[0] < -
IKPI)
996 if (j3array[1] >
IKPI)
1000 else if (j3array[1] < -
IKPI)
1002 j3array[1] +=
IK2PI;
1005 for (
int ij3 = 0; ij3 < 2; ++ij3)
1013 for (
int iij3 = ij3 + 1; iij3 < 2; ++iij3)
1018 j3valid[iij3] =
false;
1024 cj3 = cj3array[ij3];
1025 sj3 = sj3array[ij3];
1028 evalcond[0] = ((((new_r12) * (
IKcos(j3)))) +
1029 (((IkReal(-1.00000000000000)) * (new_r02) * (
IKsin(j3)))));
1030 if (
IKabs(evalcond[0]) > 0.000001)
1037 IkReal j5array[1], cj5array[1], sj5array[1];
1038 bool j5valid[1] = {
false };
1040 if (
IKabs(((((IkReal(-1.00000000000000)) * (new_r11) * (sj3))) +
1041 (((IkReal(-1.00000000000000)) * (cj3) * (new_r01))))) <
1044 IKabs(
IKsqr(((((IkReal(-1.00000000000000)) * (new_r11) * (sj3))) +
1045 (((IkReal(-1.00000000000000)) * (cj3) * (new_r01))))) +
1046 IKsqr(((((new_r10) * (sj3))) + (((cj3) * (new_r00))))) - 1) <=
1049 j5array[0] =
IKatan2(((((IkReal(-1.00000000000000)) * (new_r11) * (sj3))) +
1050 (((IkReal(-1.00000000000000)) * (cj3) * (new_r01)))),
1051 ((((new_r10) * (sj3))) + (((cj3) * (new_r00)))));
1052 sj5array[0] =
IKsin(j5array[0]);
1053 cj5array[0] =
IKcos(j5array[0]);
1054 if (j5array[0] >
IKPI)
1056 j5array[0] -=
IK2PI;
1058 else if (j5array[0] < -
IKPI)
1060 j5array[0] +=
IK2PI;
1063 for (
int ij5 = 0; ij5 < 1; ++ij5)
1071 for (
int iij5 = ij5 + 1; iij5 < 1; ++iij5)
1073 if (j5valid[iij5] &&
1077 j5valid[iij5] =
false;
1083 cj5 = cj5array[ij5];
1084 sj5 = sj5array[ij5];
1087 IkReal x105 =
IKsin(j5);
1088 IkReal x106 = ((IkReal(1.00000000000000)) * (sj3));
1089 IkReal x107 = ((IkReal(1.00000000000000)) * (
IKcos(j5)));
1090 evalcond[0] = ((((IkReal(-1.00000000000000)) * (new_r00) * (x106))) +
1091 (((cj3) * (new_r10))) + (((IkReal(-1.00000000000000)) * (x105))));
1092 evalcond[1] = ((((IkReal(-1.00000000000000)) * (x107))) + (((cj3) * (new_r11))) +
1093 (((IkReal(-1.00000000000000)) * (new_r01) * (x106))));
1094 evalcond[2] = ((((new_r11) * (sj3))) + (x105) + (((cj3) * (new_r01))));
1095 evalcond[3] = ((((IkReal(-1.00000000000000)) * (x107))) + (((new_r10) * (sj3))) +
1096 (((cj3) * (new_r00))));
1097 if (
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 ||
1098 IKabs(evalcond[2]) > 0.000001 ||
IKabs(evalcond[3]) > 0.000001)
1105 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
1106 vinfos[0].jointtype = 1;
1107 vinfos[0].foffset = j0;
1108 vinfos[0].indices[0] = _ij0[0];
1109 vinfos[0].indices[1] = _ij0[1];
1110 vinfos[0].maxsolutions = _nj0;
1111 vinfos[1].jointtype = 1;
1112 vinfos[1].foffset = j1;
1113 vinfos[1].indices[0] = _ij1[0];
1114 vinfos[1].indices[1] = _ij1[1];
1115 vinfos[1].maxsolutions = _nj1;
1116 vinfos[2].jointtype = 1;
1117 vinfos[2].foffset = j2;
1118 vinfos[2].indices[0] = _ij2[0];
1119 vinfos[2].indices[1] = _ij2[1];
1120 vinfos[2].maxsolutions = _nj2;
1121 vinfos[3].jointtype = 1;
1122 vinfos[3].foffset = j3;
1123 vinfos[3].indices[0] = _ij3[0];
1124 vinfos[3].indices[1] = _ij3[1];
1125 vinfos[3].maxsolutions = _nj3;
1126 vinfos[4].jointtype = 1;
1127 vinfos[4].foffset = j4;
1128 vinfos[4].indices[0] = _ij4[0];
1129 vinfos[4].indices[1] = _ij4[1];
1130 vinfos[4].maxsolutions = _nj4;
1131 vinfos[5].jointtype = 1;
1132 vinfos[5].foffset = j5;
1133 vinfos[5].indices[0] = _ij5[0];
1134 vinfos[5].indices[1] = _ij5[1];
1135 vinfos[5].maxsolutions = _nj5;
1136 std::vector<int> vfree(0);
1146 evalcond[0] = ((IkReal(-3.14159265358979)) + (
IKfmod(j4, IkReal(6.28318530717959))));
1147 evalcond[1] = ((IkReal(1.00000000000000)) + (new_r22));
1148 evalcond[2] = new_r20;
1149 evalcond[3] = new_r21;
1150 evalcond[4] = ((IkReal(-1.00000000000000)) * (new_r20));
1151 evalcond[5] = ((IkReal(-1.00000000000000)) * (new_r21));
1152 evalcond[6] = ((IkReal(-1.00000000000000)) + (((IkReal(-1.00000000000000)) * (new_r22))));
1153 if (
IKabs(evalcond[0]) < 0.0000010000000000 &&
IKabs(evalcond[1]) < 0.0000010000000000 &&
1154 IKabs(evalcond[2]) < 0.0000010000000000 &&
IKabs(evalcond[3]) < 0.0000010000000000 &&
1155 IKabs(evalcond[4]) < 0.0000010000000000 &&
IKabs(evalcond[5]) < 0.0000010000000000 &&
1156 IKabs(evalcond[6]) < 0.0000010000000000)
1159 IkReal j3array[2], cj3array[2], sj3array[2];
1160 bool j3valid[2] = {
false };
1164 IkReal x108 =
IKatan2(new_r02, new_r12);
1165 j3array[0] = ((IkReal(-1.00000000000000)) * (x108));
1166 sj3array[0] =
IKsin(j3array[0]);
1167 cj3array[0] =
IKcos(j3array[0]);
1168 j3array[1] = ((IkReal(3.14159265358979)) + (((IkReal(-1.00000000000000)) * (x108))));
1169 sj3array[1] =
IKsin(j3array[1]);
1170 cj3array[1] =
IKcos(j3array[1]);
1171 if (j3array[0] >
IKPI)
1173 j3array[0] -=
IK2PI;
1175 else if (j3array[0] < -
IKPI)
1177 j3array[0] +=
IK2PI;
1180 if (j3array[1] >
IKPI)
1182 j3array[1] -=
IK2PI;
1184 else if (j3array[1] < -
IKPI)
1186 j3array[1] +=
IK2PI;
1189 for (
int ij3 = 0; ij3 < 2; ++ij3)
1197 for (
int iij3 = ij3 + 1; iij3 < 2; ++iij3)
1202 j3valid[iij3] =
false;
1208 cj3 = cj3array[ij3];
1209 sj3 = sj3array[ij3];
1212 evalcond[0] = ((((new_r12) * (
IKcos(j3)))) +
1213 (((IkReal(-1.00000000000000)) * (new_r02) * (
IKsin(j3)))));
1214 if (
IKabs(evalcond[0]) > 0.000001)
1221 IkReal j5array[1], cj5array[1], sj5array[1];
1222 bool j5valid[1] = {
false };
1225 IKabs(((((IkReal(-1.00000000000000)) * (cj3) * (new_r00))) +
1226 (((IkReal(-1.00000000000000)) * (new_r10) * (sj3))))) <
1228 IKabs(
IKsqr(((((new_r11) * (sj3))) + (((cj3) * (new_r01))))) +
1229 IKsqr(((((IkReal(-1.00000000000000)) * (cj3) * (new_r00))) +
1230 (((IkReal(-1.00000000000000)) * (new_r10) * (sj3))))) -
1233 j5array[0] =
IKatan2(((((new_r11) * (sj3))) + (((cj3) * (new_r01)))),
1234 ((((IkReal(-1.00000000000000)) * (cj3) * (new_r00))) +
1235 (((IkReal(-1.00000000000000)) * (new_r10) * (sj3)))));
1236 sj5array[0] =
IKsin(j5array[0]);
1237 cj5array[0] =
IKcos(j5array[0]);
1238 if (j5array[0] >
IKPI)
1240 j5array[0] -=
IK2PI;
1242 else if (j5array[0] < -
IKPI)
1244 j5array[0] +=
IK2PI;
1247 for (
int ij5 = 0; ij5 < 1; ++ij5)
1255 for (
int iij5 = ij5 + 1; iij5 < 1; ++iij5)
1257 if (j5valid[iij5] &&
1261 j5valid[iij5] =
false;
1267 cj5 = cj5array[ij5];
1268 sj5 = sj5array[ij5];
1271 IkReal x109 =
IKcos(j5);
1272 IkReal x110 = ((IkReal(1.00000000000000)) * (sj3));
1273 IkReal x111 = ((IkReal(1.00000000000000)) * (
IKsin(j5)));
1274 evalcond[0] = ((((IkReal(-1.00000000000000)) * (new_r00) * (x110))) +
1275 (((IkReal(-1.00000000000000)) * (x111))) + (((cj3) * (new_r10))));
1276 evalcond[1] = ((((IkReal(-1.00000000000000)) * (x109))) +
1277 (((IkReal(-1.00000000000000)) * (new_r01) * (x110))) +
1278 (((cj3) * (new_r11))));
1279 evalcond[2] = ((((new_r11) * (sj3))) + (((IkReal(-1.00000000000000)) * (x111))) +
1280 (((cj3) * (new_r01))));
1281 evalcond[3] = ((((new_r10) * (sj3))) + (x109) + (((cj3) * (new_r00))));
1282 if (
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 ||
1283 IKabs(evalcond[2]) > 0.000001 ||
IKabs(evalcond[3]) > 0.000001)
1290 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
1291 vinfos[0].jointtype = 1;
1292 vinfos[0].foffset = j0;
1293 vinfos[0].indices[0] = _ij0[0];
1294 vinfos[0].indices[1] = _ij0[1];
1295 vinfos[0].maxsolutions = _nj0;
1296 vinfos[1].jointtype = 1;
1297 vinfos[1].foffset = j1;
1298 vinfos[1].indices[0] = _ij1[0];
1299 vinfos[1].indices[1] = _ij1[1];
1300 vinfos[1].maxsolutions = _nj1;
1301 vinfos[2].jointtype = 1;
1302 vinfos[2].foffset = j2;
1303 vinfos[2].indices[0] = _ij2[0];
1304 vinfos[2].indices[1] = _ij2[1];
1305 vinfos[2].maxsolutions = _nj2;
1306 vinfos[3].jointtype = 1;
1307 vinfos[3].foffset = j3;
1308 vinfos[3].indices[0] = _ij3[0];
1309 vinfos[3].indices[1] = _ij3[1];
1310 vinfos[3].maxsolutions = _nj3;
1311 vinfos[4].jointtype = 1;
1312 vinfos[4].foffset = j4;
1313 vinfos[4].indices[0] = _ij4[0];
1314 vinfos[4].indices[1] = _ij4[1];
1315 vinfos[4].maxsolutions = _nj4;
1316 vinfos[5].jointtype = 1;
1317 vinfos[5].foffset = j5;
1318 vinfos[5].indices[0] = _ij5[0];
1319 vinfos[5].indices[1] = _ij5[1];
1320 vinfos[5].maxsolutions = _nj5;
1321 std::vector<int> vfree(0);
1345 IkReal j3array[1], cj3array[1], sj3array[1];
1346 bool j3valid[1] = {
false };
1348 IkReal x112 = ((IkReal(-1.00000000000000)) * (cj4) * (gconst3) * (new_r20));
1352 j3array[0] =
IKatan2(((new_r12) * (x112)), ((new_r02) * (x112)));
1353 sj3array[0] =
IKsin(j3array[0]);
1354 cj3array[0] =
IKcos(j3array[0]);
1355 if (j3array[0] >
IKPI)
1357 j3array[0] -=
IK2PI;
1359 else if (j3array[0] < -
IKPI)
1361 j3array[0] +=
IK2PI;
1364 for (
int ij3 = 0; ij3 < 1; ++ij3)
1372 for (
int iij3 = ij3 + 1; iij3 < 1; ++iij3)
1377 j3valid[iij3] =
false;
1383 cj3 = cj3array[ij3];
1384 sj3 = sj3array[ij3];
1387 IkReal x113 =
IKsin(j3);
1388 IkReal x114 =
IKcos(j3);
1389 IkReal x115 = ((IkReal(1.00000000000000)) * (sj4));
1390 IkReal x116 = ((sj4) * (x113));
1391 IkReal x117 = ((sj4) * (x114));
1392 IkReal x118 = ((new_r02) * (x114));
1393 IkReal x119 = ((new_r12) * (x113));
1395 ((((IkReal(-1.00000000000000)) * (new_r02) * (x113))) + (((new_r12) * (x114))));
1396 evalcond[1] = ((((IkReal(-1.00000000000000)) * (x115))) + (x119) + (x118));
1397 evalcond[2] = ((((new_r00) * (x117))) + (((cj4) * (new_r20))) + (((new_r10) * (x116))));
1398 evalcond[3] = ((((new_r11) * (x116))) + (((new_r01) * (x117))) + (((cj4) * (new_r21))));
1399 evalcond[4] = ((IkReal(-1.00000000000000)) + (((new_r02) * (x117))) +
1400 (((new_r12) * (x116))) + (((cj4) * (new_r22))));
1401 evalcond[5] = ((((cj4) * (x118))) + (((cj4) * (x119))) +
1402 (((IkReal(-1.00000000000000)) * (new_r22) * (x115))));
1403 if (
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 ||
1404 IKabs(evalcond[2]) > 0.000001 ||
IKabs(evalcond[3]) > 0.000001 ||
1405 IKabs(evalcond[4]) > 0.000001 ||
IKabs(evalcond[5]) > 0.000001)
1412 IkReal dummyeval[1];
1416 if (
IKabs(dummyeval[0]) < 0.0000010000000000)
1419 IkReal dummyeval[1];
1421 if (
IKabs(dummyeval[0]) < 0.0000010000000000)
1424 IkReal dummyeval[1];
1426 if (
IKabs(dummyeval[0]) < 0.0000010000000000)
1429 IkReal evalcond[11];
1430 IkReal x120 = ((IkReal(-1.00000000000000)) + (new_r22));
1431 IkReal x121 = ((((cj3) * (new_r12))) +
1432 (((IkReal(-1.00000000000000)) * (new_r02) * (sj3))));
1433 IkReal x122 = ((((new_r12) * (sj3))) + (((cj3) * (new_r02))));
1435 ((IkReal(-3.14159265358979)) +
1436 (
IKfmod(((IkReal(3.14159265358979)) + (j4)), IkReal(6.28318530717959))));
1438 evalcond[2] = new_r20;
1439 evalcond[3] = new_r21;
1443 evalcond[7] = new_r20;
1444 evalcond[8] = new_r21;
1446 evalcond[10] = x122;
1447 if (
IKabs(evalcond[0]) < 0.0000010000000000 &&
1448 IKabs(evalcond[1]) < 0.0000010000000000 &&
1449 IKabs(evalcond[2]) < 0.0000010000000000 &&
1450 IKabs(evalcond[3]) < 0.0000010000000000 &&
1451 IKabs(evalcond[4]) < 0.0000010000000000 &&
1452 IKabs(evalcond[5]) < 0.0000010000000000 &&
1453 IKabs(evalcond[6]) < 0.0000010000000000 &&
1454 IKabs(evalcond[7]) < 0.0000010000000000 &&
1455 IKabs(evalcond[8]) < 0.0000010000000000 &&
1456 IKabs(evalcond[9]) < 0.0000010000000000 &&
1457 IKabs(evalcond[10]) < 0.0000010000000000)
1460 IkReal j5array[1], cj5array[1], sj5array[1];
1461 bool j5valid[1] = {
false };
1463 if (
IKabs(((((IkReal(-1.00000000000000)) * (new_r11) * (sj3))) +
1464 (((IkReal(-1.00000000000000)) * (cj3) * (new_r01))))) <
1466 IKabs(((((new_r10) * (sj3))) + (((cj3) * (new_r00))))) <
1468 IKabs(
IKsqr(((((IkReal(-1.00000000000000)) * (new_r11) * (sj3))) +
1469 (((IkReal(-1.00000000000000)) * (cj3) * (new_r01))))) +
1470 IKsqr(((((new_r10) * (sj3))) + (((cj3) * (new_r00))))) - 1) <=
1473 j5array[0] =
IKatan2(((((IkReal(-1.00000000000000)) * (new_r11) * (sj3))) +
1474 (((IkReal(-1.00000000000000)) * (cj3) * (new_r01)))),
1475 ((((new_r10) * (sj3))) + (((cj3) * (new_r00)))));
1476 sj5array[0] =
IKsin(j5array[0]);
1477 cj5array[0] =
IKcos(j5array[0]);
1478 if (j5array[0] >
IKPI)
1480 j5array[0] -=
IK2PI;
1482 else if (j5array[0] < -
IKPI)
1484 j5array[0] +=
IK2PI;
1487 for (
int ij5 = 0; ij5 < 1; ++ij5)
1495 for (
int iij5 = ij5 + 1; iij5 < 1; ++iij5)
1497 if (j5valid[iij5] &&
1501 j5valid[iij5] =
false;
1507 cj5 = cj5array[ij5];
1508 sj5 = sj5array[ij5];
1511 IkReal x123 =
IKsin(j5);
1512 IkReal x124 = ((IkReal(1.00000000000000)) * (sj3));
1513 IkReal x125 = ((IkReal(1.00000000000000)) * (
IKcos(j5)));
1514 evalcond[0] = ((((IkReal(-1.00000000000000)) * (x123))) +
1515 (((IkReal(-1.00000000000000)) * (new_r00) * (x124))) +
1516 (((cj3) * (new_r10))));
1518 ((((IkReal(-1.00000000000000)) * (new_r01) * (x124))) +
1519 (((cj3) * (new_r11))) + (((IkReal(-1.00000000000000)) * (x125))));
1520 evalcond[2] = ((((new_r11) * (sj3))) + (x123) + (((cj3) * (new_r01))));
1522 ((((new_r10) * (sj3))) + (((IkReal(-1.00000000000000)) * (x125))) +
1523 (((cj3) * (new_r00))));
1524 if (
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 ||
1525 IKabs(evalcond[2]) > 0.000001 ||
IKabs(evalcond[3]) > 0.000001)
1532 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
1533 vinfos[0].jointtype = 1;
1534 vinfos[0].foffset = j0;
1535 vinfos[0].indices[0] = _ij0[0];
1536 vinfos[0].indices[1] = _ij0[1];
1537 vinfos[0].maxsolutions = _nj0;
1538 vinfos[1].jointtype = 1;
1539 vinfos[1].foffset = j1;
1540 vinfos[1].indices[0] = _ij1[0];
1541 vinfos[1].indices[1] = _ij1[1];
1542 vinfos[1].maxsolutions = _nj1;
1543 vinfos[2].jointtype = 1;
1544 vinfos[2].foffset = j2;
1545 vinfos[2].indices[0] = _ij2[0];
1546 vinfos[2].indices[1] = _ij2[1];
1547 vinfos[2].maxsolutions = _nj2;
1548 vinfos[3].jointtype = 1;
1549 vinfos[3].foffset = j3;
1550 vinfos[3].indices[0] = _ij3[0];
1551 vinfos[3].indices[1] = _ij3[1];
1552 vinfos[3].maxsolutions = _nj3;
1553 vinfos[4].jointtype = 1;
1554 vinfos[4].foffset = j4;
1555 vinfos[4].indices[0] = _ij4[0];
1556 vinfos[4].indices[1] = _ij4[1];
1557 vinfos[4].maxsolutions = _nj4;
1558 vinfos[5].jointtype = 1;
1559 vinfos[5].foffset = j5;
1560 vinfos[5].indices[0] = _ij5[0];
1561 vinfos[5].indices[1] = _ij5[1];
1562 vinfos[5].maxsolutions = _nj5;
1563 std::vector<int> vfree(0);
1571 IkReal x126 = ((new_r12) * (sj3));
1572 IkReal x127 = ((IkReal(1.00000000000000)) * (new_r02));
1573 IkReal x128 = ((((IkReal(-1.00000000000000)) * (sj3) * (x127))) +
1574 (((cj3) * (new_r12))));
1576 ((IkReal(-3.14159265358979)) + (
IKfmod(j4, IkReal(6.28318530717959))));
1577 evalcond[1] = ((IkReal(1.00000000000000)) + (new_r22));
1578 evalcond[2] = new_r20;
1579 evalcond[3] = new_r21;
1582 evalcond[6] = ((x126) + (((cj3) * (new_r02))));
1583 evalcond[7] = ((IkReal(-1.00000000000000)) * (new_r20));
1584 evalcond[8] = ((IkReal(-1.00000000000000)) * (new_r21));
1585 evalcond[9] = ((IkReal(-1.00000000000000)) +
1586 (((IkReal(-1.00000000000000)) * (new_r22))));
1587 evalcond[10] = ((((IkReal(-1.00000000000000)) * (cj3) * (x127))) +
1588 (((IkReal(-1.00000000000000)) * (x126))));
1589 if (
IKabs(evalcond[0]) < 0.0000010000000000 &&
1590 IKabs(evalcond[1]) < 0.0000010000000000 &&
1591 IKabs(evalcond[2]) < 0.0000010000000000 &&
1592 IKabs(evalcond[3]) < 0.0000010000000000 &&
1593 IKabs(evalcond[4]) < 0.0000010000000000 &&
1594 IKabs(evalcond[5]) < 0.0000010000000000 &&
1595 IKabs(evalcond[6]) < 0.0000010000000000 &&
1596 IKabs(evalcond[7]) < 0.0000010000000000 &&
1597 IKabs(evalcond[8]) < 0.0000010000000000 &&
1598 IKabs(evalcond[9]) < 0.0000010000000000 &&
1599 IKabs(evalcond[10]) < 0.0000010000000000)
1602 IkReal j5array[1], cj5array[1], sj5array[1];
1603 bool j5valid[1] = {
false };
1605 if (
IKabs(((((new_r11) * (sj3))) + (((cj3) * (new_r01))))) <
1607 IKabs(((((IkReal(-1.00000000000000)) * (cj3) * (new_r00))) +
1608 (((IkReal(-1.00000000000000)) * (new_r10) * (sj3))))) <
1610 IKabs(
IKsqr(((((new_r11) * (sj3))) + (((cj3) * (new_r01))))) +
1611 IKsqr(((((IkReal(-1.00000000000000)) * (cj3) * (new_r00))) +
1612 (((IkReal(-1.00000000000000)) * (new_r10) * (sj3))))) -
1616 IKatan2(((((new_r11) * (sj3))) + (((cj3) * (new_r01)))),
1617 ((((IkReal(-1.00000000000000)) * (cj3) * (new_r00))) +
1618 (((IkReal(-1.00000000000000)) * (new_r10) * (sj3)))));
1619 sj5array[0] =
IKsin(j5array[0]);
1620 cj5array[0] =
IKcos(j5array[0]);
1621 if (j5array[0] >
IKPI)
1623 j5array[0] -=
IK2PI;
1625 else if (j5array[0] < -
IKPI)
1627 j5array[0] +=
IK2PI;
1630 for (
int ij5 = 0; ij5 < 1; ++ij5)
1638 for (
int iij5 = ij5 + 1; iij5 < 1; ++iij5)
1640 if (j5valid[iij5] &&
1644 j5valid[iij5] =
false;
1650 cj5 = cj5array[ij5];
1651 sj5 = sj5array[ij5];
1654 IkReal x129 =
IKcos(j5);
1655 IkReal x130 = ((IkReal(1.00000000000000)) * (sj3));
1656 IkReal x131 = ((IkReal(1.00000000000000)) * (
IKsin(j5)));
1657 evalcond[0] = ((((IkReal(-1.00000000000000)) * (x131))) +
1658 (((IkReal(-1.00000000000000)) * (new_r00) * (x130))) +
1659 (((cj3) * (new_r10))));
1660 evalcond[1] = ((((IkReal(-1.00000000000000)) * (x129))) +
1661 (((cj3) * (new_r11))) +
1662 (((IkReal(-1.00000000000000)) * (new_r01) * (x130))));
1663 evalcond[2] = ((((IkReal(-1.00000000000000)) * (x131))) +
1664 (((new_r11) * (sj3))) + (((cj3) * (new_r01))));
1666 ((x129) + (((new_r10) * (sj3))) + (((cj3) * (new_r00))));
1667 if (
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 ||
1668 IKabs(evalcond[2]) > 0.000001 ||
IKabs(evalcond[3]) > 0.000001)
1675 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
1676 vinfos[0].jointtype = 1;
1677 vinfos[0].foffset = j0;
1678 vinfos[0].indices[0] = _ij0[0];
1679 vinfos[0].indices[1] = _ij0[1];
1680 vinfos[0].maxsolutions = _nj0;
1681 vinfos[1].jointtype = 1;
1682 vinfos[1].foffset = j1;
1683 vinfos[1].indices[0] = _ij1[0];
1684 vinfos[1].indices[1] = _ij1[1];
1685 vinfos[1].maxsolutions = _nj1;
1686 vinfos[2].jointtype = 1;
1687 vinfos[2].foffset = j2;
1688 vinfos[2].indices[0] = _ij2[0];
1689 vinfos[2].indices[1] = _ij2[1];
1690 vinfos[2].maxsolutions = _nj2;
1691 vinfos[3].jointtype = 1;
1692 vinfos[3].foffset = j3;
1693 vinfos[3].indices[0] = _ij3[0];
1694 vinfos[3].indices[1] = _ij3[1];
1695 vinfos[3].maxsolutions = _nj3;
1696 vinfos[4].jointtype = 1;
1697 vinfos[4].foffset = j4;
1698 vinfos[4].indices[0] = _ij4[0];
1699 vinfos[4].indices[1] = _ij4[1];
1700 vinfos[4].maxsolutions = _nj4;
1701 vinfos[5].jointtype = 1;
1702 vinfos[5].foffset = j5;
1703 vinfos[5].indices[0] = _ij5[0];
1704 vinfos[5].indices[1] = _ij5[1];
1705 vinfos[5].maxsolutions = _nj5;
1706 std::vector<int> vfree(0);
1728 IkReal j5array[1], cj5array[1], sj5array[1];
1729 bool j5valid[1] = {
false };
1731 if (
IKabs(((((IkReal(-1.00000000000000)) * (new_r00) * (sj3))) +
1733 IKabs(((IkReal(-1.00000000000000)) * (new_r20) *
1734 (((
IKabs(sj4) != 0) ? ((IkReal)1 / (sj4)) : (IkReal)1.0e30)))) <
1737 IKsqr(((((IkReal(-1.00000000000000)) * (new_r00) * (sj3))) +
1738 (((cj3) * (new_r10))))) +
1739 IKsqr(((IkReal(-1.00000000000000)) * (new_r20) *
1740 (((
IKabs(sj4) != 0) ? ((IkReal)1 / (sj4)) : (IkReal)1.0e30)))) -
1744 IKatan2(((((IkReal(-1.00000000000000)) * (new_r00) * (sj3))) +
1745 (((cj3) * (new_r10)))),
1746 ((IkReal(-1.00000000000000)) * (new_r20) *
1747 (((
IKabs(sj4) != 0) ? ((IkReal)1 / (sj4)) : (IkReal)1.0e30))));
1748 sj5array[0] =
IKsin(j5array[0]);
1749 cj5array[0] =
IKcos(j5array[0]);
1750 if (j5array[0] >
IKPI)
1752 j5array[0] -=
IK2PI;
1754 else if (j5array[0] < -
IKPI)
1756 j5array[0] +=
IK2PI;
1759 for (
int ij5 = 0; ij5 < 1; ++ij5)
1767 for (
int iij5 = ij5 + 1; iij5 < 1; ++iij5)
1769 if (j5valid[iij5] &&
1773 j5valid[iij5] =
false;
1779 cj5 = cj5array[ij5];
1780 sj5 = sj5array[ij5];
1783 IkReal x132 =
IKsin(j5);
1784 IkReal x133 =
IKcos(j5);
1785 IkReal x134 = ((IkReal(1.00000000000000)) * (sj3));
1786 IkReal x135 = ((new_r11) * (sj3));
1787 IkReal x136 = ((new_r10) * (sj3));
1788 IkReal x137 = ((cj3) * (cj4));
1789 IkReal x138 = ((IkReal(1.00000000000000)) * (sj4));
1790 IkReal x139 = ((IkReal(1.00000000000000)) * (x133));
1791 IkReal x140 = ((IkReal(1.00000000000000)) * (x132));
1792 evalcond[0] = ((new_r20) + (((sj4) * (x133))));
1794 ((((IkReal(-1.00000000000000)) * (x132) * (x138))) + (new_r21));
1796 ((((IkReal(-1.00000000000000)) * (x140))) + (((cj3) * (new_r10))) +
1797 (((IkReal(-1.00000000000000)) * (new_r00) * (x134))));
1799 ((((IkReal(-1.00000000000000)) * (x139))) + (((cj3) * (new_r11))) +
1800 (((IkReal(-1.00000000000000)) * (new_r01) * (x134))));
1801 evalcond[4] = ((((cj4) * (x132))) + (x135) + (((cj3) * (new_r01))));
1802 evalcond[5] = ((x136) + (((IkReal(-1.00000000000000)) * (cj4) * (x139))) +
1803 (((cj3) * (new_r00))));
1804 evalcond[6] = ((((cj4) * (x135))) + (((new_r01) * (x137))) + (x132) +
1805 (((IkReal(-1.00000000000000)) * (new_r21) * (x138))));
1806 evalcond[7] = ((((IkReal(-1.00000000000000)) * (x139))) +
1807 (((IkReal(-1.00000000000000)) * (new_r20) * (x138))) +
1808 (((cj4) * (x136))) + (((new_r00) * (x137))));
1809 if (
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 ||
1810 IKabs(evalcond[2]) > 0.000001 ||
IKabs(evalcond[3]) > 0.000001 ||
1811 IKabs(evalcond[4]) > 0.000001 ||
IKabs(evalcond[5]) > 0.000001 ||
1812 IKabs(evalcond[6]) > 0.000001 ||
IKabs(evalcond[7]) > 0.000001)
1819 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
1820 vinfos[0].jointtype = 1;
1821 vinfos[0].foffset = j0;
1822 vinfos[0].indices[0] = _ij0[0];
1823 vinfos[0].indices[1] = _ij0[1];
1824 vinfos[0].maxsolutions = _nj0;
1825 vinfos[1].jointtype = 1;
1826 vinfos[1].foffset = j1;
1827 vinfos[1].indices[0] = _ij1[0];
1828 vinfos[1].indices[1] = _ij1[1];
1829 vinfos[1].maxsolutions = _nj1;
1830 vinfos[2].jointtype = 1;
1831 vinfos[2].foffset = j2;
1832 vinfos[2].indices[0] = _ij2[0];
1833 vinfos[2].indices[1] = _ij2[1];
1834 vinfos[2].maxsolutions = _nj2;
1835 vinfos[3].jointtype = 1;
1836 vinfos[3].foffset = j3;
1837 vinfos[3].indices[0] = _ij3[0];
1838 vinfos[3].indices[1] = _ij3[1];
1839 vinfos[3].maxsolutions = _nj3;
1840 vinfos[4].jointtype = 1;
1841 vinfos[4].foffset = j4;
1842 vinfos[4].indices[0] = _ij4[0];
1843 vinfos[4].indices[1] = _ij4[1];
1844 vinfos[4].maxsolutions = _nj4;
1845 vinfos[5].jointtype = 1;
1846 vinfos[5].foffset = j5;
1847 vinfos[5].indices[0] = _ij5[0];
1848 vinfos[5].indices[1] = _ij5[1];
1849 vinfos[5].maxsolutions = _nj5;
1850 std::vector<int> vfree(0);
1861 IkReal j5array[1], cj5array[1], sj5array[1];
1862 bool j5valid[1] = {
false };
1864 if (
IKabs(((new_r21) *
1865 (((
IKabs(sj4) != 0) ? ((IkReal)1 / (sj4)) : (IkReal)1.0e30)))) <
1867 IKabs(((((IkReal(-1.00000000000000)) * (new_r01) * (sj3))) +
1870 (((
IKabs(sj4) != 0) ? ((IkReal)1 / (sj4)) : (IkReal)1.0e30)))) +
1871 IKsqr(((((IkReal(-1.00000000000000)) * (new_r01) * (sj3))) +
1872 (((cj3) * (new_r11))))) -
1876 ((new_r21) * (((
IKabs(sj4) != 0) ? ((IkReal)1 / (sj4)) : (IkReal)1.0e30))),
1877 ((((IkReal(-1.00000000000000)) * (new_r01) * (sj3))) + (((cj3) * (new_r11)))));
1878 sj5array[0] =
IKsin(j5array[0]);
1879 cj5array[0] =
IKcos(j5array[0]);
1880 if (j5array[0] >
IKPI)
1882 j5array[0] -=
IK2PI;
1884 else if (j5array[0] < -
IKPI)
1886 j5array[0] +=
IK2PI;
1889 for (
int ij5 = 0; ij5 < 1; ++ij5)
1897 for (
int iij5 = ij5 + 1; iij5 < 1; ++iij5)
1899 if (j5valid[iij5] &&
1903 j5valid[iij5] =
false;
1909 cj5 = cj5array[ij5];
1910 sj5 = sj5array[ij5];
1913 IkReal x141 =
IKsin(j5);
1914 IkReal x142 =
IKcos(j5);
1915 IkReal x143 = ((IkReal(1.00000000000000)) * (sj3));
1916 IkReal x144 = ((new_r11) * (sj3));
1917 IkReal x145 = ((new_r10) * (sj3));
1918 IkReal x146 = ((cj3) * (cj4));
1919 IkReal x147 = ((IkReal(1.00000000000000)) * (sj4));
1920 IkReal x148 = ((IkReal(1.00000000000000)) * (x142));
1921 IkReal x149 = ((IkReal(1.00000000000000)) * (x141));
1922 evalcond[0] = ((((sj4) * (x142))) + (new_r20));
1923 evalcond[1] = ((new_r21) + (((IkReal(-1.00000000000000)) * (x141) * (x147))));
1925 ((((IkReal(-1.00000000000000)) * (new_r00) * (x143))) +
1926 (((cj3) * (new_r10))) + (((IkReal(-1.00000000000000)) * (x149))));
1927 evalcond[3] = ((((IkReal(-1.00000000000000)) * (x148))) +
1928 (((IkReal(-1.00000000000000)) * (new_r01) * (x143))) +
1929 (((cj3) * (new_r11))));
1930 evalcond[4] = ((((cj4) * (x141))) + (x144) + (((cj3) * (new_r01))));
1931 evalcond[5] = ((((IkReal(-1.00000000000000)) * (cj4) * (x148))) + (x145) +
1932 (((cj3) * (new_r00))));
1933 evalcond[6] = ((((cj4) * (x144))) + (((new_r01) * (x146))) + (x141) +
1934 (((IkReal(-1.00000000000000)) * (new_r21) * (x147))));
1935 evalcond[7] = ((((cj4) * (x145))) + (((IkReal(-1.00000000000000)) * (x148))) +
1936 (((IkReal(-1.00000000000000)) * (new_r20) * (x147))) +
1937 (((new_r00) * (x146))));
1938 if (
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 ||
1939 IKabs(evalcond[2]) > 0.000001 ||
IKabs(evalcond[3]) > 0.000001 ||
1940 IKabs(evalcond[4]) > 0.000001 ||
IKabs(evalcond[5]) > 0.000001 ||
1941 IKabs(evalcond[6]) > 0.000001 ||
IKabs(evalcond[7]) > 0.000001)
1948 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
1949 vinfos[0].jointtype = 1;
1950 vinfos[0].foffset = j0;
1951 vinfos[0].indices[0] = _ij0[0];
1952 vinfos[0].indices[1] = _ij0[1];
1953 vinfos[0].maxsolutions = _nj0;
1954 vinfos[1].jointtype = 1;
1955 vinfos[1].foffset = j1;
1956 vinfos[1].indices[0] = _ij1[0];
1957 vinfos[1].indices[1] = _ij1[1];
1958 vinfos[1].maxsolutions = _nj1;
1959 vinfos[2].jointtype = 1;
1960 vinfos[2].foffset = j2;
1961 vinfos[2].indices[0] = _ij2[0];
1962 vinfos[2].indices[1] = _ij2[1];
1963 vinfos[2].maxsolutions = _nj2;
1964 vinfos[3].jointtype = 1;
1965 vinfos[3].foffset = j3;
1966 vinfos[3].indices[0] = _ij3[0];
1967 vinfos[3].indices[1] = _ij3[1];
1968 vinfos[3].maxsolutions = _nj3;
1969 vinfos[4].jointtype = 1;
1970 vinfos[4].foffset = j4;
1971 vinfos[4].indices[0] = _ij4[0];
1972 vinfos[4].indices[1] = _ij4[1];
1973 vinfos[4].maxsolutions = _nj4;
1974 vinfos[5].jointtype = 1;
1975 vinfos[5].foffset = j5;
1976 vinfos[5].indices[0] = _ij5[0];
1977 vinfos[5].indices[1] = _ij5[1];
1978 vinfos[5].maxsolutions = _nj5;
1979 std::vector<int> vfree(0);
1990 IkReal j5array[1], cj5array[1], sj5array[1];
1991 bool j5valid[1] = {
false };
1994 IKabs(((IkReal(-1.00000000000000)) * (gconst5) * (new_r20))) <
1997 j5array[0] =
IKatan2(((gconst5) * (new_r21)),
1998 ((IkReal(-1.00000000000000)) * (gconst5) * (new_r20)));
1999 sj5array[0] =
IKsin(j5array[0]);
2000 cj5array[0] =
IKcos(j5array[0]);
2001 if (j5array[0] >
IKPI)
2003 j5array[0] -=
IK2PI;
2005 else if (j5array[0] < -
IKPI)
2007 j5array[0] +=
IK2PI;
2010 for (
int ij5 = 0; ij5 < 1; ++ij5)
2018 for (
int iij5 = ij5 + 1; iij5 < 1; ++iij5)
2020 if (j5valid[iij5] &&
2024 j5valid[iij5] =
false;
2030 cj5 = cj5array[ij5];
2031 sj5 = sj5array[ij5];
2034 IkReal x150 =
IKsin(j5);
2035 IkReal x151 =
IKcos(j5);
2036 IkReal x152 = ((IkReal(1.00000000000000)) * (sj3));
2037 IkReal x153 = ((new_r11) * (sj3));
2038 IkReal x154 = ((new_r10) * (sj3));
2039 IkReal x155 = ((cj3) * (cj4));
2040 IkReal x156 = ((IkReal(1.00000000000000)) * (sj4));
2041 IkReal x157 = ((IkReal(1.00000000000000)) * (x151));
2042 IkReal x158 = ((IkReal(1.00000000000000)) * (x150));
2043 evalcond[0] = ((((sj4) * (x151))) + (new_r20));
2044 evalcond[1] = ((new_r21) + (((IkReal(-1.00000000000000)) * (x150) * (x156))));
2045 evalcond[2] = ((((IkReal(-1.00000000000000)) * (new_r00) * (x152))) +
2046 (((IkReal(-1.00000000000000)) * (x158))) + (((cj3) * (new_r10))));
2047 evalcond[3] = ((((cj3) * (new_r11))) + (((IkReal(-1.00000000000000)) * (x157))) +
2048 (((IkReal(-1.00000000000000)) * (new_r01) * (x152))));
2049 evalcond[4] = ((x153) + (((cj4) * (x150))) + (((cj3) * (new_r01))));
2050 evalcond[5] = ((x154) + (((IkReal(-1.00000000000000)) * (cj4) * (x157))) +
2051 (((cj3) * (new_r00))));
2052 evalcond[6] = ((((IkReal(-1.00000000000000)) * (new_r21) * (x156))) + (x150) +
2053 (((new_r01) * (x155))) + (((cj4) * (x153))));
2054 evalcond[7] = ((((IkReal(-1.00000000000000)) * (x157))) +
2055 (((IkReal(-1.00000000000000)) * (new_r20) * (x156))) +
2056 (((cj4) * (x154))) + (((new_r00) * (x155))));
2057 if (
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 ||
2058 IKabs(evalcond[2]) > 0.000001 ||
IKabs(evalcond[3]) > 0.000001 ||
2059 IKabs(evalcond[4]) > 0.000001 ||
IKabs(evalcond[5]) > 0.000001 ||
2060 IKabs(evalcond[6]) > 0.000001 ||
IKabs(evalcond[7]) > 0.000001)
2067 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
2068 vinfos[0].jointtype = 1;
2069 vinfos[0].foffset = j0;
2070 vinfos[0].indices[0] = _ij0[0];
2071 vinfos[0].indices[1] = _ij0[1];
2072 vinfos[0].maxsolutions = _nj0;
2073 vinfos[1].jointtype = 1;
2074 vinfos[1].foffset = j1;
2075 vinfos[1].indices[0] = _ij1[0];
2076 vinfos[1].indices[1] = _ij1[1];
2077 vinfos[1].maxsolutions = _nj1;
2078 vinfos[2].jointtype = 1;
2079 vinfos[2].foffset = j2;
2080 vinfos[2].indices[0] = _ij2[0];
2081 vinfos[2].indices[1] = _ij2[1];
2082 vinfos[2].maxsolutions = _nj2;
2083 vinfos[3].jointtype = 1;
2084 vinfos[3].foffset = j3;
2085 vinfos[3].indices[0] = _ij3[0];
2086 vinfos[3].indices[1] = _ij3[1];
2087 vinfos[3].maxsolutions = _nj3;
2088 vinfos[4].jointtype = 1;
2089 vinfos[4].foffset = j4;
2090 vinfos[4].indices[0] = _ij4[0];
2091 vinfos[4].indices[1] = _ij4[1];
2092 vinfos[4].maxsolutions = _nj4;
2093 vinfos[5].jointtype = 1;
2094 vinfos[5].foffset = j5;
2095 vinfos[5].indices[0] = _ij5[0];
2096 vinfos[5].indices[1] = _ij5[1];
2097 vinfos[5].maxsolutions = _nj5;
2098 std::vector<int> vfree(0);
2113 IkReal j3array[1], cj3array[1], sj3array[1];
2114 bool j3valid[1] = {
false };
2116 IkReal x159 = ((gconst2) * (sj4));
2120 j3array[0] =
IKatan2(((new_r12) * (x159)), ((new_r02) * (x159)));
2121 sj3array[0] =
IKsin(j3array[0]);
2122 cj3array[0] =
IKcos(j3array[0]);
2123 if (j3array[0] >
IKPI)
2125 j3array[0] -=
IK2PI;
2127 else if (j3array[0] < -
IKPI)
2129 j3array[0] +=
IK2PI;
2132 for (
int ij3 = 0; ij3 < 1; ++ij3)
2140 for (
int iij3 = ij3 + 1; iij3 < 1; ++iij3)
2145 j3valid[iij3] =
false;
2151 cj3 = cj3array[ij3];
2152 sj3 = sj3array[ij3];
2155 IkReal x160 =
IKsin(j3);
2156 IkReal x161 =
IKcos(j3);
2157 IkReal x162 = ((IkReal(1.00000000000000)) * (sj4));
2158 IkReal x163 = ((sj4) * (x160));
2159 IkReal x164 = ((sj4) * (x161));
2160 IkReal x165 = ((new_r02) * (x161));
2161 IkReal x166 = ((new_r12) * (x160));
2162 evalcond[0] = ((((new_r12) * (x161))) + (((IkReal(-1.00000000000000)) * (new_r02) * (x160))));
2163 evalcond[1] = ((x166) + (x165) + (((IkReal(-1.00000000000000)) * (x162))));
2164 evalcond[2] = ((((new_r00) * (x164))) + (((new_r10) * (x163))) + (((cj4) * (new_r20))));
2165 evalcond[3] = ((((new_r01) * (x164))) + (((new_r11) * (x163))) + (((cj4) * (new_r21))));
2166 evalcond[4] = ((IkReal(-1.00000000000000)) + (((new_r02) * (x164))) + (((new_r12) * (x163))) +
2167 (((cj4) * (new_r22))));
2168 evalcond[5] = ((((cj4) * (x165))) + (((IkReal(-1.00000000000000)) * (new_r22) * (x162))) +
2169 (((cj4) * (x166))));
2170 if (
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 ||
2171 IKabs(evalcond[2]) > 0.000001 ||
IKabs(evalcond[3]) > 0.000001 ||
2172 IKabs(evalcond[4]) > 0.000001 ||
IKabs(evalcond[5]) > 0.000001)
2179 IkReal dummyeval[1];
2183 if (
IKabs(dummyeval[0]) < 0.0000010000000000)
2186 IkReal dummyeval[1];
2188 if (
IKabs(dummyeval[0]) < 0.0000010000000000)
2191 IkReal dummyeval[1];
2193 if (
IKabs(dummyeval[0]) < 0.0000010000000000)
2196 IkReal evalcond[11];
2197 IkReal x167 = ((IkReal(-1.00000000000000)) + (new_r22));
2199 ((((cj3) * (new_r12))) + (((IkReal(-1.00000000000000)) * (new_r02) * (sj3))));
2200 IkReal x169 = ((((new_r12) * (sj3))) + (((cj3) * (new_r02))));
2202 ((IkReal(-3.14159265358979)) +
2203 (
IKfmod(((IkReal(3.14159265358979)) + (j4)), IkReal(6.28318530717959))));
2205 evalcond[2] = new_r20;
2206 evalcond[3] = new_r21;
2210 evalcond[7] = new_r20;
2211 evalcond[8] = new_r21;
2213 evalcond[10] = x169;
2214 if (
IKabs(evalcond[0]) < 0.0000010000000000 &&
2215 IKabs(evalcond[1]) < 0.0000010000000000 &&
2216 IKabs(evalcond[2]) < 0.0000010000000000 &&
2217 IKabs(evalcond[3]) < 0.0000010000000000 &&
2218 IKabs(evalcond[4]) < 0.0000010000000000 &&
2219 IKabs(evalcond[5]) < 0.0000010000000000 &&
2220 IKabs(evalcond[6]) < 0.0000010000000000 &&
2221 IKabs(evalcond[7]) < 0.0000010000000000 &&
2222 IKabs(evalcond[8]) < 0.0000010000000000 &&
2223 IKabs(evalcond[9]) < 0.0000010000000000 &&
2224 IKabs(evalcond[10]) < 0.0000010000000000)
2227 IkReal j5array[1], cj5array[1], sj5array[1];
2228 bool j5valid[1] = {
false };
2230 if (
IKabs(((((IkReal(-1.00000000000000)) * (new_r11) * (sj3))) +
2231 (((IkReal(-1.00000000000000)) * (cj3) * (new_r01))))) <
2233 IKabs(((((new_r10) * (sj3))) + (((cj3) * (new_r00))))) <
2235 IKabs(
IKsqr(((((IkReal(-1.00000000000000)) * (new_r11) * (sj3))) +
2236 (((IkReal(-1.00000000000000)) * (cj3) * (new_r01))))) +
2237 IKsqr(((((new_r10) * (sj3))) + (((cj3) * (new_r00))))) - 1) <=
2240 j5array[0] =
IKatan2(((((IkReal(-1.00000000000000)) * (new_r11) * (sj3))) +
2241 (((IkReal(-1.00000000000000)) * (cj3) * (new_r01)))),
2242 ((((new_r10) * (sj3))) + (((cj3) * (new_r00)))));
2243 sj5array[0] =
IKsin(j5array[0]);
2244 cj5array[0] =
IKcos(j5array[0]);
2245 if (j5array[0] >
IKPI)
2247 j5array[0] -=
IK2PI;
2249 else if (j5array[0] < -
IKPI)
2251 j5array[0] +=
IK2PI;
2254 for (
int ij5 = 0; ij5 < 1; ++ij5)
2262 for (
int iij5 = ij5 + 1; iij5 < 1; ++iij5)
2264 if (j5valid[iij5] &&
2268 j5valid[iij5] =
false;
2274 cj5 = cj5array[ij5];
2275 sj5 = sj5array[ij5];
2278 IkReal x170 =
IKsin(j5);
2279 IkReal x171 = ((IkReal(1.00000000000000)) * (sj3));
2280 IkReal x172 = ((IkReal(1.00000000000000)) * (
IKcos(j5)));
2282 ((((IkReal(-1.00000000000000)) * (x170))) + (((cj3) * (new_r10))) +
2283 (((IkReal(-1.00000000000000)) * (new_r00) * (x171))));
2285 ((((IkReal(-1.00000000000000)) * (new_r01) * (x171))) +
2286 (((cj3) * (new_r11))) + (((IkReal(-1.00000000000000)) * (x172))));
2287 evalcond[2] = ((x170) + (((new_r11) * (sj3))) + (((cj3) * (new_r01))));
2289 ((((new_r10) * (sj3))) + (((IkReal(-1.00000000000000)) * (x172))) +
2290 (((cj3) * (new_r00))));
2291 if (
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 ||
2292 IKabs(evalcond[2]) > 0.000001 ||
IKabs(evalcond[3]) > 0.000001)
2299 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
2300 vinfos[0].jointtype = 1;
2301 vinfos[0].foffset = j0;
2302 vinfos[0].indices[0] = _ij0[0];
2303 vinfos[0].indices[1] = _ij0[1];
2304 vinfos[0].maxsolutions = _nj0;
2305 vinfos[1].jointtype = 1;
2306 vinfos[1].foffset = j1;
2307 vinfos[1].indices[0] = _ij1[0];
2308 vinfos[1].indices[1] = _ij1[1];
2309 vinfos[1].maxsolutions = _nj1;
2310 vinfos[2].jointtype = 1;
2311 vinfos[2].foffset = j2;
2312 vinfos[2].indices[0] = _ij2[0];
2313 vinfos[2].indices[1] = _ij2[1];
2314 vinfos[2].maxsolutions = _nj2;
2315 vinfos[3].jointtype = 1;
2316 vinfos[3].foffset = j3;
2317 vinfos[3].indices[0] = _ij3[0];
2318 vinfos[3].indices[1] = _ij3[1];
2319 vinfos[3].maxsolutions = _nj3;
2320 vinfos[4].jointtype = 1;
2321 vinfos[4].foffset = j4;
2322 vinfos[4].indices[0] = _ij4[0];
2323 vinfos[4].indices[1] = _ij4[1];
2324 vinfos[4].maxsolutions = _nj4;
2325 vinfos[5].jointtype = 1;
2326 vinfos[5].foffset = j5;
2327 vinfos[5].indices[0] = _ij5[0];
2328 vinfos[5].indices[1] = _ij5[1];
2329 vinfos[5].maxsolutions = _nj5;
2330 std::vector<int> vfree(0);
2338 IkReal x173 = ((new_r12) * (sj3));
2339 IkReal x174 = ((IkReal(1.00000000000000)) * (new_r02));
2341 ((((cj3) * (new_r12))) + (((IkReal(-1.00000000000000)) * (sj3) * (x174))));
2343 ((IkReal(-3.14159265358979)) + (
IKfmod(j4, IkReal(6.28318530717959))));
2344 evalcond[1] = ((IkReal(1.00000000000000)) + (new_r22));
2345 evalcond[2] = new_r20;
2346 evalcond[3] = new_r21;
2349 evalcond[6] = ((x173) + (((cj3) * (new_r02))));
2350 evalcond[7] = ((IkReal(-1.00000000000000)) * (new_r20));
2351 evalcond[8] = ((IkReal(-1.00000000000000)) * (new_r21));
2353 ((IkReal(-1.00000000000000)) + (((IkReal(-1.00000000000000)) * (new_r22))));
2354 evalcond[10] = ((((IkReal(-1.00000000000000)) * (x173))) +
2355 (((IkReal(-1.00000000000000)) * (cj3) * (x174))));
2356 if (
IKabs(evalcond[0]) < 0.0000010000000000 &&
2357 IKabs(evalcond[1]) < 0.0000010000000000 &&
2358 IKabs(evalcond[2]) < 0.0000010000000000 &&
2359 IKabs(evalcond[3]) < 0.0000010000000000 &&
2360 IKabs(evalcond[4]) < 0.0000010000000000 &&
2361 IKabs(evalcond[5]) < 0.0000010000000000 &&
2362 IKabs(evalcond[6]) < 0.0000010000000000 &&
2363 IKabs(evalcond[7]) < 0.0000010000000000 &&
2364 IKabs(evalcond[8]) < 0.0000010000000000 &&
2365 IKabs(evalcond[9]) < 0.0000010000000000 &&
2366 IKabs(evalcond[10]) < 0.0000010000000000)
2369 IkReal j5array[1], cj5array[1], sj5array[1];
2370 bool j5valid[1] = {
false };
2372 if (
IKabs(((((new_r11) * (sj3))) + (((cj3) * (new_r01))))) <
2374 IKabs(((((IkReal(-1.00000000000000)) * (cj3) * (new_r00))) +
2375 (((IkReal(-1.00000000000000)) * (new_r10) * (sj3))))) <
2377 IKabs(
IKsqr(((((new_r11) * (sj3))) + (((cj3) * (new_r01))))) +
2378 IKsqr(((((IkReal(-1.00000000000000)) * (cj3) * (new_r00))) +
2379 (((IkReal(-1.00000000000000)) * (new_r10) * (sj3))))) -
2382 j5array[0] =
IKatan2(((((new_r11) * (sj3))) + (((cj3) * (new_r01)))),
2383 ((((IkReal(-1.00000000000000)) * (cj3) * (new_r00))) +
2384 (((IkReal(-1.00000000000000)) * (new_r10) * (sj3)))));
2385 sj5array[0] =
IKsin(j5array[0]);
2386 cj5array[0] =
IKcos(j5array[0]);
2387 if (j5array[0] >
IKPI)
2389 j5array[0] -=
IK2PI;
2391 else if (j5array[0] < -
IKPI)
2393 j5array[0] +=
IK2PI;
2396 for (
int ij5 = 0; ij5 < 1; ++ij5)
2404 for (
int iij5 = ij5 + 1; iij5 < 1; ++iij5)
2406 if (j5valid[iij5] &&
2410 j5valid[iij5] =
false;
2416 cj5 = cj5array[ij5];
2417 sj5 = sj5array[ij5];
2420 IkReal x176 =
IKcos(j5);
2421 IkReal x177 = ((IkReal(1.00000000000000)) * (sj3));
2422 IkReal x178 = ((IkReal(1.00000000000000)) * (
IKsin(j5)));
2424 ((((IkReal(-1.00000000000000)) * (new_r00) * (x177))) +
2425 (((IkReal(-1.00000000000000)) * (x178))) + (((cj3) * (new_r10))));
2426 evalcond[1] = ((((cj3) * (new_r11))) +
2427 (((IkReal(-1.00000000000000)) * (new_r01) * (x177))) +
2428 (((IkReal(-1.00000000000000)) * (x176))));
2429 evalcond[2] = ((((IkReal(-1.00000000000000)) * (x178))) +
2430 (((new_r11) * (sj3))) + (((cj3) * (new_r01))));
2431 evalcond[3] = ((x176) + (((new_r10) * (sj3))) + (((cj3) * (new_r00))));
2432 if (
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 ||
2433 IKabs(evalcond[2]) > 0.000001 ||
IKabs(evalcond[3]) > 0.000001)
2440 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
2441 vinfos[0].jointtype = 1;
2442 vinfos[0].foffset = j0;
2443 vinfos[0].indices[0] = _ij0[0];
2444 vinfos[0].indices[1] = _ij0[1];
2445 vinfos[0].maxsolutions = _nj0;
2446 vinfos[1].jointtype = 1;
2447 vinfos[1].foffset = j1;
2448 vinfos[1].indices[0] = _ij1[0];
2449 vinfos[1].indices[1] = _ij1[1];
2450 vinfos[1].maxsolutions = _nj1;
2451 vinfos[2].jointtype = 1;
2452 vinfos[2].foffset = j2;
2453 vinfos[2].indices[0] = _ij2[0];
2454 vinfos[2].indices[1] = _ij2[1];
2455 vinfos[2].maxsolutions = _nj2;
2456 vinfos[3].jointtype = 1;
2457 vinfos[3].foffset = j3;
2458 vinfos[3].indices[0] = _ij3[0];
2459 vinfos[3].indices[1] = _ij3[1];
2460 vinfos[3].maxsolutions = _nj3;
2461 vinfos[4].jointtype = 1;
2462 vinfos[4].foffset = j4;
2463 vinfos[4].indices[0] = _ij4[0];
2464 vinfos[4].indices[1] = _ij4[1];
2465 vinfos[4].maxsolutions = _nj4;
2466 vinfos[5].jointtype = 1;
2467 vinfos[5].foffset = j5;
2468 vinfos[5].indices[0] = _ij5[0];
2469 vinfos[5].indices[1] = _ij5[1];
2470 vinfos[5].maxsolutions = _nj5;
2471 std::vector<int> vfree(0);
2493 IkReal j5array[1], cj5array[1], sj5array[1];
2494 bool j5valid[1] = {
false };
2496 if (
IKabs(((((IkReal(-1.00000000000000)) * (new_r00) * (sj3))) +
2498 IKabs(((IkReal(-1.00000000000000)) * (new_r20) *
2499 (((
IKabs(sj4) != 0) ? ((IkReal)1 / (sj4)) : (IkReal)1.0e30)))) <
2501 IKabs(
IKsqr(((((IkReal(-1.00000000000000)) * (new_r00) * (sj3))) +
2502 (((cj3) * (new_r10))))) +
2503 IKsqr(((IkReal(-1.00000000000000)) * (new_r20) *
2504 (((
IKabs(sj4) != 0) ? ((IkReal)1 / (sj4)) : (IkReal)1.0e30)))) -
2508 ((((IkReal(-1.00000000000000)) * (new_r00) * (sj3))) + (((cj3) * (new_r10)))),
2509 ((IkReal(-1.00000000000000)) * (new_r20) *
2510 (((
IKabs(sj4) != 0) ? ((IkReal)1 / (sj4)) : (IkReal)1.0e30))));
2511 sj5array[0] =
IKsin(j5array[0]);
2512 cj5array[0] =
IKcos(j5array[0]);
2513 if (j5array[0] >
IKPI)
2515 j5array[0] -=
IK2PI;
2517 else if (j5array[0] < -
IKPI)
2519 j5array[0] +=
IK2PI;
2522 for (
int ij5 = 0; ij5 < 1; ++ij5)
2530 for (
int iij5 = ij5 + 1; iij5 < 1; ++iij5)
2532 if (j5valid[iij5] &&
2536 j5valid[iij5] =
false;
2542 cj5 = cj5array[ij5];
2543 sj5 = sj5array[ij5];
2546 IkReal x179 =
IKsin(j5);
2547 IkReal x180 =
IKcos(j5);
2548 IkReal x181 = ((IkReal(1.00000000000000)) * (sj3));
2549 IkReal x182 = ((new_r11) * (sj3));
2550 IkReal x183 = ((new_r10) * (sj3));
2551 IkReal x184 = ((cj3) * (cj4));
2552 IkReal x185 = ((IkReal(1.00000000000000)) * (sj4));
2553 IkReal x186 = ((IkReal(1.00000000000000)) * (x180));
2554 IkReal x187 = ((IkReal(1.00000000000000)) * (x179));
2555 evalcond[0] = ((((sj4) * (x180))) + (new_r20));
2556 evalcond[1] = ((new_r21) + (((IkReal(-1.00000000000000)) * (x179) * (x185))));
2558 ((((IkReal(-1.00000000000000)) * (new_r00) * (x181))) +
2559 (((IkReal(-1.00000000000000)) * (x187))) + (((cj3) * (new_r10))));
2561 ((((IkReal(-1.00000000000000)) * (new_r01) * (x181))) +
2562 (((cj3) * (new_r11))) + (((IkReal(-1.00000000000000)) * (x186))));
2563 evalcond[4] = ((x182) + (((cj3) * (new_r01))) + (((cj4) * (x179))));
2564 evalcond[5] = ((x183) + (((IkReal(-1.00000000000000)) * (cj4) * (x186))) +
2565 (((cj3) * (new_r00))));
2566 evalcond[6] = ((x179) + (((cj4) * (x182))) + (((new_r01) * (x184))) +
2567 (((IkReal(-1.00000000000000)) * (new_r21) * (x185))));
2568 evalcond[7] = ((((new_r00) * (x184))) + (((cj4) * (x183))) +
2569 (((IkReal(-1.00000000000000)) * (new_r20) * (x185))) +
2570 (((IkReal(-1.00000000000000)) * (x186))));
2571 if (
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 ||
2572 IKabs(evalcond[2]) > 0.000001 ||
IKabs(evalcond[3]) > 0.000001 ||
2573 IKabs(evalcond[4]) > 0.000001 ||
IKabs(evalcond[5]) > 0.000001 ||
2574 IKabs(evalcond[6]) > 0.000001 ||
IKabs(evalcond[7]) > 0.000001)
2581 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
2582 vinfos[0].jointtype = 1;
2583 vinfos[0].foffset = j0;
2584 vinfos[0].indices[0] = _ij0[0];
2585 vinfos[0].indices[1] = _ij0[1];
2586 vinfos[0].maxsolutions = _nj0;
2587 vinfos[1].jointtype = 1;
2588 vinfos[1].foffset = j1;
2589 vinfos[1].indices[0] = _ij1[0];
2590 vinfos[1].indices[1] = _ij1[1];
2591 vinfos[1].maxsolutions = _nj1;
2592 vinfos[2].jointtype = 1;
2593 vinfos[2].foffset = j2;
2594 vinfos[2].indices[0] = _ij2[0];
2595 vinfos[2].indices[1] = _ij2[1];
2596 vinfos[2].maxsolutions = _nj2;
2597 vinfos[3].jointtype = 1;
2598 vinfos[3].foffset = j3;
2599 vinfos[3].indices[0] = _ij3[0];
2600 vinfos[3].indices[1] = _ij3[1];
2601 vinfos[3].maxsolutions = _nj3;
2602 vinfos[4].jointtype = 1;
2603 vinfos[4].foffset = j4;
2604 vinfos[4].indices[0] = _ij4[0];
2605 vinfos[4].indices[1] = _ij4[1];
2606 vinfos[4].maxsolutions = _nj4;
2607 vinfos[5].jointtype = 1;
2608 vinfos[5].foffset = j5;
2609 vinfos[5].indices[0] = _ij5[0];
2610 vinfos[5].indices[1] = _ij5[1];
2611 vinfos[5].maxsolutions = _nj5;
2612 std::vector<int> vfree(0);
2623 IkReal j5array[1], cj5array[1], sj5array[1];
2624 bool j5valid[1] = {
false };
2626 if (
IKabs(((new_r21) * (((
IKabs(sj4) != 0) ? ((IkReal)1 / (sj4)) : (IkReal)1.0e30)))) <
2628 IKabs(((((IkReal(-1.00000000000000)) * (new_r01) * (sj3))) +
2631 (((
IKabs(sj4) != 0) ? ((IkReal)1 / (sj4)) : (IkReal)1.0e30)))) +
2632 IKsqr(((((IkReal(-1.00000000000000)) * (new_r01) * (sj3))) +
2633 (((cj3) * (new_r11))))) -
2637 ((new_r21) * (((
IKabs(sj4) != 0) ? ((IkReal)1 / (sj4)) : (IkReal)1.0e30))),
2638 ((((IkReal(-1.00000000000000)) * (new_r01) * (sj3))) + (((cj3) * (new_r11)))));
2639 sj5array[0] =
IKsin(j5array[0]);
2640 cj5array[0] =
IKcos(j5array[0]);
2641 if (j5array[0] >
IKPI)
2643 j5array[0] -=
IK2PI;
2645 else if (j5array[0] < -
IKPI)
2647 j5array[0] +=
IK2PI;
2650 for (
int ij5 = 0; ij5 < 1; ++ij5)
2658 for (
int iij5 = ij5 + 1; iij5 < 1; ++iij5)
2660 if (j5valid[iij5] &&
2664 j5valid[iij5] =
false;
2670 cj5 = cj5array[ij5];
2671 sj5 = sj5array[ij5];
2674 IkReal x188 =
IKsin(j5);
2675 IkReal x189 =
IKcos(j5);
2676 IkReal x190 = ((IkReal(1.00000000000000)) * (sj3));
2677 IkReal x191 = ((new_r11) * (sj3));
2678 IkReal x192 = ((new_r10) * (sj3));
2679 IkReal x193 = ((cj3) * (cj4));
2680 IkReal x194 = ((IkReal(1.00000000000000)) * (sj4));
2681 IkReal x195 = ((IkReal(1.00000000000000)) * (x189));
2682 IkReal x196 = ((IkReal(1.00000000000000)) * (x188));
2683 evalcond[0] = ((new_r20) + (((sj4) * (x189))));
2684 evalcond[1] = ((new_r21) + (((IkReal(-1.00000000000000)) * (x188) * (x194))));
2686 ((((IkReal(-1.00000000000000)) * (x196))) +
2687 (((IkReal(-1.00000000000000)) * (new_r00) * (x190))) + (((cj3) * (new_r10))));
2689 ((((cj3) * (new_r11))) + (((IkReal(-1.00000000000000)) * (new_r01) * (x190))) +
2690 (((IkReal(-1.00000000000000)) * (x195))));
2691 evalcond[4] = ((((cj4) * (x188))) + (x191) + (((cj3) * (new_r01))));
2692 evalcond[5] = ((((IkReal(-1.00000000000000)) * (cj4) * (x195))) + (x192) +
2693 (((cj3) * (new_r00))));
2694 evalcond[6] = ((((IkReal(-1.00000000000000)) * (new_r21) * (x194))) +
2695 (((cj4) * (x191))) + (x188) + (((new_r01) * (x193))));
2697 ((((new_r00) * (x193))) + (((IkReal(-1.00000000000000)) * (x195))) +
2698 (((cj4) * (x192))) + (((IkReal(-1.00000000000000)) * (new_r20) * (x194))));
2699 if (
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 ||
2700 IKabs(evalcond[2]) > 0.000001 ||
IKabs(evalcond[3]) > 0.000001 ||
2701 IKabs(evalcond[4]) > 0.000001 ||
IKabs(evalcond[5]) > 0.000001 ||
2702 IKabs(evalcond[6]) > 0.000001 ||
IKabs(evalcond[7]) > 0.000001)
2709 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
2710 vinfos[0].jointtype = 1;
2711 vinfos[0].foffset = j0;
2712 vinfos[0].indices[0] = _ij0[0];
2713 vinfos[0].indices[1] = _ij0[1];
2714 vinfos[0].maxsolutions = _nj0;
2715 vinfos[1].jointtype = 1;
2716 vinfos[1].foffset = j1;
2717 vinfos[1].indices[0] = _ij1[0];
2718 vinfos[1].indices[1] = _ij1[1];
2719 vinfos[1].maxsolutions = _nj1;
2720 vinfos[2].jointtype = 1;
2721 vinfos[2].foffset = j2;
2722 vinfos[2].indices[0] = _ij2[0];
2723 vinfos[2].indices[1] = _ij2[1];
2724 vinfos[2].maxsolutions = _nj2;
2725 vinfos[3].jointtype = 1;
2726 vinfos[3].foffset = j3;
2727 vinfos[3].indices[0] = _ij3[0];
2728 vinfos[3].indices[1] = _ij3[1];
2729 vinfos[3].maxsolutions = _nj3;
2730 vinfos[4].jointtype = 1;
2731 vinfos[4].foffset = j4;
2732 vinfos[4].indices[0] = _ij4[0];
2733 vinfos[4].indices[1] = _ij4[1];
2734 vinfos[4].maxsolutions = _nj4;
2735 vinfos[5].jointtype = 1;
2736 vinfos[5].foffset = j5;
2737 vinfos[5].indices[0] = _ij5[0];
2738 vinfos[5].indices[1] = _ij5[1];
2739 vinfos[5].maxsolutions = _nj5;
2740 std::vector<int> vfree(0);
2751 IkReal j5array[1], cj5array[1], sj5array[1];
2752 bool j5valid[1] = {
false };
2758 IKatan2(((gconst5) * (new_r21)), ((IkReal(-1.00000000000000)) * (gconst5) * (new_r20)));
2759 sj5array[0] =
IKsin(j5array[0]);
2760 cj5array[0] =
IKcos(j5array[0]);
2761 if (j5array[0] >
IKPI)
2763 j5array[0] -=
IK2PI;
2765 else if (j5array[0] < -
IKPI)
2767 j5array[0] +=
IK2PI;
2770 for (
int ij5 = 0; ij5 < 1; ++ij5)
2778 for (
int iij5 = ij5 + 1; iij5 < 1; ++iij5)
2783 j5valid[iij5] =
false;
2789 cj5 = cj5array[ij5];
2790 sj5 = sj5array[ij5];
2793 IkReal x197 =
IKsin(j5);
2794 IkReal x198 =
IKcos(j5);
2795 IkReal x199 = ((IkReal(1.00000000000000)) * (sj3));
2796 IkReal x200 = ((new_r11) * (sj3));
2797 IkReal x201 = ((new_r10) * (sj3));
2798 IkReal x202 = ((cj3) * (cj4));
2799 IkReal x203 = ((IkReal(1.00000000000000)) * (sj4));
2800 IkReal x204 = ((IkReal(1.00000000000000)) * (x198));
2801 IkReal x205 = ((IkReal(1.00000000000000)) * (x197));
2802 evalcond[0] = ((new_r20) + (((sj4) * (x198))));
2803 evalcond[1] = ((new_r21) + (((IkReal(-1.00000000000000)) * (x197) * (x203))));
2804 evalcond[2] = ((((IkReal(-1.00000000000000)) * (x205))) + (((cj3) * (new_r10))) +
2805 (((IkReal(-1.00000000000000)) * (new_r00) * (x199))));
2806 evalcond[3] = ((((IkReal(-1.00000000000000)) * (x204))) + (((cj3) * (new_r11))) +
2807 (((IkReal(-1.00000000000000)) * (new_r01) * (x199))));
2808 evalcond[4] = ((((cj4) * (x197))) + (x200) + (((cj3) * (new_r01))));
2810 ((x201) + (((IkReal(-1.00000000000000)) * (cj4) * (x204))) + (((cj3) * (new_r00))));
2811 evalcond[6] = ((((new_r01) * (x202))) + (((cj4) * (x200))) + (x197) +
2812 (((IkReal(-1.00000000000000)) * (new_r21) * (x203))));
2813 evalcond[7] = ((((cj4) * (x201))) + (((new_r00) * (x202))) +
2814 (((IkReal(-1.00000000000000)) * (x204))) +
2815 (((IkReal(-1.00000000000000)) * (new_r20) * (x203))));
2816 if (
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 ||
2817 IKabs(evalcond[2]) > 0.000001 ||
IKabs(evalcond[3]) > 0.000001 ||
2818 IKabs(evalcond[4]) > 0.000001 ||
IKabs(evalcond[5]) > 0.000001 ||
2819 IKabs(evalcond[6]) > 0.000001 ||
IKabs(evalcond[7]) > 0.000001)
2826 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
2827 vinfos[0].jointtype = 1;
2828 vinfos[0].foffset = j0;
2829 vinfos[0].indices[0] = _ij0[0];
2830 vinfos[0].indices[1] = _ij0[1];
2831 vinfos[0].maxsolutions = _nj0;
2832 vinfos[1].jointtype = 1;
2833 vinfos[1].foffset = j1;
2834 vinfos[1].indices[0] = _ij1[0];
2835 vinfos[1].indices[1] = _ij1[1];
2836 vinfos[1].maxsolutions = _nj1;
2837 vinfos[2].jointtype = 1;
2838 vinfos[2].foffset = j2;
2839 vinfos[2].indices[0] = _ij2[0];
2840 vinfos[2].indices[1] = _ij2[1];
2841 vinfos[2].maxsolutions = _nj2;
2842 vinfos[3].jointtype = 1;
2843 vinfos[3].foffset = j3;
2844 vinfos[3].indices[0] = _ij3[0];
2845 vinfos[3].indices[1] = _ij3[1];
2846 vinfos[3].maxsolutions = _nj3;
2847 vinfos[4].jointtype = 1;
2848 vinfos[4].foffset = j4;
2849 vinfos[4].indices[0] = _ij4[0];
2850 vinfos[4].indices[1] = _ij4[1];
2851 vinfos[4].maxsolutions = _nj4;
2852 vinfos[5].jointtype = 1;
2853 vinfos[5].foffset = j5;
2854 vinfos[5].indices[0] = _ij5[0];
2855 vinfos[5].indices[1] = _ij5[1];
2856 vinfos[5].maxsolutions = _nj5;
2857 std::vector<int> vfree(0);
2872 IkReal j5array[1], cj5array[1], sj5array[1];
2873 bool j5valid[1] = {
false };
2878 j5array[0] =
IKatan2(((gconst4) * (new_r21)), ((IkReal(-1.00000000000000)) * (gconst4) * (new_r20)));
2879 sj5array[0] =
IKsin(j5array[0]);
2880 cj5array[0] =
IKcos(j5array[0]);
2881 if (j5array[0] >
IKPI)
2883 j5array[0] -=
IK2PI;
2885 else if (j5array[0] < -
IKPI)
2887 j5array[0] +=
IK2PI;
2890 for (
int ij5 = 0; ij5 < 1; ++ij5)
2898 for (
int iij5 = ij5 + 1; iij5 < 1; ++iij5)
2903 j5valid[iij5] =
false;
2909 cj5 = cj5array[ij5];
2910 sj5 = sj5array[ij5];
2913 evalcond[0] = ((new_r20) + (((sj4) * (
IKcos(j5)))));
2914 evalcond[1] = ((((IkReal(-1.00000000000000)) * (sj4) * (
IKsin(j5)))) + (new_r21));
2915 if (
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001)
2922 IkReal dummyeval[1];
2924 gconst6 =
IKsign((((new_r12) * (new_r12)) + ((new_r02) * (new_r02))));
2925 dummyeval[0] = (((new_r12) * (new_r12)) + ((new_r02) * (new_r02)));
2926 if (
IKabs(dummyeval[0]) < 0.0000010000000000)
2929 IkReal dummyeval[1];
2931 gconst7 =
IKsign(((((IkReal(-1.00000000000000)) * (new_r01) * (new_r02))) +
2932 (((IkReal(-1.00000000000000)) * (new_r11) * (new_r12)))));
2933 dummyeval[0] = ((((IkReal(-1.00000000000000)) * (new_r01) * (new_r02))) +
2934 (((IkReal(-1.00000000000000)) * (new_r11) * (new_r12))));
2935 if (
IKabs(dummyeval[0]) < 0.0000010000000000)
2942 IkReal j3array[1], cj3array[1], sj3array[1];
2943 bool j3valid[1] = {
false };
2945 IkReal x206 = ((cj4) * (gconst7) * (sj5));
2949 j3array[0] =
IKatan2(((new_r12) * (x206)), ((new_r02) * (x206)));
2950 sj3array[0] =
IKsin(j3array[0]);
2951 cj3array[0] =
IKcos(j3array[0]);
2952 if (j3array[0] >
IKPI)
2954 j3array[0] -=
IK2PI;
2956 else if (j3array[0] < -
IKPI)
2958 j3array[0] +=
IK2PI;
2961 for (
int ij3 = 0; ij3 < 1; ++ij3)
2969 for (
int iij3 = ij3 + 1; iij3 < 1; ++iij3)
2974 j3valid[iij3] =
false;
2980 cj3 = cj3array[ij3];
2981 sj3 = sj3array[ij3];
2983 IkReal evalcond[12];
2984 IkReal x207 =
IKsin(j3);
2985 IkReal x208 =
IKcos(j3);
2986 IkReal x209 = ((IkReal(1.00000000000000)) * (cj5));
2987 IkReal x210 = ((IkReal(1.00000000000000)) * (sj4));
2988 IkReal x211 = ((cj4) * (x208));
2989 IkReal x212 = ((sj4) * (x208));
2990 IkReal x213 = ((cj4) * (x207));
2991 IkReal x214 = ((new_r11) * (x207));
2992 IkReal x215 = ((sj4) * (x207));
2993 IkReal x216 = ((IkReal(1.00000000000000)) * (x207));
2995 ((((IkReal(-1.00000000000000)) * (new_r02) * (x216))) + (((new_r12) * (x208))));
2996 evalcond[1] = ((((IkReal(-1.00000000000000)) * (x210))) + (((new_r12) * (x207))) +
2997 (((new_r02) * (x208))));
2999 ((((new_r10) * (x208))) + (((IkReal(-1.00000000000000)) * (new_r00) * (x216))) +
3000 (((IkReal(-1.00000000000000)) * (sj5))));
3001 evalcond[3] = ((((IkReal(-1.00000000000000)) * (new_r01) * (x216))) +
3002 (((IkReal(-1.00000000000000)) * (x209))) + (((new_r11) * (x208))));
3003 evalcond[4] = ((((new_r01) * (x208))) + (x214) + (((cj4) * (sj5))));
3004 evalcond[5] = ((((new_r10) * (x207))) + (((new_r00) * (x208))) +
3005 (((IkReal(-1.00000000000000)) * (cj4) * (x209))));
3006 evalcond[6] = ((((new_r00) * (x212))) + (((new_r10) * (x215))) + (((cj4) * (new_r20))));
3007 evalcond[7] = ((((cj4) * (new_r21))) + (((new_r01) * (x212))) + (((sj4) * (x214))));
3008 evalcond[8] = ((IkReal(-1.00000000000000)) + (((cj4) * (new_r22))) +
3009 (((new_r02) * (x212))) + (((new_r12) * (x215))));
3010 evalcond[9] = ((((new_r12) * (x213))) + (((new_r02) * (x211))) +
3011 (((IkReal(-1.00000000000000)) * (new_r22) * (x210))));
3013 ((((new_r11) * (x213))) + (((IkReal(-1.00000000000000)) * (new_r21) * (x210))) +
3014 (sj5) + (((new_r01) * (x211))));
3016 ((((IkReal(-1.00000000000000)) * (x209))) + (((new_r00) * (x211))) +
3017 (((IkReal(-1.00000000000000)) * (new_r20) * (x210))) + (((new_r10) * (x213))));
3018 if (
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 ||
3019 IKabs(evalcond[2]) > 0.000001 ||
IKabs(evalcond[3]) > 0.000001 ||
3020 IKabs(evalcond[4]) > 0.000001 ||
IKabs(evalcond[5]) > 0.000001 ||
3021 IKabs(evalcond[6]) > 0.000001 ||
IKabs(evalcond[7]) > 0.000001 ||
3022 IKabs(evalcond[8]) > 0.000001 ||
IKabs(evalcond[9]) > 0.000001 ||
3023 IKabs(evalcond[10]) > 0.000001 ||
IKabs(evalcond[11]) > 0.000001)
3030 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
3031 vinfos[0].jointtype = 1;
3032 vinfos[0].foffset = j0;
3033 vinfos[0].indices[0] = _ij0[0];
3034 vinfos[0].indices[1] = _ij0[1];
3035 vinfos[0].maxsolutions = _nj0;
3036 vinfos[1].jointtype = 1;
3037 vinfos[1].foffset = j1;
3038 vinfos[1].indices[0] = _ij1[0];
3039 vinfos[1].indices[1] = _ij1[1];
3040 vinfos[1].maxsolutions = _nj1;
3041 vinfos[2].jointtype = 1;
3042 vinfos[2].foffset = j2;
3043 vinfos[2].indices[0] = _ij2[0];
3044 vinfos[2].indices[1] = _ij2[1];
3045 vinfos[2].maxsolutions = _nj2;
3046 vinfos[3].jointtype = 1;
3047 vinfos[3].foffset = j3;
3048 vinfos[3].indices[0] = _ij3[0];
3049 vinfos[3].indices[1] = _ij3[1];
3050 vinfos[3].maxsolutions = _nj3;
3051 vinfos[4].jointtype = 1;
3052 vinfos[4].foffset = j4;
3053 vinfos[4].indices[0] = _ij4[0];
3054 vinfos[4].indices[1] = _ij4[1];
3055 vinfos[4].maxsolutions = _nj4;
3056 vinfos[5].jointtype = 1;
3057 vinfos[5].foffset = j5;
3058 vinfos[5].indices[0] = _ij5[0];
3059 vinfos[5].indices[1] = _ij5[1];
3060 vinfos[5].maxsolutions = _nj5;
3061 std::vector<int> vfree(0);
3072 IkReal j3array[1], cj3array[1], sj3array[1];
3073 bool j3valid[1] = {
false };
3075 IkReal x217 = ((gconst6) * (sj4));
3079 j3array[0] =
IKatan2(((new_r12) * (x217)), ((new_r02) * (x217)));
3080 sj3array[0] =
IKsin(j3array[0]);
3081 cj3array[0] =
IKcos(j3array[0]);
3082 if (j3array[0] >
IKPI)
3084 j3array[0] -=
IK2PI;
3086 else if (j3array[0] < -
IKPI)
3088 j3array[0] +=
IK2PI;
3091 for (
int ij3 = 0; ij3 < 1; ++ij3)
3099 for (
int iij3 = ij3 + 1; iij3 < 1; ++iij3)
3104 j3valid[iij3] =
false;
3110 cj3 = cj3array[ij3];
3111 sj3 = sj3array[ij3];
3113 IkReal evalcond[12];
3114 IkReal x218 =
IKsin(j3);
3115 IkReal x219 =
IKcos(j3);
3116 IkReal x220 = ((IkReal(1.00000000000000)) * (cj5));
3117 IkReal x221 = ((IkReal(1.00000000000000)) * (sj4));
3118 IkReal x222 = ((cj4) * (x219));
3119 IkReal x223 = ((sj4) * (x219));
3120 IkReal x224 = ((cj4) * (x218));
3121 IkReal x225 = ((new_r11) * (x218));
3122 IkReal x226 = ((sj4) * (x218));
3123 IkReal x227 = ((IkReal(1.00000000000000)) * (x218));
3125 ((((new_r12) * (x219))) + (((IkReal(-1.00000000000000)) * (new_r02) * (x227))));
3126 evalcond[1] = ((((IkReal(-1.00000000000000)) * (x221))) + (((new_r12) * (x218))) +
3127 (((new_r02) * (x219))));
3128 evalcond[2] = ((((IkReal(-1.00000000000000)) * (new_r00) * (x227))) +
3129 (((new_r10) * (x219))) + (((IkReal(-1.00000000000000)) * (sj5))));
3130 evalcond[3] = ((((IkReal(-1.00000000000000)) * (x220))) + (((new_r11) * (x219))) +
3131 (((IkReal(-1.00000000000000)) * (new_r01) * (x227))));
3132 evalcond[4] = ((((new_r01) * (x219))) + (x225) + (((cj4) * (sj5))));
3133 evalcond[5] = ((((new_r00) * (x219))) + (((new_r10) * (x218))) +
3134 (((IkReal(-1.00000000000000)) * (cj4) * (x220))));
3135 evalcond[6] = ((((new_r00) * (x223))) + (((cj4) * (new_r20))) + (((new_r10) * (x226))));
3136 evalcond[7] = ((((sj4) * (x225))) + (((cj4) * (new_r21))) + (((new_r01) * (x223))));
3137 evalcond[8] = ((IkReal(-1.00000000000000)) + (((new_r12) * (x226))) +
3138 (((new_r02) * (x223))) + (((cj4) * (new_r22))));
3139 evalcond[9] = ((((IkReal(-1.00000000000000)) * (new_r22) * (x221))) +
3140 (((new_r12) * (x224))) + (((new_r02) * (x222))));
3141 evalcond[10] = ((((new_r11) * (x224))) + (((new_r01) * (x222))) + (sj5) +
3142 (((IkReal(-1.00000000000000)) * (new_r21) * (x221))));
3144 ((((IkReal(-1.00000000000000)) * (x220))) + (((new_r10) * (x224))) +
3145 (((IkReal(-1.00000000000000)) * (new_r20) * (x221))) + (((new_r00) * (x222))));
3146 if (
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 ||
3147 IKabs(evalcond[2]) > 0.000001 ||
IKabs(evalcond[3]) > 0.000001 ||
3148 IKabs(evalcond[4]) > 0.000001 ||
IKabs(evalcond[5]) > 0.000001 ||
3149 IKabs(evalcond[6]) > 0.000001 ||
IKabs(evalcond[7]) > 0.000001 ||
3150 IKabs(evalcond[8]) > 0.000001 ||
IKabs(evalcond[9]) > 0.000001 ||
3151 IKabs(evalcond[10]) > 0.000001 ||
IKabs(evalcond[11]) > 0.000001)
3158 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
3159 vinfos[0].jointtype = 1;
3160 vinfos[0].foffset = j0;
3161 vinfos[0].indices[0] = _ij0[0];
3162 vinfos[0].indices[1] = _ij0[1];
3163 vinfos[0].maxsolutions = _nj0;
3164 vinfos[1].jointtype = 1;
3165 vinfos[1].foffset = j1;
3166 vinfos[1].indices[0] = _ij1[0];
3167 vinfos[1].indices[1] = _ij1[1];
3168 vinfos[1].maxsolutions = _nj1;
3169 vinfos[2].jointtype = 1;
3170 vinfos[2].foffset = j2;
3171 vinfos[2].indices[0] = _ij2[0];
3172 vinfos[2].indices[1] = _ij2[1];
3173 vinfos[2].maxsolutions = _nj2;
3174 vinfos[3].jointtype = 1;
3175 vinfos[3].foffset = j3;
3176 vinfos[3].indices[0] = _ij3[0];
3177 vinfos[3].indices[1] = _ij3[1];
3178 vinfos[3].maxsolutions = _nj3;
3179 vinfos[4].jointtype = 1;
3180 vinfos[4].foffset = j4;
3181 vinfos[4].indices[0] = _ij4[0];
3182 vinfos[4].indices[1] = _ij4[1];
3183 vinfos[4].maxsolutions = _nj4;
3184 vinfos[5].jointtype = 1;
3185 vinfos[5].foffset = j5;
3186 vinfos[5].indices[0] = _ij5[0];
3187 vinfos[5].indices[1] = _ij5[1];
3188 vinfos[5].maxsolutions = _nj5;
3189 std::vector<int> vfree(0);
3212 return solver.
ComputeIk(eetrans, eerot, pfree, solutions);
3217 return "<robot:genericrobot - abb_irb2400 (1f04c8a90b29778d31a8f2cb88b4a166)>";
3222 #ifdef IKFAST_NAMESPACE
3226 #ifndef IKFAST_NO_MAIN
3229 #ifdef IKFAST_NAMESPACE
3230 using namespace IKFAST_NAMESPACE;
3232 int main(
int argc,
char** argv)
3236 printf(
"\nUsage: ./ik r00 r01 r02 t0 r10 r11 r12 t1 r20 r21 r22 t2 free0 ...\n\n"
3237 "Returns the ik solutions given the transformation of the end effector specified by\n"
3238 "a 3x3 rotation R (rXX), and a 3x1 translation (tX).\n"
3239 "There are %d free parameters that have to be specified.\n\n",
3246 IkReal eerot[9], eetrans[3];
3247 eerot[0] = atof(argv[1]);
3248 eerot[1] = atof(argv[2]);
3249 eerot[2] = atof(argv[3]);
3250 eetrans[0] = atof(argv[4]);
3251 eerot[3] = atof(argv[5]);
3252 eerot[4] = atof(argv[6]);
3253 eerot[5] = atof(argv[7]);
3254 eetrans[1] = atof(argv[8]);
3255 eerot[6] = atof(argv[9]);
3256 eerot[7] = atof(argv[10]);
3257 eerot[8] = atof(argv[11]);
3258 eetrans[2] = atof(argv[12]);
3259 for (std::size_t i = 0; i < vfree.size(); ++i)
3260 vfree[i] = atof(argv[13 + i]);
3261 bool bSuccess =
ComputeIk(eetrans, eerot, vfree.size() > 0 ? &vfree[0] : NULL, solutions);
3265 fprintf(stderr,
"Failed to get ik solution\n");
3274 printf(
"sol%d (free=%d): ", (
int)i, (
int)sol.
GetFree().size());
3275 std::vector<IkReal> vsolfree(sol.
GetFree().size());
3276 sol.
GetSolution(&solvalues[0], vsolfree.size() > 0 ? &vsolfree[0] : NULL);
3277 for (std::size_t j = 0; j < solvalues.size(); ++j)
3278 printf(
"%.15f, ", solvalues[j]);
3282 IkReal rot[9], trans[3];
3283 IkReal sol[6] = { 0.46365, 0.93285, 1.75595 - M_PI / 2.0, 6.28319, -2.68880, -0.46365 };
3285 printf(
"FK: %f %f %f\n", trans[0], trans[1], trans[2]);