Blender  V3.3
inertia.cpp
Go to the documentation of this file.
1 
4 // Copyright (C) 2007 Ruben Smits <ruben dot smits at mech dot kuleuven dot be>
5 
6 // Version: 1.0
7 // Author: Ruben Smits <ruben dot smits at mech dot kuleuven dot be>
8 // Maintainer: Ruben Smits <ruben dot smits at mech dot kuleuven dot be>
9 // URL: http://www.orocos.org/kdl
10 
11 // This library is free software; you can redistribute it and/or
12 // modify it under the terms of the GNU Lesser General Public
13 // License as published by the Free Software Foundation; either
14 // version 2.1 of the License, or (at your option) any later version.
15 
16 // This library is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 // Lesser General Public License for more details.
20 
21 // You should have received a copy of the GNU Lesser General Public
22 // License along with this library; if not, write to the Free Software
23 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 
25 #include "inertia.hpp"
26 
27 #include <Eigen/Core>
28 
29 namespace KDL {
30 using namespace Eigen;
31 
32 Inertia::Inertia(double m,double Ixx,double Iyy,double Izz,double Ixy,double Ixz,double Iyz):
33 data(Matrix<double,6,6>::Zero())
34 {
35  data(0,0)=Ixx;
36  data(1,1)=Iyy;
37  data(2,2)=Izz;
38  data(2,1)=data(1,2)=Ixy;
39  data(3,1)=data(1,3)=Ixz;
40  data(3,2)=data(2,3)=Iyz;
41 
42  data.block(3,3,3,3)=m*Matrix<double,3,3>::Identity();
43 }
44 
46 {
47 }
48 
49 
50 
51 }
typedef double(DMatrix)[4][4]
Inertia(double m=0, double Ixx=0, double Iyy=0, double Izz=0, double Ixy=0, double Ixz=0, double Iyz=0)
Definition: inertia.cpp:32
Definition: chain.cpp:27