1 #define IKFAST_HAS_LIBRARY 25 #define IKFAST_COMPILE_ASSERT(x) extern int __dummy[(int)x] 34 #define IKFAST_STRINGIZE2(s) #s 35 #define IKFAST_STRINGIZE(s) IKFAST_STRINGIZE2(s) 43 #ifndef __PRETTY_FUNCTION__ 44 #define __PRETTY_FUNCTION__ __FUNCDNAME__ 48 #ifndef __PRETTY_FUNCTION__ 49 #define __PRETTY_FUNCTION__ __func__ 52 #define IKFAST_ASSERT(b) { if( !(b) ) { std::stringstream ss; ss << "ikfast exception: " << __FILE__ << ":" << __LINE__ << ": " <<__PRETTY_FUNCTION__ << ": Assertion '" << #b << "' failed"; throw std::runtime_error(ss.str()); } } 57 #define IKFAST_ALIGNED16(x) __declspec(align(16)) x 59 #define IKFAST_ALIGNED16(x) x __attribute((aligned(16))) 62 #define IK2PI ((IkReal)6.28318530717959) 63 #define IKPI ((IkReal)3.14159265358979) 64 #define IKPI_2 ((IkReal)1.57079632679490) 74 void dgetrf_ (
const int* m,
const int* n,
double* a,
const int* lda,
int* ipiv,
int* info);
75 void zgetrf_ (
const int* m,
const int* n, std::complex<double>* a,
const int* lda,
int* ipiv,
int* info);
76 void dgetri_(
const int* n,
const double* a,
const int* lda,
int* ipiv,
double* work,
const int* lwork,
int* info);
77 void dgesv_ (
const int* n,
const int* nrhs,
double* a,
const int* lda,
int* ipiv,
double* b,
const int* ldb,
int* info);
78 void dgetrs_(
const char *trans,
const int *n,
const int *nrhs,
double *a,
const int *lda,
int *ipiv,
double *b,
const int *ldb,
int *info);
79 void dgeev_(
const char *jobvl,
const char *jobvr,
const int *n,
double *a,
const int *lda,
double *wr,
double *wi,
double *vl,
const int *ldvl,
double *vr,
const int *ldvr,
double *work,
const int *lwork,
int *info);
84 #ifdef IKFAST_NAMESPACE 85 namespace IKFAST_NAMESPACE {
88 inline float IKabs(
float f) {
return fabsf(f); }
89 inline double IKabs(
double f) {
return fabs(f); }
91 inline float IKsqr(
float f) {
return f*f; }
92 inline double IKsqr(
double f) {
return f*f; }
94 inline float IKlog(
float f) {
return logf(f); }
95 inline double IKlog(
double f) {
return log(f); }
98 #ifndef IKFAST_SINCOS_THRESH 99 #define IKFAST_SINCOS_THRESH ((IkReal)0.000001) 103 #ifndef IKFAST_ATAN2_MAGTHRESH 104 #define IKFAST_ATAN2_MAGTHRESH ((IkReal)2e-6) 108 #ifndef IKFAST_SOLUTION_THRESH 109 #define IKFAST_SOLUTION_THRESH ((IkReal)1e-6) 115 if( f <= -1 )
return float(-
IKPI_2);
116 else if( f >= 1 )
return float(
IKPI_2);
122 if( f <= -1 )
return -
IKPI_2;
123 else if( f >= 1 )
return IKPI_2;
148 if( f <= -1 )
return float(
IKPI);
149 else if( f >= 1 )
return float(0);
155 if( f <= -1 )
return IKPI;
156 else if( f >= 1 )
return 0;
159 inline float IKsin(
float f) {
return sinf(f); }
161 inline float IKcos(
float f) {
return cosf(f); }
163 inline float IKtan(
float f) {
return tanf(f); }
165 inline float IKsqrt(
float f) {
if( f <= 0.0f )
return 0.0f;
return sqrtf(f); }
166 inline double IKsqrt(
double f) {
if( f <= 0.0 )
return 0.0;
return sqrt(f); }
172 else if( isnan(fx) ) {
175 return atan2f(fy,fx);
182 else if( isnan(fx) ) {
210 IKFAST_API
void ComputeFk(
const IkReal* j, IkReal* eetrans, IkReal* eerot) {
211 IkReal x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40,x41,x42,x43,x44,x45,x46,x47,x48,x49;
224 x12=((IkReal(0.110000000000000))*(x6));
225 x13=((IkReal(0.110000000000000))*(x0));
226 x14=((IkReal(1.00000000000000))*(x7));
227 x15=((IkReal(1.00000000000000))*(x11));
228 x16=((IkReal(0.625000000000000))*(x7));
229 x17=((IkReal(1.00000000000000))*(x0));
230 x18=((IkReal(1.00000000000000))*(x10));
231 x19=((IkReal(0.110000000000000))*(x7));
232 x20=((IkReal(0.625000000000000))*(x0));
233 x21=((IkReal(0.825000000000000))*(x3));
239 x27=((IkReal(1.00000000000000))*(x22));
240 x28=((IkReal(1.00000000000000))*(x25));
243 x31=((x24)+(((IkReal(-1.00000000000000))*(x27))));
244 x32=((x28)+(((IkReal(1.00000000000000))*(x23))));
245 x33=((IkReal(-1.00000000000000))*(x32));
246 x34=((((IkReal(-1.00000000000000))*(x29)))+(((x0)*(x22))));
247 x35=((((x22)*(x7)))+(((IkReal(-1.00000000000000))*(x30))));
250 x38=((x17)*(((((IkReal(-1.00000000000000))*(x23)))+(((IkReal(-1.00000000000000))*(x25))))));
251 x39=((x17)*(((x25)+(x23))));
252 x40=((x14)*(((((IkReal(-1.00000000000000))*(x23)))+(((IkReal(-1.00000000000000))*(x25))))));
253 x41=((x14)*(((x25)+(x23))));
257 x45=((((IkReal(-1.00000000000000))*(x14)*(x5)))+(((x34)*(x6))));
258 x46=((x42)+(((x0)*(x5))));
259 x47=((((x5)*(((x29)+(((IkReal(-1.00000000000000))*(x17)*(x22)))))))+(((IkReal(-1.00000000000000))*(x14)*(x6))));
260 x48=((((x0)*(x6)))+(((x5)*(((((IkReal(-1.00000000000000))*(x14)*(x22)))+(x30))))));
262 eerot[0]=((((x8)*(((x49)+(x44)))))+(((x47)*(x9))));
263 eerot[1]=((((x9)*(((((IkReal(-1.00000000000000))*(x15)*(x38)))+(((IkReal(-1.00000000000000))*(x18)*(x45)))))))+(((x47)*(x8))));
264 eerot[2]=((((x10)*(x39)))+(((x11)*(x45))));
265 eetrans[0]=((((x10)*(((((x13)*(x23)))+(((x13)*(x25)))))))+(((x0)*(x21)))+(((IkReal(0.150000000000000))*(x0)))+(((x11)*(((((IkReal(-1.00000000000000))*(x19)*(x5)))+(((x12)*(x34)))))))+(((x20)*(x25)))+(((x20)*(x23))));
266 eerot[3]=((((x8)*(((((x11)*(x40)))+(((x10)*(x46)))))))+(((x48)*(x9))));
267 eerot[4]=((((x9)*(((((IkReal(-1.00000000000000))*(x18)*(x46)))+(((IkReal(-1.00000000000000))*(x15)*(x40)))))))+(((x48)*(x8))));
268 eerot[5]=((((x11)*(x46)))+(((x10)*(x41))));
269 eetrans[1]=((((IkReal(0.150000000000000))*(x7)))+(((x21)*(x7)))+(((x11)*(((((x12)*(x35)))+(((x13)*(x5)))))))+(((x16)*(x23)))+(((x16)*(x25)))+(((x10)*(((((x19)*(x25)))+(((x19)*(x23))))))));
270 eerot[6]=((((x8)*(((x43)+(((x11)*(x31)))))))+(((x37)*(x9))));
271 eerot[7]=((((x9)*(((((IkReal(-1.00000000000000))*(x18)*(x36)))+(((IkReal(-1.00000000000000))*(x15)*(x31)))))))+(((x37)*(x8))));
272 eerot[8]=((((x10)*(((x27)+(((IkReal(-1.00000000000000))*(x24)))))))+(((x26)*(x33))));
273 eetrans[2]=((IkReal(0.550000000000000))+(((IkReal(0.825000000000000))*(x1)))+(((IkReal(-0.625000000000000))*(x24)))+(((IkReal(0.625000000000000))*(x22)))+(((x26)*(((((IkReal(-0.110000000000000))*(x23)))+(((IkReal(-0.110000000000000))*(x25)))))))+(((x10)*(((((IkReal(-0.110000000000000))*(x24)))+(((IkReal(0.110000000000000))*(x22))))))));
286 IkReal j0,cj0,sj0,htj0,j1,cj1,sj1,htj1,j2,cj2,sj2,htj2,j3,cj3,sj3,htj3,j4,cj4,sj4,htj4,j5,cj5,
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,rxp1_1,new_r12,r12,rxp1_2,new_r20,r20,rxp2_0,new_r21,r21,rxp2_1,new_r22,r22,rxp2_2,new_px,px,npx,new_py,py,npy,new_pz,pz,npz,pp;
287 unsigned char _ij0[2], _nj0,_ij1[2], _nj1,_ij2[2], _nj2,_ij3[2], _nj3,_ij4[2], _nj4,_ij5[2],
_nj5;
290 j0=numeric_limits<IkReal>::quiet_NaN(); _ij0[0] = -1; _ij0[1] = -1; _nj0 = -1; j1=numeric_limits<IkReal>::quiet_NaN(); _ij1[0] = -1; _ij1[1] = -1; _nj1 = -1; j2=numeric_limits<IkReal>::quiet_NaN(); _ij2[0] = -1; _ij2[1] = -1; _nj2 = -1; j3=numeric_limits<IkReal>::quiet_NaN(); _ij3[0] = -1; _ij3[1] = -1; _nj3 = -1; j4=numeric_limits<IkReal>::quiet_NaN(); _ij4[0] = -1; _ij4[1] = -1; _nj4 = -1; j5=numeric_limits<IkReal>::quiet_NaN(); _ij5[0] = -1; _ij5[1] = -1; _nj5 = -1;
291 for(
int dummyiter = 0; dummyiter < 1; ++dummyiter) {
302 px = eetrans[0]; py = eetrans[1]; pz = eetrans[2];
307 new_px=((px)+(((IkReal(-0.110000000000000))*(r02))));
311 new_py=((((IkReal(-0.110000000000000))*(r12)))+(py));
315 new_pz=((IkReal(-0.550000000000000))+(((IkReal(-0.110000000000000))*(r22)))+(pz));
316 r00 = new_r00; r01 = new_r01; r02 = new_r02; r10 = new_r10; r11 = new_r11; r12 = new_r12; r20 = new_r20; r21 = new_r21; r22 = new_r22; px = new_px; py = new_py; pz = new_pz;
317 pp=(((px)*(px))+((pz)*(pz))+((py)*(py)));
318 npx=((((py)*(r10)))+(((pz)*(r20)))+(((px)*(r00))));
319 npy=((((px)*(r01)))+(((pz)*(r21)))+(((py)*(r11))));
320 npz=((((py)*(r12)))+(((pz)*(r22)))+(((px)*(r02))));
321 rxp0_0=((((IkReal(-1.00000000000000))*(py)*(r20)))+(((pz)*(r10))));
322 rxp0_1=((((px)*(r20)))+(((IkReal(-1.00000000000000))*(pz)*(r00))));
323 rxp0_2=((((py)*(r00)))+(((IkReal(-1.00000000000000))*(px)*(r10))));
324 rxp1_0=((((pz)*(r11)))+(((IkReal(-1.00000000000000))*(py)*(r21))));
325 rxp1_1=((((IkReal(-1.00000000000000))*(pz)*(r01)))+(((px)*(r21))));
326 rxp1_2=((((py)*(r01)))+(((IkReal(-1.00000000000000))*(px)*(r11))));
327 rxp2_0=((((IkReal(-1.00000000000000))*(py)*(r22)))+(((pz)*(r12))));
328 rxp2_1=((((px)*(r22)))+(((IkReal(-1.00000000000000))*(pz)*(r02))));
329 rxp2_2=((((py)*(r02)))+(((IkReal(-1.00000000000000))*(px)*(r12))));
331 IkReal j0array[2], cj0array[2], sj0array[2];
332 bool j0valid[2]={
false};
336 IkReal x50=
IKatan2(((IkReal(-1.00000000000000))*(py)), px);
337 j0array[0]=((IkReal(-1.00000000000000))*(x50));
338 sj0array[0]=
IKsin(j0array[0]);
339 cj0array[0]=
IKcos(j0array[0]);
340 j0array[1]=((IkReal(3.14159265358979))+(((IkReal(-1.00000000000000))*(x50))));
341 sj0array[1]=
IKsin(j0array[1]);
342 cj0array[1]=
IKcos(j0array[1]);
343 if( j0array[0] >
IKPI )
347 else if( j0array[0] < -
IKPI )
351 if( j0array[1] >
IKPI )
355 else if( j0array[1] < -
IKPI )
359 for(
int ij0 = 0; ij0 < 2; ++ij0)
365 _ij0[0] = ij0; _ij0[1] = -1;
366 for(
int iij0 = ij0+1; iij0 < 2; ++iij0)
370 j0valid[iij0]=
false; _ij0[1] = iij0;
break;
373 j0 = j0array[ij0]; cj0 = cj0array[ij0]; sj0 = sj0array[ij0];
376 IkReal j2array[2], cj2array[2], sj2array[2];
377 bool j2valid[2]={
false};
379 cj2array[0]=((IkReal(-1.01696969696970))+(((IkReal(-0.290909090909091))*(py)*(sj0)))+(((IkReal(-0.290909090909091))*(cj0)*(px)))+(((IkReal(0.969696969696970))*(pp))));
382 j2valid[0] = j2valid[1] =
true;
383 j2array[0] =
IKacos(cj2array[0]);
384 sj2array[0] =
IKsin(j2array[0]);
385 cj2array[1] = cj2array[0];
386 j2array[1] = -j2array[0];
387 sj2array[1] = -sj2array[0];
389 else if( isnan(cj2array[0]) )
393 cj2array[0] = 1; sj2array[0] = 0; j2array[0] = 0;
395 for(
int ij2 = 0; ij2 < 2; ++ij2)
401 _ij2[0] = ij2; _ij2[1] = -1;
402 for(
int iij2 = ij2+1; iij2 < 2; ++iij2)
406 j2valid[iij2]=
false; _ij2[1] = iij2;
break;
409 j2 = j2array[ij2]; cj2 = cj2array[ij2]; sj2 = sj2array[ij2];
414 IkReal x51=((IkReal(5.00000000000000))*(cj2));
415 IkReal x52=((py)*(sj0));
416 IkReal x53=((cj0)*(px));
417 gconst0=
IKsign(((IkReal(0.990000000000000))+(((IkReal(0.750000000000000))*(cj2)))+(((IkReal(-1.00000000000000))*(x51)*(x53)))+(((IkReal(-5.00000000000000))*(pz)*(sj2)))+(((IkReal(-1.00000000000000))*(x51)*(x52)))+(((IkReal(-6.60000000000000))*(x53)))+(((IkReal(-6.60000000000000))*(x52)))));
418 IkReal x54=((py)*(sj0));
419 IkReal x55=((cj0)*(px));
420 IkReal x56=((IkReal(6.66666666666667))*(cj2));
421 dummyeval[0]=((IkReal(1.32000000000000))+(((IkReal(-6.66666666666667))*(pz)*(sj2)))+(((IkReal(-1.00000000000000))*(x54)*(x56)))+(((IkReal(-8.80000000000000))*(x54)))+(((IkReal(-8.80000000000000))*(x55)))+(((IkReal(-1.00000000000000))*(x55)*(x56)))+(cj2));
422 if(
IKabs(dummyeval[0]) < 0.0000010000000000 )
426 IkReal x57=((IkReal(6.66666666666667))*(sj2));
427 dummyeval[0]=((((IkReal(-1.00000000000000))*(sj2)))+(((IkReal(-6.66666666666667))*(cj2)*(pz)))+(((IkReal(-8.80000000000000))*(pz)))+(((cj0)*(px)*(x57)))+(((py)*(sj0)*(x57))));
428 if(
IKabs(dummyeval[0]) < 0.0000010000000000 )
435 IkReal j1array[1], cj1array[1], sj1array[1];
436 bool j1valid[1]={
false};
438 IkReal x58=((py)*(sj0));
439 IkReal x59=((IkReal(40.0000000000000))*(sj2));
440 IkReal x60=((IkReal(8.00000000000000))*(pz));
441 IkReal x61=((cj0)*(px));
442 IkReal x62=((cj2)*(pz));
443 IkReal x63=((IkReal(5.00000000000000))*(sj2));
444 if(
IKabs(((((
IKabs(((((IkReal(-5.00000000000000))*(x62)))+(((IkReal(-6.60000000000000))*(pz)))+(((x61)*(x63)))+(((IkReal(-0.750000000000000))*(sj2)))+(((x58)*(x63))))) != 0)?((IkReal)1/(((((IkReal(-5.00000000000000))*(x62)))+(((IkReal(-6.60000000000000))*(pz)))+(((x61)*(x63)))+(((IkReal(-0.750000000000000))*(sj2)))+(((x58)*(x63)))))):(IkReal)1.0e30))*(((((IkReal(-1.00000000000000))*(x60)*(x61)))+(((IkReal(-1.00000000000000))*(x58)*(x60)))+(((IkReal(4.12500000000000))*(sj2)))+(((IkReal(3.12500000000000))*(cj2)*(sj2)))+(((IkReal(1.20000000000000))*(pz))))))) <
IKFAST_ATAN2_MAGTHRESH &&
IKabs(((((
IKabs(((((x59)*(x61)))+(((IkReal(-6.00000000000000))*(sj2)))+(((IkReal(-52.8000000000000))*(pz)))+(((IkReal(-40.0000000000000))*(x62)))+(((x58)*(x59))))) != 0)?((IkReal)1/(((((x59)*(x61)))+(((IkReal(-6.00000000000000))*(sj2)))+(((IkReal(-52.8000000000000))*(pz)))+(((IkReal(-40.0000000000000))*(x62)))+(((x58)*(x59)))))):(IkReal)1.0e30))*(((((IkReal(-64.0000000000000))*((pz)*(pz))))+(((IkReal(25.0000000000000))*((sj2)*(sj2)))))))) <
IKFAST_ATAN2_MAGTHRESH &&
IKabs(
IKsqr(((((
IKabs(((((IkReal(-5.00000000000000))*(x62)))+(((IkReal(-6.60000000000000))*(pz)))+(((x61)*(x63)))+(((IkReal(-0.750000000000000))*(sj2)))+(((x58)*(x63))))) != 0)?((IkReal)1/(((((IkReal(-5.00000000000000))*(x62)))+(((IkReal(-6.60000000000000))*(pz)))+(((x61)*(x63)))+(((IkReal(-0.750000000000000))*(sj2)))+(((x58)*(x63)))))):(IkReal)1.0e30))*(((((IkReal(-1.00000000000000))*(x60)*(x61)))+(((IkReal(-1.00000000000000))*(x58)*(x60)))+(((IkReal(4.12500000000000))*(sj2)))+(((IkReal(3.12500000000000))*(cj2)*(sj2)))+(((IkReal(1.20000000000000))*(pz)))))))+
IKsqr(((((
IKabs(((((x59)*(x61)))+(((IkReal(-6.00000000000000))*(sj2)))+(((IkReal(-52.8000000000000))*(pz)))+(((IkReal(-40.0000000000000))*(x62)))+(((x58)*(x59))))) != 0)?((IkReal)1/(((((x59)*(x61)))+(((IkReal(-6.00000000000000))*(sj2)))+(((IkReal(-52.8000000000000))*(pz)))+(((IkReal(-40.0000000000000))*(x62)))+(((x58)*(x59)))))):(IkReal)1.0e30))*(((((IkReal(-64.0000000000000))*((pz)*(pz))))+(((IkReal(25.0000000000000))*((sj2)*(sj2))))))))-1) <=
IKFAST_SINCOS_THRESH )
446 j1array[0]=
IKatan2(((((
IKabs(((((IkReal(-5.00000000000000))*(x62)))+(((IkReal(-6.60000000000000))*(pz)))+(((x61)*(x63)))+(((IkReal(-0.750000000000000))*(sj2)))+(((x58)*(x63))))) != 0)?((IkReal)1/(((((IkReal(-5.00000000000000))*(x62)))+(((IkReal(-6.60000000000000))*(pz)))+(((x61)*(x63)))+(((IkReal(-0.750000000000000))*(sj2)))+(((x58)*(x63)))))):(IkReal)1.0e30))*(((((IkReal(-1.00000000000000))*(x60)*(x61)))+(((IkReal(-1.00000000000000))*(x58)*(x60)))+(((IkReal(4.12500000000000))*(sj2)))+(((IkReal(3.12500000000000))*(cj2)*(sj2)))+(((IkReal(1.20000000000000))*(pz)))))), ((((
IKabs(((((x59)*(x61)))+(((IkReal(-6.00000000000000))*(sj2)))+(((IkReal(-52.8000000000000))*(pz)))+(((IkReal(-40.0000000000000))*(x62)))+(((x58)*(x59))))) != 0)?((IkReal)1/(((((x59)*(x61)))+(((IkReal(-6.00000000000000))*(sj2)))+(((IkReal(-52.8000000000000))*(pz)))+(((IkReal(-40.0000000000000))*(x62)))+(((x58)*(x59)))))):(IkReal)1.0e30))*(((((IkReal(-64.0000000000000))*((pz)*(pz))))+(((IkReal(25.0000000000000))*((sj2)*(sj2))))))));
447 sj1array[0]=
IKsin(j1array[0]);
448 cj1array[0]=
IKcos(j1array[0]);
449 if( j1array[0] >
IKPI )
453 else if( j1array[0] < -
IKPI )
457 for(
int ij1 = 0; ij1 < 1; ++ij1)
463 _ij1[0] = ij1; _ij1[1] = -1;
464 for(
int iij1 = ij1+1; iij1 < 1; ++iij1)
468 j1valid[iij1]=
false; _ij1[1] = iij1;
break;
471 j1 = j1array[ij1]; cj1 = cj1array[ij1]; sj1 = sj1array[ij1];
474 IkReal x64=
IKcos(j1);
475 IkReal x65=
IKsin(j1);
476 IkReal x66=((IkReal(0.625000000000000))*(cj2));
477 IkReal x67=((cj0)*(px));
478 IkReal x68=((IkReal(0.625000000000000))*(sj2));
479 IkReal x69=((py)*(sj0));
480 IkReal x70=((IkReal(1.00000000000000))*(x64));
481 IkReal x71=((pz)*(x64));
482 IkReal x72=((x65)*(x69));
483 evalcond[0]=((((IkReal(-1.00000000000000))*(x64)*(x66)))+(((x65)*(x68)))+(((IkReal(-0.825000000000000))*(x64)))+(pz));
484 evalcond[1]=((IkReal(-0.825000000000000))+(((x65)*(x67)))+(((IkReal(-1.00000000000000))*(x66)))+(((IkReal(-0.150000000000000))*(x65)))+(x72)+(x71));
485 evalcond[2]=((((IkReal(0.150000000000000))*(x64)))+(((IkReal(-1.00000000000000))*(x67)*(x70)))+(x68)+(((IkReal(-1.00000000000000))*(x69)*(x70)))+(((pz)*(x65))));
486 evalcond[3]=((IkReal(0.150000000000000))+(((x65)*(x66)))+(((IkReal(-1.00000000000000))*(x69)))+(((IkReal(-1.00000000000000))*(x67)))+(((x64)*(x68)))+(((IkReal(0.825000000000000))*(x65))));
487 evalcond[4]=((IkReal(-0.312500000000000))+(((IkReal(0.300000000000000))*(x67)))+(((IkReal(-0.247500000000000))*(x65)))+(((IkReal(-1.00000000000000))*(pp)))+(((IkReal(1.65000000000000))*(x72)))+(((IkReal(1.65000000000000))*(x65)*(x67)))+(((IkReal(1.65000000000000))*(x71)))+(((IkReal(0.300000000000000))*(x69))));
488 if(
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 ||
IKabs(evalcond[2]) > 0.000001 ||
IKabs(evalcond[3]) > 0.000001 ||
IKabs(evalcond[4]) > 0.000001 )
494 rotationfunction0(solutions);
505 IkReal j1array[1], cj1array[1], sj1array[1];
506 bool j1valid[1]={
false};
508 IkReal x228=((IkReal(8.00000000000000))*(pz));
509 if(
IKabs(((gconst0)*(((IkReal(-5.44500000000000))+(((pz)*(x228)))+(((IkReal(-3.12500000000000))*((cj2)*(cj2))))+(((IkReal(-8.25000000000000))*(cj2))))))) <
IKFAST_ATAN2_MAGTHRESH &&
IKabs(((gconst0)*(((((IkReal(-4.12500000000000))*(sj2)))+(((IkReal(-3.12500000000000))*(cj2)*(sj2)))+(((IkReal(-1.00000000000000))*(py)*(sj0)*(x228)))+(((IkReal(-1.00000000000000))*(cj0)*(px)*(x228)))+(((IkReal(1.20000000000000))*(pz))))))) <
IKFAST_ATAN2_MAGTHRESH )
511 j1array[0]=
IKatan2(((gconst0)*(((IkReal(-5.44500000000000))+(((pz)*(x228)))+(((IkReal(-3.12500000000000))*((cj2)*(cj2))))+(((IkReal(-8.25000000000000))*(cj2)))))), ((gconst0)*(((((IkReal(-4.12500000000000))*(sj2)))+(((IkReal(-3.12500000000000))*(cj2)*(sj2)))+(((IkReal(-1.00000000000000))*(py)*(sj0)*(x228)))+(((IkReal(-1.00000000000000))*(cj0)*(px)*(x228)))+(((IkReal(1.20000000000000))*(pz)))))));
512 sj1array[0]=
IKsin(j1array[0]);
513 cj1array[0]=
IKcos(j1array[0]);
514 if( j1array[0] >
IKPI )
518 else if( j1array[0] < -
IKPI )
522 for(
int ij1 = 0; ij1 < 1; ++ij1)
528 _ij1[0] = ij1; _ij1[1] = -1;
529 for(
int iij1 = ij1+1; iij1 < 1; ++iij1)
533 j1valid[iij1]=
false; _ij1[1] = iij1;
break;
536 j1 = j1array[ij1]; cj1 = cj1array[ij1]; sj1 = sj1array[ij1];
539 IkReal x229=
IKcos(j1);
540 IkReal x230=
IKsin(j1);
541 IkReal x231=((IkReal(0.625000000000000))*(cj2));
542 IkReal x232=((cj0)*(px));
543 IkReal x233=((IkReal(0.625000000000000))*(sj2));
544 IkReal x234=((py)*(sj0));
545 IkReal x235=((IkReal(1.00000000000000))*(x229));
546 IkReal x236=((pz)*(x229));
547 IkReal x237=((x230)*(x234));
548 evalcond[0]=((((x230)*(x233)))+(pz)+(((IkReal(-1.00000000000000))*(x229)*(x231)))+(((IkReal(-0.825000000000000))*(x229))));
549 evalcond[1]=((IkReal(-0.825000000000000))+(x236)+(x237)+(((IkReal(-0.150000000000000))*(x230)))+(((IkReal(-1.00000000000000))*(x231)))+(((x230)*(x232))));
550 evalcond[2]=((x233)+(((IkReal(0.150000000000000))*(x229)))+(((pz)*(x230)))+(((IkReal(-1.00000000000000))*(x234)*(x235)))+(((IkReal(-1.00000000000000))*(x232)*(x235))));
551 evalcond[3]=((IkReal(0.150000000000000))+(((x230)*(x231)))+(((IkReal(0.825000000000000))*(x230)))+(((x229)*(x233)))+(((IkReal(-1.00000000000000))*(x232)))+(((IkReal(-1.00000000000000))*(x234))));
552 evalcond[4]=((IkReal(-0.312500000000000))+(((IkReal(-1.00000000000000))*(pp)))+(((IkReal(1.65000000000000))*(x236)))+(((IkReal(0.300000000000000))*(x232)))+(((IkReal(0.300000000000000))*(x234)))+(((IkReal(1.65000000000000))*(x237)))+(((IkReal(1.65000000000000))*(x230)*(x232)))+(((IkReal(-0.247500000000000))*(x230))));
553 if(
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 ||
IKabs(evalcond[2]) > 0.000001 ||
IKabs(evalcond[3]) > 0.000001 ||
IKabs(evalcond[4]) > 0.000001 )
559 rotationfunction0(solutions);
574 for(
int rotationiter = 0; rotationiter < 1; ++rotationiter) {
575 IkReal x73=((cj0)*(r00));
576 IkReal x74=((cj0)*(r01));
577 IkReal x75=((IkReal(1.00000000000000))*(sj1));
578 IkReal x76=((IkReal(1.00000000000000))*(sj0));
579 IkReal x77=((cj1)*(sj2));
580 IkReal x78=((cj0)*(r02));
581 IkReal x79=((((IkReal(-1.00000000000000))*(sj2)*(x75)))+(((cj1)*(cj2))));
582 IkReal x80=((x77)+(((cj2)*(sj1))));
583 IkReal x81=((cj0)*(x79));
584 IkReal x82=((sj0)*(x80));
585 IkReal x83=((sj0)*(x79));
586 IkReal x84=((((IkReal(-1.00000000000000))*(x77)))+(((IkReal(-1.00000000000000))*(cj2)*(x75))));
587 new_r00=((((r20)*(x84)))+(((r10)*(x83)))+(((x73)*(x79))));
588 new_r01=((((x74)*(x79)))+(((r11)*(x83)))+(((r21)*(x84))));
589 new_r02=((((r12)*(x83)))+(((x78)*(x79)))+(((r22)*(x84))));
590 new_r10=((((IkReal(-1.00000000000000))*(r00)*(x76)))+(((cj0)*(r10))));
591 new_r11=((((IkReal(-1.00000000000000))*(r01)*(x76)))+(((cj0)*(r11))));
592 new_r12=((((IkReal(-1.00000000000000))*(r02)*(x76)))+(((cj0)*(r12))));
593 new_r20=((((r20)*(x79)))+(((r10)*(x82)))+(((x73)*(x80))));
594 new_r21=((((x74)*(x80)))+(((r11)*(x82)))+(((r21)*(x79))));
595 new_r22=((((r22)*(x79)))+(((r12)*(x82)))+(((x78)*(x80))));
597 IkReal j4array[2], cj4array[2], sj4array[2];
598 bool j4valid[2]={
false};
603 j4valid[0] = j4valid[1] =
true;
604 j4array[0] =
IKacos(cj4array[0]);
605 sj4array[0] =
IKsin(j4array[0]);
606 cj4array[1] = cj4array[0];
607 j4array[1] = -j4array[0];
608 sj4array[1] = -sj4array[0];
610 else if( isnan(cj4array[0]) )
614 cj4array[0] = 1; sj4array[0] = 0; j4array[0] = 0;
616 for(
int ij4 = 0; ij4 < 2; ++ij4)
622 _ij4[0] = ij4; _ij4[1] = -1;
623 for(
int iij4 = ij4+1; iij4 < 2; ++iij4)
627 j4valid[iij4]=
false; _ij4[1] = iij4;
break;
630 j4 = j4array[ij4]; cj4 = cj4array[ij4]; sj4 = sj4array[ij4];
637 if(
IKabs(dummyeval[0]) < 0.0000010000000000 )
642 gconst1=
IKsign((((new_r12)*(new_r12))+((new_r02)*(new_r02))));
643 dummyeval[0]=(((new_r12)*(new_r12))+((new_r02)*(new_r02)));
644 if(
IKabs(dummyeval[0]) < 0.0000010000000000 )
649 gconst2=
IKsign(((((cj4)*((new_r02)*(new_r02))))+(((cj4)*((new_r12)*(new_r12))))));
650 dummyeval[0]=((((cj4)*((new_r02)*(new_r02))))+(((cj4)*((new_r12)*(new_r12)))));
651 if(
IKabs(dummyeval[0]) < 0.0000010000000000 )
655 evalcond[0]=((IkReal(-3.14159265358979))+(
IKfmod(((IkReal(1.57079632679490))+(j4)), IkReal(6.28318530717959))));
657 evalcond[2]=((IkReal(-1.00000000000000))*(new_r22));
658 if(
IKabs(evalcond[0]) < 0.0000010000000000 &&
IKabs(evalcond[1]) < 0.0000010000000000 &&
IKabs(evalcond[2]) < 0.0000010000000000 )
661 IkReal j5array[1], cj5array[1], sj5array[1];
662 bool j5valid[1]={
false};
666 j5array[0]=
IKatan2(new_r21, ((IkReal(-1.00000000000000))*(new_r20)));
667 sj5array[0]=
IKsin(j5array[0]);
668 cj5array[0]=
IKcos(j5array[0]);
669 if( j5array[0] >
IKPI )
673 else if( j5array[0] < -
IKPI )
677 for(
int ij5 = 0; ij5 < 1; ++ij5)
683 _ij5[0] = ij5; _ij5[1] = -1;
684 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
688 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
691 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
694 evalcond[0]=((
IKcos(j5))+(new_r20));
695 evalcond[1]=((new_r21)+(((IkReal(-1.00000000000000))*(
IKsin(j5)))));
696 if(
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 )
705 gconst9=
IKsign(((((IkReal(-1.00000000000000))*(new_r02)*(new_r11)))+(((new_r01)*(new_r12)))));
706 dummyeval[0]=((((IkReal(-1.00000000000000))*(new_r02)*(new_r11)))+(((new_r01)*(new_r12))));
707 if(
IKabs(dummyeval[0]) < 0.0000010000000000 )
712 gconst10=
IKsign(((((new_r00)*(new_r12)))+(((IkReal(-1.00000000000000))*(new_r02)*(new_r10)))));
713 dummyeval[0]=((((new_r00)*(new_r12)))+(((IkReal(-1.00000000000000))*(new_r02)*(new_r10))));
714 if(
IKabs(dummyeval[0]) < 0.0000010000000000 )
721 IkReal j3array[1], cj3array[1], sj3array[1];
722 bool j3valid[1]={
false};
726 j3array[0]=
IKatan2(((gconst10)*(new_r00)), ((IkReal(-1.00000000000000))*(gconst10)*(new_r10)));
727 sj3array[0]=
IKsin(j3array[0]);
728 cj3array[0]=
IKcos(j3array[0]);
729 if( j3array[0] >
IKPI )
733 else if( j3array[0] < -
IKPI )
737 for(
int ij3 = 0; ij3 < 1; ++ij3)
743 _ij3[0] = ij3; _ij3[1] = -1;
744 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
748 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
751 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
754 IkReal x85=
IKsin(j3);
755 IkReal x86=
IKcos(j3);
756 IkReal x87=((IkReal(1.00000000000000))*(x85));
757 evalcond[0]=((((IkReal(-1.00000000000000))*(new_r02)*(x87)))+(((new_r12)*(x86))));
758 evalcond[1]=((IkReal(-1.00000000000000))+(((new_r12)*(x85)))+(((new_r02)*(x86))));
759 evalcond[2]=((((IkReal(-1.00000000000000))*(new_r00)*(x87)))+(((new_r10)*(x86)))+(((IkReal(-1.00000000000000))*(sj5))));
760 evalcond[3]=((((IkReal(-1.00000000000000))*(cj5)))+(((new_r11)*(x86)))+(((IkReal(-1.00000000000000))*(new_r01)*(x87))));
761 evalcond[4]=((((new_r11)*(x85)))+(((new_r01)*(x86))));
762 evalcond[5]=((((new_r10)*(x85)))+(((new_r00)*(x86))));
763 if(
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 ||
IKabs(evalcond[2]) > 0.000001 ||
IKabs(evalcond[3]) > 0.000001 ||
IKabs(evalcond[4]) > 0.000001 ||
IKabs(evalcond[5]) > 0.000001 )
770 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
771 vinfos[0].jointtype = 1;
772 vinfos[0].foffset = j0;
773 vinfos[0].indices[0] = _ij0[0];
774 vinfos[0].indices[1] = _ij0[1];
775 vinfos[0].maxsolutions = _nj0;
776 vinfos[1].jointtype = 1;
777 vinfos[1].foffset = j1;
778 vinfos[1].indices[0] = _ij1[0];
779 vinfos[1].indices[1] = _ij1[1];
780 vinfos[1].maxsolutions = _nj1;
781 vinfos[2].jointtype = 1;
782 vinfos[2].foffset = j2;
783 vinfos[2].indices[0] = _ij2[0];
784 vinfos[2].indices[1] = _ij2[1];
785 vinfos[2].maxsolutions = _nj2;
786 vinfos[3].jointtype = 1;
787 vinfos[3].foffset = j3;
788 vinfos[3].indices[0] = _ij3[0];
789 vinfos[3].indices[1] = _ij3[1];
790 vinfos[3].maxsolutions = _nj3;
791 vinfos[4].jointtype = 1;
792 vinfos[4].foffset = j4;
793 vinfos[4].indices[0] = _ij4[0];
794 vinfos[4].indices[1] = _ij4[1];
795 vinfos[4].maxsolutions = _nj4;
796 vinfos[5].jointtype = 1;
797 vinfos[5].foffset = j5;
798 vinfos[5].indices[0] = _ij5[0];
799 vinfos[5].indices[1] = _ij5[1];
800 vinfos[5].maxsolutions = _nj5;
801 std::vector<int> vfree(0);
814 IkReal j3array[1], cj3array[1], sj3array[1];
815 bool j3valid[1]={
false};
819 j3array[0]=
IKatan2(((gconst9)*(new_r01)), ((IkReal(-1.00000000000000))*(gconst9)*(new_r11)));
820 sj3array[0]=
IKsin(j3array[0]);
821 cj3array[0]=
IKcos(j3array[0]);
822 if( j3array[0] >
IKPI )
826 else if( j3array[0] < -
IKPI )
830 for(
int ij3 = 0; ij3 < 1; ++ij3)
836 _ij3[0] = ij3; _ij3[1] = -1;
837 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
841 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
844 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
847 IkReal x88=
IKsin(j3);
848 IkReal x89=
IKcos(j3);
849 IkReal x90=((IkReal(1.00000000000000))*(x88));
850 evalcond[0]=((((new_r12)*(x89)))+(((IkReal(-1.00000000000000))*(new_r02)*(x90))));
851 evalcond[1]=((IkReal(-1.00000000000000))+(((new_r12)*(x88)))+(((new_r02)*(x89))));
852 evalcond[2]=((((new_r10)*(x89)))+(((IkReal(-1.00000000000000))*(new_r00)*(x90)))+(((IkReal(-1.00000000000000))*(sj5))));
853 evalcond[3]=((((IkReal(-1.00000000000000))*(cj5)))+(((IkReal(-1.00000000000000))*(new_r01)*(x90)))+(((new_r11)*(x89))));
854 evalcond[4]=((((new_r11)*(x88)))+(((new_r01)*(x89))));
855 evalcond[5]=((((new_r10)*(x88)))+(((new_r00)*(x89))));
856 if(
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 ||
IKabs(evalcond[2]) > 0.000001 ||
IKabs(evalcond[3]) > 0.000001 ||
IKabs(evalcond[4]) > 0.000001 ||
IKabs(evalcond[5]) > 0.000001 )
863 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
864 vinfos[0].jointtype = 1;
865 vinfos[0].foffset = j0;
866 vinfos[0].indices[0] = _ij0[0];
867 vinfos[0].indices[1] = _ij0[1];
868 vinfos[0].maxsolutions = _nj0;
869 vinfos[1].jointtype = 1;
870 vinfos[1].foffset = j1;
871 vinfos[1].indices[0] = _ij1[0];
872 vinfos[1].indices[1] = _ij1[1];
873 vinfos[1].maxsolutions = _nj1;
874 vinfos[2].jointtype = 1;
875 vinfos[2].foffset = j2;
876 vinfos[2].indices[0] = _ij2[0];
877 vinfos[2].indices[1] = _ij2[1];
878 vinfos[2].maxsolutions = _nj2;
879 vinfos[3].jointtype = 1;
880 vinfos[3].foffset = j3;
881 vinfos[3].indices[0] = _ij3[0];
882 vinfos[3].indices[1] = _ij3[1];
883 vinfos[3].maxsolutions = _nj3;
884 vinfos[4].jointtype = 1;
885 vinfos[4].foffset = j4;
886 vinfos[4].indices[0] = _ij4[0];
887 vinfos[4].indices[1] = _ij4[1];
888 vinfos[4].maxsolutions = _nj4;
889 vinfos[5].jointtype = 1;
890 vinfos[5].foffset = j5;
891 vinfos[5].indices[0] = _ij5[0];
892 vinfos[5].indices[1] = _ij5[1];
893 vinfos[5].maxsolutions = _nj5;
894 std::vector<int> vfree(0);
908 evalcond[0]=((IkReal(-3.14159265358979))+(
IKfmod(((IkReal(4.71238898038469))+(j4)), IkReal(6.28318530717959))));
911 if(
IKabs(evalcond[0]) < 0.0000010000000000 &&
IKabs(evalcond[1]) < 0.0000010000000000 &&
IKabs(evalcond[2]) < 0.0000010000000000 )
914 IkReal j5array[1], cj5array[1], sj5array[1];
915 bool j5valid[1]={
false};
919 j5array[0]=
IKatan2(((IkReal(-1.00000000000000))*(new_r21)), new_r20);
920 sj5array[0]=
IKsin(j5array[0]);
921 cj5array[0]=
IKcos(j5array[0]);
922 if( j5array[0] >
IKPI )
926 else if( j5array[0] < -
IKPI )
930 for(
int ij5 = 0; ij5 < 1; ++ij5)
936 _ij5[0] = ij5; _ij5[1] = -1;
937 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
941 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
944 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
947 evalcond[0]=((((IkReal(-1.00000000000000))*(
IKcos(j5))))+(new_r20));
948 evalcond[1]=((new_r21)+(
IKsin(j5)));
949 if(
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 )
958 gconst13=
IKsign(((((IkReal(-1.00000000000000))*(new_r01)*(new_r12)))+(((new_r02)*(new_r11)))));
959 dummyeval[0]=((((IkReal(-1.00000000000000))*(new_r01)*(new_r12)))+(((new_r02)*(new_r11))));
960 if(
IKabs(dummyeval[0]) < 0.0000010000000000 )
965 gconst14=
IKsign(((((IkReal(-1.00000000000000))*(new_r00)*(new_r12)))+(((new_r02)*(new_r10)))));
966 dummyeval[0]=((((IkReal(-1.00000000000000))*(new_r00)*(new_r12)))+(((new_r02)*(new_r10))));
967 if(
IKabs(dummyeval[0]) < 0.0000010000000000 )
974 IkReal j3array[1], cj3array[1], sj3array[1];
975 bool j3valid[1]={
false};
979 j3array[0]=
IKatan2(((gconst14)*(new_r00)), ((IkReal(-1.00000000000000))*(gconst14)*(new_r10)));
980 sj3array[0]=
IKsin(j3array[0]);
981 cj3array[0]=
IKcos(j3array[0]);
982 if( j3array[0] >
IKPI )
986 else if( j3array[0] < -
IKPI )
990 for(
int ij3 = 0; ij3 < 1; ++ij3)
996 _ij3[0] = ij3; _ij3[1] = -1;
997 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
1001 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
1004 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
1007 IkReal x91=
IKsin(j3);
1008 IkReal x92=
IKcos(j3);
1009 IkReal x93=((IkReal(1.00000000000000))*(x91));
1010 evalcond[0]=((((new_r12)*(x92)))+(((IkReal(-1.00000000000000))*(new_r02)*(x93))));
1011 evalcond[1]=((IkReal(1.00000000000000))+(((new_r12)*(x91)))+(((new_r02)*(x92))));
1012 evalcond[2]=((((new_r10)*(x92)))+(((IkReal(-1.00000000000000))*(new_r00)*(x93)))+(((IkReal(-1.00000000000000))*(sj5))));
1013 evalcond[3]=((((IkReal(-1.00000000000000))*(cj5)))+(((new_r11)*(x92)))+(((IkReal(-1.00000000000000))*(new_r01)*(x93))));
1014 evalcond[4]=((((new_r01)*(x92)))+(((new_r11)*(x91))));
1015 evalcond[5]=((((new_r10)*(x91)))+(((new_r00)*(x92))));
1016 if(
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 ||
IKabs(evalcond[2]) > 0.000001 ||
IKabs(evalcond[3]) > 0.000001 ||
IKabs(evalcond[4]) > 0.000001 ||
IKabs(evalcond[5]) > 0.000001 )
1023 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
1024 vinfos[0].jointtype = 1;
1025 vinfos[0].foffset = j0;
1026 vinfos[0].indices[0] = _ij0[0];
1027 vinfos[0].indices[1] = _ij0[1];
1028 vinfos[0].maxsolutions = _nj0;
1029 vinfos[1].jointtype = 1;
1030 vinfos[1].foffset = j1;
1031 vinfos[1].indices[0] = _ij1[0];
1032 vinfos[1].indices[1] = _ij1[1];
1033 vinfos[1].maxsolutions = _nj1;
1034 vinfos[2].jointtype = 1;
1035 vinfos[2].foffset = j2;
1036 vinfos[2].indices[0] = _ij2[0];
1037 vinfos[2].indices[1] = _ij2[1];
1038 vinfos[2].maxsolutions = _nj2;
1039 vinfos[3].jointtype = 1;
1040 vinfos[3].foffset = j3;
1041 vinfos[3].indices[0] = _ij3[0];
1042 vinfos[3].indices[1] = _ij3[1];
1043 vinfos[3].maxsolutions = _nj3;
1044 vinfos[4].jointtype = 1;
1045 vinfos[4].foffset = j4;
1046 vinfos[4].indices[0] = _ij4[0];
1047 vinfos[4].indices[1] = _ij4[1];
1048 vinfos[4].maxsolutions = _nj4;
1049 vinfos[5].jointtype = 1;
1050 vinfos[5].foffset = j5;
1051 vinfos[5].indices[0] = _ij5[0];
1052 vinfos[5].indices[1] = _ij5[1];
1053 vinfos[5].maxsolutions = _nj5;
1054 std::vector<int> vfree(0);
1067 IkReal j3array[1], cj3array[1], sj3array[1];
1068 bool j3valid[1]={
false};
1072 j3array[0]=
IKatan2(((gconst13)*(new_r01)), ((IkReal(-1.00000000000000))*(gconst13)*(new_r11)));
1073 sj3array[0]=
IKsin(j3array[0]);
1074 cj3array[0]=
IKcos(j3array[0]);
1075 if( j3array[0] >
IKPI )
1079 else if( j3array[0] < -
IKPI )
1080 { j3array[0]+=
IK2PI;
1083 for(
int ij3 = 0; ij3 < 1; ++ij3)
1089 _ij3[0] = ij3; _ij3[1] = -1;
1090 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
1094 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
1097 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
1100 IkReal x94=
IKsin(j3);
1101 IkReal x95=
IKcos(j3);
1102 IkReal x96=((IkReal(1.00000000000000))*(x94));
1103 evalcond[0]=((((IkReal(-1.00000000000000))*(new_r02)*(x96)))+(((new_r12)*(x95))));
1104 evalcond[1]=((IkReal(1.00000000000000))+(((new_r02)*(x95)))+(((new_r12)*(x94))));
1105 evalcond[2]=((((new_r10)*(x95)))+(((IkReal(-1.00000000000000))*(new_r00)*(x96)))+(((IkReal(-1.00000000000000))*(sj5))));
1106 evalcond[3]=((((IkReal(-1.00000000000000))*(cj5)))+(((IkReal(-1.00000000000000))*(new_r01)*(x96)))+(((new_r11)*(x95))));
1107 evalcond[4]=((((new_r11)*(x94)))+(((new_r01)*(x95))));
1108 evalcond[5]=((((new_r10)*(x94)))+(((new_r00)*(x95))));
1109 if(
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 ||
IKabs(evalcond[2]) > 0.000001 ||
IKabs(evalcond[3]) > 0.000001 ||
IKabs(evalcond[4]) > 0.000001 ||
IKabs(evalcond[5]) > 0.000001 )
1116 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
1117 vinfos[0].jointtype = 1;
1118 vinfos[0].foffset = j0;
1119 vinfos[0].indices[0] = _ij0[0];
1120 vinfos[0].indices[1] = _ij0[1];
1121 vinfos[0].maxsolutions = _nj0;
1122 vinfos[1].jointtype = 1;
1123 vinfos[1].foffset = j1;
1124 vinfos[1].indices[0] = _ij1[0];
1125 vinfos[1].indices[1] = _ij1[1];
1126 vinfos[1].maxsolutions = _nj1;
1127 vinfos[2].jointtype = 1;
1128 vinfos[2].foffset = j2;
1129 vinfos[2].indices[0] = _ij2[0];
1130 vinfos[2].indices[1] = _ij2[1];
1131 vinfos[2].maxsolutions = _nj2;
1132 vinfos[3].jointtype = 1;
1133 vinfos[3].foffset = j3;
1134 vinfos[3].indices[0] = _ij3[0];
1135 vinfos[3].indices[1] = _ij3[1];
1136 vinfos[3].maxsolutions = _nj3;
1137 vinfos[4].jointtype = 1;
1138 vinfos[4].foffset = j4;
1139 vinfos[4].indices[0] = _ij4[0];
1140 vinfos[4].indices[1] = _ij4[1];
1141 vinfos[4].maxsolutions = _nj4;
1142 vinfos[5].jointtype = 1;
1143 vinfos[5].foffset = j5;
1144 vinfos[5].indices[0] = _ij5[0];
1145 vinfos[5].indices[1] = _ij5[1];
1146 vinfos[5].maxsolutions = _nj5;
1147 std::vector<int> vfree(0);
1161 evalcond[0]=((IkReal(-3.14159265358979))+(
IKfmod(((IkReal(3.14159265358979))+(j4)), IkReal(6.28318530717959))));
1162 evalcond[1]=((IkReal(-1.00000000000000))+(new_r22));
1163 evalcond[2]=new_r20;
1164 evalcond[3]=new_r21;
1165 evalcond[4]=((IkReal(-1.00000000000000))*(new_r20));
1166 evalcond[5]=((IkReal(-1.00000000000000))*(new_r21));
1167 evalcond[6]=((IkReal(1.00000000000000))+(((IkReal(-1.00000000000000))*(new_r22))));
1168 if(
IKabs(evalcond[0]) < 0.0000010000000000 &&
IKabs(evalcond[1]) < 0.0000010000000000 &&
IKabs(evalcond[2]) < 0.0000010000000000 &&
IKabs(evalcond[3]) < 0.0000010000000000 &&
IKabs(evalcond[4]) < 0.0000010000000000 &&
IKabs(evalcond[5]) < 0.0000010000000000 &&
IKabs(evalcond[6]) < 0.0000010000000000 )
1171 IkReal j3array[2], cj3array[2], sj3array[2];
1172 bool j3valid[2]={
false};
1176 IkReal x97=
IKatan2(new_r02, new_r12);
1177 j3array[0]=((IkReal(-1.00000000000000))*(x97));
1178 sj3array[0]=
IKsin(j3array[0]);
1179 cj3array[0]=
IKcos(j3array[0]);
1180 j3array[1]=((IkReal(3.14159265358979))+(((IkReal(-1.00000000000000))*(x97))));
1181 sj3array[1]=
IKsin(j3array[1]);
1182 cj3array[1]=
IKcos(j3array[1]);
1183 if( j3array[0] >
IKPI )
1187 else if( j3array[0] < -
IKPI )
1188 { j3array[0]+=
IK2PI;
1191 if( j3array[1] >
IKPI )
1195 else if( j3array[1] < -
IKPI )
1196 { j3array[1]+=
IK2PI;
1199 for(
int ij3 = 0; ij3 < 2; ++ij3)
1205 _ij3[0] = ij3; _ij3[1] = -1;
1206 for(
int iij3 = ij3+1; iij3 < 2; ++iij3)
1210 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
1213 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
1216 evalcond[0]=((((new_r12)*(
IKcos(j3))))+(((IkReal(-1.00000000000000))*(new_r02)*(
IKsin(j3)))));
1217 if(
IKabs(evalcond[0]) > 0.000001 )
1224 IkReal j5array[1], cj5array[1], sj5array[1];
1225 bool j5valid[1]={
false};
1229 j5array[0]=
IKatan2(((((IkReal(-1.00000000000000))*(new_r11)*(sj3)))+(((IkReal(-1.00000000000000))*(cj3)*(new_r01)))), ((((new_r10)*(sj3)))+(((cj3)*(new_r00)))));
1230 sj5array[0]=
IKsin(j5array[0]);
1231 cj5array[0]=
IKcos(j5array[0]);
1232 if( j5array[0] >
IKPI )
1236 else if( j5array[0] < -
IKPI )
1237 { j5array[0]+=
IK2PI;
1240 for(
int ij5 = 0; ij5 < 1; ++ij5)
1246 _ij5[0] = ij5; _ij5[1] = -1;
1247 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
1251 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
1254 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
1257 IkReal x98=
IKsin(j5);
1258 IkReal x99=((IkReal(1.00000000000000))*(sj3));
1259 IkReal x100=((IkReal(1.00000000000000))*(
IKcos(j5)));
1260 evalcond[0]=((((IkReal(-1.00000000000000))*(x98)))+(((IkReal(-1.00000000000000))*(new_r00)*(x99)))+(((cj3)*(new_r10))));
1261 evalcond[1]=((((cj3)*(new_r11)))+(((IkReal(-1.00000000000000))*(new_r01)*(x99)))+(((IkReal(-1.00000000000000))*(x100))));
1262 evalcond[2]=((((new_r11)*(sj3)))+(((cj3)*(new_r01)))+(x98));
1263 evalcond[3]=((((new_r10)*(sj3)))+(((IkReal(-1.00000000000000))*(x100)))+(((cj3)*(new_r00))));
1264 if(
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 ||
IKabs(evalcond[2]) > 0.000001 ||
IKabs(evalcond[3]) > 0.000001 )
1271 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
1272 vinfos[0].jointtype = 1;
1273 vinfos[0].foffset = j0;
1274 vinfos[0].indices[0] = _ij0[0];
1275 vinfos[0].indices[1] = _ij0[1];
1276 vinfos[0].maxsolutions = _nj0;
1277 vinfos[1].jointtype = 1;
1278 vinfos[1].foffset = j1;
1279 vinfos[1].indices[0] = _ij1[0];
1280 vinfos[1].indices[1] = _ij1[1];
1281 vinfos[1].maxsolutions = _nj1;
1282 vinfos[2].jointtype = 1;
1283 vinfos[2].foffset = j2;
1284 vinfos[2].indices[0] = _ij2[0];
1285 vinfos[2].indices[1] = _ij2[1];
1286 vinfos[2].maxsolutions = _nj2;
1287 vinfos[3].jointtype = 1;
1288 vinfos[3].foffset = j3;
1289 vinfos[3].indices[0] = _ij3[0];
1290 vinfos[3].indices[1] = _ij3[1];
1291 vinfos[3].maxsolutions = _nj3;
1292 vinfos[4].jointtype = 1;
1293 vinfos[4].foffset = j4;
1294 vinfos[4].indices[0] = _ij4[0];
1295 vinfos[4].indices[1] = _ij4[1];
1296 vinfos[4].maxsolutions = _nj4;
1297 vinfos[5].jointtype = 1;
1298 vinfos[5].foffset = j5;
1299 vinfos[5].indices[0] = _ij5[0];
1300 vinfos[5].indices[1] = _ij5[1];
1301 vinfos[5].maxsolutions = _nj5;
1302 std::vector<int> vfree(0);
1312 IkReal x101=((IkReal(1.00000000000000))+(new_r22));
1313 evalcond[0]=((IkReal(-3.14159265358979))+(
IKfmod(j4, IkReal(6.28318530717959))));
1315 evalcond[2]=new_r20;
1316 evalcond[3]=new_r21;
1317 evalcond[4]=new_r20;
1318 evalcond[5]=new_r21;
1320 if(
IKabs(evalcond[0]) < 0.0000010000000000 &&
IKabs(evalcond[1]) < 0.0000010000000000 &&
IKabs(evalcond[2]) < 0.0000010000000000 &&
IKabs(evalcond[3]) < 0.0000010000000000 &&
IKabs(evalcond[4]) < 0.0000010000000000 &&
IKabs(evalcond[5]) < 0.0000010000000000 &&
IKabs(evalcond[6]) < 0.0000010000000000 )
1323 IkReal j3array[2], cj3array[2], sj3array[2];
1324 bool j3valid[2]={
false};
1328 IkReal x102=
IKatan2(new_r02, new_r12);
1329 j3array[0]=((IkReal(-1.00000000000000))*(x102));
1330 sj3array[0]=
IKsin(j3array[0]);
1331 cj3array[0]=
IKcos(j3array[0]);
1332 j3array[1]=((IkReal(3.14159265358979))+(((IkReal(-1.00000000000000))*(x102))));
1333 sj3array[1]=
IKsin(j3array[1]);
1334 cj3array[1]=
IKcos(j3array[1]);
1335 if( j3array[0] >
IKPI )
1339 else if( j3array[0] < -
IKPI )
1340 { j3array[0]+=
IK2PI;
1343 if( j3array[1] >
IKPI )
1347 else if( j3array[1] < -
IKPI )
1348 { j3array[1]+=
IK2PI;
1351 for(
int ij3 = 0; ij3 < 2; ++ij3)
1357 _ij3[0] = ij3; _ij3[1] = -1;
1358 for(
int iij3 = ij3+1; iij3 < 2; ++iij3)
1362 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
1365 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
1368 evalcond[0]=((((new_r12)*(
IKcos(j3))))+(((IkReal(-1.00000000000000))*(new_r02)*(
IKsin(j3)))));
1369 if(
IKabs(evalcond[0]) > 0.000001 )
1376 IkReal j5array[1], cj5array[1], sj5array[1];
1377 bool j5valid[1]={
false};
1381 j5array[0]=
IKatan2(((((new_r11)*(sj3)))+(((cj3)*(new_r01)))), ((((IkReal(-1.00000000000000))*(cj3)*(new_r00)))+(((IkReal(-1.00000000000000))*(new_r10)*(sj3)))));
1382 sj5array[0]=
IKsin(j5array[0]);
1383 cj5array[0]=
IKcos(j5array[0]);
1384 if( j5array[0] >
IKPI )
1388 else if( j5array[0] < -
IKPI )
1389 { j5array[0]+=
IK2PI;
1392 for(
int ij5 = 0; ij5 < 1; ++ij5)
1398 _ij5[0] = ij5; _ij5[1] = -1;
1399 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
1403 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
1406 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
1409 IkReal x103=
IKcos(j5);
1410 IkReal x104=((IkReal(1.00000000000000))*(sj3));
1411 IkReal x105=((IkReal(1.00000000000000))*(
IKsin(j5)));
1412 evalcond[0]=((((IkReal(-1.00000000000000))*(new_r00)*(x104)))+(((cj3)*(new_r10)))+(((IkReal(-1.00000000000000))*(x105))));
1413 evalcond[1]=((((IkReal(-1.00000000000000))*(new_r01)*(x104)))+(((IkReal(-1.00000000000000))*(x103)))+(((cj3)*(new_r11))));
1414 evalcond[2]=((((new_r11)*(sj3)))+(((IkReal(-1.00000000000000))*(x105)))+(((cj3)*(new_r01))));
1415 evalcond[3]=((((new_r10)*(sj3)))+(x103)+(((cj3)*(new_r00))));
1416 if(
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 ||
IKabs(evalcond[2]) > 0.000001 ||
IKabs(evalcond[3]) > 0.000001 )
1423 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
1424 vinfos[0].jointtype = 1;
1425 vinfos[0].foffset = j0;
1426 vinfos[0].indices[0] = _ij0[0];
1427 vinfos[0].indices[1] = _ij0[1];
1428 vinfos[0].maxsolutions = _nj0;
1429 vinfos[1].jointtype = 1;
1430 vinfos[1].foffset = j1;
1431 vinfos[1].indices[0] = _ij1[0];
1432 vinfos[1].indices[1] = _ij1[1];
1433 vinfos[1].maxsolutions = _nj1;
1434 vinfos[2].jointtype = 1;
1435 vinfos[2].foffset = j2;
1436 vinfos[2].indices[0] = _ij2[0];
1437 vinfos[2].indices[1] = _ij2[1];
1438 vinfos[2].maxsolutions = _nj2;
1439 vinfos[3].jointtype = 1;
1440 vinfos[3].foffset = j3;
1441 vinfos[3].indices[0] = _ij3[0];
1442 vinfos[3].indices[1] = _ij3[1];
1443 vinfos[3].maxsolutions = _nj3;
1444 vinfos[4].jointtype = 1;
1445 vinfos[4].foffset = j4;
1446 vinfos[4].indices[0] = _ij4[0];
1447 vinfos[4].indices[1] = _ij4[1];
1448 vinfos[4].maxsolutions = _nj4;
1449 vinfos[5].jointtype = 1;
1450 vinfos[5].foffset = j5;
1451 vinfos[5].indices[0] = _ij5[0];
1452 vinfos[5].indices[1] = _ij5[1];
1453 vinfos[5].maxsolutions = _nj5;
1454 std::vector<int> vfree(0);
1480 IkReal j3array[1], cj3array[1], sj3array[1];
1481 bool j3valid[1]={
false};
1483 IkReal x106=((gconst2)*(new_r22)*(sj4));
1486 j3array[0]=
IKatan2(((new_r12)*(x106)), ((new_r02)*(x106)));
1487 sj3array[0]=
IKsin(j3array[0]);
1488 cj3array[0]=
IKcos(j3array[0]);
1489 if( j3array[0] >
IKPI )
1493 else if( j3array[0] < -
IKPI )
1494 { j3array[0]+=
IK2PI;
1497 for(
int ij3 = 0; ij3 < 1; ++ij3)
1503 _ij3[0] = ij3; _ij3[1] = -1;
1504 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
1508 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
1511 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
1514 IkReal x107=
IKsin(j3);
1515 IkReal x108=
IKcos(j3);
1516 IkReal x109=((IkReal(1.00000000000000))*(sj4));
1517 IkReal x110=((IkReal(1.00000000000000))*(cj4));
1518 IkReal x111=((new_r02)*(x108));
1519 IkReal x112=((new_r12)*(x107));
1520 evalcond[0]=((((IkReal(-1.00000000000000))*(new_r02)*(x107)))+(((new_r12)*(x108))));
1521 evalcond[1]=((((IkReal(-1.00000000000000))*(x109)))+(x112)+(x111));
1522 evalcond[2]=((((IkReal(-1.00000000000000))*(new_r22)*(x109)))+(((cj4)*(x111)))+(((cj4)*(x112))));
1523 evalcond[3]=((((IkReal(-1.00000000000000))*(new_r00)*(x108)*(x109)))+(((IkReal(-1.00000000000000))*(new_r20)*(x110)))+(((IkReal(-1.00000000000000))*(new_r10)*(x107)*(x109))));
1524 evalcond[4]=((((IkReal(-1.00000000000000))*(new_r01)*(x108)*(x109)))+(((IkReal(-1.00000000000000))*(new_r21)*(x110)))+(((IkReal(-1.00000000000000))*(new_r11)*(x107)*(x109))));
1525 evalcond[5]=((IkReal(1.00000000000000))+(((IkReal(-1.00000000000000))*(x109)*(x111)))+(((IkReal(-1.00000000000000))*(x109)*(x112)))+(((IkReal(-1.00000000000000))*(new_r22)*(x110))));
1526 if(
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 ||
IKabs(evalcond[2]) > 0.000001 ||
IKabs(evalcond[3]) > 0.000001 ||
IKabs(evalcond[4]) > 0.000001 ||
IKabs(evalcond[5]) > 0.000001 )
1533 IkReal dummyeval[1];
1537 if(
IKabs(dummyeval[0]) < 0.0000010000000000 )
1540 IkReal dummyeval[1];
1542 if(
IKabs(dummyeval[0]) < 0.0000010000000000 )
1545 IkReal dummyeval[1];
1547 if(
IKabs(dummyeval[0]) < 0.0000010000000000 )
1550 IkReal evalcond[11];
1551 IkReal x113=((((cj3)*(new_r12)))+(((IkReal(-1.00000000000000))*(new_r02)*(sj3))));
1552 IkReal x114=((((new_r12)*(sj3)))+(((cj3)*(new_r02))));
1553 evalcond[0]=((IkReal(-3.14159265358979))+(
IKfmod(((IkReal(3.14159265358979))+(j4)), IkReal(6.28318530717959))));
1554 evalcond[1]=((IkReal(-1.00000000000000))+(new_r22));
1555 evalcond[2]=new_r20;
1556 evalcond[3]=new_r21;
1561 evalcond[8]=((IkReal(-1.00000000000000))*(new_r20));
1562 evalcond[9]=((IkReal(-1.00000000000000))*(new_r21));
1563 evalcond[10]=((IkReal(1.00000000000000))+(((IkReal(-1.00000000000000))*(new_r22))));
1564 if(
IKabs(evalcond[0]) < 0.0000010000000000 &&
IKabs(evalcond[1]) < 0.0000010000000000 &&
IKabs(evalcond[2]) < 0.0000010000000000 &&
IKabs(evalcond[3]) < 0.0000010000000000 &&
IKabs(evalcond[4]) < 0.0000010000000000 &&
IKabs(evalcond[5]) < 0.0000010000000000 &&
IKabs(evalcond[6]) < 0.0000010000000000 &&
IKabs(evalcond[7]) < 0.0000010000000000 &&
IKabs(evalcond[8]) < 0.0000010000000000 &&
IKabs(evalcond[9]) < 0.0000010000000000 &&
IKabs(evalcond[10]) < 0.0000010000000000 )
1567 IkReal j5array[1], cj5array[1], sj5array[1];
1568 bool j5valid[1]={
false};
1572 j5array[0]=
IKatan2(((((IkReal(-1.00000000000000))*(new_r11)*(sj3)))+(((IkReal(-1.00000000000000))*(cj3)*(new_r01)))), ((((new_r10)*(sj3)))+(((cj3)*(new_r00)))));
1573 sj5array[0]=
IKsin(j5array[0]);
1574 cj5array[0]=
IKcos(j5array[0]);
1575 if( j5array[0] >
IKPI )
1579 else if( j5array[0] < -
IKPI )
1580 { j5array[0]+=
IK2PI;
1583 for(
int ij5 = 0; ij5 < 1; ++ij5)
1589 _ij5[0] = ij5; _ij5[1] = -1;
1590 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
1594 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
1597 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
1600 IkReal x115=
IKsin(j5);
1601 IkReal x116=((IkReal(1.00000000000000))*(sj3));
1602 IkReal x117=((IkReal(1.00000000000000))*(
IKcos(j5)));
1603 evalcond[0]=((((IkReal(-1.00000000000000))*(x115)))+(((IkReal(-1.00000000000000))*(new_r00)*(x116)))+(((cj3)*(new_r10))));
1604 evalcond[1]=((((IkReal(-1.00000000000000))*(x117)))+(((cj3)*(new_r11)))+(((IkReal(-1.00000000000000))*(new_r01)*(x116))));
1605 evalcond[2]=((((new_r11)*(sj3)))+(x115)+(((cj3)*(new_r01))));
1606 evalcond[3]=((((IkReal(-1.00000000000000))*(x117)))+(((new_r10)*(sj3)))+(((cj3)*(new_r00))));
1607 if(
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 ||
IKabs(evalcond[2]) > 0.000001 ||
IKabs(evalcond[3]) > 0.000001 )
1614 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
1615 vinfos[0].jointtype = 1;
1616 vinfos[0].foffset = j0;
1617 vinfos[0].indices[0] = _ij0[0];
1618 vinfos[0].indices[1] = _ij0[1];
1619 vinfos[0].maxsolutions = _nj0;
1620 vinfos[1].jointtype = 1;
1621 vinfos[1].foffset = j1;
1622 vinfos[1].indices[0] = _ij1[0];
1623 vinfos[1].indices[1] = _ij1[1];
1624 vinfos[1].maxsolutions = _nj1;
1625 vinfos[2].jointtype = 1;
1626 vinfos[2].foffset = j2;
1627 vinfos[2].indices[0] = _ij2[0];
1628 vinfos[2].indices[1] = _ij2[1];
1629 vinfos[2].maxsolutions = _nj2;
1630 vinfos[3].jointtype = 1;
1631 vinfos[3].foffset = j3;
1632 vinfos[3].indices[0] = _ij3[0];
1633 vinfos[3].indices[1] = _ij3[1];
1634 vinfos[3].maxsolutions = _nj3;
1635 vinfos[4].jointtype = 1;
1636 vinfos[4].foffset = j4;
1637 vinfos[4].indices[0] = _ij4[0];
1638 vinfos[4].indices[1] = _ij4[1];
1639 vinfos[4].maxsolutions = _nj4;
1640 vinfos[5].jointtype = 1;
1641 vinfos[5].foffset = j5;
1642 vinfos[5].indices[0] = _ij5[0];
1643 vinfos[5].indices[1] = _ij5[1];
1644 vinfos[5].maxsolutions = _nj5;
1645 std::vector<int> vfree(0);
1653 IkReal x118=((IkReal(1.00000000000000))+(new_r22));
1654 IkReal x119=((new_r12)*(sj3));
1655 IkReal x120=((IkReal(1.00000000000000))*(new_r02));
1656 IkReal x121=((((cj3)*(new_r12)))+(((IkReal(-1.00000000000000))*(sj3)*(x120))));
1657 evalcond[0]=((IkReal(-3.14159265358979))+(
IKfmod(j4, IkReal(6.28318530717959))));
1659 evalcond[2]=new_r20;
1660 evalcond[3]=new_r21;
1663 evalcond[6]=((x119)+(((cj3)*(new_r02))));
1664 evalcond[7]=((((IkReal(-1.00000000000000))*(cj3)*(x120)))+(((IkReal(-1.00000000000000))*(x119))));
1665 evalcond[8]=new_r20;
1666 evalcond[9]=new_r21;
1668 if(
IKabs(evalcond[0]) < 0.0000010000000000 &&
IKabs(evalcond[1]) < 0.0000010000000000 &&
IKabs(evalcond[2]) < 0.0000010000000000 &&
IKabs(evalcond[3]) < 0.0000010000000000 &&
IKabs(evalcond[4]) < 0.0000010000000000 &&
IKabs(evalcond[5]) < 0.0000010000000000 &&
IKabs(evalcond[6]) < 0.0000010000000000 &&
IKabs(evalcond[7]) < 0.0000010000000000 &&
IKabs(evalcond[8]) < 0.0000010000000000 &&
IKabs(evalcond[9]) < 0.0000010000000000 &&
IKabs(evalcond[10]) < 0.0000010000000000 )
1671 IkReal j5array[1], cj5array[1], sj5array[1];
1672 bool j5valid[1]={
false};
1676 j5array[0]=
IKatan2(((((new_r11)*(sj3)))+(((cj3)*(new_r01)))), ((((IkReal(-1.00000000000000))*(cj3)*(new_r00)))+(((IkReal(-1.00000000000000))*(new_r10)*(sj3)))));
1677 sj5array[0]=
IKsin(j5array[0]);
1678 cj5array[0]=
IKcos(j5array[0]);
1679 if( j5array[0] >
IKPI )
1683 else if( j5array[0] < -
IKPI )
1684 { j5array[0]+=
IK2PI;
1687 for(
int ij5 = 0; ij5 < 1; ++ij5)
1693 _ij5[0] = ij5; _ij5[1] = -1;
1694 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
1698 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
1701 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
1704 IkReal x122=
IKcos(j5);
1705 IkReal x123=((IkReal(1.00000000000000))*(sj3));
1706 IkReal x124=((IkReal(1.00000000000000))*(
IKsin(j5)));
1707 evalcond[0]=((((IkReal(-1.00000000000000))*(x124)))+(((cj3)*(new_r10)))+(((IkReal(-1.00000000000000))*(new_r00)*(x123))));
1708 evalcond[1]=((((cj3)*(new_r11)))+(((IkReal(-1.00000000000000))*(x122)))+(((IkReal(-1.00000000000000))*(new_r01)*(x123))));
1709 evalcond[2]=((((new_r11)*(sj3)))+(((IkReal(-1.00000000000000))*(x124)))+(((cj3)*(new_r01))));
1710 evalcond[3]=((x122)+(((new_r10)*(sj3)))+(((cj3)*(new_r00))));
1711 if(
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 ||
IKabs(evalcond[2]) > 0.000001 ||
IKabs(evalcond[3]) > 0.000001 )
1718 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
1719 vinfos[0].jointtype = 1;
1720 vinfos[0].foffset = j0;
1721 vinfos[0].indices[0] = _ij0[0];
1722 vinfos[0].indices[1] = _ij0[1];
1723 vinfos[0].maxsolutions = _nj0;
1724 vinfos[1].jointtype = 1;
1725 vinfos[1].foffset = j1;
1726 vinfos[1].indices[0] = _ij1[0];
1727 vinfos[1].indices[1] = _ij1[1];
1728 vinfos[1].maxsolutions = _nj1;
1729 vinfos[2].jointtype = 1;
1730 vinfos[2].foffset = j2;
1731 vinfos[2].indices[0] = _ij2[0];
1732 vinfos[2].indices[1] = _ij2[1];
1733 vinfos[2].maxsolutions = _nj2;
1734 vinfos[3].jointtype = 1;
1735 vinfos[3].foffset = j3;
1736 vinfos[3].indices[0] = _ij3[0];
1737 vinfos[3].indices[1] = _ij3[1];
1738 vinfos[3].maxsolutions = _nj3;
1739 vinfos[4].jointtype = 1;
1740 vinfos[4].foffset = j4;
1741 vinfos[4].indices[0] = _ij4[0];
1742 vinfos[4].indices[1] = _ij4[1];
1743 vinfos[4].maxsolutions = _nj4;
1744 vinfos[5].jointtype = 1;
1745 vinfos[5].foffset = j5;
1746 vinfos[5].indices[0] = _ij5[0];
1747 vinfos[5].indices[1] = _ij5[1];
1748 vinfos[5].maxsolutions = _nj5;
1749 std::vector<int> vfree(0);
1771 IkReal j5array[1], cj5array[1], sj5array[1];
1772 bool j5valid[1]={
false};
1776 j5array[0]=
IKatan2(((((IkReal(-1.00000000000000))*(new_r00)*(sj3)))+(((cj3)*(new_r10)))), ((IkReal(-1.00000000000000))*(new_r20)*(((
IKabs(sj4) != 0)?((IkReal)1/(sj4)):(IkReal)1.0e30))));
1777 sj5array[0]=
IKsin(j5array[0]);
1778 cj5array[0]=
IKcos(j5array[0]);
1779 if( j5array[0] >
IKPI )
1783 else if( j5array[0] < -
IKPI )
1784 { j5array[0]+=
IK2PI;
1787 for(
int ij5 = 0; ij5 < 1; ++ij5)
1793 _ij5[0] = ij5; _ij5[1] = -1;
1794 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
1798 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
1801 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
1804 IkReal x125=
IKsin(j5);
1805 IkReal x126=
IKcos(j5);
1806 IkReal x127=((IkReal(1.00000000000000))*(sj3));
1807 IkReal x128=((new_r11)*(sj3));
1808 IkReal x129=((new_r10)*(sj3));
1809 IkReal x130=((cj3)*(cj4));
1810 IkReal x131=((IkReal(1.00000000000000))*(sj4));
1811 IkReal x132=((IkReal(1.00000000000000))*(x126));
1812 IkReal x133=((IkReal(1.00000000000000))*(x125));
1813 evalcond[0]=((new_r20)+(((sj4)*(x126))));
1814 evalcond[1]=((new_r21)+(((IkReal(-1.00000000000000))*(x125)*(x131))));
1815 evalcond[2]=((((cj3)*(new_r10)))+(((IkReal(-1.00000000000000))*(new_r00)*(x127)))+(((IkReal(-1.00000000000000))*(x133))));
1816 evalcond[3]=((((cj3)*(new_r11)))+(((IkReal(-1.00000000000000))*(x132)))+(((IkReal(-1.00000000000000))*(new_r01)*(x127))));
1817 evalcond[4]=((((cj4)*(x125)))+(x128)+(((cj3)*(new_r01))));
1818 evalcond[5]=((((IkReal(-1.00000000000000))*(cj4)*(x132)))+(x129)+(((cj3)*(new_r00))));
1819 evalcond[6]=((((IkReal(-1.00000000000000))*(new_r21)*(x131)))+(((new_r01)*(x130)))+(x125)+(((cj4)*(x128))));
1820 evalcond[7]=((((IkReal(-1.00000000000000))*(new_r20)*(x131)))+(((cj4)*(x129)))+(((new_r00)*(x130)))+(((IkReal(-1.00000000000000))*(x132))));
1821 if(
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 ||
IKabs(evalcond[2]) > 0.000001 ||
IKabs(evalcond[3]) > 0.000001 ||
IKabs(evalcond[4]) > 0.000001 ||
IKabs(evalcond[5]) > 0.000001 ||
IKabs(evalcond[6]) > 0.000001 ||
IKabs(evalcond[7]) > 0.000001 )
1828 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
1829 vinfos[0].jointtype = 1;
1830 vinfos[0].foffset = j0;
1831 vinfos[0].indices[0] = _ij0[0];
1832 vinfos[0].indices[1] = _ij0[1];
1833 vinfos[0].maxsolutions = _nj0;
1834 vinfos[1].jointtype = 1;
1835 vinfos[1].foffset = j1;
1836 vinfos[1].indices[0] = _ij1[0];
1837 vinfos[1].indices[1] = _ij1[1];
1838 vinfos[1].maxsolutions = _nj1;
1839 vinfos[2].jointtype = 1;
1840 vinfos[2].foffset = j2;
1841 vinfos[2].indices[0] = _ij2[0];
1842 vinfos[2].indices[1] = _ij2[1];
1843 vinfos[2].maxsolutions = _nj2;
1844 vinfos[3].jointtype = 1;
1845 vinfos[3].foffset = j3;
1846 vinfos[3].indices[0] = _ij3[0];
1847 vinfos[3].indices[1] = _ij3[1];
1848 vinfos[3].maxsolutions = _nj3;
1849 vinfos[4].jointtype = 1;
1850 vinfos[4].foffset = j4;
1851 vinfos[4].indices[0] = _ij4[0];
1852 vinfos[4].indices[1] = _ij4[1];
1853 vinfos[4].maxsolutions = _nj4;
1854 vinfos[5].jointtype = 1;
1855 vinfos[5].foffset = j5;
1856 vinfos[5].indices[0] = _ij5[0];
1857 vinfos[5].indices[1] = _ij5[1];
1858 vinfos[5].maxsolutions = _nj5;
1859 std::vector<int> vfree(0);
1872 IkReal j5array[1], cj5array[1], sj5array[1];
1873 bool j5valid[1]={
false};
1877 j5array[0]=
IKatan2(((new_r21)*(((
IKabs(sj4) != 0)?((IkReal)1/(sj4)):(IkReal)1.0e30))), ((((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 )
1884 else if( j5array[0] < -
IKPI )
1885 { j5array[0]+=
IK2PI;
1888 for(
int ij5 = 0; ij5 < 1; ++ij5)
1894 _ij5[0] = ij5; _ij5[1] = -1;
1895 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
1899 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
1902 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
1905 IkReal x134=
IKsin(j5);
1906 IkReal x135=
IKcos(j5);
1907 IkReal x136=((IkReal(1.00000000000000))*(sj3));
1908 IkReal x137=((new_r11)*(sj3));
1909 IkReal x138=((new_r10)*(sj3));
1910 IkReal x139=((cj3)*(cj4));
1911 IkReal x140=((IkReal(1.00000000000000))*(sj4));
1912 IkReal x141=((IkReal(1.00000000000000))*(x135));
1913 IkReal x142=((IkReal(1.00000000000000))*(x134));
1914 evalcond[0]=((new_r20)+(((sj4)*(x135))));
1915 evalcond[1]=((((IkReal(-1.00000000000000))*(x134)*(x140)))+(new_r21));
1916 evalcond[2]=((((IkReal(-1.00000000000000))*(x142)))+(((IkReal(-1.00000000000000))*(new_r00)*(x136)))+(((cj3)*(new_r10))));
1917 evalcond[3]=((((IkReal(-1.00000000000000))*(x141)))+(((cj3)*(new_r11)))+(((IkReal(-1.00000000000000))*(new_r01)*(x136))));
1918 evalcond[4]=((x137)+(((cj4)*(x134)))+(((cj3)*(new_r01))));
1919 evalcond[5]=((((IkReal(-1.00000000000000))*(cj4)*(x141)))+(x138)+(((cj3)*(new_r00))));
1920 evalcond[6]=((((cj4)*(x137)))+(((new_r01)*(x139)))+(x134)+(((IkReal(-1.00000000000000))*(new_r21)*(x140))));
1921 evalcond[7]=((((IkReal(-1.00000000000000))*(x141)))+(((new_r00)*(x139)))+(((IkReal(-1.00000000000000))*(new_r20)*(x140)))+(((cj4)*(x138))));
1922 if(
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 ||
IKabs(evalcond[2]) > 0.000001 ||
IKabs(evalcond[3]) > 0.000001 ||
IKabs(evalcond[4]) > 0.000001 ||
IKabs(evalcond[5]) > 0.000001 ||
IKabs(evalcond[6]) > 0.000001 ||
IKabs(evalcond[7]) > 0.000001 )
1929 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
1930 vinfos[0].jointtype = 1;
1931 vinfos[0].foffset = j0;
1932 vinfos[0].indices[0] = _ij0[0];
1933 vinfos[0].indices[1] = _ij0[1];
1934 vinfos[0].maxsolutions = _nj0;
1935 vinfos[1].jointtype = 1;
1936 vinfos[1].foffset = j1;
1937 vinfos[1].indices[0] = _ij1[0];
1938 vinfos[1].indices[1] = _ij1[1];
1939 vinfos[1].maxsolutions = _nj1;
1940 vinfos[2].jointtype = 1;
1941 vinfos[2].foffset = j2;
1942 vinfos[2].indices[0] = _ij2[0];
1943 vinfos[2].indices[1] = _ij2[1];
1944 vinfos[2].maxsolutions = _nj2;
1945 vinfos[3].jointtype = 1;
1946 vinfos[3].foffset = j3;
1947 vinfos[3].indices[0] = _ij3[0];
1948 vinfos[3].indices[1] = _ij3[1];
1949 vinfos[3].maxsolutions = _nj3;
1950 vinfos[4].jointtype = 1;
1951 vinfos[4].foffset = j4;
1952 vinfos[4].indices[0] = _ij4[0];
1953 vinfos[4].indices[1] = _ij4[1];
1954 vinfos[4].maxsolutions = _nj4;
1955 vinfos[5].jointtype = 1;
1956 vinfos[5].foffset = j5;
1957 vinfos[5].indices[0] = _ij5[0];
1958 vinfos[5].indices[1] = _ij5[1];
1959 vinfos[5].maxsolutions = _nj5;
1960 std::vector<int> vfree(0);
1973 IkReal j5array[1], cj5array[1], sj5array[1];
1974 bool j5valid[1]={
false};
1978 j5array[0]=
IKatan2(((gconst4)*(new_r21)), ((IkReal(-1.00000000000000))*(gconst4)*(new_r20)));
1979 sj5array[0]=
IKsin(j5array[0]);
1980 cj5array[0]=
IKcos(j5array[0]);
1981 if( j5array[0] >
IKPI )
1985 else if( j5array[0] < -
IKPI )
1986 { j5array[0]+=
IK2PI;
1989 for(
int ij5 = 0; ij5 < 1; ++ij5)
1995 _ij5[0] = ij5; _ij5[1] = -1;
1996 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
2000 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
2003 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
2006 IkReal x143=
IKsin(j5);
2007 IkReal x144=
IKcos(j5);
2008 IkReal x145=((IkReal(1.00000000000000))*(sj3));
2009 IkReal x146=((new_r11)*(sj3));
2010 IkReal x147=((new_r10)*(sj3));
2011 IkReal x148=((cj3)*(cj4));
2012 IkReal x149=((IkReal(1.00000000000000))*(sj4));
2013 IkReal x150=((IkReal(1.00000000000000))*(x144));
2014 IkReal x151=((IkReal(1.00000000000000))*(x143));
2015 evalcond[0]=((new_r20)+(((sj4)*(x144))));
2016 evalcond[1]=((new_r21)+(((IkReal(-1.00000000000000))*(x143)*(x149))));
2017 evalcond[2]=((((IkReal(-1.00000000000000))*(new_r00)*(x145)))+(((cj3)*(new_r10)))+(((IkReal(-1.00000000000000))*(x151))));
2018 evalcond[3]=((((IkReal(-1.00000000000000))*(new_r01)*(x145)))+(((cj3)*(new_r11)))+(((IkReal(-1.00000000000000))*(x150))));
2019 evalcond[4]=((((cj4)*(x143)))+(x146)+(((cj3)*(new_r01))));
2020 evalcond[5]=((((IkReal(-1.00000000000000))*(cj4)*(x150)))+(x147)+(((cj3)*(new_r00))));
2021 evalcond[6]=((((cj4)*(x146)))+(((IkReal(-1.00000000000000))*(new_r21)*(x149)))+(((new_r01)*(x148)))+(x143));
2022 evalcond[7]=((((cj4)*(x147)))+(((IkReal(-1.00000000000000))*(new_r20)*(x149)))+(((new_r00)*(x148)))+(((IkReal(-1.00000000000000))*(x150))));
2023 if(
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 ||
IKabs(evalcond[2]) > 0.000001 ||
IKabs(evalcond[3]) > 0.000001 ||
IKabs(evalcond[4]) > 0.000001 ||
IKabs(evalcond[5]) > 0.000001 ||
IKabs(evalcond[6]) > 0.000001 ||
IKabs(evalcond[7]) > 0.000001 )
2030 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
2031 vinfos[0].jointtype = 1;
2032 vinfos[0].foffset = j0;
2033 vinfos[0].indices[0] = _ij0[0];
2034 vinfos[0].indices[1] = _ij0[1];
2035 vinfos[0].maxsolutions = _nj0;
2036 vinfos[1].jointtype = 1;
2037 vinfos[1].foffset = j1;
2038 vinfos[1].indices[0] = _ij1[0];
2039 vinfos[1].indices[1] = _ij1[1];
2040 vinfos[1].maxsolutions = _nj1;
2041 vinfos[2].jointtype = 1;
2042 vinfos[2].foffset = j2;
2043 vinfos[2].indices[0] = _ij2[0];
2044 vinfos[2].indices[1] = _ij2[1];
2045 vinfos[2].maxsolutions = _nj2;
2046 vinfos[3].jointtype = 1;
2047 vinfos[3].foffset = j3;
2048 vinfos[3].indices[0] = _ij3[0];
2049 vinfos[3].indices[1] = _ij3[1];
2050 vinfos[3].maxsolutions = _nj3;
2051 vinfos[4].jointtype = 1;
2052 vinfos[4].foffset = j4;
2053 vinfos[4].indices[0] = _ij4[0];
2054 vinfos[4].indices[1] = _ij4[1];
2055 vinfos[4].maxsolutions = _nj4;
2056 vinfos[5].jointtype = 1;
2057 vinfos[5].foffset = j5;
2058 vinfos[5].indices[0] = _ij5[0];
2059 vinfos[5].indices[1] = _ij5[1];
2060 vinfos[5].maxsolutions = _nj5;
2061 std::vector<int> vfree(0);
2080 IkReal j3array[1], cj3array[1], sj3array[1];
2081 bool j3valid[1]={
false};
2083 IkReal x152=((gconst1)*(sj4));
2086 j3array[0]=
IKatan2(((new_r12)*(x152)), ((new_r02)*(x152)));
2087 sj3array[0]=
IKsin(j3array[0]);
2088 cj3array[0]=
IKcos(j3array[0]);
2089 if( j3array[0] >
IKPI )
2093 else if( j3array[0] < -
IKPI )
2094 { j3array[0]+=
IK2PI;
2097 for(
int ij3 = 0; ij3 < 1; ++ij3)
2103 _ij3[0] = ij3; _ij3[1] = -1;
2104 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
2108 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
2111 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
2114 IkReal x153=
IKsin(j3);
2115 IkReal x154=
IKcos(j3);
2116 IkReal x155=((IkReal(1.00000000000000))*(sj4));
2117 IkReal x156=((IkReal(1.00000000000000))*(cj4));
2118 IkReal x157=((new_r02)*(x154));
2119 IkReal x158=((new_r12)*(x153));
2120 evalcond[0]=((((new_r12)*(x154)))+(((IkReal(-1.00000000000000))*(new_r02)*(x153))));
2121 evalcond[1]=((((IkReal(-1.00000000000000))*(x155)))+(x157)+(x158));
2122 evalcond[2]=((((IkReal(-1.00000000000000))*(new_r22)*(x155)))+(((cj4)*(x158)))+(((cj4)*(x157))));
2123 evalcond[3]=((((IkReal(-1.00000000000000))*(new_r10)*(x153)*(x155)))+(((IkReal(-1.00000000000000))*(new_r20)*(x156)))+(((IkReal(-1.00000000000000))*(new_r00)*(x154)*(x155))));
2124 evalcond[4]=((((IkReal(-1.00000000000000))*(new_r21)*(x156)))+(((IkReal(-1.00000000000000))*(new_r01)*(x154)*(x155)))+(((IkReal(-1.00000000000000))*(new_r11)*(x153)*(x155))));
2125 evalcond[5]=((IkReal(1.00000000000000))+(((IkReal(-1.00000000000000))*(new_r22)*(x156)))+(((IkReal(-1.00000000000000))*(x155)*(x158)))+(((IkReal(-1.00000000000000))*(x155)*(x157))));
2126 if(
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 ||
IKabs(evalcond[2]) > 0.000001 ||
IKabs(evalcond[3]) > 0.000001 ||
IKabs(evalcond[4]) > 0.000001 ||
IKabs(evalcond[5]) > 0.000001 )
2133 IkReal dummyeval[1];
2137 if(
IKabs(dummyeval[0]) < 0.0000010000000000 )
2140 IkReal dummyeval[1];
2142 if(
IKabs(dummyeval[0]) < 0.0000010000000000 )
2145 IkReal dummyeval[1];
2147 if(
IKabs(dummyeval[0]) < 0.0000010000000000 )
2150 IkReal evalcond[11];
2151 IkReal x159=((((cj3)*(new_r12)))+(((IkReal(-1.00000000000000))*(new_r02)*(sj3))));
2152 IkReal x160=((((new_r12)*(sj3)))+(((cj3)*(new_r02))));
2153 evalcond[0]=((IkReal(-3.14159265358979))+(
IKfmod(((IkReal(3.14159265358979))+(j4)), IkReal(6.28318530717959))));
2154 evalcond[1]=((IkReal(-1.00000000000000))+(new_r22));
2155 evalcond[2]=new_r20;
2156 evalcond[3]=new_r21;
2161 evalcond[8]=((IkReal(-1.00000000000000))*(new_r20));
2162 evalcond[9]=((IkReal(-1.00000000000000))*(new_r21));
2163 evalcond[10]=((IkReal(1.00000000000000))+(((IkReal(-1.00000000000000))*(new_r22))));
2164 if(
IKabs(evalcond[0]) < 0.0000010000000000 &&
IKabs(evalcond[1]) < 0.0000010000000000 &&
IKabs(evalcond[2]) < 0.0000010000000000 &&
IKabs(evalcond[3]) < 0.0000010000000000 &&
IKabs(evalcond[4]) < 0.0000010000000000 &&
IKabs(evalcond[5]) < 0.0000010000000000 &&
IKabs(evalcond[6]) < 0.0000010000000000 &&
IKabs(evalcond[7]) < 0.0000010000000000 &&
IKabs(evalcond[8]) < 0.0000010000000000 &&
IKabs(evalcond[9]) < 0.0000010000000000 &&
IKabs(evalcond[10]) < 0.0000010000000000 )
2167 IkReal j5array[1], cj5array[1], sj5array[1];
2168 bool j5valid[1]={
false};
2172 j5array[0]=
IKatan2(((((IkReal(-1.00000000000000))*(new_r11)*(sj3)))+(((IkReal(-1.00000000000000))*(cj3)*(new_r01)))), ((((new_r10)*(sj3)))+(((cj3)*(new_r00)))));
2173 sj5array[0]=
IKsin(j5array[0]);
2174 cj5array[0]=
IKcos(j5array[0]);
2175 if( j5array[0] >
IKPI )
2179 else if( j5array[0] < -
IKPI )
2180 { j5array[0]+=
IK2PI;
2183 for(
int ij5 = 0; ij5 < 1; ++ij5)
2189 _ij5[0] = ij5; _ij5[1] = -1;
2190 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
2194 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
2197 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
2200 IkReal x161=
IKsin(j5);
2201 IkReal x162=((IkReal(1.00000000000000))*(sj3));
2202 IkReal x163=((IkReal(1.00000000000000))*(
IKcos(j5)));
2203 evalcond[0]=((((cj3)*(new_r10)))+(((IkReal(-1.00000000000000))*(new_r00)*(x162)))+(((IkReal(-1.00000000000000))*(x161))));
2204 evalcond[1]=((((cj3)*(new_r11)))+(((IkReal(-1.00000000000000))*(x163)))+(((IkReal(-1.00000000000000))*(new_r01)*(x162))));
2205 evalcond[2]=((((new_r11)*(sj3)))+(x161)+(((cj3)*(new_r01))));
2206 evalcond[3]=((((new_r10)*(sj3)))+(((IkReal(-1.00000000000000))*(x163)))+(((cj3)*(new_r00))));
2207 if(
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 ||
IKabs(evalcond[2]) > 0.000001 ||
IKabs(evalcond[3]) > 0.000001 )
2214 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
2215 vinfos[0].jointtype = 1;
2216 vinfos[0].foffset = j0;
2217 vinfos[0].indices[0] = _ij0[0];
2218 vinfos[0].indices[1] = _ij0[1];
2219 vinfos[0].maxsolutions = _nj0;
2220 vinfos[1].jointtype = 1;
2221 vinfos[1].foffset = j1;
2222 vinfos[1].indices[0] = _ij1[0];
2223 vinfos[1].indices[1] = _ij1[1];
2224 vinfos[1].maxsolutions = _nj1;
2225 vinfos[2].jointtype = 1;
2226 vinfos[2].foffset = j2;
2227 vinfos[2].indices[0] = _ij2[0];
2228 vinfos[2].indices[1] = _ij2[1];
2229 vinfos[2].maxsolutions = _nj2;
2230 vinfos[3].jointtype = 1;
2231 vinfos[3].foffset = j3;
2232 vinfos[3].indices[0] = _ij3[0];
2233 vinfos[3].indices[1] = _ij3[1];
2234 vinfos[3].maxsolutions = _nj3;
2235 vinfos[4].jointtype = 1;
2236 vinfos[4].foffset = j4;
2237 vinfos[4].indices[0] = _ij4[0];
2238 vinfos[4].indices[1] = _ij4[1];
2239 vinfos[4].maxsolutions = _nj4;
2240 vinfos[5].jointtype = 1;
2241 vinfos[5].foffset = j5;
2242 vinfos[5].indices[0] = _ij5[0];
2243 vinfos[5].indices[1] = _ij5[1];
2244 vinfos[5].maxsolutions = _nj5;
2245 std::vector<int> vfree(0);
2253 IkReal x164=((IkReal(1.00000000000000))+(new_r22));
2254 IkReal x165=((new_r12)*(sj3));
2255 IkReal x166=((IkReal(1.00000000000000))*(new_r02));
2256 IkReal x167=((((cj3)*(new_r12)))+(((IkReal(-1.00000000000000))*(sj3)*(x166))));
2257 evalcond[0]=((IkReal(-3.14159265358979))+(
IKfmod(j4, IkReal(6.28318530717959))));
2259 evalcond[2]=new_r20;
2260 evalcond[3]=new_r21;
2263 evalcond[6]=((x165)+(((cj3)*(new_r02))));
2264 evalcond[7]=((((IkReal(-1.00000000000000))*(cj3)*(x166)))+(((IkReal(-1.00000000000000))*(x165))));
2265 evalcond[8]=new_r20;
2266 evalcond[9]=new_r21;
2268 if(
IKabs(evalcond[0]) < 0.0000010000000000 &&
IKabs(evalcond[1]) < 0.0000010000000000 &&
IKabs(evalcond[2]) < 0.0000010000000000 &&
IKabs(evalcond[3]) < 0.0000010000000000 &&
IKabs(evalcond[4]) < 0.0000010000000000 &&
IKabs(evalcond[5]) < 0.0000010000000000 &&
IKabs(evalcond[6]) < 0.0000010000000000 &&
IKabs(evalcond[7]) < 0.0000010000000000 &&
IKabs(evalcond[8]) < 0.0000010000000000 &&
IKabs(evalcond[9]) < 0.0000010000000000 &&
IKabs(evalcond[10]) < 0.0000010000000000 )
2271 IkReal j5array[1], cj5array[1], sj5array[1];
2272 bool j5valid[1]={
false};
2276 j5array[0]=
IKatan2(((((new_r11)*(sj3)))+(((cj3)*(new_r01)))), ((((IkReal(-1.00000000000000))*(cj3)*(new_r00)))+(((IkReal(-1.00000000000000))*(new_r10)*(sj3)))));
2277 sj5array[0]=
IKsin(j5array[0]);
2278 cj5array[0]=
IKcos(j5array[0]);
2279 if( j5array[0] >
IKPI )
2283 else if( j5array[0] < -
IKPI )
2284 { j5array[0]+=
IK2PI;
2287 for(
int ij5 = 0; ij5 < 1; ++ij5)
2293 _ij5[0] = ij5; _ij5[1] = -1;
2294 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
2298 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
2301 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
2304 IkReal x168=
IKcos(j5);
2305 IkReal x169=((IkReal(1.00000000000000))*(sj3));
2306 IkReal x170=((IkReal(1.00000000000000))*(
IKsin(j5)));
2307 evalcond[0]=((((IkReal(-1.00000000000000))*(new_r00)*(x169)))+(((cj3)*(new_r10)))+(((IkReal(-1.00000000000000))*(x170))));
2308 evalcond[1]=((((IkReal(-1.00000000000000))*(new_r01)*(x169)))+(((cj3)*(new_r11)))+(((IkReal(-1.00000000000000))*(x168))));
2309 evalcond[2]=((((new_r11)*(sj3)))+(((IkReal(-1.00000000000000))*(x170)))+(((cj3)*(new_r01))));
2310 evalcond[3]=((x168)+(((new_r10)*(sj3)))+(((cj3)*(new_r00))));
2311 if(
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 ||
IKabs(evalcond[2]) > 0.000001 ||
IKabs(evalcond[3]) > 0.000001 )
2318 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
2319 vinfos[0].jointtype = 1;
2320 vinfos[0].foffset = j0;
2321 vinfos[0].indices[0] = _ij0[0];
2322 vinfos[0].indices[1] = _ij0[1];
2323 vinfos[0].maxsolutions = _nj0;
2324 vinfos[1].jointtype = 1;
2325 vinfos[1].foffset = j1;
2326 vinfos[1].indices[0] = _ij1[0];
2327 vinfos[1].indices[1] = _ij1[1];
2328 vinfos[1].maxsolutions = _nj1;
2329 vinfos[2].jointtype = 1;
2330 vinfos[2].foffset = j2;
2331 vinfos[2].indices[0] = _ij2[0];
2332 vinfos[2].indices[1] = _ij2[1];
2333 vinfos[2].maxsolutions = _nj2;
2334 vinfos[3].jointtype = 1;
2335 vinfos[3].foffset = j3;
2336 vinfos[3].indices[0] = _ij3[0];
2337 vinfos[3].indices[1] = _ij3[1];
2338 vinfos[3].maxsolutions = _nj3;
2339 vinfos[4].jointtype = 1;
2340 vinfos[4].foffset = j4;
2341 vinfos[4].indices[0] = _ij4[0];
2342 vinfos[4].indices[1] = _ij4[1];
2343 vinfos[4].maxsolutions = _nj4;
2344 vinfos[5].jointtype = 1;
2345 vinfos[5].foffset = j5;
2346 vinfos[5].indices[0] = _ij5[0];
2347 vinfos[5].indices[1] = _ij5[1];
2348 vinfos[5].maxsolutions = _nj5;
2349 std::vector<int> vfree(0);
2371 IkReal j5array[1], cj5array[1], sj5array[1];
2372 bool j5valid[1]={
false};
2376 j5array[0]=
IKatan2(((((IkReal(-1.00000000000000))*(new_r00)*(sj3)))+(((cj3)*(new_r10)))), ((IkReal(-1.00000000000000))*(new_r20)*(((
IKabs(sj4) != 0)?((IkReal)1/(sj4)):(IkReal)1.0e30))));
2377 sj5array[0]=
IKsin(j5array[0]);
2378 cj5array[0]=
IKcos(j5array[0]);
2379 if( j5array[0] >
IKPI )
2383 else if( j5array[0] < -
IKPI )
2384 { j5array[0]+=
IK2PI;
2387 for(
int ij5 = 0; ij5 < 1; ++ij5)
2393 _ij5[0] = ij5; _ij5[1] = -1;
2394 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
2398 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
2401 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
2404 IkReal x171=
IKsin(j5);
2405 IkReal x172=
IKcos(j5);
2406 IkReal x173=((IkReal(1.00000000000000))*(sj3));
2407 IkReal x174=((new_r11)*(sj3));
2408 IkReal x175=((new_r10)*(sj3));
2409 IkReal x176=((cj3)*(cj4));
2410 IkReal x177=((IkReal(1.00000000000000))*(sj4));
2411 IkReal x178=((IkReal(1.00000000000000))*(x172));
2412 IkReal x179=((IkReal(1.00000000000000))*(x171));
2413 evalcond[0]=((new_r20)+(((sj4)*(x172))));
2414 evalcond[1]=((((IkReal(-1.00000000000000))*(x171)*(x177)))+(new_r21));
2415 evalcond[2]=((((IkReal(-1.00000000000000))*(x179)))+(((cj3)*(new_r10)))+(((IkReal(-1.00000000000000))*(new_r00)*(x173))));
2416 evalcond[3]=((((IkReal(-1.00000000000000))*(x178)))+(((cj3)*(new_r11)))+(((IkReal(-1.00000000000000))*(new_r01)*(x173))));
2417 evalcond[4]=((x174)+(((cj4)*(x171)))+(((cj3)*(new_r01))));
2418 evalcond[5]=((((IkReal(-1.00000000000000))*(cj4)*(x178)))+(x175)+(((cj3)*(new_r00))));
2419 evalcond[6]=((x171)+(((IkReal(-1.00000000000000))*(new_r21)*(x177)))+(((new_r01)*(x176)))+(((cj4)*(x174))));
2420 evalcond[7]=((((IkReal(-1.00000000000000))*(x178)))+(((new_r00)*(x176)))+(((IkReal(-1.00000000000000))*(new_r20)*(x177)))+(((cj4)*(x175))));
2421 if(
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 ||
IKabs(evalcond[2]) > 0.000001 ||
IKabs(evalcond[3]) > 0.000001 ||
IKabs(evalcond[4]) > 0.000001 ||
IKabs(evalcond[5]) > 0.000001 ||
IKabs(evalcond[6]) > 0.000001 ||
IKabs(evalcond[7]) > 0.000001 )
2428 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
2429 vinfos[0].jointtype = 1;
2430 vinfos[0].foffset = j0;
2431 vinfos[0].indices[0] = _ij0[0];
2432 vinfos[0].indices[1] = _ij0[1];
2433 vinfos[0].maxsolutions = _nj0;
2434 vinfos[1].jointtype = 1;
2435 vinfos[1].foffset = j1;
2436 vinfos[1].indices[0] = _ij1[0];
2437 vinfos[1].indices[1] = _ij1[1];
2438 vinfos[1].maxsolutions = _nj1;
2439 vinfos[2].jointtype = 1;
2440 vinfos[2].foffset = j2;
2441 vinfos[2].indices[0] = _ij2[0];
2442 vinfos[2].indices[1] = _ij2[1];
2443 vinfos[2].maxsolutions = _nj2;
2444 vinfos[3].jointtype = 1;
2445 vinfos[3].foffset = j3;
2446 vinfos[3].indices[0] = _ij3[0];
2447 vinfos[3].indices[1] = _ij3[1];
2448 vinfos[3].maxsolutions = _nj3;
2449 vinfos[4].jointtype = 1;
2450 vinfos[4].foffset = j4;
2451 vinfos[4].indices[0] = _ij4[0];
2452 vinfos[4].indices[1] = _ij4[1];
2453 vinfos[4].maxsolutions = _nj4;
2454 vinfos[5].jointtype = 1;
2455 vinfos[5].foffset = j5;
2456 vinfos[5].indices[0] = _ij5[0];
2457 vinfos[5].indices[1] = _ij5[1];
2458 vinfos[5].maxsolutions = _nj5;
2459 std::vector<int> vfree(0);
2472 IkReal j5array[1], cj5array[1], sj5array[1];
2473 bool j5valid[1]={
false};
2477 j5array[0]=
IKatan2(((new_r21)*(((
IKabs(sj4) != 0)?((IkReal)1/(sj4)):(IkReal)1.0e30))), ((((IkReal(-1.00000000000000))*(new_r01)*(sj3)))+(((cj3)*(new_r11)))));
2478 sj5array[0]=
IKsin(j5array[0]);
2479 cj5array[0]=
IKcos(j5array[0]);
2480 if( j5array[0] >
IKPI )
2484 else if( j5array[0] < -
IKPI )
2485 { j5array[0]+=
IK2PI;
2488 for(
int ij5 = 0; ij5 < 1; ++ij5)
2494 _ij5[0] = ij5; _ij5[1] = -1;
2495 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
2499 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
2502 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
2505 IkReal x180=
IKsin(j5);
2506 IkReal x181=
IKcos(j5);
2507 IkReal x182=((IkReal(1.00000000000000))*(sj3));
2508 IkReal x183=((new_r11)*(sj3));
2509 IkReal x184=((new_r10)*(sj3));
2510 IkReal x185=((cj3)*(cj4));
2511 IkReal x186=((IkReal(1.00000000000000))*(sj4));
2512 IkReal x187=((IkReal(1.00000000000000))*(x181));
2513 IkReal x188=((IkReal(1.00000000000000))*(x180));
2514 evalcond[0]=((new_r20)+(((sj4)*(x181))));
2515 evalcond[1]=((new_r21)+(((IkReal(-1.00000000000000))*(x180)*(x186))));
2516 evalcond[2]=((((IkReal(-1.00000000000000))*(x188)))+(((IkReal(-1.00000000000000))*(new_r00)*(x182)))+(((cj3)*(new_r10))));
2517 evalcond[3]=((((cj3)*(new_r11)))+(((IkReal(-1.00000000000000))*(x187)))+(((IkReal(-1.00000000000000))*(new_r01)*(x182))));
2518 evalcond[4]=((x183)+(((cj4)*(x180)))+(((cj3)*(new_r01))));
2519 evalcond[5]=((((IkReal(-1.00000000000000))*(cj4)*(x187)))+(x184)+(((cj3)*(new_r00))));
2520 evalcond[6]=((((IkReal(-1.00000000000000))*(new_r21)*(x186)))+(((cj4)*(x183)))+(x180)+(((new_r01)*(x185))));
2521 evalcond[7]=((((cj4)*(x184)))+(((IkReal(-1.00000000000000))*(x187)))+(((new_r00)*(x185)))+(((IkReal(-1.00000000000000))*(new_r20)*(x186))));
2522 if(
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 ||
IKabs(evalcond[2]) > 0.000001 ||
IKabs(evalcond[3]) > 0.000001 ||
IKabs(evalcond[4]) > 0.000001 ||
IKabs(evalcond[5]) > 0.000001 ||
IKabs(evalcond[6]) > 0.000001 ||
IKabs(evalcond[7]) > 0.000001 )
2529 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
2530 vinfos[0].jointtype = 1;
2531 vinfos[0].foffset = j0;
2532 vinfos[0].indices[0] = _ij0[0];
2533 vinfos[0].indices[1] = _ij0[1];
2534 vinfos[0].maxsolutions = _nj0;
2535 vinfos[1].jointtype = 1;
2536 vinfos[1].foffset = j1;
2537 vinfos[1].indices[0] = _ij1[0];
2538 vinfos[1].indices[1] = _ij1[1];
2539 vinfos[1].maxsolutions = _nj1;
2540 vinfos[2].jointtype = 1;
2541 vinfos[2].foffset = j2;
2542 vinfos[2].indices[0] = _ij2[0];
2543 vinfos[2].indices[1] = _ij2[1];
2544 vinfos[2].maxsolutions = _nj2;
2545 vinfos[3].jointtype = 1;
2546 vinfos[3].foffset = j3;
2547 vinfos[3].indices[0] = _ij3[0];
2548 vinfos[3].indices[1] = _ij3[1];
2549 vinfos[3].maxsolutions = _nj3;
2550 vinfos[4].jointtype = 1;
2551 vinfos[4].foffset = j4;
2552 vinfos[4].indices[0] = _ij4[0];
2553 vinfos[4].indices[1] = _ij4[1];
2554 vinfos[4].maxsolutions = _nj4;
2555 vinfos[5].jointtype = 1;
2556 vinfos[5].foffset = j5;
2557 vinfos[5].indices[0] = _ij5[0];
2558 vinfos[5].indices[1] = _ij5[1];
2559 vinfos[5].maxsolutions = _nj5;
2560 std::vector<int> vfree(0);
2573 IkReal j5array[1], cj5array[1], sj5array[1];
2574 bool j5valid[1]={
false};
2578 j5array[0]=
IKatan2(((gconst4)*(new_r21)), ((IkReal(-1.00000000000000))*(gconst4)*(new_r20)));
2579 sj5array[0]=
IKsin(j5array[0]);
2580 cj5array[0]=
IKcos(j5array[0]);
2581 if( j5array[0] >
IKPI )
2585 else if( j5array[0] < -
IKPI )
2586 { j5array[0]+=
IK2PI;
2589 for(
int ij5 = 0; ij5 < 1; ++ij5)
2595 _ij5[0] = ij5; _ij5[1] = -1;
2596 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
2600 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
2603 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
2606 IkReal x189=
IKsin(j5);
2607 IkReal x190=
IKcos(j5);
2608 IkReal x191=((IkReal(1.00000000000000))*(sj3));
2609 IkReal x192=((new_r11)*(sj3));
2610 IkReal x193=((new_r10)*(sj3));
2611 IkReal x194=((cj3)*(cj4));
2612 IkReal x195=((IkReal(1.00000000000000))*(sj4));
2613 IkReal x196=((IkReal(1.00000000000000))*(x190));
2614 IkReal x197=((IkReal(1.00000000000000))*(x189));
2615 evalcond[0]=((new_r20)+(((sj4)*(x190))));
2616 evalcond[1]=((new_r21)+(((IkReal(-1.00000000000000))*(x189)*(x195))));
2617 evalcond[2]=((((IkReal(-1.00000000000000))*(x197)))+(((IkReal(-1.00000000000000))*(new_r00)*(x191)))+(((cj3)*(new_r10))));
2618 evalcond[3]=((((IkReal(-1.00000000000000))*(new_r01)*(x191)))+(((cj3)*(new_r11)))+(((IkReal(-1.00000000000000))*(x196))));
2619 evalcond[4]=((x192)+(((cj4)*(x189)))+(((cj3)*(new_r01))));
2620 evalcond[5]=((x193)+(((IkReal(-1.00000000000000))*(cj4)*(x196)))+(((cj3)*(new_r00))));
2621 evalcond[6]=((x189)+(((new_r01)*(x194)))+(((IkReal(-1.00000000000000))*(new_r21)*(x195)))+(((cj4)*(x192))));
2622 evalcond[7]=((((new_r00)*(x194)))+(((cj4)*(x193)))+(((IkReal(-1.00000000000000))*(new_r20)*(x195)))+(((IkReal(-1.00000000000000))*(x196))));
2623 if(
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 ||
IKabs(evalcond[2]) > 0.000001 ||
IKabs(evalcond[3]) > 0.000001 ||
IKabs(evalcond[4]) > 0.000001 ||
IKabs(evalcond[5]) > 0.000001 ||
IKabs(evalcond[6]) > 0.000001 ||
IKabs(evalcond[7]) > 0.000001 )
2630 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
2631 vinfos[0].jointtype = 1;
2632 vinfos[0].foffset = j0;
2633 vinfos[0].indices[0] = _ij0[0];
2634 vinfos[0].indices[1] = _ij0[1];
2635 vinfos[0].maxsolutions = _nj0;
2636 vinfos[1].jointtype = 1;
2637 vinfos[1].foffset = j1;
2638 vinfos[1].indices[0] = _ij1[0];
2639 vinfos[1].indices[1] = _ij1[1];
2640 vinfos[1].maxsolutions = _nj1;
2641 vinfos[2].jointtype = 1;
2642 vinfos[2].foffset = j2;
2643 vinfos[2].indices[0] = _ij2[0];
2644 vinfos[2].indices[1] = _ij2[1];
2645 vinfos[2].maxsolutions = _nj2;
2646 vinfos[3].jointtype = 1;
2647 vinfos[3].foffset = j3;
2648 vinfos[3].indices[0] = _ij3[0];
2649 vinfos[3].indices[1] = _ij3[1];
2650 vinfos[3].maxsolutions = _nj3;
2651 vinfos[4].jointtype = 1;
2652 vinfos[4].foffset = j4;
2653 vinfos[4].indices[0] = _ij4[0];
2654 vinfos[4].indices[1] = _ij4[1];
2655 vinfos[4].maxsolutions = _nj4;
2656 vinfos[5].jointtype = 1;
2657 vinfos[5].foffset = j5;
2658 vinfos[5].indices[0] = _ij5[0];
2659 vinfos[5].indices[1] = _ij5[1];
2660 vinfos[5].maxsolutions = _nj5;
2661 std::vector<int> vfree(0);
2680 IkReal j5array[1], cj5array[1], sj5array[1];
2681 bool j5valid[1]={
false};
2685 j5array[0]=
IKatan2(((gconst3)*(new_r21)), ((IkReal(-1.00000000000000))*(gconst3)*(new_r20)));
2686 sj5array[0]=
IKsin(j5array[0]);
2687 cj5array[0]=
IKcos(j5array[0]);
2688 if( j5array[0] >
IKPI )
2692 else if( j5array[0] < -
IKPI )
2693 { j5array[0]+=
IK2PI;
2696 for(
int ij5 = 0; ij5 < 1; ++ij5)
2702 _ij5[0] = ij5; _ij5[1] = -1;
2703 for(
int iij5 = ij5+1; iij5 < 1; ++iij5)
2707 j5valid[iij5]=
false; _ij5[1] = iij5;
break;
2710 j5 = j5array[ij5]; cj5 = cj5array[ij5]; sj5 = sj5array[ij5];
2713 evalcond[0]=((new_r20)+(((sj4)*(
IKcos(j5)))));
2714 evalcond[1]=((((IkReal(-1.00000000000000))*(sj4)*(
IKsin(j5))))+(new_r21));
2715 if(
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 )
2722 IkReal dummyeval[1];
2724 gconst5=
IKsign((((new_r12)*(new_r12))+((new_r02)*(new_r02))));
2725 dummyeval[0]=(((new_r12)*(new_r12))+((new_r02)*(new_r02)));
2726 if(
IKabs(dummyeval[0]) < 0.0000010000000000 )
2729 IkReal dummyeval[1];
2731 gconst6=
IKsign(((((IkReal(-1.00000000000000))*(new_r01)*(new_r02)))+(((IkReal(-1.00000000000000))*(new_r11)*(new_r12)))));
2732 dummyeval[0]=((((IkReal(-1.00000000000000))*(new_r01)*(new_r02)))+(((IkReal(-1.00000000000000))*(new_r11)*(new_r12))));
2733 if(
IKabs(dummyeval[0]) < 0.0000010000000000 )
2740 IkReal j3array[1], cj3array[1], sj3array[1];
2741 bool j3valid[1]={
false};
2743 IkReal x198=((cj4)*(gconst6)*(sj5));
2746 j3array[0]=
IKatan2(((new_r12)*(x198)), ((new_r02)*(x198)));
2747 sj3array[0]=
IKsin(j3array[0]);
2748 cj3array[0]=
IKcos(j3array[0]);
2749 if( j3array[0] >
IKPI )
2753 else if( j3array[0] < -
IKPI )
2754 { j3array[0]+=
IK2PI;
2757 for(
int ij3 = 0; ij3 < 1; ++ij3)
2763 _ij3[0] = ij3; _ij3[1] = -1;
2764 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
2768 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
2771 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
2773 IkReal evalcond[12];
2774 IkReal x199=
IKsin(j3);
2775 IkReal x200=
IKcos(j3);
2776 IkReal x201=((IkReal(1.00000000000000))*(cj5));
2777 IkReal x202=((IkReal(1.00000000000000))*(cj4));
2778 IkReal x203=((IkReal(1.00000000000000))*(sj4));
2779 IkReal x204=((cj4)*(x200));
2780 IkReal x205=((cj4)*(x199));
2781 IkReal x206=((new_r00)*(x200));
2782 IkReal x207=((new_r11)*(x199));
2783 IkReal x208=((new_r02)*(x200));
2784 IkReal x209=((new_r01)*(x200));
2785 IkReal x210=((new_r12)*(x199));
2786 IkReal x211=((IkReal(1.00000000000000))*(x199));
2787 IkReal x212=((new_r10)*(x199));
2788 evalcond[0]=((((IkReal(-1.00000000000000))*(new_r02)*(x211)))+(((new_r12)*(x200))));
2789 evalcond[1]=((((IkReal(-1.00000000000000))*(x203)))+(x210)+(x208));
2790 evalcond[2]=((((IkReal(-1.00000000000000))*(new_r00)*(x211)))+(((new_r10)*(x200)))+(((IkReal(-1.00000000000000))*(sj5))));
2791 evalcond[3]=((((new_r11)*(x200)))+(((IkReal(-1.00000000000000))*(new_r01)*(x211)))+(((IkReal(-1.00000000000000))*(x201))));
2792 evalcond[4]=((x207)+(x209)+(((cj4)*(sj5))));
2793 evalcond[5]=((((IkReal(-1.00000000000000))*(cj4)*(x201)))+(x212)+(x206));
2794 evalcond[6]=((((new_r12)*(x205)))+(((new_r02)*(x204)))+(((IkReal(-1.00000000000000))*(new_r22)*(x203))));
2795 evalcond[7]=((((IkReal(-1.00000000000000))*(new_r20)*(x202)))+(((IkReal(-1.00000000000000))*(x203)*(x206)))+(((IkReal(-1.00000000000000))*(x203)*(x212))));
2796 evalcond[8]=((((IkReal(-1.00000000000000))*(x203)*(x209)))+(((IkReal(-1.00000000000000))*(new_r21)*(x202)))+(((IkReal(-1.00000000000000))*(x203)*(x207))));
2797 evalcond[9]=((((new_r11)*(x205)))+(sj5)+(((IkReal(-1.00000000000000))*(new_r21)*(x203)))+(((new_r01)*(x204))));
2798 evalcond[10]=((IkReal(1.00000000000000))+(((IkReal(-1.00000000000000))*(new_r22)*(x202)))+(((IkReal(-1.00000000000000))*(x203)*(x210)))+(((IkReal(-1.00000000000000))*(x203)*(x208))));
2799 evalcond[11]=((((new_r00)*(x204)))+(((IkReal(-1.00000000000000))*(new_r20)*(x203)))+(((new_r10)*(x205)))+(((IkReal(-1.00000000000000))*(x201))));
2800 if(
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 ||
IKabs(evalcond[2]) > 0.000001 ||
IKabs(evalcond[3]) > 0.000001 ||
IKabs(evalcond[4]) > 0.000001 ||
IKabs(evalcond[5]) > 0.000001 ||
IKabs(evalcond[6]) > 0.000001 ||
IKabs(evalcond[7]) > 0.000001 ||
IKabs(evalcond[8]) > 0.000001 ||
IKabs(evalcond[9]) > 0.000001 ||
IKabs(evalcond[10]) > 0.000001 ||
IKabs(evalcond[11]) > 0.000001 )
2807 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
2808 vinfos[0].jointtype = 1;
2809 vinfos[0].foffset = j0;
2810 vinfos[0].indices[0] = _ij0[0];
2811 vinfos[0].indices[1] = _ij0[1];
2812 vinfos[0].maxsolutions = _nj0;
2813 vinfos[1].jointtype = 1;
2814 vinfos[1].foffset = j1;
2815 vinfos[1].indices[0] = _ij1[0];
2816 vinfos[1].indices[1] = _ij1[1];
2817 vinfos[1].maxsolutions = _nj1;
2818 vinfos[2].jointtype = 1;
2819 vinfos[2].foffset = j2;
2820 vinfos[2].indices[0] = _ij2[0];
2821 vinfos[2].indices[1] = _ij2[1];
2822 vinfos[2].maxsolutions = _nj2;
2823 vinfos[3].jointtype = 1;
2824 vinfos[3].foffset = j3;
2825 vinfos[3].indices[0] = _ij3[0];
2826 vinfos[3].indices[1] = _ij3[1];
2827 vinfos[3].maxsolutions = _nj3;
2828 vinfos[4].jointtype = 1;
2829 vinfos[4].foffset = j4;
2830 vinfos[4].indices[0] = _ij4[0];
2831 vinfos[4].indices[1] = _ij4[1];
2832 vinfos[4].maxsolutions = _nj4;
2833 vinfos[5].jointtype = 1;
2834 vinfos[5].foffset = j5;
2835 vinfos[5].indices[0] = _ij5[0];
2836 vinfos[5].indices[1] = _ij5[1];
2837 vinfos[5].maxsolutions = _nj5;
2838 std::vector<int> vfree(0);
2851 IkReal j3array[1], cj3array[1], sj3array[1];
2852 bool j3valid[1]={
false};
2854 IkReal x213=((gconst5)*(sj4));
2857 j3array[0]=
IKatan2(((new_r12)*(x213)), ((new_r02)*(x213)));
2858 sj3array[0]=
IKsin(j3array[0]);
2859 cj3array[0]=
IKcos(j3array[0]);
2860 if( j3array[0] >
IKPI )
2864 else if( j3array[0] < -
IKPI )
2865 { j3array[0]+=
IK2PI;
2868 for(
int ij3 = 0; ij3 < 1; ++ij3)
2874 _ij3[0] = ij3; _ij3[1] = -1;
2875 for(
int iij3 = ij3+1; iij3 < 1; ++iij3)
2879 j3valid[iij3]=
false; _ij3[1] = iij3;
break;
2882 j3 = j3array[ij3]; cj3 = cj3array[ij3]; sj3 = sj3array[ij3];
2884 IkReal evalcond[12];
2885 IkReal x214=
IKsin(j3);
2886 IkReal x215=
IKcos(j3);
2887 IkReal x216=((IkReal(1.00000000000000))*(cj5));
2888 IkReal x217=((IkReal(1.00000000000000))*(cj4));
2889 IkReal x218=((IkReal(1.00000000000000))*(sj4));
2890 IkReal x219=((cj4)*(x215));
2891 IkReal x220=((cj4)*(x214));
2892 IkReal x221=((new_r00)*(x215));
2893 IkReal x222=((new_r11)*(x214));
2894 IkReal x223=((new_r02)*(x215));
2895 IkReal x224=((new_r01)*(x215));
2896 IkReal x225=((new_r12)*(x214));
2897 IkReal x226=((IkReal(1.00000000000000))*(x214));
2898 IkReal x227=((new_r10)*(x214));
2899 evalcond[0]=((((IkReal(-1.00000000000000))*(new_r02)*(x226)))+(((new_r12)*(x215))));
2900 evalcond[1]=((((IkReal(-1.00000000000000))*(x218)))+(x223)+(x225));
2901 evalcond[2]=((((new_r10)*(x215)))+(((IkReal(-1.00000000000000))*(new_r00)*(x226)))+(((IkReal(-1.00000000000000))*(sj5))));
2902 evalcond[3]=((((new_r11)*(x215)))+(((IkReal(-1.00000000000000))*(new_r01)*(x226)))+(((IkReal(-1.00000000000000))*(x216))));
2903 evalcond[4]=((x222)+(x224)+(((cj4)*(sj5))));
2904 evalcond[5]=((((IkReal(-1.00000000000000))*(cj4)*(x216)))+(x221)+(x227));
2905 evalcond[6]=((((new_r12)*(x220)))+(((IkReal(-1.00000000000000))*(new_r22)*(x218)))+(((new_r02)*(x219))));
2906 evalcond[7]=((((IkReal(-1.00000000000000))*(new_r20)*(x217)))+(((IkReal(-1.00000000000000))*(x218)*(x227)))+(((IkReal(-1.00000000000000))*(x218)*(x221))));
2907 evalcond[8]=((((IkReal(-1.00000000000000))*(x218)*(x222)))+(((IkReal(-1.00000000000000))*(new_r21)*(x217)))+(((IkReal(-1.00000000000000))*(x218)*(x224))));
2908 evalcond[9]=((((new_r01)*(x219)))+(((IkReal(-1.00000000000000))*(new_r21)*(x218)))+(sj5)+(((new_r11)*(x220))));
2909 evalcond[10]=((IkReal(1.00000000000000))+(((IkReal(-1.00000000000000))*(x218)*(x223)))+(((IkReal(-1.00000000000000))*(new_r22)*(x217)))+(((IkReal(-1.00000000000000))*(x218)*(x225))));
2910 evalcond[11]=((((new_r00)*(x219)))+(((IkReal(-1.00000000000000))*(new_r20)*(x218)))+(((IkReal(-1.00000000000000))*(x216)))+(((new_r10)*(x220))));
2911 if(
IKabs(evalcond[0]) > 0.000001 ||
IKabs(evalcond[1]) > 0.000001 ||
IKabs(evalcond[2]) > 0.000001 ||
IKabs(evalcond[3]) > 0.000001 ||
IKabs(evalcond[4]) > 0.000001 ||
IKabs(evalcond[5]) > 0.000001 ||
IKabs(evalcond[6]) > 0.000001 ||
IKabs(evalcond[7]) > 0.000001 ||
IKabs(evalcond[8]) > 0.000001 ||
IKabs(evalcond[9]) > 0.000001 ||
IKabs(evalcond[10]) > 0.000001 ||
IKabs(evalcond[11]) > 0.000001 )
2918 std::vector<IkSingleDOFSolutionBase<IkReal> > vinfos(6);
2919 vinfos[0].jointtype = 1;
2920 vinfos[0].foffset = j0;
2921 vinfos[0].indices[0] = _ij0[0];
2922 vinfos[0].indices[1] = _ij0[1];
2923 vinfos[0].maxsolutions = _nj0;
2924 vinfos[1].jointtype = 1;
2925 vinfos[1].foffset = j1;
2926 vinfos[1].indices[0] = _ij1[0];
2927 vinfos[1].indices[1] = _ij1[1];
2928 vinfos[1].maxsolutions = _nj1;
2929 vinfos[2].jointtype = 1;
2930 vinfos[2].foffset = j2;
2931 vinfos[2].indices[0] = _ij2[0];
2932 vinfos[2].indices[1] = _ij2[1];
2933 vinfos[2].maxsolutions = _nj2;
2934 vinfos[3].jointtype = 1;
2935 vinfos[3].foffset = j3;
2936 vinfos[3].indices[0] = _ij3[0];
2937 vinfos[3].indices[1] = _ij3[1];
2938 vinfos[3].maxsolutions = _nj3;
2939 vinfos[4].jointtype = 1;
2940 vinfos[4].foffset = j4;
2941 vinfos[4].indices[0] = _ij4[0];
2942 vinfos[4].indices[1] = _ij4[1];
2943 vinfos[4].maxsolutions = _nj4;
2944 vinfos[5].jointtype = 1;
2945 vinfos[5].foffset = j5;
2946 vinfos[5].indices[0] = _ij5[0];
2947 vinfos[5].indices[1] = _ij5[1];
2948 vinfos[5].maxsolutions = _nj5;
2949 std::vector<int> vfree(0);
2974 return solver.
ComputeIk(eetrans,eerot,pfree,solutions);
2977 IKFAST_API
const char*
GetKinematicsHash() {
return "<robot:genericrobot - staubli_rx160 (d3ee5b9916b20168fe976c8233d52676)>"; }
2981 #ifdef IKFAST_NAMESPACE 2985 #ifndef IKFAST_NO_MAIN 2988 #ifdef IKFAST_NAMESPACE 2989 using namespace IKFAST_NAMESPACE;
2994 printf(
"\nUsage: ./ik r00 r01 r02 t0 r10 r11 r12 t1 r20 r21 r22 t2 free0 ...\n\n" 2995 "Returns the ik solutions given the transformation of the end effector specified by\n" 2996 "a 3x3 rotation R (rXX), and a 3x1 translation (tX).\n" 3003 IkReal eerot[9],eetrans[3];
3004 eerot[0] = atof(argv[1]); eerot[1] = atof(argv[2]); eerot[2] = atof(argv[3]); eetrans[0] = atof(argv[4]);
3005 eerot[3] = atof(argv[5]); eerot[4] = atof(argv[6]); eerot[5] = atof(argv[7]); eetrans[1] = atof(argv[8]);
3006 eerot[6] = atof(argv[9]); eerot[7] = atof(argv[10]); eerot[8] = atof(argv[11]); eetrans[2] = atof(argv[12]);
3007 for(std::size_t i = 0; i < vfree.size(); ++i)
3008 vfree[i] = atof(argv[13+i]);
3009 bool bSuccess =
ComputeIk(eetrans, eerot, vfree.size() > 0 ? &vfree[0] : NULL, solutions);
3012 fprintf(stderr,
"Failed to get ik solution\n");
3020 printf(
"sol%d (free=%d): ", (
int)i, (
int)sol.
GetFree().size());
3021 std::vector<IkReal> vsolfree(sol.
GetFree().size());
3022 sol.
GetSolution(&solvalues[0],vsolfree.size()>0?&vsolfree[0]:NULL);
3023 for( std::size_t j = 0; j < solvalues.size(); ++j)
3024 printf(
"%.15f, ", solvalues[j]);
virtual const IkSolutionBase< T > & GetSolution(size_t index) const
returns the solution pointer
IKFAST_API int * GetFreeParameters()
void dgetrs_(const char *trans, const int *n, const int *nrhs, double *a, const int *lda, int *ipiv, double *b, const int *ldb, int *info)
void dgesv_(const int *n, const int *nrhs, double *a, const int *lda, int *ipiv, double *b, const int *ldb, int *info)
INLINE Rall1d< T, V, S > log(const Rall1d< T, V, S > &arg)
virtual size_t GetNumSolutions() const
returns the number of solutions stored
The discrete solutions are returned in this structure.
IKFAST_API int GetNumJoints()
virtual const std::vector< int > & GetFree() const =0
Gets the indices of the configuration space that have to be preset before a full solution can be retu...
void rotationfunction0(IkSolutionListBase< IkReal > &solutions)
#define IKFAST_STRINGIZE(s)
void dgetrf_(const int *m, const int *n, double *a, const int *lda, int *ipiv, int *info)
virtual size_t AddSolution(const std::vector< IkSingleDOFSolutionBase< T > > &vinfos, const std::vector< int > &vfree)=0
add one solution and return its index for later retrieval
#define IKFAST_ATAN2_MAGTHRESH
#define IKFAST_SOLUTION_THRESH
IKFAST_API int GetNumFreeParameters()
INLINE Rall1d< T, V, S > asin(const Rall1d< T, V, S > &x)
virtual void Clear()=0
clears all current solutions, note that any memory addresses returned from GetSolution will be invali...
float IKatan2(float fy, float fx)
void dgetri_(const int *n, const double *a, const int *lda, int *ipiv, double *work, const int *lwork, int *info)
IKFAST_API int GetIkType()
int main(int argc, char **argv)
INLINE Rall1d< T, V, S > sqrt(const Rall1d< T, V, S > &arg)
virtual void GetSolution(T *solution, const T *freevalues) const =0
gets a concrete solution
bool ComputeIk(const IkReal *eetrans, const IkReal *eerot, const IkReal *pfree, IkSolutionListBase< IkReal > &solutions)
#define IKFAST_SINCOS_THRESH
INLINE Rall1d< T, V, S > acos(const Rall1d< T, V, S > &x)
IKFAST_API const char * GetIkFastVersion()
Default implementation of IkSolutionListBase.
void dgeev_(const char *jobvl, const char *jobvr, const int *n, double *a, const int *lda, double *wr, double *wi, double *vl, const int *ldvl, double *vr, const int *ldvr, double *work, const int *lwork, int *info)
INLINE Rall1d< T, V, S > atan2(const Rall1d< T, V, S > &y, const Rall1d< T, V, S > &x)
float IKfmod(float x, float y)
IKFAST_API void ComputeFk(const IkReal *j, IkReal *eetrans, IkReal *eerot)
#define IKFAST_VERSION
Header file for all ikfast c++ files/shared objects.
IKFAST_API bool ComputeIk(const IkReal *eetrans, const IkReal *eerot, const IkReal *pfree, IkSolutionListBase< IkReal > &solutions)
INLINE Rall1d< T, V, S > cos(const Rall1d< T, V, S > &arg)
INLINE Rall1d< T, V, S > tan(const Rall1d< T, V, S > &arg)
IKFAST_API int GetIkRealSize()
IKFAST_API const char * GetKinematicsHash()
void zgetrf_(const int *m, const int *n, std::complex< double > *a, const int *lda, int *ipiv, int *info)
manages all the solutions
INLINE Rall1d< T, V, S > sin(const Rall1d< T, V, S > &arg)
virtual size_t GetNumSolutions() const =0
returns the number of solutions stored
#define IKFAST_COMPILE_ASSERT(x)