visual-tracking-control
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
VisualProprioception Class Reference

#include <VisualProprioception.h>

Inheritance diagram for VisualProprioception:
[legend]

Public Member Functions

 VisualProprioception (const bool use_thumb, const bool use_forearm, const int num_images, const double resolution_ratio, const yarp::os::ConstString &cam_sel, const yarp::os::ConstString &laterality, const yarp::os::ConstString &context)
 
 VisualProprioception (const VisualProprioception &proprio)
 
 VisualProprioception (VisualProprioception &&proprio) noexcept
 
 ~VisualProprioception () noexcept
 
VisualProprioceptionoperator= (const VisualProprioception &proprio)
 
VisualProprioceptionoperator= (VisualProprioception &&proprio) noexcept
 
void observe (const Eigen::Ref< const Eigen::MatrixXf > &cur_states, cv::OutputArray observations) override
 
bool setProperty (const std::string property) override
 
int getOGLTilesNumber ()
 
int getOGLTilesRows ()
 
int getOGLTilesCols ()
 
unsigned int getCamWidth ()
 
unsigned int getCamHeight ()
 
float getCamFx ()
 
float getCamFy ()
 
float getCamCx ()
 
float getCamCy ()
 

Protected Member Functions

yarp::sig::Matrix getInvertedH (const double a, const double d, const double alpha, const double offset, const double q)
 
bool openGazeController ()
 
bool openAnalogs ()
 
bool closeAnalogs ()
 
bool setiCubParams ()
 
void setArmJoints (const yarp::sig::Vector &q)
 
void setArmJoints (const yarp::sig::Vector &q, const yarp::sig::Vector &analogs, const yarp::sig::Matrix &analog_bounds)
 
void getModelPose (const Eigen::Ref< const Eigen::MatrixXf > &cur_states, std::vector< Superimpose::ModelPoseContainer > &hand_poses)
 
yarp::sig::Vector readArmEncoders ()
 
yarp::sig::Vector readTorso ()
 
yarp::sig::Vector readRootToFingers ()
 
yarp::sig::Vector readRootToEye (const yarp::os::ConstString cam_sel)
 
bool file_found (const yarp::os::ConstString &file)
 

Protected Attributes

yarp::os::ConstString log_ID_ = "[VisualProprioception]"
 
yarp::os::ConstString laterality_
 
yarp::dev::PolyDriver drv_gaze_
 
yarp::dev::IGazeControl * itf_gaze_
 
iCub::iKin::iCubArm icub_arm_
 
iCub::iKin::iCubFinger icub_kin_finger_ [3]
 
iCub::iKin::iCubEye icub_kin_eye_
 
yarp::os::BufferedPort< yarp::os::Bottle > port_head_enc_
 
yarp::os::BufferedPort< yarp::os::Bottle > port_torso_enc_
 
yarp::os::BufferedPort< yarp::os::Bottle > port_arm_enc_
 
yarp::dev::PolyDriver drv_right_hand_analog_
 
yarp::dev::IAnalogSensor * itf_right_hand_analog_
 
yarp::sig::Matrix right_hand_analogs_bounds_
 
bool analogs_ = false
 
yarp::os::ConstString cam_sel_
 
double cam_x_ [3]
 
double cam_o_ [4]
 
unsigned int cam_width_
 
unsigned int cam_height_
 
float cam_fx_
 
float cam_cx_
 
float cam_fy_
 
float cam_cy_
 
double resolution_ratio_
 
bool use_thumb_
 
bool use_forearm_
 
SICAD::ModelPathContainer cad_obj_
 
SICAD * si_cad_
 
int ogl_tiles_rows_
 
int ogl_tiles_cols_
 

Detailed Description

Definition at line 20 of file VisualProprioception.h.

Constructor & Destructor Documentation

◆ VisualProprioception() [1/3]

VisualProprioception::VisualProprioception ( const bool  use_thumb,
const bool  use_forearm,
const int  num_images,
const double  resolution_ratio,
const yarp::os::ConstString &  cam_sel,
const yarp::os::ConstString &  laterality,
const yarp::os::ConstString &  context 
)

