iCub-main
Loading...
Searching...
No Matches
Public Member Functions | List of all members
depth2kin_IDL Class Reference

depth2kin_IDL IDL Interface to depth2kin services. More...

#include <depth2kin_IDL.h>

+ Inheritance diagram for depth2kin_IDL:

Public Member Functions

 depth2kin_IDL ()
 
virtual std::int32_t getNumExperts ()
 Return the number of available experts.
 
virtual bool clearExperts ()
 Clear the list of currently available experts.
 
virtual bool load ()
 Reload the list of experts stored within the configuration file.
 
virtual bool save ()
 Save the current list of experts into the configuration file.
 
virtual bool log (const std::string &type)
 Store on file the log of system response computed out of the explored set of input-output pairs.
 
virtual bool explore ()
 Start the exploration phase.
 
virtual bool stop ()
 Yield an asynchronous stop of the exploration phase.
 
virtual bool setMaxDist (const double max_dist)
 Set the maximum allowed distance between the depth point and kinematic prediction to enable data collection.
 
virtual double getMaxDist ()
 Return the maximum allowed distance between depth point and kinematic prediction to enable data collection.
 
virtual bool setRoi (const std::int32_t side)
 Set the side of the squared window used to filter data collection in the image plane.
 
virtual std::int32_t getRoi ()
 Return the side of the squared window used to filter data collection in the image plane.
 
virtual bool setBlockEyes (const double block_eyes)
 Set the vergence angle used to keep the gaze fixed.
 
virtual double getBlockEyes ()
 Return the current angle to keep the vergence at.
 
virtual bool blockEyes ()
 Tell the gaze to immediately steer the eyes to the stored vergence angle and stay still.
 
virtual bool clearEyes ()
 Remove the block on the eyes.
 
virtual bool setArm (const std::string &arm)
 Select the arm to deal with.
 
virtual std::string getArm ()
 Return the current arm.
 
virtual bool setCalibrationType (const std::string &type, const std::string &extrapolation="auto")
 Set up the calibrator type.
 
virtual std::string getCalibrationType ()
 Return the current calibration type.
 
virtual yarp::os::Property calibrate (const bool rm_outliers=true)
 Ask the current calibrator to carry out the calibration.
 
virtual bool pushCalibrator ()
 Push the current calibrator in the list of experts.
 
virtual bool setTouchWithExperts (const std::string &sw)
 Enable/disable the use of experts for touch test.
 
virtual std::string getTouchWithExperts ()
 Return the current status of the switch for experts usage during touch test.
 
virtual bool touch (const std::int32_t u, const std::int32_t v)
 Yield a touch action with the finger on a depth point.
 
virtual PointReq getPoint (const std::string &arm, const double x, const double y, const double z)
 Retrieve the compensated kinematic point corresponding to the input depth point.
 
virtual std::vector< PointReqgetPoints (const std::string &arm, const std::vector< double > &coordinates)
 Retrieve the compensated kinematic points corresponding to the input depth points.
 
virtual bool setExperiment (const std::string &exp, const std::string &v)
 Set on/off an experiment.
 
virtual std::string getExperiment (const std::string &exp)
 Return the current status of the experiment.
 
virtual yarp::sig::Vector getExtrinsics (const std::string &eye)
 Retrieve the current extrinsics camera parameters.
 
virtual bool resetExtrinsics (const std::string &eye)
 Reset the extrinsics matrix to default eye matrix.
 
virtual bool setExplorationWait (const double wait)
 Set up the wait timeout used during exploration between two consecutive data points.
 
virtual double getExplorationWait ()
 Return the current wait timeout used during exploration between two consecutive data points.
 
virtual bool setExplorationInTargetTol (const double tol)
 Set up the cartesian tolerance used during exploration.
 
virtual double getExplorationInTargetTol ()
 Return the current cartesian tolerance used during exploration.
 
virtual bool setTouchInTargetTol (const double tol)
 Set up the cartesian tolerance used during a touch actions.
 
virtual double getTouchInTargetTol ()
 Return the current cartesian tolerance used during touch actions.
 
virtual bool setExplorationSpace (const double cx, const double cy, const double cz, const double a, const double b)
 Set up the internally coded exploration space composed by two co-centered ellipses, one orthogonal to other, and defined by means of the center and the two semi-axes.
 
virtual bool setExplorationSpaceDelta (const double dcx=0.000000, const double dcy=0.000000, const double dcz=0.000000, const double da=0.000000, const double db=0.000000)
 Set up the exploration space in terms of differences with respect to the internally coded couple of ellipses.
 
virtual yarp::os::Property getExplorationData ()
 Return some progress about the ongoing exploration.
 
