8#ifndef ROBOTSIO_ICUBHAND_H
9#define ROBOTSIO_ICUBHAND_H
13#include <iCub/iKin/iKinFwd.h>
15#include <yarp/dev/IAnalogSensor.h>
16#include <yarp/dev/IControlLimits.h>
17#include <yarp/dev/IEncoders.h>
18#include <yarp/dev/PolyDriver.h>
19#include <yarp/sig/Matrix.h>
20#include <yarp/os/Network.h>
21#include <yarp/os/ResourceFinder.h>
24#include <unordered_map>
36 iCubHand(
const std::string& robot_name,
const std::string& laterality,
const std::string& port_prefix,
const std::string& context,
const bool& use_analogs,
const std::string& thumb_version =
"");
40 std::pair<bool, std::unordered_map<std::string, Eigen::VectorXd>> encoders(
const bool& blocking);
43 std::pair<bool, yarp::sig::Vector> load_vector_double(
const yarp::os::ResourceFinder& rf,
const std::string key,
const std::size_t size);
45 yarp::os::Network yarp_;
47 const bool use_analogs_ =
false;
55 bool use_interface_arm_ =
false;
63 yarp::dev::IAnalogSensor *ianalog_{
nullptr};
65 yarp::dev::IControlLimits *ilimits_{
nullptr};
67 yarp::dev::PolyDriver drv_arm_;
69 yarp::dev::IEncoders *iarm_{
nullptr};
77 yarp::os::BufferedPort<yarp::os::Bottle> port_arm_;
83 std::unordered_map<std::string, iCub::iKin::iCubFinger>
fingers_;
91 bool use_bounds_ =
false;
const std::string log_name_
std::unordered_map< std::string, iCub::iKin::iCubFinger > fingers_
yarp::dev::PolyDriver drv_analog_
yarp::sig::Matrix analog_bounds_
bool use_interface_analogs_
yarp::os::BufferedPort< yarp::os::Bottle > port_analogs_