◆ VisualProprioception() [2/3]

VisualProprioception::VisualProprioception ( const VisualProprioception proprio)

Definition at line 263 of file VisualProprioception.cpp.

References cam_o_, cam_x_, icub_arm_, and icub_kin_finger_.

◆ VisualProprioception() [3/3]

VisualProprioception::VisualProprioception ( VisualProprioception &&  proprio)
noexcept

Definition at line 290 of file VisualProprioception.cpp.

References cam_o_, cam_x_, and icub_kin_finger_.

◆ ~VisualProprioception()

VisualProprioception::~VisualProprioception ( )
noexcept

Member Function Documentation

◆ closeAnalogs()

bool VisualProprioception::closeAnalogs ( )
protected

Definition at line 719 of file VisualProprioception.cpp.

References analogs_, and drv_right_hand_analog_.

Referenced by setProperty().

◆ file_found()

bool VisualProprioception::file_found ( const yarp::os::ConstString &  file)
protected

Definition at line 541 of file VisualProprioception.cpp.

References log_ID_.

◆ getCamCx()

float VisualProprioception::getCamCx ( )

Definition at line 595 of file VisualProprioception.cpp.

References cam_cx_.

◆ getCamCy()

float VisualProprioception::getCamCy ( )

Definition at line 601 of file VisualProprioception.cpp.

References cam_cy_.

◆ getCamFx()

float VisualProprioception::getCamFx ( )

Definition at line 583 of file VisualProprioception.cpp.

References cam_fx_.

◆ getCamFy()

float VisualProprioception::getCamFy ( )

Definition at line 589 of file VisualProprioception.cpp.

References cam_fy_.

◆ getCamHeight()

unsigned int VisualProprioception::getCamHeight ( )

Definition at line 577 of file VisualProprioception.cpp.

References cam_height_.

◆ getCamWidth()

unsigned int VisualProprioception::getCamWidth ( )

Definition at line 571 of file VisualProprioception.cpp.

References cam_width_.

◆ getInvertedH()

yarp::sig::Matrix VisualProprioception::getInvertedH ( const double  a,
const double  d,
const double  alpha,
const double  offset,
const double  q 
)
protected

Definition at line 607 of file VisualProprioception.cpp.

Referenced by getModelPose().

◆ getModelPose()

void VisualProprioception::getModelPose ( const Eigen::Ref< const Eigen::MatrixXf > &  cur_states,
std::vector< Superimpose::ModelPoseContainer > &  hand_poses 
)
protected

Definition at line 374 of file VisualProprioception.cpp.

References getInvertedH(), icub_arm_, icub_kin_finger_, use_forearm_, and use_thumb_.

Referenced by observe().

Here is the call graph for this function:

◆ getOGLTilesCols()

int VisualProprioception::getOGLTilesCols ( )

Definition at line 565 of file VisualProprioception.cpp.

References si_cad_.

◆ getOGLTilesNumber()

int VisualProprioception::getOGLTilesNumber ( )

Definition at line 553 of file VisualProprioception.cpp.

References si_cad_.

◆ getOGLTilesRows()

int VisualProprioception::getOGLTilesRows ( )

Definition at line 559 of file VisualProprioception.cpp.

References si_cad_.

◆ observe()

void VisualProprioception::observe ( const Eigen::Ref< const Eigen::MatrixXf > &  cur_states,
cv::OutputArray  observations 
)
override

Definition at line 451 of file VisualProprioception.cpp.

References cam_o_, cam_x_, getModelPose(), and si_cad_.

Here is the call graph for this function:

◆ openAnalogs()

bool VisualProprioception::openAnalogs ( )
protected

◆ openGazeController()

bool VisualProprioception::openGazeController ( )
protected

Definition at line 655 of file VisualProprioception.cpp.

References cam_sel_, drv_gaze_, itf_gaze_, and log_ID_.

