icub-client
opcPopulator.h
Go to the documentation of this file.
1 #include <functional>
2 
3 #include <yarp/os/all.h>
4 
5 namespace icubclient {
6  class ICubClient;
7  class Object;
8 }
9 
13 class opcPopulator : public yarp::os::RFModule {
14 protected:
15 
17  double period;
18  yarp::os::Port rpc;
19 
20  double X_obj;
21  double Y_obj;
22  double Z_obj;
23  double X_ag;
24  double Y_ag;
25  double Z_ag;
26  double noise;
27 
28 public:
29  bool configure(yarp::os::ResourceFinder &rf);
30 
32  {
33  return true;
34  }
35 
36  bool close();
37 
38  double getPeriod()
39  {
40  return period;
41  }
42 
43  bool updateModule();
49  bool populateEntityRandom(const yarp::os::Bottle &bInput);
50 
55  bool populateRedBall();
56 
61  bool populateSpecific();
62 
67  bool populateTwoUnknowns();
68 
74  bool addUnknownEntity(const yarp::os::Bottle &bInput);
75 
82  bool setAttributeEntity(const yarp::os::Bottle &bInput, std::function<void(icubclient::Object*, double)> f_setter);
83 
84  //RPC & scenarios
85  bool respond(const yarp::os::Bottle& cmd, yarp::os::Bottle& reply);
86 };
bool interruptModule()
Definition: opcPopulator.h:31
Grants access to high level motor commands (grasp, touch, look, goto, etc) of the robot as well as it...
Definition: icubClient.h:66
yarp::os::Port rpc
Definition: opcPopulator.h:18
double X_ag
X coordinate of object used within populateSpecific() for top_left and top_right. ...
Definition: opcPopulator.h:23
Represent any physical entity (including objects and agents) that can be stored within the OPC...
Definition: object.h:35
double Y_ag
Y coordinate of object used within populateSpecific() for top_left (inverted) and top_right...
Definition: opcPopulator.h:24
double getPeriod()
Definition: opcPopulator.h:38
icubclient::ICubClient * iCub
Definition: opcPopulator.h:16
double Z_ag
Z coordinate of object used within populateSpecific() for top_left and top_right. ...
Definition: opcPopulator.h:25
double Z_obj
Z coordinate of object used within populateSpecific() for bottom_left and bottom_right.
Definition: opcPopulator.h:22
double Y_obj
Y coordinate of object used within populateSpecific() for bottom_left (inverted) and bottom_right...
Definition: opcPopulator.h:21
double X_obj
X coordinate of object used within populateSpecific() for bottom_left and bottom_right.
Definition: opcPopulator.h:20
double noise
(Gaussian) noise to be added to X_obj, Y_obj, Z_obj, X_ag, Y_ag, Z_ag in populateSpecific() ...
Definition: opcPopulator.h:26
double period
Definition: opcPopulator.h:17