7#ifndef YARP_DEV_GAZECONTROL_H
8#define YARP_DEV_GAZECONTROL_H
22struct GazeEventParameters;
23struct GazeEventVariables;
262 const double z = 1.0) = 0;
276 const double ver) = 0;
352 const double z = 1.0) = 0;
366 const double ver) = 0;
918 virtual bool waitMotionDone(
const double period=0.1,
const double timeout=0.0) = 0;
contains the definition of a Vector type
Interface for a event notified by the gaze controller.
yarp::dev::GazeEventVariables gazeEventVariables
The event handler fills this structure with useful information at run-time.
yarp::dev::GazeEventParameters gazeEventParameters
The user fills this structure to establish the event parameters.
virtual void gazeEventCallback()=0
Event callback to be overridden by the user.
virtual ~GazeEvent()
Destructor.
Interface for a gaze controller.
virtual bool lookAtMonoPixel(const int camSel, const yarp::sig::Vector &px, const double z=1.0)=0
Move the gaze to a location specified by a pixel within the image plane.
virtual bool lookAtMonoPixelWithVergenceSync(const int camSel, const yarp::sig::Vector &px, const double ver)=0
Move the gaze to a location specified by a pixel within the image plane using the vergence.
virtual bool lookAtRelAngles(const yarp::sig::Vector &ang)=0
Move the gaze to a specified gazing angles configuration given in the relative reference frame.
virtual bool getVORGain(double *gain)=0
Get the current gain used to weigh the vestibulo-ocular reflex (VOR).
virtual bool getStereoOptions(yarp::os::Bottle &options)=0
Return the current options used by the stereo approach.
virtual bool clearEyes()=0
Unblock the eyes.
virtual bool setNeckTrajTime(const double t)=0
Set the duration of the trajectory for the neck actuators.
virtual bool getJointsVelocities(yarp::sig::Vector &qdot)=0
Get the joints velocities commanded by the controller.
virtual bool setEyesTrajTime(const double t)=0
Set the duration of the trajectory for the eyes actuators.
virtual ~IGazeControl()
Destructor.
virtual bool tweakSet(const yarp::os::Bottle &options)=0
Tweak low-level controller's parameters.
virtual bool getTrackingMode(bool *f)=0
Get the current controller mode.
virtual bool triangulate3DPoint(const yarp::sig::Vector &pxl, const yarp::sig::Vector &pxr, yarp::sig::Vector &x)=0
Triangulate two points given in the image planes to find the corresponding 3-d point in the space.
virtual bool lookAtFixationPointSync(const yarp::sig::Vector &fp)=0
Move the gaze to a specified fixation point in cartesian space.
virtual bool setStabilizationMode(const bool f)=0
Turn on/off the gaze stabilization.
virtual bool deleteContext(const int id)=0
Delete a specified controller context.
virtual bool stopControl()=0
Ask for an immediate stop of the motion.
virtual bool setVORGain(const double gain)=0
Set the gain used to weigh the vestibulo-ocular reflex (VOR).
virtual bool setSaccadesActivationAngle(const double angle)=0
Set the activation angle for saccadic movements.
virtual bool lookAtMonoPixelWithVergence(const int camSel, const yarp::sig::Vector &px, const double ver)=0
Move the gaze to a location specified by a pixel within the image plane using the vergence.
virtual bool get3DPoint(const int camSel, const yarp::sig::Vector &px, const double z, yarp::sig::Vector &x)=0
Get the 3-d point whose pixel projection and z-component in the camera frame are given.
virtual bool getHeadPose(yarp::sig::Vector &x, yarp::sig::Vector &o, yarp::os::Stamp *stamp=NULL)=0
Get the current pose of the head frame.
virtual bool bindNeckPitch(const double min, const double max)=0
Bind the neck pitch within a specified range.
virtual bool getNeckYawRange(double *min, double *max)=0
Return the current neck yaw range.
virtual bool getJointsDesired(yarp::sig::Vector &qdes)=0
Get the joints target values where the controller is moving the system to.
virtual bool blockNeckRoll()=0
Block the neck roll at the current angle.
virtual bool lookAtRelAnglesSync(const yarp::sig::Vector &ang)=0
Move the gaze to a specified gazing angles configuration given in the relative reference frame.
virtual bool bindNeckYaw(const double min, const double max)=0
Bind the neck yaw within a specified range.
virtual bool getNeckAngleUserTolerance(double *angle)=0
Return the current tolerance defined by the user to gaze at the target with the neck,...
virtual bool getNeckTrajTime(double *t)=0
Get the current trajectory duration for the neck actuators.
virtual bool blockNeckYaw(const double val)=0
Block the neck yaw at a specified angle.
virtual bool clearNeckPitch()=0
Unblock the neck pitch.
virtual bool waitSaccadeDone(const double period=0.1, const double timeout=0.0)=0
Wait until the current saccade is terminated.
virtual bool getOCRGain(double *gain)=0
Get the current gain used to weigh the oculo-collic reflex (OCR).
virtual bool get3DPointFromAngles(const int mode, const yarp::sig::Vector &ang, yarp::sig::Vector &x)=0
Get the 3-d coordinates corresponding to the angular positions.
virtual bool setSaccadesMode(const bool f)=0
Enable/disable the use of very fast eyes movements (saccades).
virtual bool setTrackingMode(const bool f)=0
Set the controller in tracking or non-tracking mode.
virtual bool tweakGet(yarp::os::Bottle &options)=0
Return low-level controller's parameters.
virtual bool setOCRGain(const double gain)=0
Set the gain used to weigh the oculo-collic reflex (OCR).
virtual bool get3DPointOnPlane(const int camSel, const yarp::sig::Vector &px, const yarp::sig::Vector &plane, yarp::sig::Vector &x)=0
Get the 3-d point - whose pixel projection is given - that results from the projection into a plane s...
virtual bool getNeckRollRange(double *min, double *max)=0
Return the current neck roll range.
virtual bool setStereoOptions(const yarp::os::Bottle &options)=0
Update the options used by the stereo approach.
virtual bool blockEyes()=0
Block the eyes to look always straight ahead (the tilt can vary) with the current vergence angle.
virtual bool blockNeckYaw()=0
Block the neck yaw at the current angle.
virtual bool getBlockedVergence(double *ver)=0
Return the current vergence angle used to block the eyes.
virtual bool getSaccadesMode(bool *f)=0
Query whether the very fast eyes movements (saccades) will be employed or not.
virtual bool setSaccadesInhibitionPeriod(const double period)=0
Set the inhibition period for saccadic movements.
virtual bool getAnglesFrom3DPoint(const yarp::sig::Vector &x, yarp::sig::Vector &ang)=0
Get the absolute angular coordinates corresponding to the 3-d point.
virtual bool lookAtAbsAnglesSync(const yarp::sig::Vector &ang)=0
Move the gaze to a specified gazing angles configuration given in the absolute reference frame.
virtual bool getFixationPoint(yarp::sig::Vector &fp, yarp::os::Stamp *stamp=NULL)=0
Get the current fixation point.
virtual bool blockEyes(const double ver)=0
Block the eyes to look always straight ahead (the tilt can vary) with a specified vergence angle.
virtual bool checkMotionDone(bool *f)=0
Check once if the current trajectory is terminated.
virtual bool getAngles(yarp::sig::Vector &ang, yarp::os::Stamp *stamp=NULL)=0
Get the current gaze configuration in terms of azimuth and elevation angles wrt to the absolute refer...
virtual bool lookAtStereoPixels(const yarp::sig::Vector &pxl, const yarp::sig::Vector &pxr)=0
Move the gaze to a location specified by two pixels representing the same 3-d point as seen from with...
virtual bool getStabilizationMode(bool *f)=0
Get the current stabilization mode.
virtual bool lookAtAbsAngles(const yarp::sig::Vector &ang)=0
Move the gaze to a specified gazing angles configuration given in the absolute reference frame.
virtual bool lookAtFixationPoint(const yarp::sig::Vector &fp)=0
Move the gaze to a specified fixation point in cartesian space.
virtual bool blockNeckRoll(const double val)=0
Block the neck roll at a specified angle.
virtual bool restoreContext(const int id)=0
Restore the controller context previously stored.
virtual bool storeContext(int *id)=0
Store the controller context.
virtual bool getNeckPitchRange(double *min, double *max)=0
Return the current neck pitch range.
virtual bool getEyesTrajTime(double *t)=0
Get the current trajectory duration for the eyes actuators.
virtual bool registerEvent(yarp::dev::GazeEvent &event)=0
Register an event.
virtual bool blockNeckPitch(const double val)=0
Block the neck pitch at a specified angle.
virtual bool bindNeckRoll(const double min, const double max)=0
Bind the neck roll within a specified range.
virtual bool unregisterEvent(yarp::dev::GazeEvent &event)=0
Unregister an event.
virtual bool checkSaccadeDone(bool *f)=0
Check once if the saccade is terminated.
virtual bool get2DPixel(const int camSel, const yarp::sig::Vector &x, yarp::sig::Vector &px)=0
Get the 2-d pixel point - whose cartesian coordinates are given wrt the root reference frame - that r...
virtual bool getLeftEyePose(yarp::sig::Vector &x, yarp::sig::Vector &o, yarp::os::Stamp *stamp=NULL)=0
Get the current pose of the left eye frame.
virtual bool getRightEyePose(yarp::sig::Vector &x, yarp::sig::Vector &o, yarp::os::Stamp *stamp=NULL)=0
Get the current pose of the right eye frame.
virtual bool blockNeckPitch()=0
Block the neck pitch at the current angle.
virtual bool lookAtStereoPixelsSync(const yarp::sig::Vector &pxl, const yarp::sig::Vector &pxr)=0
Move the gaze to a location specified by two pixels representing the same 3-d point as seen from with...
virtual bool getSaccadesInhibitionPeriod(double *period)=0
Get the current inhibition period for saccadic movements.
virtual bool setNeckAngleUserTolerance(const double angle)=0
Specify a new tolerance to gaze at the target with the neck.
virtual bool clearNeckRoll()=0
Unblock the neck roll.
virtual bool waitMotionDone(const double period=0.1, const double timeout=0.0)=0
Wait until the current trajectory is terminated.
virtual bool clearNeckYaw()=0
Unblock the neck yaw.
virtual bool getInfo(yarp::os::Bottle &info)=0
Return useful info on the operating state of the controller.
virtual bool lookAtMonoPixelSync(const int camSel, const yarp::sig::Vector &px, const double z=1.0)=0
Move the gaze to a location specified by a pixel within the image plane.
virtual bool getSaccadesActivationAngle(double *angle)=0
Get the current activation angle for saccadic movements.
A simple collection of objects that can be described and transmitted in a portable way.
An abstraction for a time stamp and/or sequence number.
For streams capable of holding different kinds of content, check what they actually have.
The main, catch-all namespace for YARP.
Structure for configuring a gaze event.
double motionOngoingCheckPoint
The user specifies the motion check-point that raises a "motion-ongoing" event through this parameter...
std::string type
The signature of the event as specified by the user.
Structure for retrieving information from a gaze event.
double time
Contain the time instant of the source when the event took place, as filled by the event handler.
double motionOngoingCheckPoint
Contain the motion check-point that raised a "motion-ongoing" event.
std::string type
The signature of the received event as filled by the event handler.