◆ operator=() [1/2]

VisualProprioception & VisualProprioception::operator= ( const VisualProprioception proprio)

Definition at line 325 of file VisualProprioception.cpp.

◆ operator=() [2/2]

VisualProprioception & VisualProprioception::operator= ( VisualProprioception &&  proprio)
noexcept

Definition at line 334 of file VisualProprioception.cpp.

References cad_obj_, cam_o_, cam_x_, icub_arm_, icub_kin_finger_, and si_cad_.

◆ readArmEncoders()

yarp::sig::Vector VisualProprioception::readArmEncoders ( )
protected

◆ readRootToEye()

Vector VisualProprioception::readRootToEye ( const yarp::os::ConstString  cam_sel)
protected

Definition at line 761 of file VisualProprioception.cpp.

References port_head_enc_, and readTorso().

Referenced by setiCubParams().

Here is the call graph for this function:

◆ readRootToFingers()

Vector VisualProprioception::readRootToFingers ( )
protected

Definition at line 747 of file VisualProprioception.cpp.

References port_arm_enc_, and readTorso().

Referenced by setiCubParams().

Here is the call graph for this function:

◆ readTorso()

Vector VisualProprioception::readTorso ( )
protected

Definition at line 733 of file VisualProprioception.cpp.

References port_torso_enc_.

Referenced by readRootToEye(), and readRootToFingers().

◆ setArmJoints() [1/2]

void VisualProprioception::setArmJoints ( const yarp::sig::Vector &  q)
protected

Referenced by setiCubParams().

◆ setArmJoints() [2/2]

void VisualProprioception::setArmJoints ( const yarp::sig::Vector &  q,
const yarp::sig::Vector &  analogs,
const yarp::sig::Matrix &  analog_bounds 
)
protected

◆ setiCubParams()

bool VisualProprioception::setiCubParams ( )
protected

Definition at line 477 of file VisualProprioception.cpp.

References analogs_, cam_o_, cam_sel_, cam_x_, icub_arm_, icub_kin_eye_, icub_kin_finger_, itf_right_hand_analog_, readRootToEye(), readRootToFingers(), right_hand_analogs_bounds_, and setArmJoints().

Referenced by setProperty().

Here is the call graph for this function:

◆ setProperty()

bool VisualProprioception::setProperty ( const std::string  property)
override

Definition at line 463 of file VisualProprioception.cpp.

References closeAnalogs(), openAnalogs(), and setiCubParams().

Here is the call graph for this function:

Member Data Documentation

◆ analogs_

bool VisualProprioception::analogs_ = false
protected

Definition at line 80 of file VisualProprioception.h.

Referenced by closeAnalogs(), openAnalogs(), and setiCubParams().

◆ cad_obj_

SICAD::ModelPathContainer VisualProprioception::cad_obj_
protected

Definition at line 109 of file VisualProprioception.h.

Referenced by operator=().

◆ cam_cx_

float VisualProprioception::cam_cx_
protected

Definition at line 102 of file VisualProprioception.h.

Referenced by getCamCx().

◆ cam_cy_

float VisualProprioception::cam_cy_
protected

Definition at line 104 of file VisualProprioception.h.

Referenced by getCamCy().

◆ cam_fx_

float VisualProprioception::cam_fx_
protected

Definition at line 101 of file VisualProprioception.h.

Referenced by getCamFx().

◆ cam_fy_

float VisualProprioception::cam_fy_
protected

Definition at line 103 of file VisualProprioception.h.

Referenced by getCamFy().

◆ cam_height_

unsigned int VisualProprioception::cam_height_
protected

Definition at line 100 of file VisualProprioception.h.

Referenced by getCamHeight().

◆ cam_o_

double VisualProprioception::cam_o_[4]
protected

Definition at line 98 of file VisualProprioception.h.

Referenced by observe(), operator=(), setiCubParams(), and VisualProprioception().

◆ cam_sel_

yarp::os::ConstString VisualProprioception::cam_sel_
protected

