19 #ifndef JSON_AO_HIERARCHY_CONTROL_H
20 #define JSON_AO_HIERARCHY_CONTROL_H
31 #include "dev/dhustigschultz/BP_SC_NoLegs_Stats/JSONQuadCPGControl.h"
33 #include <json/value.h>
66 double lp = -1 * M_PI,
95 const double freqFeedbackMin;
96 const double freqFeedbackMax;
97 const double ampFeedbackMin;
98 const double ampFeedbackMax;
99 const double phaseFeedbackMin;
100 const double phaseFeedbackMax;
103 const double maxHeight;
104 const double minHeight;
118 int theirHighMuscles;
121 const double highFreq2;
122 const double freqFeedbackMax2;
127 std::string resourcePath =
"");
141 virtual void setupCPGs(
BaseQuadModelLearning& subject, array_2D achillesNodeActions, array_4D achillesEdgeActions);
143 virtual array_2D scaleNodeActions (Json::Value actions,
double highFreq,
double freqFeedbackMax);
145 virtual array_4D
scaleEdgeActions (Json::Value actions,
int segmentSpan,
int theirMuscles,
int ourMuscles);
151 std::vector<double> transformFeedbackActions(std::vector< std::vector<double> >& actions);
157 std::vector<tgCPGActuatorControl*> m_leftFrontAchillesControllers;
158 std::vector<tgCPGActuatorControl*> m_rightFrontAchillesControllers;
160 std::vector<tgCPGActuatorControl*> m_leftRearAchillesControllers;
161 std::vector<tgCPGActuatorControl*> m_rightRearAchillesControllers;
166 std::vector< std::vector<double> > m_quadCOM;
170 #endif // JSON_ACHILLES_HIERARCHY_CONTROL_H
JSONAOHierarchyControl(JSONAOHierarchyControl::Config config, std::string args, std::string resourcePath="")
virtual void onSetup(BaseQuadModelLearning &subject)
virtual void onTeardown(BaseQuadModelLearning &subject)
virtual array_4D scaleEdgeActions(Json::Value actions, int segmentSpan, int theirMuscles, int ourMuscles)
virtual void onStep(BaseQuadModelLearning &subject, double dt)
Config(int ss, int tm, int om, int param, int segnum=6, double ct=0.1, double la=0, double ha=30, double lp=-1 *M_PI, double hp=M_PI, double kt=0.0, double kp=1000.0, double kv=100.0, bool def=true, double cl=10.0, double lf=0.0, double hf=30.0, double ffMin=0.0, double ffMax=0.0, double afMin=0.0, double afMax=0.0, double pfMin=0.0, double pfMax=0.0, double maxH=60.0, double minH=1.0, int ohighm=5, int thighm=5, double hf2=20.0, double ffMax2=0.0)