jntarrayvel.hpp 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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_JNTARRAYVEL_HPP
  18. #define KDL_JNTARRAYVEL_HPP
  19. #include "utilities/utility.h"
  20. #include "jntarray.hpp"
  21. #include "framevel.hpp"
  22. namespace KDL
  23. {
  24. class JntArrayVel
  25. {
  26. public:
  27. JntArray q;
  28. JntArray qdot;
  29. public:
  30. JntArrayVel(unsigned int size);
  31. JntArrayVel(const JntArray& q,const JntArray& qdot);
  32. JntArrayVel(const JntArray& q);
  33. JntArray value()const;
  34. JntArray deriv()const;
  35. friend void Add(const JntArrayVel& src1,const JntArrayVel& src2,JntArrayVel& dest);
  36. friend void Add(const JntArrayVel& src1,const JntArray& src2,JntArrayVel& dest);
  37. friend void Subtract(const JntArrayVel& src1,const JntArrayVel& src2,JntArrayVel& dest);
  38. friend void Subtract(const JntArrayVel& src1,const JntArray& src2,JntArrayVel& dest);
  39. friend void Multiply(const JntArrayVel& src,const double& factor,JntArrayVel& dest);
  40. friend void Multiply(const JntArrayVel& src,const doubleVel& factor,JntArrayVel& dest);
  41. friend void Divide(const JntArrayVel& src,const double& factor,JntArrayVel& dest);
  42. friend void Divide(const JntArrayVel& src,const doubleVel& factor,JntArrayVel& dest);
  43. friend void SetToZero(JntArrayVel& array);
  44. friend bool Equal(const JntArrayVel& src1,const JntArrayVel& src2,double eps);
  45. };
  46. bool Equal(const JntArrayVel&, const JntArrayVel&, double = epsilon);
  47. }
  48. #endif