SCL  1.0
Standard Control Library : Control, dynamics, physics, and simulation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros Groups Pages
CActuatorBase.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 CActuatorBase.hpp
25  *
26  * Created on: Aug 24, 2012
27  *
28  * Author: Samir Menon <smenon@stanford.edu>
29  */
30 
31 #ifndef CACTUATORBASE_HPP_
32 #define CACTUATORBASE_HPP_
33 
34 #include <scl/data_structs/SObject.hpp>
35 
36 #include <Eigen/Eigen>
37 
38 namespace scl
39 {
47  {
48  public:
49  sBool flag_apply_limits_force_; //true
50  sBool flag_apply_limits_pos_; //true
51  sBool flag_apply_limits_vel_; //true
52  sBool flag_apply_limits_acc_; //true
53  sBool flag_apply_noise_force_; //true
54  sBool flag_apply_noise_pos_; //true
55  sBool flag_apply_noise_vel_; //true
56  sBool flag_apply_noise_acc_; //true
57  sBool flag_apply_delay_forces_; //false
58 
59  Eigen::VectorXd limits_force_;
60  Eigen::VectorXd limits_pos_;
61  Eigen::VectorXd limits_vel_;
62  Eigen::VectorXd limits_acc_;
63 
66  flag_apply_limits_force_(true),
67  flag_apply_limits_pos_(true),
68  flag_apply_limits_vel_(true),
69  flag_apply_limits_acc_(true),
70  flag_apply_noise_force_(true),
71  flag_apply_noise_pos_(true),
72  flag_apply_noise_vel_(true),
73  flag_apply_noise_acc_(true),
74  flag_apply_delay_forces_(false)
75  {}
76  };
77 
110  {
111  public:
112  /* *****************************************************************
113  * Actuation Model
114  * ***************************************************************** */
126  virtual sBool actuate(const std::vector<sFloat>& arg_input,
127  Eigen::VectorXd& ret_output_gc_force) = 0;
128 
134  virtual sBool computeJacobian()=0;
135 
136  /* *****************************************************************
137  * Actuator Properties
138  * ***************************************************************** */
141  virtual sBool getActuatesGC()=0;
142 
143  /* *****************************************************************
144  * Initialization
145  * ***************************************************************** */
147  virtual sBool init(SActuatorSettings* arg_state)=0;
148 
150  virtual sBool hasBeenInit()=0;
151 
154 
156  virtual ~CActuatorBase() {}
157 
158  protected:
161  };
162 
163 } /* namespace scl */
164 #endif /* CACTUATORBASE_HPP_ */
virtual sBool hasBeenInit()=0
SActuatorSettings()
Definition: CActuatorBase.hpp:65
virtual sBool getActuatesGC()=0
SActuatorSettings settings_
Definition: CActuatorBase.hpp:160
virtual sBool init(SActuatorSettings *arg_state)=0
Definition: CActuatorBase.hpp:46
virtual sBool computeJacobian()=0
virtual ~CActuatorBase()
Definition: CActuatorBase.hpp:156
bool sBool
Definition: DataTypes.hpp:54
virtual sBool actuate(const std::vector< sFloat > &arg_input, Eigen::VectorXd &ret_output_gc_force)=0
Definition: CActuatorBase.hpp:109
CActuatorBase()
Definition: CActuatorBase.hpp:153