|
iCub-main
|
#include <module.h>
Inheritance diagram for CalibModule:Public Member Functions | |
| CalibModule () | |
| bool | configure (ResourceFinder &rf) |
| void | onRead (ImageOf< PixelMono > &imgIn) |
| double | getPeriod () |
| bool | updateModule () |
| void | terminate () |
| bool | close () |
| int | getNumExperts () |
| Return the number of available experts. | |
| bool | clearExperts () |
| Clear the list of currently available experts. | |
| bool | load () |
| Reload the list of experts stored within the configuration file. | |
| bool | save () |
| Save the current list of experts into the configuration file. | |
| bool | log (const string &type) |
| Store on file the log of system response computed out of the explored set of input-output pairs. | |
| bool | explore () |
| Start the exploration phase. | |
| bool | stop () |
| Yield an asynchronous stop of the exploration phase. | |
| bool | setMaxDist (const double max_dist) |
| Set the maximum allowed distance between the depth point and kinematic prediction to enable data collection. | |
| double | getMaxDist () |
| Return the maximum allowed distance between depth point and kinematic prediction to enable data collection. | |
| bool | setRoi (const int side) |
| int | getRoi () |
| Return the side of the squared window used to filter data collection in the image plane. | |
| bool | setBlockEyes (const double block_eyes) |
| Set the vergence angle used to keep the gaze fixed. | |
| double | getBlockEyes () |
| Return the current angle to keep the vergence at. | |
| bool | blockEyes () |
| Tell the gaze to immediately steer the eyes to the stored vergence angle and stay still. | |
| bool | clearEyes () |
| Remove the block on the eyes. | |
| bool | setArm (const string &arm) |
| Select the arm to deal with. | |
| string | getArm () |
| Return the current arm. | |
| bool | setCalibrationType (const string &type, const string &extrapolation) |
| Set up the calibrator type. | |
| string | getCalibrationType () |
| Return the current calibration type. | |
| Property | calibrate (const bool rm_outliers) |
| Ask the current calibrator to carry out the calibration. | |
| bool | pushCalibrator () |
| Push the current calibrator in the list of experts. | |
| bool | setTouchWithExperts (const string &sw) |
| Enable/disable the use of experts for touch test. | |
| string | getTouchWithExperts () |
| Return the current status of the switch for experts usage during touch test. | |
| bool | touch (const int u, const int v) |
| PointReq | getPoint (const string &arm, const double x, const double y, const double z) |
| Retrieve the compensated kinematic point corresponding to the input depth point. | |
| vector< PointReq > | getPoints (const string &arm, const vector< double > &coordinates) |
| Retrieve the compensated kinematic points corresponding to the input depth points. | |
| bool | setExperiment (const string &exp, const string &v) |
| Set on/off an experiment. | |
| string | getExperiment (const string &exp) |
| Return the current status of the experiment. | |
| Vector | getExtrinsics (const string &eye) |
| Retrieve the current extrinsics camera parameters. | |
| bool | resetExtrinsics (const string &eye) |
| Reset the extrinsics matrix to default eye matrix. | |
| bool | setExplorationWait (const double wait) |
| Set up the wait timeout used during exploration between two consecutive data points. | |
| double | getExplorationWait () |
| Return the current wait timeout used during exploration between two consecutive data points. | |
| bool | setExplorationInTargetTol (const double tol) |
| Set up the cartesian tolerance used during exploration. | |
| double | getExplorationInTargetTol () |
| Return the current cartesian tolerance used during exploration. | |
| bool | setTouchInTargetTol (const double tol) |
| Set up the cartesian tolerance used during a touch actions. | |
| double | getTouchInTargetTol () |
| Return the current cartesian tolerance used during touch actions. | |
| 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. | |
| bool | setExplorationSpaceDelta (const double dcx, const double dcy, const double dcz, const double da, const double db) |
| Set up the exploration space in terms of differences with respect to the internally coded couple of ellipses. | |
| Property | getExplorationData () |
| Return some progress about the ongoing exploration. | |
| bool | clearExplorationData () |
| Clean up the internal list of explored points pairs. | |
| bool | posture (const string &type) |
| Make the robot reach a predefined posture. | |
| bool | calibrateDepth () |
| Put the robot in a suitable predefined posture and then execute depth calibration. | |
| bool | quit () |
| Quit the module. | |
Public Member Functions inherited from depth2kin_IDL | |
| depth2kin_IDL () | |
| 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 bool | touch (const std::int32_t u, const std::int32_t v) |
| Yield a touch action with the finger on a depth point. | |
| virtual std::vector< std::string > | help (const std::string &functionName="--all") |
| bool | read (yarp::os::ConnectionReader &connection) override |
Protected Types | |
| enum | { motorExplorationStateIdle , motorExplorationStateTrigger , motorExplorationStateReach , motorExplorationStateLog } |
Protected Member Functions | |
| bool | attach (RpcServer &source) |
| bool | createTargets (const Vector &c, const Vector &size) |
| bool | isTypeValid (const string &type) |
| Calibrator * | factory (const string &type) |
| bool | factory (Value &v) |
| cv::Rect | extractFingerTip (ImageOf< PixelMono > &imgIn, ImageOf< PixelBgr > &imgOut, const Vector &c, Vector &px) |
| double | getMinVer () const |
| bool | getGazeParams (const string &eye, const string &type, Matrix &M) |
| bool | pushExtrinsics (const string &eye, const Matrix &H) |
| bool | getDepth (const Vector &px, Vector &x, Vector &pxr) |
| bool | getDepthAveraged (const Vector &px, Vector &x, Vector &pxr, const int maxSamples=5) |
| void | openHand (IControlMode *imod, IPositionControl *ipos) |
| void | postureHelper (const Vector &gaze_ang, const Matrix &targetL, const Matrix &targetR) |
| void | prepareRobot () |
| int | removeOutliers () |
| void | doMotorExploration () |
| void | doTouch (const Vector &xd) |
| void | doTest () |
|
protected |
| CalibModule::CalibModule | ( | ) |
Definition at line 886 of file module.cpp.
|
protected |
Definition at line 61 of file module.cpp.
|
virtual |
Tell the gaze to immediately steer the eyes to the stored vergence angle and stay still.
Reimplemented from depth2kin_IDL.
Definition at line 1345 of file module.cpp.
|
virtual |
Ask the current calibrator to carry out the calibration.
| rm_outliers | if true outliers removal is performed. |
calibrator, aligner. Reimplemented from depth2kin_IDL.
Definition at line 1410 of file module.cpp.
|
virtual |
Put the robot in a suitable predefined posture and then execute depth calibration.
Reimplemented from depth2kin_IDL.
Definition at line 488 of file module.cpp.
|
virtual |
Clear the list of currently available experts.
Reimplemented from depth2kin_IDL.
Definition at line 1148 of file module.cpp.
|
virtual |
Clean up the internal list of explored points pairs.
Reimplemented from depth2kin_IDL.
Definition at line 1736 of file module.cpp.
|
virtual |
Remove the block on the eyes.
Reimplemented from depth2kin_IDL.
Definition at line 1355 of file module.cpp.
| bool CalibModule::close | ( | ) |
Definition at line 1821 of file module.cpp.
| bool CalibModule::configure | ( | ResourceFinder & | rf | ) |
Definition at line 890 of file module.cpp.
|
protected |
Definition at line 68 of file module.cpp.
|
protected |
Definition at line 624 of file module.cpp.
|
protected |
Definition at line 752 of file module.cpp.
|
protected |
Definition at line 701 of file module.cpp.
|
virtual |
Start the exploration phase.
Reimplemented from depth2kin_IDL.
Definition at line 1273 of file module.cpp.
|
protected |
Definition at line 170 of file module.cpp.
|
protected |
Definition at line 126 of file module.cpp.
|
protected |
Definition at line 140 of file module.cpp.
|
virtual |
Return the current arm.
left or right. Reimplemented from depth2kin_IDL.
Definition at line 1379 of file module.cpp.
|
virtual |
Return the current angle to keep the vergence at.
Reimplemented from depth2kin_IDL.
Definition at line 1338 of file module.cpp.
|
virtual |
Return the current calibration type.
Reimplemented from depth2kin_IDL.
Definition at line 1403 of file module.cpp.
|
protected |
Definition at line 283 of file module.cpp.
|
protected |
Definition at line 306 of file module.cpp.
|
virtual |
Return the current status of the experiment.
| exp | the experiment (depth2kin or aligneyes) |
on/off. Reimplemented from depth2kin_IDL.
Definition at line 1608 of file module.cpp.
|
virtual |
Return some progress about the ongoing exploration.
Reimplemented from depth2kin_IDL.
Definition at line 1720 of file module.cpp.
|
virtual |
Return the current cartesian tolerance used during exploration.
Reimplemented from depth2kin_IDL.
Definition at line 1663 of file module.cpp.
|
virtual |
Return the current wait timeout used during exploration between two consecutive data points.
Reimplemented from depth2kin_IDL.
Definition at line 1648 of file module.cpp.
|
virtual |
Retrieve the current extrinsics camera parameters.
| eye | is left or right camera eye. |
Reimplemented from depth2kin_IDL.
Definition at line 1620 of file module.cpp.
|
protected |
Definition at line 240 of file module.cpp.
|
virtual |
Return the maximum allowed distance between depth point and kinematic prediction to enable data collection.
Reimplemented from depth2kin_IDL.
Definition at line 1303 of file module.cpp.
|
protected |
Definition at line 231 of file module.cpp.
|
virtual |
Return the number of available experts.
Reimplemented from depth2kin_IDL.
Definition at line 1140 of file module.cpp.
| double CalibModule::getPeriod | ( | ) |
Definition at line 1757 of file module.cpp.
|
virtual |
Retrieve the compensated kinematic point corresponding to the input depth point.
| arm | accounts for left or right list of experts. |
| x | the x-coordinate of the depth point. |
| y | the y-coordinate of the depth point. |
| z | the z-coordinate of the depth point. |
Reimplemented from depth2kin_IDL.
Definition at line 1531 of file module.cpp.
|
virtual |
Retrieve the compensated kinematic points corresponding to the input depth points.
| arm | accounts for left or right list of experts. |
| coordinates | the 3D coordinates of the depth points. |
Reimplemented from depth2kin_IDL.
Definition at line 1556 of file module.cpp.
|
virtual |
Return the side of the squared window used to filter data collection in the image plane.
Reimplemented from depth2kin_IDL.
Definition at line 1318 of file module.cpp.
|
virtual |
Return the current cartesian tolerance used during touch actions.
Reimplemented from depth2kin_IDL.
Definition at line 1678 of file module.cpp.
|
virtual |
Return the current status of the switch for experts usage during touch test.
on/off if experts are used/not-used. Reimplemented from depth2kin_IDL.
Definition at line 1489 of file module.cpp.
|
protected |
Definition at line 118 of file module.cpp.
|
virtual |
Reload the list of experts stored within the configuration file.
Reimplemented from depth2kin_IDL.
Definition at line 1157 of file module.cpp.
|
virtual |
Store on file the log of system response computed out of the explored set of input-output pairs.
| type | can be experts or calibrator, accounting either for the response of mixture of available experts or the output of the current calibrator, respectively. |
calibrator is selected and calibration has not been performed yet. Reimplemented from depth2kin_IDL.
Definition at line 1223 of file module.cpp.
| void CalibModule::onRead | ( | ImageOf< PixelMono > & | imgIn | ) |
Definition at line 1050 of file module.cpp.
|
protected |
Definition at line 334 of file module.cpp.
|
virtual |
Make the robot reach a predefined posture.
| type | can be one of the following: home, look_hands. |
Reimplemented from depth2kin_IDL.
Definition at line 441 of file module.cpp.
|
protected |
Definition at line 364 of file module.cpp.
|
protected |
Definition at line 514 of file module.cpp.
|
virtual |
Push the current calibrator in the list of experts.
Reimplemented from depth2kin_IDL.
Definition at line 1463 of file module.cpp.
|
protected |
Definition at line 265 of file module.cpp.
|
virtual |
Quit the module.
Reimplemented from depth2kin_IDL.
Definition at line 1750 of file module.cpp.
|
protected |
Definition at line 588 of file module.cpp.
|
virtual |
Reset the extrinsics matrix to default eye matrix.
| eye | is left or right camera eye. |
Reimplemented from depth2kin_IDL.
Definition at line 1633 of file module.cpp.
|
virtual |
Save the current list of experts into the configuration file.
Reimplemented from depth2kin_IDL.
Definition at line 1178 of file module.cpp.
|
virtual |
Select the arm to deal with.
| arm | is left or right. |
Reimplemented from depth2kin_IDL.
Definition at line 1362 of file module.cpp.
|
virtual |
Set the vergence angle used to keep the gaze fixed.
| block_eyes | the value in degrees of the vergence. It must be equal or greater than the minimum vergence angle allowed by the gaze controller. |
Reimplemented from depth2kin_IDL.
Definition at line 1325 of file module.cpp.
|
virtual |
Set up the calibrator type.
| type | can be one of the following: se3, se3+scale, affine, lssvm. |
| extrapolation | specifies 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. |
Reimplemented from depth2kin_IDL.
Definition at line 1386 of file module.cpp.
|
virtual |
Set on/off an experiment.
| exp | the experiment (depth2kin or aligneyes) to switch on/off. |
| v | is on or off. |
Reimplemented from depth2kin_IDL.
Definition at line 1587 of file module.cpp.
|
virtual |
Set up the cartesian tolerance used during exploration.
| tol | the overall tolerance employed for the cartesian movements. |
Reimplemented from depth2kin_IDL.
Definition at line 1655 of file module.cpp.
|
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.
| cx | the center x-coordinate. |
| cy | the center y-coordinate. |
| cz | the center z-coordiante. |
| a | the major semi-axis length. |
| b | the minor semi-axis length. |
Reimplemented from depth2kin_IDL.
Definition at line 1685 of file module.cpp.
|
virtual |
Set up the exploration space in terms of differences with respect to the internally coded couple of ellipses.
| dcx | the center delta x-coordinate. |
| dcy | the center delta y-coordinate. |
| dcz | the center delta z-coordiante. |
| da | the major semi-axis delta length. |
| db | the minor semi-axis delta length. |
Reimplemented from depth2kin_IDL.
Definition at line 1701 of file module.cpp.
|
virtual |
Set up the wait timeout used during exploration between two consecutive data points.
| wait | the timeout in seconds. |
Reimplemented from depth2kin_IDL.
Definition at line 1640 of file module.cpp.
|
virtual |
Set the maximum allowed distance between the depth point and kinematic prediction to enable data collection.
| max_dist | the value in meters. |
Reimplemented from depth2kin_IDL.
Definition at line 1295 of file module.cpp.
| bool CalibModule::setRoi | ( | const int | side | ) |
Definition at line 1310 of file module.cpp.
|
virtual |
Set up the cartesian tolerance used during a touch actions.
| tol | the overall tolerance employed for the cartesian movements. |
Reimplemented from depth2kin_IDL.
Definition at line 1670 of file module.cpp.
|
virtual |
Enable/disable the use of experts for touch test.
| switch | is on/off to use/not-use the experts. |
Reimplemented from depth2kin_IDL.
Definition at line 1478 of file module.cpp.
|
virtual |
Yield an asynchronous stop of the exploration phase.
Reimplemented from depth2kin_IDL.
Definition at line 1285 of file module.cpp.
| void CalibModule::terminate | ( | ) |
Definition at line 1786 of file module.cpp.
| bool CalibModule::touch | ( | const int | u, |
| const int | v | ||
| ) |
Definition at line 1496 of file module.cpp.
| bool CalibModule::updateModule | ( | ) |
Definition at line 1764 of file module.cpp.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| enum { ... } CalibModule::motorExplorationState |