1 #ifndef VISUALPROPRIOCEPTION_H 2 #define VISUALPROPRIOCEPTION_H 6 #include <BayesFilters/VisualObservationModel.h> 7 #include <iCub/iKin/iKinFwd.h> 8 #include <opencv2/core/core.hpp> 9 #include <SuperimposeMesh/SICAD.h> 10 #include <yarp/dev/GazeControl.h> 11 #include <yarp/dev/IAnalogSensor.h> 12 #include <yarp/dev/PolyDriver.h> 13 #include <yarp/os/Bottle.h> 14 #include <yarp/os/BufferedPort.h> 15 #include <yarp/os/ConstString.h> 16 #include <yarp/sig/Matrix.h> 17 #include <yarp/sig/Vector.h> 24 const bool use_forearm,
26 const double resolution_ratio,
27 const yarp::os::ConstString& cam_sel,
28 const yarp::os::ConstString& laterality,
29 const yarp::os::ConstString& context);
41 void observe(
const Eigen::Ref<const Eigen::MatrixXf>& cur_states, cv::OutputArray observations)
override;
43 bool setProperty(
const std::string property)
override;
58 yarp::os::ConstString
log_ID_ =
"[VisualProprioception]";
74 yarp::sig::Matrix
getInvertedH(
const double a,
const double d,
const double alpha,
const double offset,
const double q);
86 void setArmJoints(
const yarp::sig::Vector& q,
const yarp::sig::Vector& analogs,
const yarp::sig::Matrix& analog_bounds);
88 void getModelPose(
const Eigen::Ref<const Eigen::MatrixXf>& cur_states, std::vector<Superimpose::ModelPoseContainer>& hand_poses);
93 yarp::sig::Vector
readRootToEye(
const yarp::os::ConstString cam_sel);
114 bool file_found(
const yarp::os::ConstString& file);
yarp::dev::IGazeControl * itf_gaze_
bool setProperty(const std::string property) override
yarp::sig::Vector readRootToFingers()
iCub::iKin::iCubEye icub_kin_eye_
yarp::sig::Matrix right_hand_analogs_bounds_
yarp::os::ConstString laterality_
void observe(const Eigen::Ref< const Eigen::MatrixXf > &cur_states, cv::OutputArray observations) override
bool openGazeController()
VisualProprioception & operator=(const VisualProprioception &proprio)
yarp::dev::PolyDriver drv_right_hand_analog_
iCub::iKin::iCubFinger icub_kin_finger_[3]
yarp::os::BufferedPort< yarp::os::Bottle > port_arm_enc_
unsigned int getCamHeight()
SICAD::ModelPathContainer cad_obj_
~VisualProprioception() noexcept
yarp::sig::Vector readRootToEye(const yarp::os::ConstString cam_sel)
yarp::sig::Vector readArmEncoders()
void setArmJoints(const yarp::sig::Vector &q)
yarp::os::ConstString cam_sel_
yarp::sig::Matrix getInvertedH(const double a, const double d, const double alpha, const double offset, const double q)
yarp::os::ConstString log_ID_
void getModelPose(const Eigen::Ref< const Eigen::MatrixXf > &cur_states, std::vector< Superimpose::ModelPoseContainer > &hand_poses)
yarp::os::BufferedPort< yarp::os::Bottle > port_head_enc_
unsigned int getCamWidth()
bool file_found(const yarp::os::ConstString &file)
yarp::dev::PolyDriver drv_gaze_
yarp::dev::IAnalogSensor * itf_right_hand_analog_
yarp::os::BufferedPort< yarp::os::Bottle > port_torso_enc_
yarp::sig::Vector readTorso()
iCub::iKin::iCubArm icub_arm_
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)