-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathVirtualActuatorSet.h
38 lines (29 loc) · 1.37 KB
/
VirtualActuatorSet.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef OPENSIM_VIRTUALACTUATORSET_H_
#define OPENSIM_VIRTUALACTUATORSET_H_
#include<OpenSim/Simulation/Model/ComponentSet.h>
namespace OpenSim {
class VirtualActuator : public Object {
OpenSim_DECLARE_CONCRETE_OBJECT(VirtualActuator, Object);
public:
OpenSim_DECLARE_PROPERTY(coordinate, std::string, "coordinate that the virtual actuator applies to");
OpenSim_DECLARE_PROPERTY(weight, double, "penalty weight of the virtual actuator");
OpenSim_DECLARE_PROPERTY(min_control, double, "minimum control value of the virtual actuator");
OpenSim_DECLARE_PROPERTY(max_control, double, "maximum control value of the virtual actuator");
VirtualActuator();
VirtualActuator(const std::string& coord, double weight=1.0, double minVal = -200.0, double maxVal = 200.0);
private:
void constructProperties();
};
class VirtualActuatorSet : public Set<VirtualActuator> {
OpenSim_DECLARE_CONCRETE_OBJECT(VirtualActuatorSet, Set<VirtualActuator>);
public:
VirtualActuatorSet();
VirtualActuatorSet(const std::string& aFileName);
virtual ~VirtualActuatorSet();
void getCoordinateArray(Array<std::string>& coord_array) const;
void getWeightArray(Array<double>& weight_array) const;
void getCoordAndWeightArray(Array<std::string>& coord_array, Array<double>& weight_array) const;
void getMinAndMaxControlArray(SimTK::Vector& min_control_array, SimTK::Vector& max_control_array) const;
};
};
#endif