NTRT Simulator
Version: Master
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Friends
Pages
tgSCASineControl.h
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 TG_SCA_SINE_CONTROL_H
20
#define TG_SCA_SINE_CONTROL_H
21
22
#include "
core/tgSpringCableActuator.h
"
23
#include "
controllers/tgPIDController.h
"
24
25
// Forward declarations
26
class
btRigidBody;
27
class
tgImpedanceController
;
28
29
class
tgSCASineControl
:
public
tgObserver
<tgSpringCableActuator>
30
{
31
public
:
32
33
tgSCASineControl
(
const
double
controlStep,
34
tgImpedanceController
* p_ipc,
35
tgPIDController::Config
pidConfig,
36
const
double
amplitude,
37
const
double
frequency,
38
const
double
phase,
39
const
double
offset,
40
const
double
length);
41
42
virtual
~
tgSCASineControl
();
43
44
virtual
void
onAttach
(
tgSpringCableActuator
& subject);
45
46
virtual
void
onStep
(
tgSpringCableActuator
& subject,
double
dt);
47
48
void
updateTensionSetpoint(
double
newTension);
49
50
void
updateControlLength(
double
newControlLength);
51
52
const
double
getCommandedTension()
const
53
{
54
return
m_commandedTension;
55
}
56
57
private
:
62
double
m_controlTime;
63
double
m_totalTime;
68
const
double
m_controlStep;
69
70
double
m_commandedTension;
71
75
const
double
cpgAmplitude;
76
const
double
cpgFrequency;
77
const
double
phaseOffset;
78
const
double
offsetSpeed;
79
80
86
double
cycle;
87
double
target;
88
92
double
m_controlLength;
93
94
tgPIDController::Config
m_tempConfig;
95
96
tgPIDController
* m_PIDController;
97
98
tgImpedanceController
* m_pMotorControl;
99
};
100
101
102
#endif
tgObserver
Definition:
tgObserver.h:35
tgImpedanceController
Definition:
tgImpedanceController.h:34
tgSCASineControl
Definition:
tgSCASineControl.h:29
tgPIDController::Config
Definition:
tgPIDController.h:45
tgSCASineControl::tgSCASineControl
tgSCASineControl(const double controlStep, tgImpedanceController *p_ipc, tgPIDController::Config pidConfig, const double amplitude, const double frequency, const double phase, const double offset, const double length)
Definition:
tgSCASineControl.cpp:27
tgSpringCableActuator.h
Contains the definition of abstract base class tgSpringCableActuator. Assumes that the string is line...
tgPIDController
Definition:
tgPIDController.h:41
tgSCASineControl::onStep
virtual void onStep(tgSpringCableActuator &subject, double dt)
Definition:
tgSCASineControl.cpp:70
tgSpringCableActuator
Definition:
tgSpringCableActuator.h:46
tgSCASineControl::onAttach
virtual void onAttach(tgSpringCableActuator &subject)
Definition:
tgSCASineControl.cpp:65
tgPIDController.h
Definition of the tgPIDController class.
examples
learningSpines
tgSCASineControl.h
Generated on Wed Dec 19 2018 16:44:29 for NTRT Simulator by
1.8.6