19#ifndef __CONTROLLER_H__
20#define __CONTROLLER_H__
23#include <condition_variable>
28#include <yarp/os/all.h>
29#include <yarp/sig/all.h>
30#include <yarp/dev/all.h>
31#include <yarp/math/Math.h>
35#include <iCub/utils.h>
43using namespace yarp::os;
45using namespace yarp::sig;
46using namespace yarp::math;
119 Vector
computedxFP(
const Matrix &
H,
const Vector &
v,
const Vector &w,
const Vector &x_FP);
124 void stopLimb(
const bool execStopPosition=
true);
125 void notifyEvent(
const string &event,
const double checkPoint=-1.0);
132 const double _neckTime,
const double _eyesTime,
133 const double _min_abs_vel,
const unsigned int _period);
139 void doSaccade(
const Vector &ang,
const Vector &vel);
140 bool look(
const Vector &
x);
142 void printIter(Vector &xd, Vector &
fp, Vector &
qd, Vector &q, Vector &
v,
double printTime);
151 void setTneck(
const double execTime);
152 void setTeyes(
const double execTime);
160 bool getPose(
const string &poseSel, Vector &
x, Stamp &stamp);
bool unregisterMotionOngoingEvent(const double checkPoint)
void stopLimb(const bool execStopPosition=true)
bool setGazeStabilization(const bool f)
BufferedPort< Bottle > port_event
bool getPose(const string &poseSel, Vector &x, Stamp &stamp)
void afterStart(bool s) override
void threadRelease() override
Vector computedxFP(const Matrix &H, const Vector &v, const Vector &w, const Vector &x_FP)
void printIter(Vector &xd, Vector &fp, Vector &qd, Vector &q, Vector &v, double printTime)
minJerkVelCtrl * mjCtrlNeck
Vector computeEyesVelFromdxFP(const Vector &dfp)
void setTeyes(const double execTime)
bool areJointsHealthyAndSet()
void motionOngoingEventsFlush()
vector< int > jointsToSet
multiset< double > motionOngoingEvents
bool look(const Vector &x)
void notifyEvent(const string &event, const double checkPoint=-1.0)
minJerkVelCtrl * mjCtrlEyes
void minAllowedVergenceChanged() override
void setTneck(const double execTime)
bool getVelocity(Vector &vel)
void doSaccade(const Vector &ang, const Vector &vel)
bool threadInit() override
bool getDesired(Vector &des)
void findMinimumAllowedVergence()
IPositionControl * posHead
void setTrackingMode(const bool f)
bool getGazeStabilization() const
double ctrlActiveRisingEdgeTime
void motionOngoingEventsHandling()
BufferedPort< Vector > port_q
Integrator * IntStabilizer
IPositionDirect * posNeck
IVelocityControl * velHead
BufferedPort< Bottle > port_debug
BufferedPort< Vector > port_x
multiset< double > motionOngoingEventsCurrent
Vector computeNeckVelFromdxFP(const Vector &fp, const Vector &dfp)
bool getTrackingMode() const
condition_variable cv_eventLook
Bottle listMotionOngoingEvents()
bool registerMotionOngoingEvent(const double checkPoint)
A class for defining a saturated integrator based on Tustin formula: .
Abstract class for minimum-jerk controllers with velocity commands.
A class for describing the kinematic of the straight line coming out from the point located between t...
A class for defining the Inertia Sensor Kinematics of the iCub.
A Base class for defining a Serial Link Chain.
constexpr double GAZECTRL_MOTIONDONE_EYES_QTHRES
constexpr int32_t GAZECTRL_SWOFFCOND_DISABLESLOT
constexpr double GAZECTRL_CRITICVER_STABILIZATION
constexpr double GAZECTRL_MOTIONDONE_NECK_QTHRES
static struct bpf_program fp