SCL  1.0
Standard Control Library : Control, dynamics, physics, and simulation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros Groups Pages
SGcModel.hpp
1 /* This file is part of scl, a control and simulation library
2 for robots and biomechanical models.
3 
4 scl is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 3 of the License, or (at your option) any later version.
8 
9 Alternatively, you can redistribute it and/or
10 modify it under the terms of the GNU General Public License as
11 published by the Free Software Foundation; either version 2 of
12 the License, or (at your option) any later version.
13 
14 scl is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18 
19 You should have received a copy of the GNU Lesser General Public
20 License and a copy of the GNU General Public License along with
21 scl. If not, see <http://www.gnu.org/licenses/>.
22 */
23 /*
24  * \file SGcModel.hpp
25  *
26  * Created on: May 5, 2010
27  *
28  * Copyright (C) 2010
29  *
30  * Author: Samir Menon <smenon@stanford.edu>
31  */
32 
33 #ifndef SGCMODEL_HPP_
34 #define SGCMODEL_HPP_
35 
36 #include <scl/data_structs/SRobotParsed.hpp>
37 #include <scl/data_structs/SRigidBodyDyn.hpp>
38 #include <scl/DataTypes.hpp>
39 
40 #include <Eigen/Dense>
41 
42 #include <vector>
43 
44 namespace scl
45 {
53  class SGcModel : public SObject
54  {
55  /* *********************************************************************
56  * Data
57  * ********************************************************************* */
58  public:
59  // Eigen requires redefining the new operator for classes that contain fixed size Eigen member-data.
60  // See http://eigen.tuxfamily.org/dox/StructHavingEigenMembers.html
61  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
62 
64  Eigen::MatrixXd M_gc_;
65 
67  Eigen::MatrixXd M_gc_inv_;
68 
70  Eigen::VectorXd force_gc_cc_;
71 
73  Eigen::VectorXd force_gc_grav_;
74 
85  Eigen::VectorXd q_,dq_;
86 
88  Eigen::Vector3d pos_com_;
89 
92 
94  std::vector<std::string> processing_order_;
95 
99 
103 
105  Eigen::VectorXd vec_scratch_[5];
106 
107  /* *********************************************************************
108  * Initialization functions
109  * ********************************************************************* */
111  SGcModel();
112 
114  sBool init(const SRobotParsed& arg_robot_data);
115  };
116 }
117 
118 #endif /* SGCMODEL_HPP_ */
sFloat mass_
Definition: SGcModel.hpp:91
Eigen::VectorXd force_gc_cc_
Definition: SGcModel.hpp:70
SGcModel()
Definition: SGcModel.cpp:41
Definition: SRobotParsed.hpp:51
Definition: SGcModel.hpp:53
bool sBool
Definition: DataTypes.hpp:54
EIGEN_MAKE_ALIGNED_OPERATOR_NEW Eigen::MatrixXd M_gc_
Definition: SGcModel.hpp:64
sutil::CMappedTree< std::string, SRigidBodyDyn > rbdyn_tree_
Definition: SGcModel.hpp:102
Eigen::VectorXd force_gc_grav_
Definition: SGcModel.hpp:73
Eigen::VectorXd vec_scratch_[5]
Definition: SGcModel.hpp:105
Definition: CMappedTree.hpp:66
Eigen::MatrixXd M_gc_inv_
Definition: SGcModel.hpp:67
bool computed_spatial_transformation_and_inertia_
Definition: SGcModel.hpp:98
sBool init(const SRobotParsed &arg_robot_data)
Definition: SGcModel.cpp:44
double sFloat
Definition: DataTypes.hpp:72
std::vector< std::string > processing_order_
Definition: SGcModel.hpp:94
Eigen::Vector3d pos_com_
Definition: SGcModel.hpp:88
Eigen::VectorXd q_
Definition: SGcModel.hpp:85
Definition: SObject.hpp:43