19 #ifndef __CLIENTGAZECONTROLLER_H__
20 #define __CLIENTGAZECONTROLLER_H__
26 #include <yarp/os/all.h>
27 #include <yarp/sig/all.h>
28 #include <yarp/dev/all.h>
40 void onRead(yarp::os::Bottle &event);
63 public yarp::dev::IGazeControl
90 std::map<std::string,yarp::dev::GazeEvent*>
eventsMap;
96 bool getPose(
const std::string &poseSel, yarp::sig::Vector &
x, yarp::sig::Vector &o, yarp::os::Stamp *stamp=NULL);
108 bool open(yarp::os::Searchable &config);
116 bool getAngles(yarp::sig::Vector &ang, yarp::os::Stamp *stamp=NULL);
120 bool lookAtMonoPixel(
const int camSel,
const yarp::sig::Vector &px,
const double z=1.0);
136 bool getLeftEyePose(yarp::sig::Vector &
x, yarp::sig::Vector &o, yarp::os::Stamp *stamp=NULL);
137 bool getRightEyePose(yarp::sig::Vector &
x, yarp::sig::Vector &o, yarp::os::Stamp *stamp=NULL);
138 bool getHeadPose(yarp::sig::Vector &
x, yarp::sig::Vector &o, yarp::os::Stamp *stamp=NULL);
139 bool get2DPixel(
const int camSel,
const yarp::sig::Vector &
x, yarp::sig::Vector &px);
140 bool get3DPoint(
const int camSel,
const yarp::sig::Vector &px,
const double z, yarp::sig::Vector &
x);
141 bool get3DPointOnPlane(
const int camSel,
const yarp::sig::Vector &px,
const yarp::sig::Vector &plane, yarp::sig::Vector &
x);
144 bool triangulate3DPoint(
const yarp::sig::Vector &pxl,
const yarp::sig::Vector &pxr, yarp::sig::Vector &
x);
188 bool tweakSet(
const yarp::os::Bottle &options);
189 bool tweakGet(yarp::os::Bottle &options);
clientgazecontroller : implements the client part of the the Gaze Control Interface.
bool getPose(const std::string &poseSel, yarp::sig::Vector &x, yarp::sig::Vector &o, yarp::os::Stamp *stamp=NULL)
bool getFixationPoint(yarp::sig::Vector &fp, yarp::os::Stamp *stamp=NULL)
bool lookAtFixationPointSync(const yarp::sig::Vector &fp)
bool lookAtMonoPixel(const int camSel, const yarp::sig::Vector &px, const double z=1.0)
bool waitSaccadeDone(const double period=0.1, const double timeout=0.0)
bool lookAtMonoPixelWithVergenceSync(const int camSel, const yarp::sig::Vector &px, const double ver)
bool setTrackingMode(const bool f)
bool get3DPointOnPlane(const int camSel, const yarp::sig::Vector &px, const yarp::sig::Vector &plane, yarp::sig::Vector &x)
bool triangulate3DPoint(const yarp::sig::Vector &pxl, const yarp::sig::Vector &pxr, yarp::sig::Vector &x)
bool bindNeckPitch(const double min, const double max)
bool setStabilizationMode(const bool f)
bool setVORGain(const double gain)
yarp::os::BufferedPort< yarp::sig::Vector > portStateHead
bool getJointsVelocities(yarp::sig::Vector &qdot)
bool getNeckPitchRange(double *min, double *max)
bool getInfo(yarp::os::Bottle &info)
bool getNeckJointRange(const std::string &joint, double *min, double *max)
bool lookAtMonoPixelWithVergence(const int camSel, const yarp::sig::Vector &px, const double ver)
yarp::os::BufferedPort< yarp::os::Bottle > portCmdAng
bool setOCRGain(const double gain)
bool unregisterEvent(yarp::dev::GazeEvent &event)
std::map< std::string, yarp::dev::GazeEvent * > eventsMap
bool get3DPoint(const int camSel, const yarp::sig::Vector &px, const double z, yarp::sig::Vector &x)
bool tweakGet(yarp::os::Bottle &options)
yarp::os::BufferedPort< yarp::sig::Vector > portStateFp
yarp::os::BufferedPort< yarp::os::Bottle > portCmdFp
bool getNeckTrajTime(double *t)
bool getSaccadesActivationAngle(double *angle)
bool getOCRGain(double *gain)
bool lookAtStereoPixelsSync(const yarp::sig::Vector &pxl, const yarp::sig::Vector &pxr)
bool lookAtRelAngles(const yarp::sig::Vector &ang)
yarp::os::Stamp anglesStamp
bool getSaccadesMode(bool *f)
bool getLeftEyePose(yarp::sig::Vector &x, yarp::sig::Vector &o, yarp::os::Stamp *stamp=NULL)
ClientGazeController(yarp::os::Searchable &config)
bool getVORGain(double *gain)
bool getNeckAngleUserTolerance(double *angle)
yarp::os::BufferedPort< yarp::os::Bottle > portCmdMono
bool getBlockedVergence(double *ver)
bool getRightEyePose(yarp::sig::Vector &x, yarp::sig::Vector &o, yarp::os::Stamp *stamp=NULL)
double lastFpMsgArrivalTime
bool registerEvent(yarp::dev::GazeEvent &event)
bool setNeckAngleUserTolerance(const double angle)
bool getSaccadesInhibitionPeriod(double *period)
bool storeContext(int *id)
bool setSaccadesActivationAngle(const double angle)
bool checkSaccadeDone(bool *f)
bool bindNeckYaw(const double min, const double max)
yarp::os::RpcClient portRpc
bool getTrackingMode(bool *f)
bool setEyesTrajTime(const double t)
bool lookAtStereoPixels(const yarp::sig::Vector &pxl, const yarp::sig::Vector &pxr)
bool getInfoHelper(yarp::os::Bottle &info)
bool setStereoOptions(const yarp::os::Bottle &options)
bool bindNeckRoll(const double min, const double max)
bool getEyesTrajTime(double *t)
bool setSaccadesMode(const bool f)
bool blockNeckJoint(const std::string &joint, const double min, const double max)
bool setSaccadesInhibitionPeriod(const double period)
yarp::sig::Vector fixationPoint
bool getAngles(yarp::sig::Vector &ang, yarp::os::Stamp *stamp=NULL)
yarp::os::BufferedPort< yarp::sig::Vector > portStateAng
bool tweakSet(const yarp::os::Bottle &options)
bool getAnglesFrom3DPoint(const yarp::sig::Vector &x, yarp::sig::Vector &ang)
bool getJointsDesired(yarp::sig::Vector &qdes)
bool clearJoint(const std::string &joint)
virtual ~ClientGazeController()
bool get2DPixel(const int camSel, const yarp::sig::Vector &x, yarp::sig::Vector &px)
bool lookAtMonoPixelSync(const int camSel, const yarp::sig::Vector &px, const double z=1.0)
bool lookAtRelAnglesSync(const yarp::sig::Vector &ang)
bool getStereoOptions(yarp::os::Bottle &options)
bool waitMotionDone(const double period=0.1, const double timeout=0.0)
bool getHeadPose(yarp::sig::Vector &x, yarp::sig::Vector &o, yarp::os::Stamp *stamp=NULL)
bool setNeckTrajTime(const double t)
bool checkMotionDone(bool *f)
bool lookAtFixationPoint(const yarp::sig::Vector &fp)
bool getNeckYawRange(double *min, double *max)
yarp::os::BufferedPort< yarp::os::Bottle > portCmdStereo
std::set< int > contextIdList
bool lookAtAbsAngles(const yarp::sig::Vector &ang)
bool deleteContext(const int id)
bool getNeckRollRange(double *min, double *max)
GazeEventHandler portEvents
bool lookAtAbsAnglesSync(const yarp::sig::Vector &ang)
bool restoreContext(const int id)
bool get3DPointFromAngles(const int mode, const yarp::sig::Vector &ang, yarp::sig::Vector &x)
bool getStabilizationMode(bool *f)
double lastAngMsgArrivalTime
bool open(yarp::os::Searchable &config)
void eventHandling(yarp::os::Bottle &event)
void setInterface(ClientGazeController *interface)
void onRead(yarp::os::Bottle &event)
ClientGazeController * interface
static struct bpf_program fp