Module responsible for polling the OPC for various content (objects, skeletons, etc.) and updating icubGui based on this.
More...
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
- Copyright
- Released under the terms of the GNU GPL v2.0
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
- –name: To specify the module's name; all the open ports will be tagged with the prefix /name
- –OPCname: Name of the OPC to connect to
- –displaySkeletons: Agents skeletons will be displayed if available.
Input Ports
- /guiUpdater/rpc [Bottle] [default carrier:tcp]: Response port. Supported commands:
- help
- quit
- reset (Resets the iCubGUI)
Output Ports
- /guiUpdater/gui:o [yarp::os::Port] [default carrier:tcp]: To be connected to /iCubGui/objects
- /guiUpdater/guiBase:o [yarp::os::Port] [default carrier:tcp]: To be connected to /iCubGui/base:i
Services
◆ GuiUpdater
Definition at line 34 of file guiUpdater.h.
◆ addAgent()
void GuiUpdater::addAgent |
( |
Agent * |
a | ) |
|
Adds an agent to the iCubGUI.
Takes care of adding the body parts if displaySkeleton
is true
- Parameters
-
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 |
( |
| ) |
|
◆ configure()
bool GuiUpdater::configure |
( |
yarp::os::ResourceFinder & |
rf | ) |
|
◆ 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 |
( |
| ) |
|
◆ interruptModule()
bool GuiUpdater::interruptModule |
( |
| ) |
|
◆ 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 |
|
) |
| |
◆ updateModule()
bool GuiUpdater::updateModule |
( |
| ) |
|
◆ displaySkeleton
bool GuiUpdater::displaySkeleton |
|
protected |
◆ handlerPort
RpcServer GuiUpdater::handlerPort |
|
protected |
◆ iCub
◆ oldEntities
list<shared_ptr<Entity> > GuiUpdater::oldEntities |
|
protected |
◆ opc
◆ toGui
RpcClient GuiUpdater::toGui |
|
protected |
◆ toGuiBase
RpcClient GuiUpdater::toGuiBase |
|
protected |