icub-client
Classes
sensationManager

Reactive layer module to monitor basic sensations. More...

+ Collaboration diagram for sensationManager:

Classes

class  OpcSensation
 
class  Sensation
 
class  SensationManager
 
class  TestSensation
 

Detailed Description

Reactive layer module to monitor basic sensations.

Version:1.0

Author
Clément Moulin-Frier cleme.nosp@m.nt.m.nosp@m.oulin.nosp@m.frie.nosp@m.r@gma.nosp@m.il.c.nosp@m.om, Jordi-Ysard Puigbò jordi.nosp@m.ysar.nosp@m.d.pui.nosp@m.gbo@.nosp@m.upf.e.nosp@m.du

Description

This module is designed to pre-process all sensory requirements for the reactiveLayer modules (allostaticController and behaviorManager). It's main module (opcSensation) parses the OPC for entities and relays the relevant information to the corresponding modules (e.g. quantity of people or objects to allostaticController for internal variable decay, name and entity type to behaviorManager for interaction). This module can parse the data independently but behaviorManager and allostaticController strongly depend on it. Each sensation module to be used must be listed in the config file (see default.ini as an example with opcSensation). Jordi and Clement contributed equally to the development of this module.

Parameters

Input Ports

Output Ports

Services


Class Documentation

◆ OpcSensation

class OpcSensation

Definition at line 21 of file opcSensation.h.

+ Inheritance diagram for OpcSensation:

Public Member Functions

 OpcSensation ()
 
void configure ()
 
void publish ()
 send sensation data to port More...
 
int get_property (std::string name, std::string property)
 get_property quickly answers a boolean query More...
 
void close_ports ()
 

Public Attributes

yarp::os::Bottle u_entities
 
yarp::os::Bottle k_entities
 
yarp::os::Bottle up_entities
 
yarp::os::Bottle kp_entities
 
yarp::os::Bottle p_entities
 
yarp::os::Bottle o_positions
 

Constructor & Destructor Documentation

◆ OpcSensation()

OpcSensation::OpcSensation ( )
inline

Definition at line 44 of file opcSensation.h.

Member Function Documentation

◆ close_ports()

void OpcSensation::close_ports ( )
virtual

Implements Sensation.

Definition at line 213 of file opcSensation.cpp.

◆ configure()

void OpcSensation::configure ( )
virtual

Implements Sensation.

Definition at line 9 of file opcSensation.cpp.

◆ get_property()

int OpcSensation::get_property ( std::string  name,
std::string  property 
)

get_property quickly answers a boolean query

Parameters
nameentity name
propertyentity property (e.g. present or known)
Returns
int 1 if entity has the given property

Definition at line 145 of file opcSensation.cpp.

◆ publish()

void OpcSensation::publish ( )
virtual

send sensation data to port

Implements Sensation.

Definition at line 28 of file opcSensation.cpp.

Member Data Documentation

◆ k_entities

yarp::os::Bottle OpcSensation::k_entities

Definition at line 48 of file opcSensation.h.

◆ kp_entities

yarp::os::Bottle OpcSensation::kp_entities

Definition at line 48 of file opcSensation.h.

◆ o_positions

yarp::os::Bottle OpcSensation::o_positions

Definition at line 48 of file opcSensation.h.

◆ p_entities

yarp::os::Bottle OpcSensation::p_entities

Definition at line 48 of file opcSensation.h.

◆ u_entities

yarp::os::Bottle OpcSensation::u_entities

Definition at line 48 of file opcSensation.h.

◆ up_entities

yarp::os::Bottle OpcSensation::up_entities

Definition at line 48 of file opcSensation.h.

◆ Sensation

class Sensation

Definition at line 13 of file sensation.h.

+ Inheritance diagram for Sensation:

Public Member Functions

virtual void configure ()=0
 
virtual void publish ()=0
 send sensation data to port More...
 
virtual void close_ports ()=0
 

Member Function Documentation

◆ close_ports()

virtual void Sensation::close_ports ( )
pure virtual

Implemented in OpcSensation, and TestSensation.

◆ configure()

virtual void Sensation::configure ( )
pure virtual

Implemented in OpcSensation, and TestSensation.

◆ publish()

virtual void Sensation::publish ( )
pure virtual

send sensation data to port

Implemented in OpcSensation, and TestSensation.

◆ SensationManager

class SensationManager

Definition at line 22 of file sensationManager.h.

+ Inheritance diagram for SensationManager:

Public Member Functions

 SensationManager ()
 
bool configure (yarp::os::ResourceFinder &rf)
 
bool interruptModule ()
 
double getPeriod ()
 
bool updateModule ()
 
bool respond (const Bottle &cmd, Bottle &reply)
 
bool close ()
 

Protected Attributes

double period
 

Constructor & Destructor Documentation

◆ SensationManager()

SensationManager::SensationManager ( )
inline

Definition at line 34 of file sensationManager.h.

Member Function Documentation

◆ close()

bool SensationManager::close ( )

Definition at line 3 of file sensationManager.cpp.

◆ configure()

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

Definition at line 17 of file sensationManager.cpp.

◆ getPeriod()

double SensationManager::getPeriod ( )
inline

Definition at line 45 of file sensationManager.h.

◆ interruptModule()

bool SensationManager::interruptModule ( )
inline

Definition at line 40 of file sensationManager.h.

◆ respond()

bool SensationManager::respond ( const Bottle &  cmd,
Bottle &  reply 
)

Definition at line 61 of file sensationManager.cpp.

◆ updateModule()

bool SensationManager::updateModule ( )

Definition at line 53 of file sensationManager.cpp.

Member Data Documentation

◆ period

double SensationManager::period
protected

Definition at line 31 of file sensationManager.h.

◆ TestSensation

class TestSensation

Definition at line 19 of file test.h.

+ Inheritance diagram for TestSensation:

Public Member Functions

 TestSensation ()
 
void configure ()
 
void publish ()
 send sensation data to port More...
 
void close_ports ()
 

Constructor & Destructor Documentation

◆ TestSensation()

TestSensation::TestSensation ( )
inline

Definition at line 29 of file test.h.

Member Function Documentation

◆ close_ports()

void TestSensation::close_ports ( )
inlinevirtual

Implements Sensation.

Definition at line 35 of file test.h.

◆ configure()

void TestSensation::configure ( )
virtual

Implements Sensation.

Definition at line 8 of file test.cpp.

◆ publish()

void TestSensation::publish ( )
virtual

send sensation data to port

Implements Sensation.

Definition at line 15 of file test.cpp.