KDL 1.5.1
Loading...
Searching...
No Matches
jntspaceinertiamatrix.hpp
Go to the documentation of this file.
1// Copyright (C) 2009 Dominick Vanthienen <dominick dot vanthienen at intermodalics dot eu>
2
3// Version: 1.0
4// Author: Dominick Vanthienen <dominick dot vanthienen at intermodalics dot eu>
5// Maintainer: Ruben Smits <ruben dot smits at intermodalics dot eu>
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
31namespace 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
bool Equal(const VectorAcc &r1, const VectorAcc &r2, double eps)
Definition: frameacc.inl:159
IMETHOD bool operator==(const Frame &a, const Frame &b)
Definition: frames.inl:1275
IMETHOD void SetToZero(Vector &v)
Definition: frames.inl:1068
Definition: articulatedbodyinertia.cpp:26
bool operator==(const Rotation &a, const Rotation &b)
Definition: frames.cpp:430
void Add(const JntArray &src1, const JntArray &src2, JntArray &dest)
Function to add two joint arrays, all the arguments must have the same size: A + B = C.
Definition: jntarray.cpp:80
void Divide(const JntArray &src, const double &factor, JntArray &dest)
Function to divide all the array values with a scalar factor: A/b=C.
Definition: jntarray.cpp:95
void Multiply(const JntArray &src, const double &factor, JntArray &dest)
Function to multiply all the array values with a scalar factor: A*b=C.
Definition: jntarray.cpp:90
void SetToZero(Jacobian &jac)
Definition: jacobian.cpp:79
void Subtract(const JntArray &src1, const JntArray &src2, JntArray &dest)
Function to subtract two joint arrays, all the arguments must have the same size: A - B = C.
Definition: jntarray.cpp:85
IMETHOD bool Equal(const FrameAcc &r1, const FrameAcc &r2, double eps=epsilon)