Project: engagement_recognition

License: BSD

Dependencies:

Used by: None

All Packages

Actor Class Reference

#include <actor.h>

Inheritance diagram for Actor:

List of all members.

Public Member Functions

 Actor (std::string id)
 Actor ()
void addEvent (std::string type, bool success, unsigned long start, unsigned long delay, unsigned long duration, std::string data)
APServiceResponse adjPairService (ros::Message *message)
ServiceResponse dirGazeService (ros::Message *message, std::vector< std::string > objects)
bool getEngaged ()
HandlergetHandler ()
std::string getID ()
std::vector< std::string > getLooking ()
std::vector< std::string > getPointing ()
std::vector< unsigned long > getStatistics ()
bool isFacialGaze ()
bool isLooking (std::vector< std::string > objects)
bool isPointing (std::vector< std::string > objects)
bool isSpeaking ()
ServiceResponse mfGazeService (ros::Message *message)
void received (std::string topic, ros::Message *message)
void setEngaged (bool engaged)
bool setFacialGaze (bool start)
void setHandler (Handler *handler)
bool setLooking (std::vector< std::string > objects, bool start)
bool setPointing (std::vector< std::string > objects, bool start)
bool setSpeaking (bool start)
void updateDirGazeRecognizers (std::vector< std::string > objects)
 ~Actor ()

Private Member Functions

void createSemaphores ()

Private Attributes

bool engaged_
bool facial_gaze_
Handlerhandler_
std::string id_
ConsoleLoggerlogger_
std::vector< std::string > looking_
std::vector< std::string > pointing_
Semaphoresemaphore_
bool speaking_
Timelinestatistics_

Detailed Description

This structure encapsulates the known information about a given actor which includes where the actor is looking and pointing, and if the actor is currently speaking.

Author:
Brett Ponsler (bponsler (at) wpi (dot) edu)

Definition at line 61 of file actor.h.


Constructor & Destructor Documentation

Actor::~Actor (  ) 

Deconstructor for the Actor class.

Definition at line 42 of file actor.cpp.

Actor::Actor (  ) 

The default constructor for the Actor class.

Definition at line 55 of file actor.cpp.

Actor::Actor ( std::string  id  ) 

Constructor for the Actor class, takes an id

Parameters:
id The Actor's id

Definition at line 78 of file actor.cpp.


Member Function Documentation

void Actor::addEvent ( std::string  type,
bool  success,
unsigned long  start,
unsigned long  delay,
unsigned long  duration,
std::string  data 
)

An event has occurred add it to the statistics for this actor.

Parameters:
type The type of connection event
success The success of the connection event
start The start time for the connection event
delay The delay for the connection event
duration The duration of the connection event
data The additional data

Definition at line 437 of file actor.cpp.

APServiceResponse Actor::adjPairService ( ros::Message *  message  ) 

The adjacency pair service was called.

Parameters:
message The message that was received
Returns:
The status returned

Definition at line 131 of file actor.cpp.

void Actor::createSemaphores (  )  [private]

Create the Semaphores for the Actor.

Definition at line 101 of file actor.cpp.

ServiceResponse Actor::dirGazeService ( ros::Message *  message,
std::vector< std::string >  objects 
)

The directed gaze service was called.

Parameters:
message The message that was received
objects The objects that were received
Returns:
The status returned

Definition at line 120 of file actor.cpp.

bool Actor::getEngaged (  ) 

Return the engaged status for this actor.

Returns:
True if engaged, false otherwise

Definition at line 158 of file actor.cpp.

Handler * Actor::getHandler (  ) 

Return the Recognizer Handler for this Actor.

Returns:
The Handler

Definition at line 146 of file actor.cpp.

std::string Actor::getID (  ) 

Return the Actor's id.

Returns:
The Actor's id

Definition at line 167 of file actor.cpp.

std::vector< std::string > Actor::getLooking (  ) 

Return the vector of objects the actor is looking at.

Returns:
The vector of objects the actor is looking at

Definition at line 213 of file actor.cpp.

std::vector< std::string > Actor::getPointing (  ) 

Return the vector of objects the actor is pointing at.

Returns:
The vector of objects the actor is pointing at

Definition at line 223 of file actor.cpp.

std::vector< unsigned long > Actor::getStatistics (  ) 

Return the vector of statistics for this Actor. The vector will contain the overall and recent statistics (mean time between connection events, max time between connection events, mean delay, max delay, mean duration, max duration, failure rate).

Returns:
The vector of statistics

Definition at line 445 of file actor.cpp.

bool Actor::isFacialGaze (  ) 

Determine if the actor is looking at the robot's face.

Returns:
True if the actor is looking at the robot's face, false otherwise

Definition at line 173 of file actor.cpp.

bool Actor::isLooking ( std::vector< std::string >  objects  ) 

Determine if the actor is looking at a set of objects. This is true in the event that the set of objects the actor is looking at contains the exact same objects as the set of objects given. It is false otherwise.

Parameters:
objects The set of objects
Returns:
True if the actor is looking at the objects, false otherwise.

Definition at line 193 of file actor.cpp.

bool Actor::isPointing ( std::vector< std::string >  objects  ) 

Determine if the actor is pointing at a set of objects. This is true in the event that the set of objects the actor is pointing at contains the exact same objects as the set of objects given. It is false otherwise.

Parameters:
objects The set of objects
Returns:
True if the actor is pointing at the objects, false otherwise.

Definition at line 203 of file actor.cpp.

bool Actor::isSpeaking (  ) 

Determine if the actor is currently speaking.

Returns:
True if the actor is speaking, false otherwise

Definition at line 183 of file actor.cpp.

ServiceResponse Actor::mfGazeService ( ros::Message *  message  ) 

The mutual facial gaze service was called.

Parameters:
message The message that was received
Returns:
The status returned

Definition at line 126 of file actor.cpp.

void Actor::received ( std::string  topic,
ros::Message *  message 
)

A message was received.

Parameters:
topic The topic
message The message was received

Definition at line 115 of file actor.cpp.

void Actor::setEngaged ( bool  engaged  ) 

Set the engaged status for this actor.

Parameters:
engaged True if engaged, false if unengaged

Definition at line 151 of file actor.cpp.

bool Actor::setFacialGaze ( bool  start  ) 

Set whether the actor is making facial gaze with the robot or not.

Parameters:
start Whether the Actor started making facial gaze
Returns:
True if success, false otherwise

Definition at line 233 of file actor.cpp.

void Actor::setHandler ( Handler handler  ) 

Assign a Recognizer Handler to this Actor.

Parameters:
handler The Handler

Definition at line 136 of file actor.cpp.

bool Actor::setLooking ( std::vector< std::string >  objects,
bool  start 
)

The actor started or stopped looking at a set of objects.

Parameters:
objects The set of objects
start Whether the looking is starting or ending
Returns:
True if success, false otherwise

Definition at line 287 of file actor.cpp.

bool Actor::setPointing ( std::vector< std::string >  objects,
bool  start 
)

The actor started or stopped pointing at a set of objects.

Parameters:
objects The set of objects
start Whether the pointing is starting or ending
Returns:
True if success, false otherwise

Definition at line 362 of file actor.cpp.

bool Actor::setSpeaking ( bool  start  ) 

The actor started or stopped speaking.

Parameters:
start Whether the actor started or stopped speaking
Returns:
True if suceess, false otherwise

Definition at line 260 of file actor.cpp.

void Actor::updateDirGazeRecognizers ( std::vector< std::string >  objects  ) 

Update the directed gaze recognizers with the objects. This function will ensure that one directed gaze recognizer exists for each of the objects given. If one does not it one will be created.

Parameters:
objects The objects

Definition at line 107 of file actor.cpp.


Member Data Documentation

bool Actor::engaged_ [private]

Whether the actor is engaged or not.

Definition at line 71 of file actor.h.

bool Actor::facial_gaze_ [private]

Whether or not this actor is looking at the robot's face

Definition at line 77 of file actor.h.

The handler for this actor.

Definition at line 89 of file actor.h.

std::string Actor::id_ [private]

The actor identifier

Definition at line 74 of file actor.h.

The ConsoleLogger for the Actor class.

Reimplemented from Loggable.

Definition at line 65 of file actor.h.

std::vector<std::string> Actor::looking_ [private]

The series of objects this actor is looking at.

Definition at line 83 of file actor.h.

std::vector<std::string> Actor::pointing_ [private]

The series of objects this actor is pointing at.

Definition at line 86 of file actor.h.

A Semaphore for the Actor.

Definition at line 68 of file actor.h.

bool Actor::speaking_ [private]

Whether or not this actor is speaking.

Definition at line 80 of file actor.h.

Keep track of the statistics for this actor.

Definition at line 92 of file actor.h.


The documentation for this class was generated from the following files:
  • engagement_recognition/src/recognition/actors/actor.h
  • engagement_recognition/src/recognition/actors/actor.cpp

engagement_recognition
Author(s): Brett Ponsler (bponsler (at) wpi (dot) edu)
autogenerated on Fri Sep 9 10:35:49 2011