icub-client
Classes

Module responsible for polling the OPC for various content (objects, skeletons, etc.) and updating icubGui based on this. More...

+ Collaboration diagram for guiUpdater:

Classes

class  GuiUpdater
 

Detailed Description

Module responsible for polling the OPC for various content (objects, skeletons, etc.) and updating icubGui based on this.

Version:1.0

Author
Stephane Lallee steph.nosp@m.ane..nosp@m.lalle.nosp@m.e@gm.nosp@m.ail.c.nosp@m.om

Description

The purpose of this module is to retrieve information from the online database implemented by the objectsPropertiesCollector module (OPC) and format/transmit this information to the gui implemented by iCubGui (icub repo).

Parameters

Input Ports

Output Ports

Services


Class Documentation

◆ GuiUpdater

class GuiUpdater

Definition at line 34 of file guiUpdater.h.

+ Inheritance diagram for GuiUpdater:

Public Member Functions

bool configure (yarp::os::ResourceFinder &rf)
 
bool interruptModule ()
 
bool close ()
 
bool respond (const yarp::os::Bottle &command, yarp::os::Bottle &reply)
 
double getPeriod ()
 
bool updateModule ()
 
void resetGUI ()
 Send a request to the iCubGUI to remove all items. More...
 
void deleteObject (const string &opcTag, Object *o=nullptr)
 Deletes an object with name opcTag from the OPC. More...
 
void addObject (Object *o)
 Adds an object to the iCubGUI. More...
 
void addAgent (Agent *a)
 Adds an agent to the iCubGUI. More...
 
void addiCub (Agent *a)
 Adds the iCub the the iCubGUI. More...
 
bool isDisplayable (Entity *entity)
 Checks whether an Entity can be displayed in the GUI. More...
 

Protected Attributes

OPCClientopc
 
AgentiCub
 
RpcServer handlerPort
 
RpcClient toGui
 
RpcClient toGuiBase
 
list< shared_ptr< Entity > > oldEntities
 
bool displaySkeleton
 

Member Function Documentation

◆ addAgent()

void GuiUpdater::addAgent ( Agent a)

Adds an agent to the iCubGUI.

Takes care of adding the body parts if displaySkeleton is true

Parameters
a- the agent to be added

Definition at line 226 of file guiUpdater.cpp.

◆ addiCub()

void GuiUpdater::addiCub ( Agent a)

Adds the iCub the the iCubGUI.

Parameters
a- reference to the iCub agent

Definition at line 315 of file guiUpdater.cpp.

◆ addObject()

void GuiUpdater::addObject ( Object o)

Adds an object to the iCubGUI.

Takes care of reading the position, dimensions, color etc.

Parameters
o- the object to be added

Definition at line 287 of file guiUpdater.cpp.

◆ close()

bool GuiUpdater::close ( )

Definition at line 81 of file guiUpdater.cpp.

◆ configure()

bool GuiUpdater::configure ( yarp::os::ResourceFinder &  rf)

Definition at line 35 of file guiUpdater.cpp.

◆ deleteObject()

void GuiUpdater::deleteObject ( const string &  opcTag,
Object o = nullptr 
)

Deletes an object with name opcTag from the OPC.

Parameters
opcTag- name of the object to be deleted
o- if this is an Agent instance, take care of removing all associated body parts

Definition at line 197 of file guiUpdater.cpp.

◆ getPeriod()

double GuiUpdater::getPeriod ( )

Definition at line 129 of file guiUpdater.cpp.

◆ interruptModule()

bool GuiUpdater::interruptModule ( )

Definition at line 72 of file guiUpdater.cpp.

◆ isDisplayable()

bool GuiUpdater::isDisplayable ( Entity entity)

Checks whether an Entity can be displayed in the GUI.

Parameters
entity- Entity to be checked
Returns
true if it is an Object or a subtype of Object, false otherwise

Definition at line 192 of file guiUpdater.cpp.

◆ resetGUI()

void GuiUpdater::resetGUI ( )

Send a request to the iCubGUI to remove all items.

Definition at line 327 of file guiUpdater.cpp.

◆ respond()

bool GuiUpdater::respond ( const yarp::os::Bottle &  command,
yarp::os::Bottle &  reply 
)

Definition at line 102 of file guiUpdater.cpp.

◆ updateModule()

bool GuiUpdater::updateModule ( )

Definition at line 134 of file guiUpdater.cpp.

Member Data Documentation

◆ displaySkeleton

bool GuiUpdater::displaySkeleton
protected

Definition at line 43 of file guiUpdater.h.

◆ handlerPort

RpcServer GuiUpdater::handlerPort
protected

Definition at line 39 of file guiUpdater.h.

◆ iCub

Agent* GuiUpdater::iCub
protected

Definition at line 38 of file guiUpdater.h.

◆ oldEntities

list<shared_ptr<Entity> > GuiUpdater::oldEntities
protected

Definition at line 42 of file guiUpdater.h.

◆ opc

OPCClient* GuiUpdater::opc
protected

Definition at line 37 of file guiUpdater.h.

◆ toGui

RpcClient GuiUpdater::toGui
protected

Definition at line 40 of file guiUpdater.h.

◆ toGuiBase

RpcClient GuiUpdater::toGuiBase
protected

Definition at line 41 of file guiUpdater.h.