NTRT Simulator  Version: Master
 All Classes Namespaces Files Functions Variables Typedefs Friends Pages
tgImpedanceController.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2012, United States Government, as represented by the
3  * Administrator of the National Aeronautics and Space Administration.
4  * All rights reserved.
5  *
6  * The NASA Tensegrity Robotics Toolkit (NTRT) v1 platform is licensed
7  * under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * http://www.apache.org/licenses/LICENSE-2.0.
11  *
12  * Unless required by applicable law or agreed to in writing,
13  * software distributed under the License is distributed on an
14  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
15  * either express or implied. See the License for the specific language
16  * governing permissions and limitations under the License.
17 */
18 
19 #ifndef SRC_CORE_TG_IMPEDANCECONTROLLER_H_
20 #define SRC_CORE_TG_IMPEDANCECONTROLLER_H_
21 
28 // Forward references
29 class tgBasicController;
30 class tgBasicActuator;
35 {
36  public:
37 
39 
44 
55  tgImpedanceController(double offsetTension,
56  double lengthStiffness,
57  double velStiffness);
58 
60 
70  double control(tgBasicController& mLocalController,
71  double deltaTimeSeconds,
72  double newPosition,
73  double offsetVel = 0);
74 
75 
76  double controlTension(tgBasicController& mLocalController,
77  double deltaTimeSeconds,
78  double newPosition,
79  double offsetTension,
80  double offsetVel = 0);
84  double control(tgBasicActuator& mLocalController,
85  double deltaTimeSeconds,
86  double newPosition,
87  double offsetVel = 0);
88 
89 
90  double controlTension(tgBasicActuator& mLocalController,
91  double deltaTimeSeconds,
92  double newPosition,
93  double offsetTension,
94  double offsetVel = 0);
100  void setOffsetTension(double offsetTension);
101 
107  void setLengthStiffness(double lengthStiffness);
108 
114  void setVelStiffness(double velStiffness);
115 
120  double getOffsetTension() const
121  {
122  return m_offsetTension;
123  }
124 
129  double getLengthStiffness() const
130  {
131  return m_lengthStiffness;
132  }
133 
138  double getVelStiffness() const
139  {
140  return m_velStiffness;
141  }
142 
143  protected:
144 
152 
161 
170 
171  private:
172 
174  bool invariant() const;
175 };
176 
177 #endif // SRC_CORE_IMPEDANCECONTROL_H_
void setLengthStiffness(double lengthStiffness)
double getLengthStiffness() const
double getOffsetTension() const
tgImpedanceController()
Constructors.
void setVelStiffness(double velStiffness)
double control(tgBasicController &mLocalController, double deltaTimeSeconds, double newPosition, double offsetVel=0)
Control Functions.
void setOffsetTension(double offsetTension)