virtual bool clearExplorationData ()
 Clean up the internal list of explored points pairs.
 
virtual bool posture (const std::string &type)
 Make the robot reach a predefined posture.
 
virtual bool calibrateDepth ()
 Put the robot in a suitable predefined posture and then execute depth calibration.
 
virtual bool quit ()
 Quit the module.
 
virtual std::vector< std::string > help (const std::string &functionName="--all")
 
bool read (yarp::os::ConnectionReader &connection) override
 

Detailed Description

depth2kin_IDL IDL Interface to depth2kin services.

Definition at line 24 of file depth2kin_IDL.h.

Constructor & Destructor Documentation

◆ depth2kin_IDL()

depth2kin_IDL::depth2kin_IDL ( )

Member Function Documentation

◆ blockEyes()

virtual bool depth2kin_IDL::blockEyes ( )
virtual

Tell the gaze to immediately steer the eyes to the stored vergence angle and stay still.

Returns
true/false on success/failure.

Reimplemented in CalibModule.

◆ calibrate()

virtual yarp::os::Property depth2kin_IDL::calibrate ( const bool  rm_outliers = true)
virtual

Ask the current calibrator to carry out the calibration.

Parameters
rm_outliersif true outliers removal is performed.
Returns
a property containing the output in terms of calibration errors for each subsystem: calibrator, aligner.

Reimplemented in CalibModule.

◆ calibrateDepth()

virtual bool depth2kin_IDL::calibrateDepth ( )
virtual

Put the robot in a suitable predefined posture and then execute depth calibration.

Returns
true/false on success/failure.

Reimplemented in CalibModule.

◆ clearExperts()

virtual bool depth2kin_IDL::clearExperts ( )
virtual

Clear the list of currently available experts.

Returns
true/false on success/failure.

Reimplemented in CalibModule.

◆ clearExplorationData()

virtual bool depth2kin_IDL::clearExplorationData ( )
virtual

Clean up the internal list of explored points pairs.

Returns
true/false on success/failure.

Reimplemented in CalibModule.

◆ clearEyes()

virtual bool depth2kin_IDL::clearEyes ( )
virtual

Remove the block on the eyes.

Returns
true/false on success/failure.

Reimplemented in CalibModule.

◆ explore()

virtual bool depth2kin_IDL::explore ( )
virtual

Start the exploration phase.

Returns
true/false on success/failure.

Reimplemented in CalibModule.

◆ getArm()

virtual std::string depth2kin_IDL::getArm ( )
virtual

Return the current arm.

Returns
left or right.

Reimplemented in CalibModule.

◆ getBlockEyes()

virtual double depth2kin_IDL::getBlockEyes ( )
virtual

Return the current angle to keep the vergence at.

Returns
the vergence angle in degrees.

Reimplemented in CalibModule.

◆ getCalibrationType()

virtual std::string depth2kin_IDL::getCalibrationType ( )
virtual

Return the current calibration type.

Returns
the calibration type.

Reimplemented in CalibModule.

◆ getExperiment()

virtual std::string depth2kin_IDL::getExperiment ( const std::string &  exp)
virtual

Return the current status of the experiment.

Parameters
expthe experiment (depth2kin or aligneyes)
Returns
on/off.

Reimplemented in CalibModule.

◆ getExplorationData()

virtual yarp::os::Property depth2kin_IDL::getExplorationData ( )
virtual

Return some progress about the ongoing exploration.

Returns
a property that looks like (status [idle|ongoing]) (total_points <int>) (remaining_points <int>) (calibrator_points <int>) (aligner_points <int>)

Reimplemented in CalibModule.

◆ getExplorationInTargetTol()

virtual double depth2kin_IDL::getExplorationInTargetTol ( )
virtual

Return the current cartesian tolerance used during exploration.

Returns
the tolerance.

Reimplemented in CalibModule.

◆ getExplorationWait()

virtual double depth2kin_IDL::getExplorationWait ( )
virtual

Return the current wait timeout used during exploration between two consecutive data points.

Returns
the wait timeout in seconds.

Reimplemented in CalibModule.

◆ getExtrinsics()

virtual yarp::sig::Vector depth2kin_IDL::getExtrinsics ( const std::string &  eye)
virtual

Retrieve the current extrinsics camera parameters.

Parameters
eyeis left or right camera eye.
Returns
a 6x1 Vector containing the translational and the rotational (in roll-pith-yaw convention) parts of the extrinsics matrix.

Reimplemented in CalibModule.

◆ getMaxDist()

virtual double depth2kin_IDL::getMaxDist ( )
virtual

