14 srand( (
unsigned)time( NULL ));
102 chaindyn.addSegment(segment1);
103 chaindyn.addSegment(segment2);
126 static const double scale=1;
127 static const double offset=0;
128 static const double inertiamotorA=5.0;
129 static const double inertiamotorB=3.0;
130 static const double inertiamotorC=1.0;
131 static const double damping=0;
132 static const double stiffness=0;
192 Vector(0.0,-0.3120511,-0.0038871),
198 Vector(0.0,-0.0015515,0.0),
204 Vector(0.0,0.5216809,0.0),
210 Vector(0.0,0.0119891,0.0),
216 Vector(0.0,0.0080787,0.0),
248 unsigned int nr_of_constraints = 4;
251 JntArray q_in(chain2.getNrOfJoints());
252 JntArray q_in2(chain2.getNrOfJoints());
254 for(
unsigned int i=0; i<chain2.getNrOfJoints(); i++)
259 JntArray q_out(chain2.getNrOfJoints());
260 JntArray q_out2(chain2.getNrOfJoints());
261 JntArray ff_tau(chain2.getNrOfJoints());
262 JntArray constraint_tau(chain2.getNrOfJoints());
263 Jacobian jac(chain2.getNrOfJoints());
267 Wrenches wrenches(chain2.getNrOfSegments());
268 JntSpaceInertiaMatrix m(chain2.getNrOfJoints());
270 Jacobian alpha(nr_of_constraints - 1);
271 JntArray beta(nr_of_constraints - 1);
273 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_OUT_OF_RANGE,fksolvervel.
JntToCart(q_in3, T2, chain2.getNrOfSegments()+1));
274 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_OUT_OF_RANGE, jacsolver1.
JntToJac(q_in, jac, chain2.getNrOfSegments()+1));
275 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_OUT_OF_RANGE, jacdotsolver1.
JntToJacDot(q_in3, t, chain2.getNrOfSegments()+1));
276 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_OUT_OF_RANGE, jacdotsolver1.
JntToJacDot(q_in3, jac, chain2.getNrOfSegments()+1));
280 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_NOT_UP_TO_DATE, jacdotsolver1.
JntToJacDot(q_in3, jac, chain2.getNrOfSegments()));
281 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_NOT_UP_TO_DATE, jacdotsolver1.
JntToJacDot(q_in3, t, chain2.getNrOfSegments()));
282 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_NOT_UP_TO_DATE, iksolver2.
CartToJnt(q_in,t,q_out));
283 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_NOT_UP_TO_DATE, iksolver_pinv_givens2.
CartToJnt(q_in,t,q_out));
284 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_NOT_UP_TO_DATE, iksolver_pinv_nso.
CartToJnt(q_in,t,q_out));
285 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_NOT_UP_TO_DATE, iksolver_wdls.
CartToJnt(q_in,t,q_out));
286 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_NOT_UP_TO_DATE, iksolverpos.
CartToJnt(q_in,T,q_out));
287 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_NOT_UP_TO_DATE, iksolverpos2.
CartToJnt(q_in,T,q_out));
288 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_NOT_UP_TO_DATE, iksolverpos3.
CartToJnt(q_in,T,q_out));
289 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_NOT_UP_TO_DATE, idsolver1.
CartToJnt(q_in,q_in2,q_out,wrenches,q_out2));
290 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_NOT_UP_TO_DATE, hdsolver.
CartToJnt(q_in,q_in2,q_out,alpha,beta,wrenches, ff_tau, constraint_tau));
291 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_NOT_UP_TO_DATE, dynparam.
JntToCoriolis(q_in, q_in2, q_out));
292 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_NOT_UP_TO_DATE, dynparam.
JntToGravity(q_in, q_out));
293 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_NOT_UP_TO_DATE, dynparam.
JntToMass(q_in, m));
309 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH,fksolvervel.
JntToCart(q_in3, T2, chain2.getNrOfSegments()));
310 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH, jacsolver1.
JntToJac(q_in, jac, chain2.getNrOfSegments()));
311 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH, jacdotsolver1.
JntToJacDot(q_in3, t, chain2.getNrOfSegments()));
312 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH, jacdotsolver1.
JntToJacDot(q_in3, jac, chain2.getNrOfSegments()));
313 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH, iksolver2.
CartToJnt(q_in,t,q_out));
314 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH, iksolver_pinv_givens2.
CartToJnt(q_in,t,q_out));
315 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH, iksolver_pinv_nso.
CartToJnt(q_in,t,q_out));
316 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH, iksolver_wdls.
CartToJnt(q_in,t,q_out));
317 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH, iksolverpos.
CartToJnt(q_in,T,q_out));
318 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH, iksolverpos2.
CartToJnt(q_in,T,q_out));
319 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH, iksolverpos3.
CartToJnt(q_in,T,q_out));
320 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH, idsolver1.
CartToJnt(q_in,q_in2,q_out,wrenches,q_out2));
321 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH, hdsolver.
CartToJnt(q_in,q_in2,q_out,alpha,beta,wrenches, ff_tau, constraint_tau));
322 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH, dynparam.
JntToCoriolis(q_in, q_in2, q_out));
323 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH, dynparam.
JntToGravity(q_in, q_out));
324 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH, dynparam.
JntToMass(q_in, m));
326 q_in.resize(chain2.getNrOfJoints());
327 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH, jacsolver1.
JntToJac(q_in, jac, chain2.getNrOfSegments()));
328 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH, iksolver2.
CartToJnt(q_in,t,q_out));
329 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH, iksolver_pinv_givens2.
CartToJnt(q_in,t,q_out));
330 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH, iksolver_pinv_nso.
CartToJnt(q_in,t,q_out));
331 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH, iksolver_wdls.
CartToJnt(q_in,t,q_out));
332 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH, iksolverpos.
CartToJnt(q_in,T,q_out));
333 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH, iksolverpos2.
CartToJnt(q_in,T,q_out));
334 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH, iksolverpos3.
CartToJnt(q_in,T,q_out));
335 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH, iksolverpos2.
CartToJnt(q_in,T,q_out));
336 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH, iksolverpos3.
CartToJnt(q_in,T,q_out));
337 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH, idsolver1.
CartToJnt(q_in,q_in2,q_out,wrenches,q_out2));
338 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH, hdsolver.
CartToJnt(q_in,q_in2,q_out,alpha,beta,wrenches, ff_tau, constraint_tau));
339 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH, dynparam.
JntToCoriolis(q_in, q_in2, q_out));
340 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH, dynparam.
JntToGravity(q_in, q_out));
341 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH, dynparam.
JntToMass(q_in, m));
342 q_in2.resize(chain2.getNrOfJoints());
343 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH, dynparam.
JntToCoriolis(q_in, q_in2, q_out));
344 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH, idsolver1.
CartToJnt(q_in,q_in2,q_out,wrenches,q_out2));
345 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH, hdsolver.
CartToJnt(q_in,q_in2,q_out,alpha,beta,wrenches, ff_tau, constraint_tau));
346 wrenches.resize(chain2.getNrOfSegments());
347 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH, idsolver1.
CartToJnt(q_in,q_in2,q_out,wrenches,q_out2));
348 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH, hdsolver.
CartToJnt(q_in,q_in2,q_out,alpha,beta,wrenches, ff_tau, constraint_tau));
349 q_out2.resize(chain2.getNrOfSegments());
350 ff_tau.resize(chain2.getNrOfSegments());
351 constraint_tau.resize(chain2.getNrOfSegments());
352 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH, idsolver1.
CartToJnt(q_in,q_in2,q_out,wrenches,q_out2));
353 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH, hdsolver.
CartToJnt(q_in,q_in2,q_out,alpha,beta,wrenches, ff_tau, constraint_tau));
354 alpha.resize(nr_of_constraints);
355 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH, hdsolver.
CartToJnt(q_in,q_in2,q_out,alpha,beta,wrenches, ff_tau, constraint_tau));
356 beta.
resize(nr_of_constraints);
357 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH, hdsolver.
CartToJnt(q_in,q_in2,q_out,alpha,beta,wrenches, ff_tau, constraint_tau));
358 jac.resize(chain2.getNrOfJoints());
359 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_SIZE_MISMATCH, jacdotsolver1.
JntToJacDot(q_in3, jac, chain2.getNrOfSegments()));
360 q_out.resize(chain2.getNrOfJoints());
361 q_in3.resize(chain2.getNrOfJoints());
362 m.resize(chain2.getNrOfJoints());
364 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_NOERROR,fksolvervel.
JntToCart(q_in3, T2, chain2.getNrOfSegments()));
365 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_NOERROR, jacsolver1.
JntToJac(q_in, jac, chain2.getNrOfSegments()));
366 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_NOERROR, jacdotsolver1.
JntToJacDot(q_in3, jac, chain2.getNrOfSegments()));
367 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_NOERROR, jacdotsolver1.
JntToJacDot(q_in3, t, chain2.getNrOfSegments()));
368 CPPUNIT_ASSERT((
int)SolverI::E_NOERROR <= iksolver2.
CartToJnt(q_in,t,q_out));
369 CPPUNIT_ASSERT((
int)SolverI::E_NOERROR <= iksolver_pinv_givens2.
CartToJnt(q_in,t,q_out));
370 CPPUNIT_ASSERT((
int)SolverI::E_NOERROR <= iksolver_pinv_nso.
CartToJnt(q_in,t,q_out));
371 CPPUNIT_ASSERT((
int)SolverI::E_NOERROR <= iksolver_wdls.
CartToJnt(q_in,t,q_out));
372 CPPUNIT_ASSERT((
int)SolverI::E_NOERROR <= iksolverpos.
CartToJnt(q_in,T,q_out));
373 CPPUNIT_ASSERT((
int)SolverI::E_NOERROR <= iksolverpos2.
CartToJnt(q_in,T,q_out));
374 CPPUNIT_ASSERT((
int)SolverI::E_NOERROR <= iksolverpos3.
CartToJnt(q_in,T,q_out));
375 CPPUNIT_ASSERT((
int)SolverI::E_NOERROR <= iksolverpos2.
CartToJnt(q_in,T,q_out));
376 CPPUNIT_ASSERT((
int)SolverI::E_NOERROR <= iksolverpos3.
CartToJnt(q_in,T,q_out));
377 CPPUNIT_ASSERT((
int)SolverI::E_NOERROR <= idsolver1.
CartToJnt(q_in,q_in2,q_out,wrenches,q_out2));
378 CPPUNIT_ASSERT((
int)SolverI::E_NOERROR <= hdsolver.
CartToJnt(q_in,q_in2,q_out,alpha,beta,wrenches, ff_tau, constraint_tau));
379 CPPUNIT_ASSERT((
int)SolverI::E_NOERROR <= dynparam.
JntToCoriolis(q_in, q_in2, q_out));
380 CPPUNIT_ASSERT((
int)SolverI::E_NOERROR <= dynparam.
JntToGravity(q_in, q_out));
381 CPPUNIT_ASSERT((
int)SolverI::E_NOERROR <= dynparam.
JntToMass(q_in, m));
387 FkPosAndJacLocal(chain1,fksolver1,jacsolver1);
390 FkPosAndJacLocal(chain2,fksolver2,jacsolver2);
393 FkPosAndJacLocal(chain3,fksolver3,jacsolver3);
396 FkPosAndJacLocal(chain4,fksolver4,jacsolver4);
403 FkVelAndJacLocal(chain1,fksolver1,jacsolver1);
406 FkVelAndJacLocal(chain2,fksolver2,jacsolver2);
409 FkVelAndJacLocal(chain3,fksolver3,jacsolver3);
412 FkVelAndJacLocal(chain4,fksolver4,jacsolver4);
418 std::cout<<
"square problem"<<std::endl;
422 std::cout<<
"KDL-SVD-HouseHolder"<<std::endl;
423 FkVelAndIkVelLocal(chain1,fksolver1,iksolver1);
424 std::cout<<
"KDL-SVD-Givens"<<std::endl;
425 FkVelAndIkVelLocal(chain1,fksolver1,iksolver_pinv_givens1);
428 std::cout<<
"underdetermined problem"<<std::endl;
432 std::cout<<
"KDL-SVD-HouseHolder"<<std::endl;
433 FkVelAndIkVelLocal(chain2,fksolver2,iksolver2);
434 std::cout<<
"KDL-SVD-Givens"<<std::endl;
435 FkVelAndIkVelLocal(chain2,fksolver2,iksolver_pinv_givens2);
438 std::cout<<
"overdetermined problem"<<std::endl;
442 std::cout<<
"KDL-SVD-HouseHolder"<<std::endl;
443 FkVelAndIkVelLocal(chain3,fksolver3,iksolver3);
444 std::cout<<
"KDL-SVD-Givens"<<std::endl;
445 FkVelAndIkVelLocal(chain3,fksolver3,iksolver_pinv_givens3);
448 std::cout<<
"overdetermined problem"<<std::endl;
452 std::cout<<
"KDL-SVD-HouseHolder"<<std::endl;
453 FkVelAndIkVelLocal(chain4,fksolver4,iksolver4);
454 std::cout<<
"KDL-SVD-Givens"<<std::endl;
455 FkVelAndIkVelLocal(chain4,fksolver4,iksolver_pinv_givens4);
460 std::cout<<
"square problem"<<std::endl;
467 std::cout<<
"KDL-SVD-HouseHolder"<<std::endl;
468 FkPosAndIkPosLocal(chain1,fksolver1,iksolver1);
469 std::cout<<
"KDL-SVD-Givens"<<std::endl;
470 FkPosAndIkPosLocal(chain1,fksolver1,iksolver1_givens);
472 std::cout<<
"underdetermined problem"<<std::endl;
479 std::cout<<
"KDL-SVD-HouseHolder"<<std::endl;
480 FkPosAndIkPosLocal(chain2,fksolver2,iksolver2);
481 std::cout<<
"KDL-SVD-Givens"<<std::endl;
482 FkPosAndIkPosLocal(chain2,fksolver2,iksolver2_givens);
484 std::cout<<
"overdetermined problem"<<std::endl;
491 std::cout<<
"KDL-SVD-HouseHolder"<<std::endl;
492 FkPosAndIkPosLocal(chain3,fksolver3,iksolver3);
493 std::cout<<
"KDL-SVD-Givens"<<std::endl;
494 FkPosAndIkPosLocal(chain3,fksolver3,iksolver3_givens);
496 std::cout<<
"underdetermined problem with WGs segment constructor"<<std::endl;
503 std::cout<<
"KDL-SVD-HouseHolder"<<std::endl;
504 FkPosAndIkPosLocal(chain4,fksolver4,iksolver4);
505 std::cout<<
"KDL-SVD-Givens"<<std::endl;
506 FkPosAndIkPosLocal(chain4,fksolver4,iksolver4_givens);
511 unsigned int maxiter = 30;
513 int maxiter_vel = 30;
514 double eps_vel = 0.1 ;
515 Frame F, dF, F_des,F_solved;
518 std::cout<<
"KDL-IK Solver Tests for Near Zero SVs"<<std::endl;
523 unsigned int nj = motomansia10.getNrOfJoints();
527 std::cout<<
"norminal case: convergence"<<std::endl;
540 CPPUNIT_ASSERT_EQUAL(0, fksolver.
JntToCart(q,F));
544 iksolver1.
CartToJnt(q, F_des, q_solved));
545 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_NOERROR,
547 CPPUNIT_ASSERT_EQUAL((
unsigned int)1,
550 CPPUNIT_ASSERT_EQUAL(0, fksolver.
JntToCart(q_solved,F_solved));
552 CPPUNIT_ASSERT_EQUAL(F_des,F_solved);
554 std::cout<<
"nonconvergence: pseudoinverse singular"<<std::endl;
567 CPPUNIT_ASSERT_EQUAL(0, fksolver.
JntToCart(q,F));
574 CPPUNIT_ASSERT_EQUAL((
unsigned int)2,
577 std::cout<<
"nonconvergence: large displacement, low iterations"<<std::endl;
595 CPPUNIT_ASSERT_EQUAL(0, fksolver.
JntToCart(q,F));
598 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_MAX_ITERATIONS_EXCEEDED,
600 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_NOERROR,
602 CPPUNIT_ASSERT_EQUAL((
unsigned int)1,
605 std::cout<<
"nonconvergence: fully singular"<<std::endl;
618 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_NOERROR, fksolver.
JntToCart(q,F));
621 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_MAX_ITERATIONS_EXCEEDED,
623 CPPUNIT_ASSERT_EQUAL((
int)ChainIkSolverVel_pinv::E_CONVERGE_PINV_SINGULAR,
625 CPPUNIT_ASSERT_EQUAL((
unsigned int)3,
634 double lambda = 0.1 ;
636 std::cout<<
"KDL-IK WDLS Vel Solver Tests for Near Zero SVs"<<std::endl;
640 unsigned int nj = motomansia10.getNrOfJoints();
646 std::cout<<
"smallest singular value is above threshold (no WDLS)"<<std::endl;
661 std::cout<<
"smallest singular value is below threshold (lambda is scaled)"<<std::endl;
671 std::cout<<
"smallest singular value is zero (lambda_scaled=lambda)"<<std::endl;
675 CPPUNIT_ASSERT_EQUAL((
int)ChainIkSolverVel_wdls::E_CONVERGE_PINV_SINGULAR,
684 CPPUNIT_ASSERT_EQUAL((
int)ChainIkSolverVel_wdls::E_CONVERGE_PINV_SINGULAR,
693 double deltaq = 1E-4;
707 for (
unsigned int i=0; i< q.rows() ; i++)
714 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_NOERROR, fksolverpos.
JntToCart(q,F1));
719 Vector(jac(3,i),jac(4,i),jac(5,i)));
722 CPPUNIT_ASSERT_EQUAL(Jcol1,Jcol2);
745 CPPUNIT_ASSERT_EQUAL(cart.deriv(),t);
766 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_NOERROR, iksolvervel.
CartToJnt(qvel.
q,cart.deriv(),qdot_solved));
768 qvel.
deriv()=qdot_solved;
771 CPPUNIT_ASSERT(
Equal(qvel.
qdot,qdot_solved,1e-5));
775 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_NOERROR,fksolvervel.
JntToCart(qvel,cart_solved));
776 CPPUNIT_ASSERT(
Equal(cart.deriv(),cart_solved.
deriv(),1e-5));
793 q_init(i)=q(i)+0.1*tmp;
800 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_NOERROR, iksolverpos.
CartToJnt(q_init,F1,q_solved));
801 CPPUNIT_ASSERT_EQUAL((
int)SolverI::E_NOERROR, fksolverpos.
JntToCart(q_solved,F2));
803 CPPUNIT_ASSERT_EQUAL(F1,F2);
811 std::cout <<
"KDL Vereshchagin Hybrid Dynamics Tests" <<std::endl;
833 int solver_return = 0;
836 unsigned int nj = kukaLWR.getNrOfJoints();
837 unsigned int ns = kukaLWR.getNrOfSegments();
841 CPPUNIT_ASSERT(
Equal(nj, ns));
882 f_ext[ns - 1] = f_tool;
892 int number_of_constraints = 6;
895 Jacobian alpha_unit_force(number_of_constraints);
898 Twist unit_force_x_l(
901 alpha_unit_force.
setColumn(0, unit_force_x_l);
903 Twist unit_force_y_l(
906 alpha_unit_force.
setColumn(1, unit_force_y_l);
908 Twist unit_force_z_l(
911 alpha_unit_force.
setColumn(2, unit_force_z_l);
913 Twist unit_force_x_a(
916 alpha_unit_force.
setColumn(3, unit_force_x_a);
918 Twist unit_force_y_a(
921 alpha_unit_force.
setColumn(4, unit_force_y_a);
923 Twist unit_force_z_a(
926 alpha_unit_force.
setColumn(5, unit_force_z_a);
929 JntArray beta_energy(number_of_constraints);
930 beta_energy(0) = -0.5;
931 beta_energy(1) = -0.5;
932 beta_energy(2) = 0.0;
933 beta_energy(3) = 0.0;
934 beta_energy(4) = 0.0;
935 beta_energy(5) = 0.2;
942 solver_return = vereshchaginSolver.
CartToJnt(q, qd, qdd, alpha_unit_force, beta_energy, f_ext, ff_tau, constraint_tau);
943 if (solver_return < 0) std::cout <<
"KDL: Vereshchagin solver ERROR: " << solver_return << std::endl;
950 std::vector<Twist> xDotdot(ns + 1);
953 CPPUNIT_ASSERT(
Equal(beta_energy(0), xDotdot[ns].vel(0), eps));
954 CPPUNIT_ASSERT(
Equal(beta_energy(1), xDotdot[ns].vel(1), eps));
955 CPPUNIT_ASSERT(
Equal(beta_energy(2), xDotdot[ns].vel(2), eps));
956 CPPUNIT_ASSERT(
Equal(beta_energy(5), xDotdot[ns].rot(2), eps));
960 Eigen::VectorXd nu(number_of_constraints);
962 CPPUNIT_ASSERT(
Equal(nu(0), 669693.30355, eps));
963 CPPUNIT_ASSERT(
Equal(nu(1), 5930.60826, eps));
964 CPPUNIT_ASSERT(
Equal(nu(2), -639.5238, eps));
965 CPPUNIT_ASSERT(
Equal(nu(3), 0.000, eps));
966 CPPUNIT_ASSERT(
Equal(nu(4), 0.000, eps));
967 CPPUNIT_ASSERT(
Equal(nu(5), 573.90485, eps));
972 CPPUNIT_ASSERT(
Equal(total_tau(0), 2013.3541, eps));
973 CPPUNIT_ASSERT(
Equal(total_tau(1), -6073.4999, eps));
974 CPPUNIT_ASSERT(
Equal(total_tau(2), 2227.4487, eps));
975 CPPUNIT_ASSERT(
Equal(total_tau(3), 56.87456, eps));
976 CPPUNIT_ASSERT(
Equal(total_tau(4), -11.3789, eps));
977 CPPUNIT_ASSERT(
Equal(total_tau(5), -6.05957, eps));
978 CPPUNIT_ASSERT(
Equal(total_tau(6), 569.0776, eps));
983 Vector constrainXLinear(1.0, 0.0, 0.0);
984 Vector constrainXAngular(0.0, 0.0, 0.0);
985 Vector constrainYLinear(0.0, 0.0, 0.0);
986 Vector constrainYAngular(0.0, 0.0, 0.0);
989 Twist constraintForcesX(constrainXLinear, constrainXAngular);
990 Twist constraintForcesY(constrainYLinear, constrainYAngular);
1004 Vector linearAcc(0.0, 10, 0.0);
1005 Vector angularAcc(0.0, 0.0, 0.0);
1006 Twist twist1(linearAcc, angularAcc);
1009 Vector externalForce1(0.0, 0.0, 0.0);
1010 Vector externalTorque1(0.0, 0.0, 0.0);
1011 Vector externalForce2(0.0, 0.0, 0.0);
1012 Vector externalTorque2(0.0, 0.0, 0.0);
1013 Wrench externalNetForce1(externalForce1, externalTorque1);
1014 Wrench externalNetForce2(externalForce2, externalTorque2);
1016 externalNetForce.push_back(externalNetForce1);
1017 externalNetForce.push_back(externalNetForce2);
1024 int numberOfConstraints = 1;
1037 JntArray jointConstraintTorques[k];
1038 for (
int i = 0; i < k; i++)
1040 JntArray jointValues(chaindyn.getNrOfJoints());
1041 jointPoses[i] = jointValues;
1042 jointRates[i] = jointValues;
1043 jointAccelerations[i] = jointValues;
1044 jointFFTorques[i] = jointValues;
1045 jointConstraintTorques[i] = jointValues;
1049 JntArray jointInitialPose(chaindyn.getNrOfJoints());
1050 jointInitialPose(0) = 0.0;
1051 jointInitialPose(1) =
PI/6.0;
1056 jointPoses[0](0) = jointInitialPose(0);
1057 jointPoses[0](1) = jointInitialPose(1);
1066 double taskTimeConstant = 0.1;
1067 double simulationTime = 1*taskTimeConstant;
1068 double timeDelta = 0.01;
1070 const std::string msg =
"Assertion failed, check matrix and array sizes";
1072 for (
double t = 0.0; t <=simulationTime; t = t + timeDelta)
1074 CPPUNIT_ASSERT_EQUAL((
int)
SolverI::E_NOERROR, constraintSolver.
CartToJnt(jointPoses[0], jointRates[0], jointAccelerations[0], alpha, betha, externalNetForce, jointFFTorques[0], jointConstraintTorques[0]));
1077 jointRates[0](0) = jointRates[0](0) + jointAccelerations[0](0) * timeDelta;
1078 jointPoses[0](0) = jointPoses[0](0) + (jointRates[0](0) - jointAccelerations[0](0) * timeDelta / 2.0) * timeDelta;
1079 jointRates[0](1) = jointRates[0](1) + jointAccelerations[0](1) * timeDelta;
1080 jointPoses[0](1) = jointPoses[0](1) + (jointRates[0](1) - jointAccelerations[0](1) * timeDelta / 2.0) * timeDelta;
1081 jointFFTorques[0] = jointConstraintTorques[0];
1083 printf(
"%f %f %f %f %f %f %f %f %f\n", t, jointPoses[0](0), jointPoses[0](1), jointRates[0](0), jointRates[0](1), jointAccelerations[0](0), jointAccelerations[0](1), jointConstraintTorques[0](0), jointConstraintTorques[0](1));
1090 std::vector<Frame> v_out(chain1.getNrOfSegments());
1092 JntArray q(chain1.getNrOfJoints());
1093 JntArray qdot(chain1.getNrOfJoints());
1095 for(
unsigned int i=0; i<chain1.getNrOfJoints(); i++)
1104 CPPUNIT_ASSERT(
Equal(v_out[chain1.getNrOfSegments()-1],f_out,1e-5));
1110 std::vector<FrameVel> v_out(chain1.getNrOfSegments());
1112 JntArray q(chain1.getNrOfJoints());
1113 JntArray qdot(chain1.getNrOfJoints());
1115 for(
unsigned int i=0; i<chain1.getNrOfJoints(); i++)
1125 CPPUNIT_ASSERT(
Equal(v_out[chain1.getNrOfSegments()-1],f_out,1e-5));
1133 std::cout<<
"KDL FD Solver Development Test for Motoman SIA10"<<std::endl;
1139 Vector gravity(0.0, 0.0, -9.81);
1142 unsigned int nj = motomansia10dyn.getNrOfJoints();
1143 unsigned int ns = motomansia10dyn.getNrOfSegments();
1171 CPPUNIT_ASSERT(
Equal(-0.547, f_out.
p(0), eps));
1172 CPPUNIT_ASSERT(
Equal(-0.301, f_out.
p(1), eps));
1173 CPPUNIT_ASSERT(
Equal(0.924, f_out.
p(2), eps));
1174 CPPUNIT_ASSERT(
Equal(0.503, f_out.
M(0,0), eps));
1175 CPPUNIT_ASSERT(
Equal(0.286, f_out.
M(0,1), eps));
1176 CPPUNIT_ASSERT(
Equal(-0.816, f_out.
M(0,2), eps));
1177 CPPUNIT_ASSERT(
Equal(-0.859, f_out.
M(1,0), eps));
1178 CPPUNIT_ASSERT(
Equal(0.269, f_out.
M(1,1), eps));
1179 CPPUNIT_ASSERT(
Equal(-0.436, f_out.
M(1,2), eps));
1180 CPPUNIT_ASSERT(
Equal(0.095, f_out.
M(2,0), eps));
1181 CPPUNIT_ASSERT(
Equal(0.920, f_out.
M(2,1), eps));
1182 CPPUNIT_ASSERT(
Equal(0.381, f_out.
M(2,2), eps));
1189 {{0.301,-0.553,0.185,0.019,0.007,-0.086,0.},
1190 {-0.547,-0.112,-0.139,-0.376,-0.037,0.063,0.},
1191 {0.,-0.596,0.105,-0.342,-0.026,-0.113,0.},
1192 {0.,0.199,-0.553,0.788,-0.615,0.162,-0.816},
1193 {0.,-0.980,-0.112,-0.392,-0.536,-0.803,-0.436},
1194 {1.,0.,0.825,0.475,0.578,-0.573,0.381}};
1195 for (
unsigned int i=0; i<6; i++ ) {
1196 for (
unsigned int j=0; j<nj; j++ ) {
1197 CPPUNIT_ASSERT(
Equal(jac(i,j), Jac[i][j], eps));
1204 JntSpaceInertiaMatrix H(nj), Heff(nj);
1208 if (ret < 0) std::cout <<
"KDL: inverse dynamics ERROR: " << ret << std::endl;
1209 CPPUNIT_ASSERT(
Equal(0.000, taugrav(0), eps));
1210 CPPUNIT_ASSERT(
Equal(-36.672, taugrav(1), eps));
1211 CPPUNIT_ASSERT(
Equal(4.315, taugrav(2), eps));
1212 CPPUNIT_ASSERT(
Equal(-11.205, taugrav(3), eps));
1213 CPPUNIT_ASSERT(
Equal(0.757, taugrav(4), eps));
1214 CPPUNIT_ASSERT(
Equal(1.780, taugrav(5), eps));
1215 CPPUNIT_ASSERT(
Equal(0.000, taugrav(6), eps));
1218 if (ret < 0) std::cout <<
"KDL: inverse dynamics ERROR: " << ret << std::endl;
1219 CPPUNIT_ASSERT(
Equal(-15.523, taucor(0), eps));
1220 CPPUNIT_ASSERT(
Equal(24.250, taucor(1), eps));
1221 CPPUNIT_ASSERT(
Equal(-6.862, taucor(2), eps));
1222 CPPUNIT_ASSERT(
Equal(6.303, taucor(3), eps));
1223 CPPUNIT_ASSERT(
Equal(0.110, taucor(4), eps));
1224 CPPUNIT_ASSERT(
Equal(-4.898, taucor(5), eps));
1225 CPPUNIT_ASSERT(
Equal(-0.249, taucor(6), eps));
1228 if (ret < 0) std::cout <<
"KDL: inverse dynamics ERROR: " << ret << std::endl;
1230 {{6.8687,-0.4333,0.4599,0.6892,0.0638,-0.0054,0.0381},
1231 {-0.4333,8.8324,-0.5922,0.7905,0.0003,-0.0242,0.0265},
1232 {0.4599,-0.5922,3.3496,-0.0253,0.1150,-0.0243,0.0814},
1233 {0.6892,0.7905,-0.0253,3.9623,-0.0201,0.0087,-0.0291},
1234 {0.0638,0.0003,0.1150,-0.0201,1.1234,0.0029,0.0955},
1235 {-0.0054,-0.0242,-0.0243,0.0087,0.0029,1.1425,0},
1236 {0.0381,0.0265,0.0814,-0.0291,0.0955,0,1.1000}};
1237 for (
unsigned int i=0; i<nj; i++ ) {
1238 for (
unsigned int j=0; j<nj; j++ ) {
1239 CPPUNIT_ASSERT(
Equal(H(i,j), Hexp[i][j], eps));
1257 for(
unsigned int i=0;i<ns;i++){
1265 IdSolver.
CartToJnt(q, qd, jntarraynull, f_ext, Tnoninertial);
1266 CPPUNIT_ASSERT(
Equal(-21.252, Tnoninertial(0), eps));
1267 CPPUNIT_ASSERT(
Equal(-37.933, Tnoninertial(1), eps));
1268 CPPUNIT_ASSERT(
Equal(-2.497, Tnoninertial(2), eps));
1269 CPPUNIT_ASSERT(
Equal(-15.289, Tnoninertial(3), eps));
1270 CPPUNIT_ASSERT(
Equal(-4.646, Tnoninertial(4), eps));
1271 CPPUNIT_ASSERT(
Equal(-9.201, Tnoninertial(5), eps));
1272 CPPUNIT_ASSERT(
Equal(-5.249, Tnoninertial(6), eps));
1275 Eigen::MatrixXd H_eig(nj,nj), L(nj,nj);
1276 Eigen::VectorXd Tnon_eig(nj), D(nj), r(nj), acc_eig(nj);
1277 for(
unsigned int i=0;i<nj;i++){
1278 Tnon_eig(i) = -Tnoninertial(i);
1279 for(
unsigned int j=0;j<nj;j++){
1280 H_eig(i,j) = H(i,j);
1284 for(
unsigned int i=0;i<nj;i++){
1285 qdd(i) = acc_eig(i);
1287 CPPUNIT_ASSERT(
Equal(2.998, qdd(0), eps));
1288 CPPUNIT_ASSERT(
Equal(4.289, qdd(1), eps));
1289 CPPUNIT_ASSERT(
Equal(0.946, qdd(2), eps));
1290 CPPUNIT_ASSERT(
Equal(2.518, qdd(3), eps));
1291 CPPUNIT_ASSERT(
Equal(3.530, qdd(4), eps));
1292 CPPUNIT_ASSERT(
Equal(8.150, qdd(5), eps));
1293 CPPUNIT_ASSERT(
Equal(4.254, qdd(6), eps));
1301 std::cout<<
"KDL FD Solver Consistency Test for Motoman SIA10"<<std::endl;
1306 Vector gravity(0.0, 0.0, -9.81);
1309 unsigned int nj = motomansia10dyn.getNrOfJoints();
1310 unsigned int ns = motomansia10dyn.getNrOfSegments();
1349 for(
unsigned int i=0;i<ns;i++){
1355 ret = FdSolver.
CartToJnt(q, qd, tau, f_ext, qdd);
1356 if (ret < 0) std::cout <<
"KDL: forward dynamics ERROR: " << ret << std::endl;
1357 CPPUNIT_ASSERT(
Equal(9.486, qdd(0), eps));
1358 CPPUNIT_ASSERT(
Equal(1.830, qdd(1), eps));
1359 CPPUNIT_ASSERT(
Equal(4.726, qdd(2), eps));
1360 CPPUNIT_ASSERT(
Equal(11.665, qdd(3), eps));
1361 CPPUNIT_ASSERT(
Equal(-50.108, qdd(4), eps));
1362 CPPUNIT_ASSERT(
Equal(21.403, qdd(5), eps));
1363 CPPUNIT_ASSERT(
Equal(-0.381, qdd(6), eps));
1368 IdSolver.
CartToJnt(q, qd, qdd, f_ext, torque);
1369 for (
unsigned int i=0; i<nj; i++ )
1371 CPPUNIT_ASSERT(
Equal(torque(i), tau(i), eps));
1379 std::cout<<
"LDL Solver Test"<<std::endl;
1384 Eigen::MatrixXd A(3,3), Aout(3,3);
1385 Eigen::VectorXd b(3);
1386 Eigen::MatrixXd L(3,3), Lout(3,3);
1387 Eigen::VectorXd d(3), dout(3);
1388 Eigen::VectorXd x(3), xout(3);
1389 Eigen::VectorXd r(3);
1390 Eigen::MatrixXd Dout(3,3);
1406 for(
int i=0;i<3;i++){
1407 for(
int j=0;j<3;j++){
1408 CPPUNIT_ASSERT(
Equal(L(i,j), Lout(i,j), eps));
1413 for(
int i=0;i<3;i++){
1414 Dout(i,i) = dout(i);
1418 for(
int i=0;i<3;i++){
1419 CPPUNIT_ASSERT(
Equal(xout(i), x(i), eps));
1423 Aout = Lout * Dout * Lout.transpose();
1424 for(
int i=0;i<3;i++){
1425 for(
int j=0;j<3;j++){
1426 CPPUNIT_ASSERT(
Equal(A(i,j), Aout(i,j), eps));
1438 Frame end_effector_pose;
1444 std::cout <<
"KDL FD (inverse-inertia version) and Vereshchagin Solvers Consistency Test for KUKA LWR 4 robot" << std::endl;
1448 unsigned int nj = kukaLWR.getNrOfJoints();
1449 unsigned int ns = kukaLWR.getNrOfSegments();
1453 CPPUNIT_ASSERT(
Equal(nj, ns));
1493 for(
unsigned int i=0 ;i<ns; i++)
1495 f_ext[ns - 1] = f_tool;
1499 Vector gravity(0.0, 0.0, -9.81);
1503 ret = FdSolver.
CartToJnt(q, qd, ff_tau, f_ext, qdd);
1505 std::cout <<
"KDL: forward dynamics ERROR: " << ret << std::endl;
1514 int numberOfConstraints = 6;
1515 Jacobian alpha(numberOfConstraints);
1519 JntArray beta(numberOfConstraints);
1524 Vector linearAcc(0.0, 0.0, 9.81);
Vector angularAcc(0.0, 0.0, 0.0);
1525 Twist root_Acc(linearAcc, angularAcc);
1533 fksolverpos.
JntToCart(q, end_effector_pose, kukaLWR.getNrOfSegments());
1534 f_ext[ns - 1] = end_effector_pose.
M * f_tool;
1537 ret = constraintSolver.
CartToJnt(q, qd, q_dd_Ver, alpha, beta, f_ext, ff_tau, constraint_tau);
1539 std::cout <<
"KDL: Vereshchagin solver ERROR: " << ret << std::endl;
1543 CPPUNIT_ASSERT(
Equal(q_dd_Ver(0), qdd(0), eps));
1544 CPPUNIT_ASSERT(
Equal(q_dd_Ver(1), qdd(1), eps));
1545 CPPUNIT_ASSERT(
Equal(q_dd_Ver(2), qdd(2), eps));
1546 CPPUNIT_ASSERT(
Equal(q_dd_Ver(3), qdd(3), eps));
1547 CPPUNIT_ASSERT(
Equal(q_dd_Ver(4), qdd(4), eps));
1548 CPPUNIT_ASSERT(
Equal(q_dd_Ver(5), qdd(5), eps));
1549 CPPUNIT_ASSERT(
Equal(q_dd_Ver(6), qdd(6), eps));
double getLambdaScaled() const
This abstract class encapsulates the inverse position solver for a KDL::Chain.
virtual void updateInternalDataStructures()
virtual int JntToCart(const JntArray &q_in, Frame &p_out, int segmentNr=-1)
virtual int getError() const
Return the latest error.
const double PI_2
the value of pi/2
This class encapsulates a simple segment, that is a "rigid body" (i.e., a frame and a rigid body...
void getTotalTorque(JntArray &total_tau)
virtual int CartToJnt(const JntArray &q_init, const Frame &p_in, JntArray &q_out)=0
Computes the Jacobian time derivative (Jdot) by calculating the partial derivatives regarding to a jo...
void IkVelSolverWDLSTest()
This class encapsulates a serial kinematic interconnection structure. It is built out of segments...
virtual int CartToJnt(const JntArray &q_in, const Twist &v_in, JntArray &qdot_out)
virtual int CartToJnt(const JntArray &q_init, const Frame &p_in, JntArray &q_out)
const double PI
the value of pi
virtual void updateInternalDataStructures()
IMETHOD Vector diff(const Vector &p_w_a, const Vector &p_w_b, double dt=1)
void MultiplyJacobian(const Jacobian &jac, const JntArray &src, Twist &dest)
Maximum number of iterations exceeded.
This class represents an fixed size array containing joint values of a KDL::Chain.
6D Inertia of a rigid body
virtual int CartToJnt(const JntArray &q_in, const Twist &v_in, JntArray &qdot_out)
int ldl_solver_eigen(const Eigen::MatrixXd &A, const Eigen::VectorXd &v, Eigen::MatrixXd &L, Eigen::VectorXd &D, Eigen::VectorXd &vtmp, Eigen::VectorXd &q)
Solves the system of equations Aq = v for q via LDL decomposition, where A is a square positive defin...
Input size does not match internal state.
void FdAndVereshchaginSolversConsistencyTest()
unsigned int getNrZeroSigmas() const
void FkVelAndJacLocal(Chain &chain, ChainFkSolverVel &fksolvervel, ChainJntToJacSolver &jacsolver)
Recursive newton euler forward dynamics solver.
static const int E_CONVERGE_PINV_SINGULAR
solution converged but (pseudo)inverse is singular
virtual int CartToJnt(const JntArray &q_in, const Twist &v_in, JntArray &qdot_out)=0
int CartToJnt(const JntArray &q, const JntArray &q_dot, const JntArray &torques, const Wrenches &f_ext, JntArray &q_dotdot)
Rotation M
Orientation of the Frame.
virtual int CartToJnt(const JntArray &q_in, const Twist &v_in, JntArray &qdot_out)
Class to calculate the jacobian of a general KDL::Chain, it is used by other solvers.
void setInertia(const RigidBodyInertia &Iin)
virtual void updateInternalDataStructures()
represents both translational and rotational velocities.
IMETHOD void SetToZero(Vector &v)
virtual void updateInternalDataStructures()
static Frame DH_Craig1989(double a, double alpha, double d, double theta)
IMETHOD bool Equal(const FrameAcc &r1, const FrameAcc &r2, double eps=epsilon)
static const int E_CONVERGE_PINV_SINGULAR
solution converged but (pseudo)inverse is singular
virtual int JntToCart(const JntArray &q_in, Frame &p_out, int segmentNr=-1)=0
A concrete implementation of a 3 dimensional vector class.
static Rotation RPY(double roll, double pitch, double yaw)
Solver for the inverse position kinematics that uses Levenberg-Marquardt.
static Frame DH(double a, double alpha, double d, double theta)
virtual void updateInternalDataStructures()
void getTransformedLinkAcceleration(Twists &x_dotdot)
void FkPosAndJacLocal(Chain &chain, ChainFkSolverPos &fksolverpos, ChainJntToJacSolver &jacsolver)
Requested index out of range.
virtual int JntToCart(const JntArrayVel &q_in, FrameVel &out, int segmentNr=-1)=0
void setColumn(unsigned int i, const Twist &t)
Recursive newton euler inverse dynamics solver.
static Rotation Identity()
Gives back an identity rotaton matrix.
Vector p
origine of the Frame
int CartToJnt(const JntArray &q, const JntArray &q_dot, const JntArray &q_dotdot, const Wrenches &f_ext, JntArray &torques)
unsigned int getNrOfJoints() const
INLINE Rall1d< T, V, S > sqrt(const Rall1d< T, V, S > &arg)
void IkSingularValueTest()
void updateInternalDataStructures()
void getContraintForceMagnitude(Eigen::VectorXd &nu_)
void FdSolverConsistencyTest()
virtual int JntToCoriolis(const JntArray &q, const JntArray &q_dot, JntArray &coriolis)
int CartToJnt(const JntArray &q, const JntArray &q_dot, JntArray &q_dotdot, const Jacobian &alfa, const JntArray &beta, const Wrenches &f_ext, const JntArray &ff_torques, JntArray &constraint_torques)
void resize(unsigned int newSize)
std::vector< Wrench > Wrenches
void setLambda(const double lambda)
virtual int JntToCart(const JntArrayVel &q_in, FrameVel &out, int segmentNr=-1)
virtual int JntToJacDot(const KDL::JntArrayVel &q_in, KDL::Twist &jac_dot_q_dot, int seg_nr=-1)
Computes .
void FdSolverDevelopmentTest()
represents a frame transformation in 3D space (rotation + translation)
virtual void updateInternalDataStructures()
This class encapsulates a simple joint, that is with one parameterized degree of freedom and with sca...
unsigned int getNrZeroSigmas() const
represents both translational and rotational acceleration.
virtual int CartToJnt(const KDL::JntArray &q_init, const KDL::Frame &T_base_goal, KDL::JntArray &q_out)
computes the inverse position kinematics.
CPPUNIT_TEST_SUITE_REGISTRATION(SolverTest)
virtual void updateInternalDataStructures()
void FkVelAndIkVelLocal(Chain &chain, ChainFkSolverVel &fksolvervel, ChainIkSolverVel &iksolvervel)
double getSigmaMin() const
virtual void updateInternalDataStructures()
virtual int JntToJac(const JntArray &q_in, Jacobian &jac, int seg_nr=-1)
virtual int JntToMass(const JntArray &q, JntSpaceInertiaMatrix &H)
void FkPosAndIkPosLocal(Chain &chain, ChainFkSolverPos &fksolverpos, ChainIkSolverPos &iksolverpos)
virtual void updateInternalDataStructures()
IMETHOD void random(Vector &a)
addDelta operator for displacement rotational velocity.
virtual void updateInternalDataStructures()
This abstract class encapsulates a solver for the forward velocity kinematics for a KDL::Chain...
Abstract: Acceleration constrained hybrid dynamics calculations for a chain, based on Vereshchagin 19...
virtual int CartToJnt(const JntArray &q_init, const Frame &p_in, JntArray &q_out)
virtual int JntToGravity(const JntArray &q, JntArray &gravity)
virtual void updateInternalDataStructures()
virtual int CartToJnt(const JntArray &q_in, const Twist &v_in, JntArray &qdot_out)
This abstract class encapsulates the inverse velocity solver for a KDL::Chain.
This abstract class encapsulates a solver for the forward position kinematics for a KDL::Chain...