blob: 076045943b4e54dbc8f7c5189476d4e0dde529e5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#ifndef LOCOMOTORPRIMITIVES_CONTROLLER_H_
#define LOCOMOTORPRIMITIVES_CONTROLLER_H_
#include <map>
#include <OpenSim/OpenSim.h>
#include "MuscleEMGProfile.h"
class LocomotorPrimitivesController : public OpenSim::Controller {
OpenSim_DECLARE_CONCRETE_OBJECT(LocomotorPrimitivesController, OpenSim::Controller);
public:
LocomotorPrimitivesController(double alpha) : OpenSim::Controller(), _alpha(alpha) { }
int loadCsvData(const std::string &muscleName, const std::string &file);
void computeControls(const SimTK::State &s, SimTK::Vector &controls) const;
private:
double _alpha;
std::vector<MuscleEMGProfile> _act;
};
#endif /* LOCOMOTORPRIMITIVES_CONTROLLER_H_ */
|