19 #ifndef __VISUO_MOTOR_UTILS__
20 #define __VISUO_MOTOR_UTILS__
22 #include <yarp/os/ResourceFinder.h>
23 #include <yarp/os/RpcClient.h>
24 #include <yarp/os/PortInfo.h>
25 #include <yarp/os/PortReport.h>
26 #include <yarp/os/Vocab.h>
27 #include <yarp/sig/Vector.h>
36 #define ARM_MOST_SUITED -2
39 using namespace yarp::os;
40 using namespace yarp::sig;
50 :scheduleUpdate(false)
52 this->setReporter(*
this);
61 bool getStereoPosition(
const string &obj_name, Vector &stereo);
62 bool getCartesianPosition(
const string &obj_name, Vector &
x);
63 bool getKinematicOffsets(
const string &obj_name, Vector *kinematic_offset);
64 bool setKinematicOffsets(
const string &obj_name,
const Vector *kinematic_offset);
65 bool getTableHeight(
double &table_height);
66 bool setTableHeight(
const double table_height);
67 bool setAction(
const string &act_name,
const Bottle *trajectory);
68 bool getAction(
const string &act_name, Bottle *trajectory);
91 void set(
const Vector &stereo)
93 lock_guard<mutex> lck(mtx);
94 this->resize(stereo.size());
95 for(
size_t i=0; i<stereo.size(); i++)
96 this->
data()[i]=stereo[i];
102 lock_guard<mutex> lck(mtx);
103 stereo.resize(this->size());
104 for(
size_t i=0; i<this->size(); i++)
105 stereo[i]= this->
data()[i];
123 string name=rf.find(
"name").asString();
124 port_opc.open(
"/"+name+
"/OPC:io");
129 port_opc.interrupt();
StereoTarget stereo_target
ObjectPropertiesCollectorPort port_opc
Initializer(ResourceFinder &rf)
void report(const PortInfo &info)
ObjectPropertiesCollectorPort()
void set(const Vector &stereo)