1 #ifndef ALLOSTATICCONTROLLER_H 2 #define ALLOSTATICCONTROLLER_H 7 #include <yarp/os/all.h> 8 #include <yarp/sig/all.h> 9 #include <yarp/math/Rand.h> 57 behaviorUnderPort =
nullptr;
58 behaviorOverPort =
nullptr;
60 inputSensationPort =
nullptr;
67 bool interrupt_ports();
80 void triggerBehavior(
OutCZ mode);
91 Port to_homeo_rpc, rpc_in_port, to_behavior_rpc;
97 map<string, AllostaticDrive> allostaticDrives;
100 vector<double> drivePriorities;
102 vector< yarp::os::BufferedPort<Bottle>* > outputM_ports;
103 vector< yarp::os::BufferedPort<Bottle>* > outputm_ports;
111 void configureAllostatic(yarp::os::ResourceFinder &
rf);
118 bool openPorts(
string driveName);
124 bool configure(yarp::os::ResourceFinder &rf);
125 bool interruptModule();
140 bool updateAllostatic();
147 bool Normalize(vector<double>& vec);
155 bool respond(
const Bottle& cmd, Bottle& reply);
Port * behaviorOverPort
Port to be used when drive hits upper threshold of homeostatic level.
BufferedPort< Bottle > * inputSensationPort
Port from sensationManager.
Bottle behaviorOverCmd
Command to be send to behaviorOverPort when drive hits upper threshold of homeostatic level...
Port * behaviorUnderPort
Port to be used when drive falls below homeostatic level.
Bottle behaviorUnderCmd
Command to be send to behaviorUnderPort when drive falls below homeostatic level. ...
Port * homeoPort
Port to homeostasis module.
string name
Name of the drive.