NTRT Simulator
 All Classes Files Functions Variables Typedefs Friends Pages
ImpedanceControl.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_IMPEDANCECONTROL_H_
20 #define SRC_CORE_IMPEDANCECONTROL_H_
21 
28 // Forward references
29 class tgBaseString;
34 {
35  public:
36 
38 
43 
54  ImpedanceControl(double offsetTension,
55  double lengthStiffness,
56  double velStiffness);
57 
59 
70  double control(tgBaseString* const mString,
71  double deltaTimeSeconds,
72  double newPosition,
73  double offsetVel = 0);
74 
75 
76  double controlTension(tgBaseString* const mString,
77  double deltaTimeSeconds,
78  double newPosition,
79  double offsetTension,
80  double offsetVel = 0);
81 
87  void setOffsetTension(double offsetTension);
88 
94  void setLengthStiffness(double lengthStiffness);
95 
101  void setVelStiffness(double velStiffness);
102 
107  double getOffsetTension() const
108  {
109  return _offsetTension;
110  }
111 
116  double getLengthStiffness() const
117  {
118  return _lengthStiffness;
119  }
120 
125  double getVelStiffness() const
126  {
127  return _velStiffness;
128  }
129 
130  protected:
131 
140 
150 
160 
161  private:
162 
164  bool invariant() const;
165 };
166 
167 #endif // SRC_CORE_IMPEDANCECONTROL_H_
double getVelStiffness() const
double getOffsetTension() const
void setLengthStiffness(double lengthStiffness)
ImpedanceControl()
Constructors.
void setVelStiffness(double velStiffness)
double control(tgBaseString *const mString, double deltaTimeSeconds, double newPosition, double offsetVel=0)
Control Functions.
double getLengthStiffness() const
void setOffsetTension(double offsetTension)