SCL  1.0
Standard Control Library : Control, dynamics, physics, and simulation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros Groups Pages
CTaskGcLimitCentering.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 CTaskGcLimitCentering.hpp
24  *
25  * Created on: Mar 15, 2013
26  *
27  * Copyright (C) 2013
28  *
29  * Author: Samir Menon <smenon@stanford.edu>
30  */
31 
32 #ifndef CTASKGCLIMITCENTERING_HPP_
33 #define CTASKGCLIMITCENTERING_HPP_
34 
35 #include <scl/control/task/CTaskBase.hpp>
36 
37 #include <scl/control/task/tasks/data_structs/STaskGcLimitCentering.hpp>
38 
39 namespace scl
40 {
41 
43  {
44  public:
45  /********************************
46  * CTaskBase API
47  *********************************/
50  virtual bool init(STaskBase* arg_task_data,
51  CDynamicsBase* arg_dynamics);
52 
54  virtual STaskBase* getTaskData();
55 
58  virtual void reset();
59 
61  virtual bool computeServo(const SRobotSensors* arg_sensors);
62 
65  virtual bool computeModel(const SRobotSensors* arg_sensors);
66 
67  /********************************
68  * CTaskGcLimitCentering specific functions
69  *********************************/
71  virtual bool setGoalPos(const Eigen::VectorXd & arg_goal);
72 
74  virtual bool getGoalPos(Eigen::VectorXd & arg_goal) const
75  { arg_goal = data_->q_goal_; return true; }
76 
78  virtual bool getPos(Eigen::VectorXd & arg_pos) const
79  { arg_pos = data_->q_; return true; }
80 
83 
84  /********************************
85  * Initialization specific functions
86  *********************************/
87 
90 
93 
94  private:
95  STaskGcLimitCentering* data_;
96  };
97 
98 }
99 
100 #endif /* CTASKGCLIMITCENTERING_HPP_ */
Definition: STaskBase.hpp:69
virtual bool computeServo(const SRobotSensors *arg_sensors)
Definition: CTaskGcLimitCentering.cpp:123
virtual ~CTaskGcLimitCentering()
Definition: CTaskGcLimitCentering.hpp:92
virtual bool setGoalPos(const Eigen::VectorXd &arg_goal)
Definition: CTaskGcLimitCentering.cpp:97
virtual bool getGoalPos(Eigen::VectorXd &arg_goal) const
Definition: CTaskGcLimitCentering.hpp:74
virtual STaskBase * getTaskData()
Definition: CTaskGcLimitCentering.cpp:93
virtual bool init(STaskBase *arg_task_data, CDynamicsBase *arg_dynamics)
Definition: CTaskGcLimitCentering.cpp:46
Definition: CDynamicsBase.hpp:55
virtual void reset()
Definition: CTaskGcLimitCentering.cpp:115
virtual bool getPos(Eigen::VectorXd &arg_pos) const
Definition: CTaskGcLimitCentering.hpp:78
bool sBool
Definition: DataTypes.hpp:54
sBool achievedGoalPos()
Definition: CTaskGcLimitCentering.cpp:171
Definition: CTaskGcLimitCentering.hpp:42
Definition: STaskGcLimitCentering.hpp:43
virtual bool computeModel(const SRobotSensors *arg_sensors)
Definition: CTaskGcLimitCentering.cpp:160
CTaskGcLimitCentering()
Definition: CTaskGcLimitCentering.cpp:40
Definition: SRobotIO.hpp:49
Definition: CTaskBase.hpp:54