Return the maximum allowed distance between depth point and kinematic prediction to enable data collection.

Returns
the distance.

Reimplemented in CalibModule.

◆ getNumExperts()

virtual std::int32_t depth2kin_IDL::getNumExperts ( )
virtual

Return the number of available experts.

Returns
the number of available experts.

Reimplemented in CalibModule.

◆ getPoint()

virtual PointReq depth2kin_IDL::getPoint ( const std::string &  arm,
const double  x,
const double  y,
const double  z 
)
virtual

Retrieve the compensated kinematic point corresponding to the input depth point.

Parameters
armaccounts for left or right list of experts.
xthe x-coordinate of the depth point.
ythe y-coordinate of the depth point.
zthe z-coordinate of the depth point.
Returns
the requested point in PointReq format.

Reimplemented in CalibModule.

◆ getPoints()

virtual std::vector< PointReq > depth2kin_IDL::getPoints ( const std::string &  arm,
const std::vector< double > &  coordinates 
)
virtual

Retrieve the compensated kinematic points corresponding to the input depth points.

Parameters
armaccounts for left or right list of experts.
coordinatesthe 3D coordinates of the depth points.
Returns
the requested points in PointReq format.

Reimplemented in CalibModule.

◆ getRoi()

virtual std::int32_t depth2kin_IDL::getRoi ( )
virtual

Return the side of the squared window used to filter data collection in the image plane.

Returns
the window side.

Reimplemented in CalibModule.

◆ getTouchInTargetTol()

virtual double depth2kin_IDL::getTouchInTargetTol ( )
virtual

Return the current cartesian tolerance used during touch actions.

Returns
the tolerance.

Reimplemented in CalibModule.

◆ getTouchWithExperts()

virtual std::string depth2kin_IDL::getTouchWithExperts ( )
virtual

Return the current status of the switch for experts usage during touch test.

Returns
on/off if experts are used/not-used.

Reimplemented in CalibModule.

◆ help()

virtual std::vector< std::string > depth2kin_IDL::help ( const std::string &  functionName = "--all")
virtual

◆ load()

virtual bool depth2kin_IDL::load ( )
virtual

Reload the list of experts stored within the configuration file.

Returns
true/false on success/failure.

Reimplemented in CalibModule.

◆ log()

virtual bool depth2kin_IDL::log ( const std::string &  type)
virtual

Store on file the log of system response computed out of the explored set of input-output pairs.

Parameters
typecan be experts or calibrator, accounting either for the response of mixture of available experts or the output of the current calibrator, respectively.
Returns
true/false on success/failure. It returns false also if calibrator is selected and calibration has not been performed yet.
Note
Each row of the file will contain the following data:
\( d_x d_y d_z k_x k_y k_z r_x r_y r_z e, \) where \( d \) is the depth point, \( k \) is the kinematic point, \( r \) is the system response and \( e=|k-r| \) is the error.

Reimplemented in CalibModule.

◆ posture()

virtual bool depth2kin_IDL::posture ( const std::string &  type)
virtual

Make the robot reach a predefined posture.

Parameters
typecan be one of the following:
home, look_hands.
Returns
true/false on success/failure.

Reimplemented in CalibModule.

◆ pushCalibrator()

virtual bool depth2kin_IDL::pushCalibrator ( )
virtual

Push the current calibrator in the list of experts.

Returns
true/false on success/failure.
Note
the calibrator needs to have been calibrated at least once.

Reimplemented in CalibModule.

◆ quit()

virtual bool depth2kin_IDL::quit ( )
virtual

Quit the module.

Returns
true/false on success/failure.

Reimplemented in CalibModule.

◆ read()

bool depth2kin_IDL::read ( yarp::os::ConnectionReader &  connection)
override

◆ resetExtrinsics()

virtual bool depth2kin_IDL::resetExtrinsics ( const std::string &  eye)
virtual

Reset the extrinsics matrix to default eye matrix.

Parameters
eyeis left or right camera eye.
Returns
true/false on success/failure.

Reimplemented in CalibModule.

◆ save()

virtual bool depth2kin_IDL::save ( )
virtual

Save the current list of experts into the configuration file.

Returns
true/false on success/failure.

Reimplemented in CalibModule.

◆ setArm()

virtual bool depth2kin_IDL::setArm ( const std::string &  arm)
virtual

Select the arm to deal with.

Parameters
armis left or right.
Returns
true/false on success/failure.

Reimplemented in CalibModule.

◆ setBlockEyes()

virtual bool depth2kin_IDL::setBlockEyes ( const double  block_eyes)
virtual

Set the vergence angle used to keep the gaze fixed.