Definition at line 96 of file VisualProprioception.h.

Referenced by openAnalogs(), openGazeController(), and setiCubParams().

◆ cam_width_

unsigned int VisualProprioception::cam_width_
protected

Definition at line 99 of file VisualProprioception.h.

Referenced by getCamWidth().

◆ cam_x_

double VisualProprioception::cam_x_[3]
protected

Definition at line 97 of file VisualProprioception.h.

Referenced by observe(), operator=(), setiCubParams(), and VisualProprioception().

◆ drv_gaze_

yarp::dev::PolyDriver VisualProprioception::drv_gaze_
protected

Definition at line 62 of file VisualProprioception.h.

Referenced by openGazeController().

◆ drv_right_hand_analog_

yarp::dev::PolyDriver VisualProprioception::drv_right_hand_analog_
protected

Definition at line 70 of file VisualProprioception.h.

Referenced by closeAnalogs(), and openAnalogs().

◆ icub_arm_

iCub::iKin::iCubArm VisualProprioception::icub_arm_
protected

◆ icub_kin_eye_

iCub::iKin::iCubEye VisualProprioception::icub_kin_eye_
protected

Definition at line 66 of file VisualProprioception.h.

Referenced by setiCubParams().

◆ icub_kin_finger_

iCub::iKin::iCubFinger VisualProprioception::icub_kin_finger_[3]
protected

◆ itf_gaze_

yarp::dev::IGazeControl* VisualProprioception::itf_gaze_
protected

Definition at line 63 of file VisualProprioception.h.

Referenced by openGazeController().

◆ itf_right_hand_analog_

yarp::dev::IAnalogSensor* VisualProprioception::itf_right_hand_analog_
protected

Definition at line 71 of file VisualProprioception.h.

Referenced by openAnalogs(), and setiCubParams().

◆ laterality_

yarp::os::ConstString VisualProprioception::laterality_
protected

Definition at line 61 of file VisualProprioception.h.

Referenced by openAnalogs().

◆ log_ID_

yarp::os::ConstString VisualProprioception::log_ID_ = "[VisualProprioception]"
protected

Definition at line 58 of file VisualProprioception.h.

Referenced by file_found(), openAnalogs(), and openGazeController().

◆ ogl_tiles_cols_

int VisualProprioception::ogl_tiles_cols_
protected

Definition at line 112 of file VisualProprioception.h.

◆ ogl_tiles_rows_

int VisualProprioception::ogl_tiles_rows_
protected

Definition at line 111 of file VisualProprioception.h.

◆ port_arm_enc_

yarp::os::BufferedPort<yarp::os::Bottle> VisualProprioception::port_arm_enc_
protected

Definition at line 69 of file VisualProprioception.h.

Referenced by readRootToFingers().

◆ port_head_enc_

yarp::os::BufferedPort<yarp::os::Bottle> VisualProprioception::port_head_enc_
protected

Definition at line 67 of file VisualProprioception.h.

Referenced by readRootToEye().

◆ port_torso_enc_

yarp::os::BufferedPort<yarp::os::Bottle> VisualProprioception::port_torso_enc_
protected

Definition at line 68 of file VisualProprioception.h.

Referenced by readTorso().

◆ resolution_ratio_

double VisualProprioception::resolution_ratio_
protected

Definition at line 105 of file VisualProprioception.h.

◆ right_hand_analogs_bounds_

yarp::sig::Matrix VisualProprioception::right_hand_analogs_bounds_
protected

Definition at line 72 of file VisualProprioception.h.

Referenced by setiCubParams().

◆ si_cad_

SICAD* VisualProprioception::si_cad_
protected

◆ use_forearm_

bool VisualProprioception::use_forearm_
protected

Definition at line 108 of file VisualProprioception.h.

Referenced by getModelPose().

◆ use_thumb_

bool VisualProprioception::use_thumb_
protected

Definition at line 107 of file VisualProprioception.h.

Referenced by getModelPose().


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