jntspaceinertiamatrix.hpp
Go to the documentation of this file.
1 // Copyright (C) 2009 Dominick Vanthienen <dominick dot vanthienen at mech dot kuleuven dot be>
2 
3 // Version: 1.0
4 // Author: Dominick Vanthienen <dominick dot vanthienen at mech dot kuleuven dot be>
5 // Maintainer: Dominick Vanthienen <ruben dot smits at mech dot kuleuven dot be>
6 // URL: http://www.orocos.org/kdl
7 
8 // This library is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU Lesser General Public
10 // License as published by the Free Software Foundation; either
11 // version 2.1 of the License, or (at your option) any later version.
12 
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 
22 #ifndef KDL_JNTSPACEINERTIAMATRIX_HPP
23 #define KDL_JNTSPACEINERTIAMATRIX_HPP
24 
25 #include "frames.hpp"
26 #include "jacobian.hpp"
27 #include "jntarray.hpp"
28 
29 #include <Eigen/Core>
30 
31 namespace KDL
32 {
70  class JntSpaceInertiaMatrix
71  {
72  public:
73  Eigen::MatrixXd data;
74 
82  JntSpaceInertiaMatrix();
93  explicit JntSpaceInertiaMatrix(int size);
97  JntSpaceInertiaMatrix(const JntSpaceInertiaMatrix& arg);
98  ~JntSpaceInertiaMatrix();
108  void resize(unsigned int newSize);
109 
110  JntSpaceInertiaMatrix& operator = ( const JntSpaceInertiaMatrix& arg);
118  double operator()(unsigned int i,unsigned int j)const;
126  double& operator()(unsigned int i,unsigned int j);
131  unsigned int rows()const;
135  unsigned int columns()const;
136 
137  friend void Add(const JntSpaceInertiaMatrix& src1,const JntSpaceInertiaMatrix& src2,JntSpaceInertiaMatrix& dest);
138  friend void Subtract(const JntSpaceInertiaMatrix& src1,const JntSpaceInertiaMatrix& src2,JntSpaceInertiaMatrix& dest);
139  friend void Multiply(const JntSpaceInertiaMatrix& src,const double& factor,JntSpaceInertiaMatrix& dest);
140  friend void Divide(const JntSpaceInertiaMatrix& src,const double& factor,JntSpaceInertiaMatrix& dest);
141  friend void Multiply(const JntSpaceInertiaMatrix& src, const JntArray& vec, JntArray& dest);
142  friend void SetToZero(JntSpaceInertiaMatrix& matrix);
143  friend bool Equal(const JntSpaceInertiaMatrix& src1,const JntSpaceInertiaMatrix& src2,double eps);
144  friend bool operator==(const JntSpaceInertiaMatrix& src1,const JntSpaceInertiaMatrix& src2);
145  //friend bool operator!=(const JntSpaceInertiaMatrix& src1,const JntSpaceInertiaMatrix& src2);
146  };
147 
148  bool operator==(const JntSpaceInertiaMatrix& src1,const JntSpaceInertiaMatrix& src2);
149  //bool operator!=(const JntSpaceInertiaMatrix& src1,const JntSpaceInertiaMatrix& src2);
150 
160  void Add(const JntSpaceInertiaMatrix& src1,const JntSpaceInertiaMatrix& src2,JntSpaceInertiaMatrix& dest);
161 
171  void Subtract(const JntSpaceInertiaMatrix& src1,const JntSpaceInertiaMatrix& src2,JntSpaceInertiaMatrix& dest);
172 
182  void Multiply(const JntSpaceInertiaMatrix& src,const double& factor,JntSpaceInertiaMatrix& dest);
183 
193  void Divide(const JntSpaceInertiaMatrix& src,const double& factor,JntSpaceInertiaMatrix& dest);
194 
207  void Multiply(const JntSpaceInertiaMatrix& src, const JntArray& vec, JntArray& dest);
208 
214  void SetToZero(JntSpaceInertiaMatrix& matrix);
215 
226  bool Equal(const JntSpaceInertiaMatrix& src1,const JntSpaceInertiaMatrix& src2,double eps=epsilon);
227 
228  bool operator==(const JntSpaceInertiaMatrix& src1,const JntSpaceInertiaMatrix& src2);
229 
230 }
231 
232 #endif
void Subtract(const JntArray &src1, const JntArray &src2, JntArray &dest)
Definition: jntarray.cpp:87
void Divide(const JntArray &src, const double &factor, JntArray &dest)
Definition: jntarray.cpp:97
void Add(const JntArray &src1, const JntArray &src2, JntArray &dest)
Definition: jntarray.cpp:82
IMETHOD void SetToZero(Vector &v)
Definition: frames.hpp:1062
IMETHOD bool Equal(const FrameAcc &r1, const FrameAcc &r2, double eps=epsilon)
Definition: frameacc.hpp:394
double epsilon
default precision while comparing with Equal(..,..) functions. Initialized at 0.0000001.
bool operator==(const Rotation &a, const Rotation &b)
Definition: frames.cpp:433
void Multiply(const JntArray &src, const double &factor, JntArray &dest)
Definition: jntarray.cpp:92


orocos_kdl
Author(s):
autogenerated on Sat Jun 15 2019 19:07:36