jacobian.hpp 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. // Copyright (C) 2007 Ruben Smits <ruben dot smits at mech dot kuleuven dot be>
  2. // Version: 1.0
  3. // Author: Ruben Smits <ruben dot smits at mech dot kuleuven dot be>
  4. // Maintainer: Ruben Smits <ruben dot smits at mech dot kuleuven dot be>
  5. // URL: http://www.orocos.org/kdl
  6. // This library is free software; you can redistribute it and/or
  7. // modify it under the terms of the GNU Lesser General Public
  8. // License as published by the Free Software Foundation; either
  9. // version 2.1 of the License, or (at your option) any later version.
  10. // This library is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. // Lesser General Public License for more details.
  14. // You should have received a copy of the GNU Lesser General Public
  15. // License along with this library; if not, write to the Free Software
  16. // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  17. #ifndef KDL_JACOBIAN_HPP
  18. #define KDL_JACOBIAN_HPP
  19. #include "frames.hpp"
  20. namespace KDL
  21. {
  22. //Forward declaration
  23. class ChainJntToJacSolver;
  24. class Jacobian
  25. {
  26. friend class ChainJntToJacSolver;
  27. private:
  28. unsigned int size;
  29. unsigned int nr_blocks;
  30. public:
  31. Twist* twists;
  32. Jacobian(unsigned int size,unsigned int nr=1);
  33. Jacobian(const Jacobian& arg);
  34. Jacobian& operator=(const Jacobian& arg);
  35. bool operator ==(const Jacobian& arg);
  36. bool operator !=(const Jacobian& arg);
  37. friend bool Equal(const Jacobian& a,const Jacobian& b,double eps);
  38. ~Jacobian();
  39. double operator()(int i,int j)const;
  40. double& operator()(int i,int j);
  41. unsigned int rows()const;
  42. unsigned int columns()const;
  43. friend void SetToZero(Jacobian& jac);
  44. friend void changeRefPoint(const Jacobian& src1, const Vector& base_AB, Jacobian& dest);
  45. friend void changeBase(const Jacobian& src1, const Rotation& rot, Jacobian& dest);
  46. friend void changeRefFrame(const Jacobian& src1,const Frame& frame, Jacobian& dest);
  47. };
  48. bool Equal(const Jacobian&, const Jacobian&, double = epsilon);
  49. }
  50. #endif