blob: 702a3a5c1d93778a8895d25b854c2cd88448b31f (
plain)
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
|
#ifndef LOCOMOTORPRIMITIVES_CONTROLLER_H_
#define LOCOMOTORPRIMITIVES_CONTROLLER_H_
#include <OpenSim/OpenSim.h>
class LocomotorPrimitivesController : public OpenSim::Controller {
OpenSim_DECLARE_CONCRETE_OBJECT(LocomotorPrimitivesController, OpenSim::Controller);
public:
LocomotorPrimitivesController(OpenSim::Storage act, double alpha)
: OpenSim::Controller(), _act(act), _alpha(alpha)
{
_muscle_act = new double[act.getSmallestNumberOfStates()];
}
~LocomotorPrimitivesController()
{
delete[] _muscle_act;
}
void computeControls(const SimTK::State &s, SimTK::Vector &controls) const;
private:
double _alpha;
double *_muscle_act;
OpenSim::Storage _act;
};
#endif /* LOCOMOTORPRIMITIVES_CONTROLLER_H_ */
|