SCL  1.0
Standard Control Library : Control, dynamics, physics, and simulation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros Groups Pages
inertia_util.hpp
Go to the documentation of this file.
1 /*
2  * Stanford Whole-Body Control Framework http://stanford-scl.sourceforge.net/
3  *
4  * Copyright (c) 2010 Stanford University. All rights reserved.
5  *
6  * This program is free software: you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public License
8  * as published by the Free Software Foundation, either version 3 of
9  * the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this program. If not, see
18  * <http://www.gnu.org/licenses/>
19  */
20 
26 #ifndef JSPACE_INERTIA_UTIL_HPP
27 #define JSPACE_INERTIA_UTIL_HPP
28 
29 #include <jspace/Model.hpp>
30 #include <stdexcept>
31 #include <iosfwd>
32 
33 class deMatrix3;
34 class deVector3;
35 class deQuaternion;
36 class deFrame;
37 class deMassProp;
38 
39 namespace jspace {
40 
47  void inertia_parallel_axis_transform(double in_ixx, double in_ixy, double in_ixz,
48  double in_iyy, double in_iyz, double in_izz,
49  double trans_x, double trans_y, double trans_z, double mass,
50  double & out_ixx, double & out_ixy, double & out_ixz,
51  double & out_iyy, double & out_iyz, double & out_izz);
52 
56  void inertia_parallel_axis_transform(deMatrix3 const & in_inertia,
57  deVector3 const & translation, double mass,
58  deMatrix3 & out_inertia);
59 
66  void inertia_similarity_transform(double in_ixx, double in_ixy, double in_ixz,
67  double in_iyy, double in_iyz, double in_izz,
68  double rot_qx, double rot_qy, double rot_qz, double rot_qw,
69  double & out_ixx, double & out_ixy, double & out_ixz,
70  double & out_iyy, double & out_iyz, double & out_izz);
71 
75  void inertia_similarity_transform(double in_ixx, double in_ixy, double in_ixz,
76  double in_iyy, double in_iyz, double in_izz,
77  deQuaternion const & rotation,
78  deMatrix3 & out_inertia);
79 
80 
84  void inertia_similarity_transform(deMatrix3 const & in_inertia,
85  deQuaternion const & rotation,
87  deMatrix3 & out_inertia);
88 
99  void fuse_mass_properties(double orig_mass, deMatrix3 const & orig_inertia, deFrame const & orig_com,
100  double adtl_mass, deMatrix3 const & adtl_inertia, deFrame const & adtl_com,
101  deFrame const & home_of_adtl_wrt_orig,
102  double & fused_mass, deMatrix3 & fused_inertia, deFrame & fused_com);
103 
107  void fuse_mass_properties(deMassProp /*const*/ & original,
108  deMassProp /*const*/ & additional,
109  deFrame const & home_of_additional_wrt_original,
111  deMassProp & fused);
112 
113  void mass_inertia_explicit_form(Model const & model, Eigen::MatrixXd & mass_inertia,
114  std::ostream * dbgos = 0)
115  throw(std::runtime_error);
116 
117 }
118 
119 #endif // JSPACE_INERTIA_UTIL_HPP
3x1 vector classThis is a C++ wrapper class of deVector3f.
Definition: TaoDeVector3.h:32
Compute Mass parameters.
Definition: TaoDeMassProp.h:60
Quaternion classThis is a C++ wrapper class of deQuaternionf.
Definition: TaoDeQuaternion.h:35
Transformation class using quaternionThis class consists of a quaternion for rotation and a vector fo...
Definition: TaoDeFrame.h:36
3x3 matrix classThis is a C++ wrapper class of deMatrix3f.
Definition: TaoDeMatrix3.h:33