23#include <condition_variable>
28#include <yarp/os/all.h>
29#include <yarp/dev/all.h>
30#include <yarp/sig/all.h>
31#include <yarp/math/Math.h>
32#include <yarp/math/SVD.h>
37using namespace yarp::os;
39using namespace yarp::sig;
40using namespace yarp::math;
54class xdPort :
public BufferedPort<Bottle>,
72 void onRead(Bottle &b)
override;
76 explicit xdPort(
void *_slv);
79 void init(
const Vector &xd0);
86 bool set_xd(
const Vector &_xd);
107 void resize_v(
const int sz,
const double val);
110 void set_xd(
const Vector &_xd);
111 void set_qd(
const Vector &_qd);
112 void set_qd(
const int i,
const double val);
113 void set_x(
const Vector &_x);
114 void set_x(
const Vector &_x,
const double stamp);
115 void set_q(
const Vector &_q);
117 void set_v(
const Vector &_v);
124 Vector
get_x(
double &stamp);
183inline double sat(
const double val,
const double min,
const double max)
185 return std::min(std::max(val,min),max);
192bool getCamParams(
const ResourceFinder &rf,
const string &type, Matrix **Prj,
int &w,
int &
h,
const bool verbose=
false);
198bool getAlignHN(
const ResourceFinder &rf,
const string &type,
iKinChain *chain,
const bool verbose=
false);
221bool getFeedback(Vector &fbTorso, Vector &fbHead, PolyDriver *drvTorso,
223 double *timeStamp =
nullptr);
ResourceFinder rf_cameras
double saccadesActivationAngle
IThreeAxisLinearAccelerometers * iAccel
std::pair< Vector, bool > get_gyro()
void set_fpFrame(const Matrix &_S)
void set_xd(const Vector &_xd)
double gyro_noise_threshold
void set_qd(const Vector &_qd)
void set_q(const Vector &_q)
double saccadesInhibitionPeriod
std::pair< Vector, bool > get_accel()
void resize_counterv(const int sz, const double val)
double minAllowedVergence
IThreeAxisGyroscopes * iGyro
void resize_v(const int sz, const double val)
void set_v(const Vector &_v)
iKinLimbVersion head_version
void set_x(const Vector &_x)
void set_counterv(const Vector &_counterv)
void set_torso(const Vector &_torso)
virtual bool getExtrinsicsMatrix(const string &type, Matrix &M)
virtual bool setExtrinsicsMatrix(const string &type, const Matrix &M)
virtual void minAllowedVergenceChanged()
A class for defining the iCub Eye.
A Base class for defining a Serial Link Chain.
A class for defining the versions of the iCub limbs.
bool set_xd(const Vector &_xd)
void init(const Vector &xd0)
void onRead(Bottle &b) override
condition_variable cv_triggerNeck
void copyJointsBounds(iKinChain *ch1, iKinChain *ch2)
bool getAlignHN(const ResourceFinder &rf, const string &type, iKinChain *chain, const bool verbose=false)
bool getCamParams(const ResourceFinder &rf, const string &type, Matrix **Prj, int &w, int &h, const bool verbose=false)
bool getFeedback(Vector &fbTorso, Vector &fbHead, PolyDriver *drvTorso, PolyDriver *drvHead, const ExchangeData *commData, double *timeStamp=nullptr)
void updateNeckBlockedJoints(iKinChain *chain, const Vector &fbNeck)
void updateTorsoBlockedJoints(iKinChain *chain, const Vector &fbTorso)
Matrix alignJointsBounds(iKinChain *chain, PolyDriver *drvTorso, PolyDriver *drvHead, const ExchangeData *commData)
double sat(const double val, const double min, const double max)