22#include <yarp/os/all.h>
24#include <yarp/sig/Vector.h>
26#include <yarp/dev/PolyDriver.h>
27#include <yarp/dev/Drivers.h>
28#include <yarp/dev/all.h>
30#include <yarp/math/RandnScalar.h>
38using namespace yarp::os;
39using namespace yarp::sig;
40using namespace yarp::dev;
44class iCubBreatherThread:
public PeriodicThread
59 IPositionControl *ipos;
69 yarp::os::Bottle groupPartBottle;
70 std::vector <double> noiseStDvtns;
71 std::vector <double> refSpeeds;
74 yarp::math::RandnScalar randngen;
81 bool setCtrlModes(
const string &_s);
89 bool areJointsHealthyAndSet(vector<int> &jointsToSet,
const string &_s);
97 bool goToTarget(
const Vector &nT);
99 Vector computeNewTarget();
106 int printMessage(
const int l,
const char *f, ...)
const;
110 iCubBreatherThread(
int _rate,
string _name,
string _robot,
111 string _part,
bool _autoStart,
double _noiseStd,
112 double _refSpeed,
int _v,
const ResourceFinder &_rf);
114 virtual bool threadInit();
118 virtual void threadRelease();
120 bool startBreathing();
121 bool stopBreathing();