SCL  1.0
Standard Control Library : Control, dynamics, physics, and simulation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros Groups Pages
SActuatorSetMuscle.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 /* \file SActuatorSetMuscle.hpp
24  *
25  * Created on: Aug 18, 2013
26  *
27  * Copyright (C) 2013
28  *
29  * Author: Samir Menon <smenon@stanford.edu>
30  */
31 
32 #ifndef SACTUATORSETMUSCLE_HPP_
33 #define SACTUATORSETMUSCLE_HPP_
34 
35 #include <scl/data_structs/SObject.hpp>
36 
37 //Needs to access parent robot kinematics
38 #include <scl/data_structs/SRobotParsed.hpp>
39 #include <scl/data_structs/SActuatorSetMuscleParsed.hpp>
40 #include <scl/dynamics/CDynamicsBase.hpp>
41 
42 namespace scl
43 {
45  {
46  public:
47  /* ******************************************************
48  * Data
49  * ****************************************************** */
52 
53  /* ******************************************************
54  * Initialization
55  * ****************************************************** */
56  bool init(const SActuatorSetMuscleParsed * arg_mset_parsed)
57  {
58  if(NULL == arg_mset_parsed){ return false; }
59  if(false == arg_mset_parsed->hasBeenInit()){ return false; }
60  mset_ = arg_mset_parsed;
61  has_been_init_ = true;
62  return true;
63  }
64 
66  SActuatorSetMuscle() : SActuatorSetBase("SActuatorSetMuscle"),
67  mset_(NULL){}
68 
70  virtual ~SActuatorSetMuscle(){}
71  };
72 
73 } /* namespace scl */
74 #endif /* SACTUATORSETMUSCLE_HPP_ */
virtual ~SActuatorSetMuscle()
Definition: SActuatorSetMuscle.hpp:70
virtual bool hasBeenInit() const
Definition: SObject.hpp:66
const SActuatorSetMuscleParsed * mset_
Definition: SActuatorSetMuscle.hpp:51
Definition: SActuatorSetMuscleParsed.hpp:124
Definition: SActuatorSetMuscle.hpp:44
Definition: SActuatorSetBase.hpp:42
sBool has_been_init_
Definition: SObject.hpp:72
SActuatorSetMuscle()
Definition: SActuatorSetMuscle.hpp:66