Parameters
block_eyesthe value in degrees of the vergence. It must be equal or greater than the minimum vergence angle allowed by the gaze controller.
Returns
true/false on success/failure.

Reimplemented in CalibModule.

◆ setCalibrationType()

virtual bool depth2kin_IDL::setCalibrationType ( const std::string &  type,
const std::string &  extrapolation = "auto" 
)
virtual

Set up the calibrator type.

Parameters
typecan be one of the following:
se3, se3+scale, affine, lssvm.
extrapolationspecifies whether the calibrator will be used for extrapolating data (true) or not (false); if auto is provided, then automatic choice is taken depending on the type.
Returns
true/false on success/failure.

Reimplemented in CalibModule.

◆ setExperiment()

virtual bool depth2kin_IDL::setExperiment ( const std::string &  exp,
const std::string &  v 
)
virtual

Set on/off an experiment.

Parameters
expthe experiment (depth2kin or aligneyes) to switch on/off.
vis on or off.
Returns
true/false on success/failure.

Reimplemented in CalibModule.

◆ setExplorationInTargetTol()

virtual bool depth2kin_IDL::setExplorationInTargetTol ( const double  tol)
virtual

Set up the cartesian tolerance used during exploration.

Parameters
tolthe overall tolerance employed for the cartesian movements.
Returns
true/false on success/failure.

Reimplemented in CalibModule.

◆ setExplorationSpace()

virtual bool depth2kin_IDL::setExplorationSpace ( const double  cx,
const double  cy,
const double  cz,
const double  a,
const double  b 
)
virtual

Set up the internally coded exploration space composed by two co-centered ellipses, one orthogonal to other, and defined by means of the center and the two semi-axes.

Parameters
cxthe center x-coordinate.
cythe center y-coordinate.
czthe center z-coordiante.
athe major semi-axis length.
bthe minor semi-axis length.
Returns
true/false on success/failure.

Reimplemented in CalibModule.

◆ setExplorationSpaceDelta()

virtual bool depth2kin_IDL::setExplorationSpaceDelta ( const double  dcx = 0.000000,
const double  dcy = 0.000000,
const double  dcz = 0.000000,
const double  da = 0.000000,
const double  db = 0.000000 
)
virtual

Set up the exploration space in terms of differences with respect to the internally coded couple of ellipses.

Parameters
dcxthe center delta x-coordinate.
dcythe center delta y-coordinate.
dczthe center delta z-coordiante.
dathe major semi-axis delta length.
dbthe minor semi-axis delta length.
Returns
true/false on success/failure.

Reimplemented in CalibModule.

◆ setExplorationWait()

virtual bool depth2kin_IDL::setExplorationWait ( const double  wait)
virtual

Set up the wait timeout used during exploration between two consecutive data points.

Parameters
waitthe timeout in seconds.
Returns
true/false on success/failure.

Reimplemented in CalibModule.

◆ setMaxDist()

virtual bool depth2kin_IDL::setMaxDist ( const double  max_dist)
virtual

Set the maximum allowed distance between the depth point and kinematic prediction to enable data collection.

Parameters
max_distthe value in meters.
Returns
true/false on success/failure.

Reimplemented in CalibModule.

◆ setRoi()

virtual bool depth2kin_IDL::setRoi ( const std::int32_t  side)
virtual

Set the side of the squared window used to filter data collection in the image plane.

Parameters
sidethe length of the window side.
Returns
true/false on success/failure.

◆ setTouchInTargetTol()

virtual bool depth2kin_IDL::setTouchInTargetTol ( const double  tol)
virtual

Set up the cartesian tolerance used during a touch actions.

Parameters
tolthe overall tolerance employed for the cartesian movements.
Returns
true/false on success/failure.

Reimplemented in CalibModule.

◆ setTouchWithExperts()

virtual bool depth2kin_IDL::setTouchWithExperts ( const std::string &  sw)
virtual

Enable/disable the use of experts for touch test.

Parameters
switchis on/off to use/not-use the experts.
Returns
true/false on success/failure.

Reimplemented in CalibModule.

◆ stop()

virtual bool depth2kin_IDL::stop ( )
virtual

Yield an asynchronous stop of the exploration phase.

Returns
true/false on success/failure.

Reimplemented in CalibModule.

◆ touch()

virtual bool depth2kin_IDL::touch ( const std::int32_t  u,
const std::int32_t  v 
)
virtual

Yield a touch action with the finger on a depth point.

Parameters
uthe u-coordinate of the depth point in the image plane.
vthe v-coordinate of the depth point in the image plane.
Returns
true/false on success/failure.

The documentation for this class was generated from the following file: