icub-client
Classes

A module that gets the objects present in the OPC, and change their top down saliency according to their acceleration, appereance and disappereance. More...

+ Collaboration diagram for pasar:

Classes

struct  ObjectModel
 
class  PasarModule
 

Detailed Description

A module that gets the objects present in the OPC, and change their top down saliency according to their acceleration, appereance and disappereance.


The Bottom Up saliency is based on lumicroma and will integrate the visual component. Version:1.0

Author
Grégoire Pointeau greg..nosp@m.poin.nosp@m.teau@.nosp@m.gmai.nosp@m.l.com, Stéphane Lallée steph.nosp@m.ane..nosp@m.lalle.nosp@m.e@gm.nosp@m.ail.c.nosp@m.om

Description

A module that gets the objects present in the OPC, and change their top down saliency according to their acceleration, appereance and disappereance.
The Bottom Up saliency is based on lumicroma and will integrate the visual component.

Parameters

Input Ports

Output Ports

Services


Class Documentation

◆ ObjectModel

struct ObjectModel

Definition at line 31 of file pasar.h.

Class Members
double acceleration
double lastTimeSeen
Object o
bool present
int restingSteps
double speed

◆ PasarModule

class PasarModule

Definition at line 45 of file pasar.h.

+ Inheritance diagram for PasarModule:

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 ()
 

Protected Member Functions

void saliencyTopDown ()
 saliencyTopDown Update the salience according to the informations contained in the OPC (acceleration, appareance, disappareance) More...
 
void saliencyNormalize ()
 saliencyNormalize Normalize salience such that maximum salience = 1 More...
 
void saliencyLeakyIntegration ()
 saliencyLeakyIntegration Decrease of the salience through time. More...
 
bool saliencyPointing ()
 saliencyPointing Increase the salience of the closest object from the right hand More...
 
bool saliencyWaving ()
 saliencyWaving Increase the saliency of the agent waving More...
 
void initializeMapTiming ()
 

Protected Attributes

double pTopDownAppearanceBurst
 score of saliency for an appereance More...
 
double pTopDownDisappearanceBurst
 score of saliency for an diappereance More...
 
double pTopDownAccelerationCoef
 score of saliency for an acceleration detected More...
 
double pExponentialDecrease
 Speed of the decrease of the saliency over the time (should be less than 1) More...
 
double pTopDownWaving
 increase of saliency if waving More...
 
double thresholdMovementAccelAgent
 minimum acceleration to detect an agent More...
 
double thresholdMovementAccelObject
 minimum acceleration to detect an object More...
 
double thresholdWaving
 minimum waving detected More...
 
double thresholdPointing
 maximum distance between hand and object to detect pointing More...
 
double thresholdSaliency
 if object saliency is below this value, it is set to 0 More...
 
double dthresholdAppear
 minimum time an object has to be present before it is detected as appeared More...
 
double dthresholdDisappear
 minimum time an object has to be absent before it is detected as disappeared More...
 
double dBurstOfPointing
 how much to increase saliency if object is pointed at More...
 
double lastTimeWaving
 last time point when the agent was waving More...
 
double lastTimePointing
 last time point when the agent was pointing More...
 
bool checkWaving
 whether to detect waving of an agent More...
 
bool checkPointing
 whether to detect pointing of an agent More...
 
icubclient::ICubClientiCub
 
yarp::os::Port handlerPort
 a port to handle messages More...
 
yarp::sig::VectorOf< double > rightHandt1
 position of right at t1 More...
 
yarp::sig::VectorOf< double > rightHandt2
 position of right at t2 More...
 
yarp::sig::VectorOf< double > leftHandt1
 position of left hand at t1 More...
 
yarp::sig::VectorOf< double > leftHandt2
 position of left hand at t2 More...
 
std::pair< bool, bool > presentRightHand
 first: whether right hand was present at t1; second: whether right hand is present at t2 More...
 
std::pair< bool, bool > presentLeftHand
 first: whether left hand was present at t1; second: whether left hand is present at t2 More...
 
std::map< int, ObjectModelpresentObjectsLastStep
 
std::map< int, std::pair< double, double > > presentLastSpeed
 
std::map< int, std::pair< double, double > > presentCurrentSpeed
 
std::map< int, ObjectModelOPCEntities
 
bool isPointing
 if the human is pointing More...
 
bool isWaving
 if if the human is waving More...
 
double initTime
 

Member Function Documentation

◆ close()

bool PasarModule::close ( )

Definition at line 123 of file pasar.cpp.

◆ configure()

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

Definition at line 28 of file pasar.cpp.

◆ getPeriod()

double PasarModule::getPeriod ( )

Definition at line 372 of file pasar.cpp.

◆ initializeMapTiming()

void PasarModule::initializeMapTiming ( )
protected

!! ONLY OBJECTS and AGENTS ARE TRACKED !!!

Definition at line 587 of file pasar.cpp.

◆ interruptModule()

bool PasarModule::interruptModule ( )

Definition at line 113 of file pasar.cpp.

◆ respond()

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

Definition at line 138 of file pasar.cpp.

◆ saliencyLeakyIntegration()

void PasarModule::saliencyLeakyIntegration ( )
protected

saliencyLeakyIntegration Decrease of the salience through time.

Exponential factor pExponentialDecrease < 1

Definition at line 358 of file pasar.cpp.

◆ saliencyNormalize()

void PasarModule::saliencyNormalize ( )
protected

saliencyNormalize Normalize salience such that maximum salience = 1

Definition at line 337 of file pasar.cpp.

◆ saliencyPointing()

bool PasarModule::saliencyPointing ( )
protected

saliencyPointing Increase the salience of the closest object from the right hand

Returns
True if robot is pointing now, False otherwise

Definition at line 378 of file pasar.cpp.

◆ saliencyTopDown()

void PasarModule::saliencyTopDown ( )
protected

saliencyTopDown Update the salience according to the informations contained in the OPC (acceleration, appareance, disappareance)

Definition at line 266 of file pasar.cpp.

◆ saliencyWaving()

bool PasarModule::saliencyWaving ( )
protected

saliencyWaving Increase the saliency of the agent waving

Returns
true is the agent is wavingNow, False otherwise

Definition at line 462 of file pasar.cpp.

◆ updateModule()

bool PasarModule::updateModule ( )

Definition at line 211 of file pasar.cpp.

Member Data Documentation

◆ checkPointing

bool PasarModule::checkPointing
protected

whether to detect pointing of an agent

Definition at line 66 of file pasar.h.

◆ checkWaving

bool PasarModule::checkWaving
protected

whether to detect waving of an agent

Definition at line 65 of file pasar.h.

◆ dBurstOfPointing

double PasarModule::dBurstOfPointing
protected

how much to increase saliency if object is pointed at

Definition at line 60 of file pasar.h.

◆ dthresholdAppear

double PasarModule::dthresholdAppear
protected

minimum time an object has to be present before it is detected as appeared

Definition at line 58 of file pasar.h.

◆ dthresholdDisappear

double PasarModule::dthresholdDisappear
protected

minimum time an object has to be absent before it is detected as disappeared

Definition at line 59 of file pasar.h.

◆ handlerPort

yarp::os::Port PasarModule::handlerPort
protected

a port to handle messages

Definition at line 69 of file pasar.h.

◆ iCub

icubclient::ICubClient* PasarModule::iCub
protected

Definition at line 67 of file pasar.h.

◆ initTime

double PasarModule::initTime
protected

Definition at line 86 of file pasar.h.

◆ isPointing

bool PasarModule::isPointing
protected

if the human is pointing

Definition at line 84 of file pasar.h.

◆ isWaving

bool PasarModule::isWaving
protected

if if the human is waving

Definition at line 85 of file pasar.h.

◆ lastTimePointing

double PasarModule::lastTimePointing
protected

last time point when the agent was pointing

Definition at line 63 of file pasar.h.

◆ lastTimeWaving

double PasarModule::lastTimeWaving
protected

last time point when the agent was waving

Definition at line 62 of file pasar.h.

◆ leftHandt1

yarp::sig::VectorOf<double> PasarModule::leftHandt1
protected

position of left hand at t1

Definition at line 73 of file pasar.h.

◆ leftHandt2

yarp::sig::VectorOf<double> PasarModule::leftHandt2
protected

position of left hand at t2

Definition at line 74 of file pasar.h.

◆ OPCEntities

std::map<int, ObjectModel> PasarModule::OPCEntities
protected

Definition at line 82 of file pasar.h.

◆ pExponentialDecrease

double PasarModule::pExponentialDecrease
protected

Speed of the decrease of the saliency over the time (should be less than 1)

Definition at line 51 of file pasar.h.

◆ presentCurrentSpeed

std::map<int, std::pair<double, double> > PasarModule::presentCurrentSpeed
protected

Definition at line 81 of file pasar.h.

◆ presentLastSpeed

std::map<int, std::pair<double, double> > PasarModule::presentLastSpeed
protected

Definition at line 80 of file pasar.h.

◆ presentLeftHand

std::pair<bool, bool> PasarModule::presentLeftHand
protected

first: whether left hand was present at t1; second: whether left hand is present at t2

Definition at line 77 of file pasar.h.

◆ presentObjectsLastStep

std::map<int, ObjectModel> PasarModule::presentObjectsLastStep
protected

Definition at line 79 of file pasar.h.

◆ presentRightHand

std::pair<bool, bool> PasarModule::presentRightHand
protected

first: whether right hand was present at t1; second: whether right hand is present at t2

Definition at line 76 of file pasar.h.

◆ pTopDownAccelerationCoef

double PasarModule::pTopDownAccelerationCoef
protected

score of saliency for an acceleration detected

Definition at line 50 of file pasar.h.

◆ pTopDownAppearanceBurst

double PasarModule::pTopDownAppearanceBurst
protected

score of saliency for an appereance

Definition at line 48 of file pasar.h.

◆ pTopDownDisappearanceBurst

double PasarModule::pTopDownDisappearanceBurst
protected

score of saliency for an diappereance

Definition at line 49 of file pasar.h.

◆ pTopDownWaving

double PasarModule::pTopDownWaving
protected

increase of saliency if waving

Definition at line 52 of file pasar.h.

◆ rightHandt1

yarp::sig::VectorOf<double> PasarModule::rightHandt1
protected

position of right at t1

Definition at line 71 of file pasar.h.

◆ rightHandt2

yarp::sig::VectorOf<double> PasarModule::rightHandt2
protected

position of right at t2

Definition at line 72 of file pasar.h.

◆ thresholdMovementAccelAgent

double PasarModule::thresholdMovementAccelAgent
protected

minimum acceleration to detect an agent

Definition at line 53 of file pasar.h.

◆ thresholdMovementAccelObject

double PasarModule::thresholdMovementAccelObject
protected

minimum acceleration to detect an object

Definition at line 54 of file pasar.h.

◆ thresholdPointing

double PasarModule::thresholdPointing
protected

maximum distance between hand and object to detect pointing

Definition at line 56 of file pasar.h.

◆ thresholdSaliency

double PasarModule::thresholdSaliency
protected

if object saliency is below this value, it is set to 0

Definition at line 57 of file pasar.h.

◆ thresholdWaving

double PasarModule::thresholdWaving
protected

minimum waving detected

Definition at line 55 of file pasar.h.