Interface for visual servoing controllers. More...
#include <yarp/dev/IVisualServoing.h>
Public Types | |
enum | CamSel { CamSel::left, CamSel::right } |
Enumeration class to select left or right camera. More... | |
Public Member Functions | |
virtual | ~IVisualServoing () |
Destructor. More... | |
virtual bool | initFacilities (bool use_direct_kin)=0 |
Initialize support classes, modules and connections to perform visual servoing. More... | |
virtual bool | resetFacilities ()=0 |
Reset support classes, modules and connections to perform visual servoing. More... | |
virtual bool | stopFacilities ()=0 |
Deallocate support classes, stop modules and disconnect connections used for visual servoing. More... | |
virtual bool | goToGoal (const std::vector< yarp::sig::Vector > &vec_px_l, const std::vector< yarp::sig::Vector > &vec_px_r)=0 |
Set the goal points on both left and right camera image plane and start visual servoing. More... | |
virtual bool | goToGoal (const yarp::sig::Vector &vec_x, const yarp::sig::Vector &vec_o)=0 |
Set the goal point (3D for the position + 4D axis-angle for the orientation) and start visual servoing. More... | |
virtual bool | setModality (const std::string &mode)=0 |
Set visual servoing operating mode between: More... | |
virtual bool | setVisualServoControl (const std::string &control)=0 |
Set visual servo control law. More... | |
virtual bool | setControlPoint (const std::string &point)=0 |
Set the point controlled during visual servoing. More... | |
virtual bool | getVisualServoingInfo (yarp::os::Bottle &info)=0 |
Return useful information for visual servoing. More... | |
virtual bool | setGoToGoalTolerance (const double tol)=0 |
Set visual servoing goal tolerance. More... | |
virtual bool | checkVisualServoingController ()=0 |
Check once whether the visual servoing controller is running or not. More... | |
virtual bool | waitVisualServoingDone (const double period=0.1, const double timeout=0.0)=0 |
Wait until visual servoing reaches the goal. More... | |
virtual bool | stopController ()=0 |
Ask for an immediate stop of the visual servoing controller. More... | |
virtual bool | setTranslationGain (const double K_x_1, const double K_x_2)=0 |
Set the translation gains of the visual servoing control algorithm. More... | |
virtual bool | setMaxTranslationVelocity (const double max_x_dot)=0 |
Set the maximum translation velocity of the visual servoing control algorithm (same for each axis). More... | |
virtual bool | setTranslationGainSwitchTolerance (const double K_x_tol)=0 |
Set the tolerance, in pixels, at which the translation control law swithces its gain value. More... | |
virtual bool | setOrientationGain (const double K_o_1, const double K_o_2)=0 |
Set the orientation gains of the visual servoing control algorithm. More... | |
virtual bool | setMaxOrientationVelocity (const double max_o_dot)=0 |
Set the maximum angular velocity of the axis-angle velocity vector of the visual servoing control algorithm. More... | |
virtual bool | setOrientationGainSwitchTolerance (const double K_o_tol)=0 |
Set the tolerance, in pixels, at which the orientation control law swithces its gain value. More... | |
virtual std::vector< yarp::sig::Vector > | get3DGoalPositionsFrom3DPose (const yarp::sig::Vector &x, const yarp::sig::Vector &o)=0 |
Helper function: extract four Cartesian points lying on the plane defined by the frame o in the position x relative to the robot base frame. More... | |
virtual std::vector< yarp::sig::Vector > | getGoalPixelsFrom3DPose (const yarp::sig::Vector &x, const yarp::sig::Vector &o, const CamSel &cam)=0 |
Helper function: extract four 2D pixel points lying on the plane defined by the frame o in the position x relative to the robot base frame. More... | |
virtual bool | storedInit (const std::string &label)=0 |
Initialize the robot to an initial position. More... | |
virtual bool | storedGoToGoal (const std::string &label)=0 |
Set the robot visual servoing goal. More... | |
virtual bool | goToSFMGoal ()=0 |
Get goal point from SFM module. More... | |
Interface for visual servoing controllers.
Definition at line 29 of file IVisualServoing.h.
|
strong |
Enumeration class to select left or right camera.
Enumerator | |
---|---|
left | |
right |
Definition at line 35 of file IVisualServoing.h.
|
virtualdefault |
Destructor.
|
pure virtual |
Check once whether the visual servoing controller is running or not.
|
pure virtual |
Helper function: extract four Cartesian points lying on the plane defined by the frame o in the position x relative to the robot base frame.
x | a 3D vector which is filled with the actual position (x, y, z) [m]. |
o | a 4D vector which is filled with the actual orientation using axis-angle representation (xa, ya, za) and (theta) [rad]. |
|
pure virtual |
Helper function: extract four 2D pixel points lying on the plane defined by the frame o in the position x relative to the robot base frame.
x | a 3D vector which is filled with the actual position (x, y, z) [m]. |
o | a 4D vector which is filled with the actual orientation using axis-angle representation (xa, ya, za) and (theta) [m]/[rad]. |
cam | either "left" or "right" to select left or right camera. |
|
pure virtual |
Return useful information for visual servoing.
info | YARP Bottle cotaining all the visual servoing information. |
|
pure virtual |
Set the goal points on both left and right camera image plane and start visual servoing.
vec_px_l | a collection of four 2D vectors which contains the (u, v) coordinates of the pixels within the left image plane. |
vec_px_r | a collection of four 2D vectors which contains the (u, v) coordinates of the pixels within the right image plane. |
|
pure virtual |
Set the goal point (3D for the position + 4D axis-angle for the orientation) and start visual servoing.
vec_x | a 3D vector which contains the (x, y, z) Cartesian coordinates of the goal. |
vec_o | a 4D vector which contains the (x, y, z) axis and theta angle of rotation of the goal. |
|
pure virtual |
Get goal point from SFM module.
The point is taken by clicking on a dedicated 'yarpview' GUI and the orientation is hard-coded.
|
pure virtual |
Initialize support classes, modules and connections to perform visual servoing.
This method must be called before any other visual servoing methods. Returns upon successful or failure setup.
use_direct_kin | instruct the visual servoing control to either use direct kinematic or an estimated/refined pose of the end-effector. |
|
pure virtual |
Reset support classes, modules and connections to perform visual servoing.
Returns upon successful or failure setup.
|
pure virtual |
Set the point controlled during visual servoing.
point | label of the point to control. |
|
pure virtual |
Set visual servoing goal tolerance.
tol | the tolerance in pixel. |
|
pure virtual |
Set the maximum angular velocity of the axis-angle velocity vector of the visual servoing control algorithm.
max_x_dot | the maximum allowed angular velocity [rad/s]. |
|
pure virtual |
Set the maximum translation velocity of the visual servoing control algorithm (same for each axis).
max_x_dot | the maximum allowed velocity for x, y, z coordinates [m/s]. |
|
pure virtual |
Set visual servoing operating mode between:
mode | a label referring to one of the three operating mode, i.e. 'position', 'orientation' or 'pose'. |
|
pure virtual |
Set the orientation gains of the visual servoing control algorithm.
The two values are used, respectively, when the end-effector is far away from and close to the goal.
|
pure virtual |
Set the tolerance, in pixels, at which the orientation control law swithces its gain value.
|
pure virtual |
Set the translation gains of the visual servoing control algorithm.
The two values are used, respectively, when the end-effector is far away from and close to the goal.
|
pure virtual |
Set the tolerance, in pixels, at which the translation control law swithces its gain value.
|
pure virtual |
Set visual servo control law.
The available control law are implementation dependent. Check the used implementation to know which ones are available.
mode | a label referring to one of the visual servo controls. |
|
pure virtual |
Ask for an immediate stop of the visual servoing controller.
[wait for reply]
|
pure virtual |
Deallocate support classes, stop modules and disconnect connections used for visual servoing.
This method must be called when visual servoing is no longer needed or a new visual servoing instance is needed.
|
pure virtual |
Set the robot visual servoing goal.
The goals are stored on an external file and are referenced by a unique label.
label | a label referring to one of the available goals; the string shall be one of the available modes returned by the get_info() method. |
|
pure virtual |
Initialize the robot to an initial position.
The initial positions are stored on an external file and are referenced by a unique label.
label | a label referring to one of the available initial positions; the string shall be one of the available modes returned by the get_info() method. |
|
pure virtual |
Wait until visual servoing reaches the goal.
[wait for reply]
period | the check time period [s]. |
timeout | the check expiration time [s]. If timeout <= 0 (as by default) the check will be performed without time limitation. |