SCL  1.0
Standard Control Library : Control, dynamics, physics, and simulation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros Groups Pages
CControllerGc.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 CControllerGc.hpp
25  *
26  * Created on: Dec 29, 2010
27  *
28  * Copyright (C) 2010
29  *
30  * Author: Samir Menon <smenon@stanford.edu>
31  */
32 
33 #ifndef CCONTROLLERGC_HPP_
34 #define CCONTROLLERGC_HPP_
35 
36 #include <scl/DataTypes.hpp>
37 
38 #include <scl/control/CControllerBase.hpp>
39 
40 #include <scl/control/gc/data_structs/SControllerGc.hpp>
41 
42 namespace scl
43 {
56  {
57  public:
58  /* ******************************************************************
59  * CControllerBase API
60  * ****************************************************************** */
62  CControllerGc();
63 
65  virtual ~CControllerGc();
66 
72  virtual sBool computeControlForces();
73 
80  virtual sBool computeKinematics(){ return true; }
81 
86  virtual sBool computeDynamics();
87 
92  { return true; }
93 
95  virtual const Eigen::VectorXd* getControlForces();
96 
98  virtual sBool init(SControllerBase* arg_data,
99  scl::CDynamicsBase* arg_dynamics);
100 
102  virtual sBool reset();
103 
105  virtual sBool hasBeenInit() { return has_been_init_; }
106 
107  /* ******************************************************************
108  * Additional control functions
109  * ****************************************************************** */
115 
125  sBool computeControlForcesPIDA(const sFloat arg_time);
126 
130 
131  protected:
132 
133  SControllerGc* data_;
134  };
135 
136 }
137 
138 #endif /* CCONTROLLERGC_HPP_ */
virtual sBool init(SControllerBase *arg_data, scl::CDynamicsBase *arg_dynamics)
Definition: CControllerGc.cpp:179
virtual const Eigen::VectorXd * getControlForces()
Definition: CControllerGc.cpp:175
virtual sBool computeNonControlOperations()
Definition: CControllerGc.hpp:91
virtual sBool computeControlForces()
Definition: CControllerGc.cpp:50
Definition: CDynamicsBase.hpp:55
virtual ~CControllerGc()
Definition: CControllerGc.cpp:46
virtual sBool hasBeenInit()
Definition: CControllerGc.hpp:105
bool sBool
Definition: DataTypes.hpp:54
Definition: SControllerBase.hpp:48
Definition: CControllerBase.hpp:59
Definition: SControllerGc.hpp:55
sBool computeFloatForces()
Definition: CControllerGc.cpp:140
double sFloat
Definition: DataTypes.hpp:72
sBool computeControlForcesPD()
Definition: CControllerGc.cpp:78
virtual sBool reset()
Definition: CControllerGc.cpp:251
sBool computeControlForcesPIDA(const sFloat arg_time)
Definition: CControllerGc.cpp:103
CControllerGc()
Definition: CControllerGc.cpp:41
virtual sBool computeDynamics()
Definition: CControllerGc.cpp:169
Definition: CControllerGc.hpp:55
virtual sBool computeKinematics()
Definition: CControllerGc.hpp:80