18 #include <yarp/os/all.h> 19 #include <yarp/sig/all.h> 30 if (!yarp.checkNetwork())
32 yError()<<
"YARP network seems unavailable!";
36 OPCClient world(
"test_are_attention/opc");
39 yError()<<
"OPC seems unavailabe!";
44 ICubClient icub(
"test_are_attention",
"icubClient",
"test_are_attention.ini");
47 yError()<<
"One or more functionalities seem unavailabe!";
54 object->m_ego_position[0]=-0.35;
55 object->m_ego_position[1]=-0.2;
56 object->m_ego_position[2]=-0.1;
57 yInfo()<<
"creating a "<<
object->name();
60 yInfo()<<
"homing ...";
63 yInfo()<<
"looking at the "<<
object->name();
67 yInfo()<<
"pointing at the "<<
object->name();
70 yInfo()<<
"shutting down ... ";
bool point(const yarp::sig::VectorOf< double > &target, const yarp::os::Bottle &options=yarp::os::Bottle())
Point at a specified location from the iCub.
void close()
Close the client ports.
Grants access to high level motor commands (grasp, touch, look, goto, etc) of the robot as well as it...
bool connect(const std::string &opcName="OPC")
Try to connect all functionalities.
double m_present
Is the object present in the scene A value of 1.0 means that the object currently is in the scene A v...
void commit()
Commit all the entities & relations stored locally, erasing the server copies.
T * addOrRetrieveEntity(const std::string &name)
Obtains an entity with the given name.
bool connect(const std::string &opcName)
Try to connect the client to an OPC server.
Represent any physical entity (including objects and agents) that can be stored within the OPC...
bool home(const std::string &part="all")
Go in home position.
An OPC client using the datastructures defined within the icub-client library.
bool look(const std::string &target, const yarp::os::Bottle &options=yarp::os::Bottle())
Look at a specified target object.
void clear()
Clear the OPC content.
std::string name() const
Return the name of an entity (which has to be unique within the OPC)
void close()
Properly closes all ports which were opened.