Project: engagement_recognition

License: BSD

Dependencies:

Used by: None

All Packages

RNode Class Reference

#include <rnode.h>

Inheritance diagram for RNode:

List of all members.

Public Member Functions

void advertise ()
void castEvent (Event event)
bool compareAdditional (std::vector< std::string > additional, std::string compare)
void endSharedGaze ()
ActorfindActor (std::string id)
bool foundActor (std::string id)
bool lostActor (std::string id)
bool masterExists ()
void performingExtendedActionCallback (const engagement_msgs::PerformanceConstPtr &msg)
void performingLookCallback (const engagement_msgs::PerformanceConstPtr &msg)
void performingNodCallback (const engagement_msgs::PerformanceConstPtr &msg)
void performingPointCallback (const engagement_msgs::PerformanceConstPtr &msg)
void performingShakeCallback (const engagement_msgs::PerformanceConstPtr &msg)
void performingUtteranceCallback (const engagement_msgs::SpeechConstPtr &msg)
bool recogAdjacencyPairService (engagement_srvs::RobotAdjacencyPair::Request &req, engagement_srvs::RobotAdjacencyPair::Response &res)
bool recogDirGazeService (engagement_srvs::RobotDirectedGaze::Request &req, engagement_srvs::RobotDirectedGaze::Response &res)
bool recogMFGazeService (engagement_srvs::RobotMutualFacialGaze::Request &req, engagement_srvs::RobotMutualFacialGaze::Response &res)
bool recogStatisticsService (engagement_srvs::ActorStatistics::Request &req, engagement_srvs::ActorStatistics::Response &res)
void relayToActors (std::string topic, ros::Message *message)
 RNode (EventSink *parent)
 RNode ()
void spawnThread ()
void startSharedGaze ()
void subscribe ()
void updateOldThreads ()
void visionExtendedActionCallback (const engagement_msgs::PerformanceConstPtr &msg)
void visionFaceCallback (const engagement_msgs::ActorIDStatusConstPtr &msg)
void visionFacialGazeCallback (const engagement_msgs::PerformanceConstPtr &msg)
void visionLookCallback (const engagement_msgs::PerformanceConstPtr &msg)
void visionNodCallback (const engagement_msgs::PerformanceConstPtr &msg)
void visionPointCallback (const engagement_msgs::PerformanceConstPtr &msg)
void visionShakeCallback (const engagement_msgs::PerformanceConstPtr &msg)
 ~RNode ()

Static Private Member Functions

static void * spin (void *param)

Private Attributes

pthread_t * master_thread_
std::vector< pthread_t * > old_threads_
ros::Subscriber performing_ext_action_sub_
ros::Subscriber performing_look_sub_
ros::Subscriber performing_nod_sub_
ros::Subscriber performing_point_sub_
ros::Subscriber performing_shake_sub_
ros::Subscriber performing_utterance_sub_
ros::ServiceServer recog_adjacency_pair_srv_
ros::ServiceServer recog_dir_gaze_srv_
ros::ServiceServer recog_mf_gaze_srv_
ros::ServiceServer recog_statistics_srv_
Duration shared_gaze_
unsigned long shared_gaze_start_
ros::Publisher status_pub_
ros::Subscriber vision_face_sub_
double window_size_

Detailed Description

The RNode class is responsible for managing the engagement during a human and robot interaction. It keeps track of each Actor in the interaction and uses Recognizer objects to determine if any Actor is involved in a connection event.

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

Definition at line 59 of file rnode.h.


Constructor & Destructor Documentation

RNode::~RNode (  ) 

Deconstructor for the RNode class.

Definition at line 58 of file rnode.cpp.

RNode::RNode (  ) 

Default constructor for the RNode object.

Definition at line 69 of file rnode.cpp.

RNode::RNode ( EventSink parent  ) 

Constructor for the RNode class, takes a parent EventSink object.

Parameters:
parent The parent EventSink

Definition at line 85 of file rnode.cpp.


Member Function Documentation

void RNode::advertise (  ) 

Advertise all the outgoing topics for the RNode.

Definition at line 133 of file rnode.cpp.

void RNode::castEvent ( Event  event  )  [virtual]

Method responsible for casting an event.

This function is responsible for casting a single event which contains additional information associated with it.

Parameters:
event The event that has been cast

Implements EventSink.

Definition at line 196 of file rnode.cpp.

bool RNode::compareAdditional ( std::vector< std::string >  additional,
std::string  compare 
) [virtual]

Compare the additional data as specified.

Parameters:
additional The additional data
compare How to compare the data
Returns:
Success of the comparison

Implements EventSink.

Definition at line 290 of file rnode.cpp.

void RNode::endSharedGaze (  ) 

End the shared gaze.

Definition at line 172 of file rnode.cpp.

Actor * RNode::findActor ( std::string  id  ) 

Find the Actor in the array.

This function locates the specific Actor, identified by the id, and returns it. It returns null if no object was located.

Parameters:
id The Actor's identifier
Returns:
The requested Actor, or null

Definition at line 347 of file rnode.cpp.

bool RNode::foundActor ( std::string  id  ) 

Add an Actor object to an array of Actors.

This function is responsible for adding an Actor object to the array with the given id. This function is called in the event that the Actor's face has been detected by the vision system.

Parameters:
id The Actor identifier
Returns:
True if success, false otherwise

Definition at line 297 of file rnode.cpp.

bool RNode::lostActor ( std::string  id  ) 

Remove an Actor from an array of Actors. This function is responsible for locating an Actor object with the given id in the array and removing that object from the array.

Parameters:
id The id of the Actor
Returns:
True if success, false otherwise

Definition at line 328 of file rnode.cpp.

bool RNode::masterExists (  ) 

Return true if a master thread exists, false otherwise.

Returns:
True if master thread exists, false otherwise

Definition at line 396 of file rnode.cpp.

void RNode::performingExtendedActionCallback ( const engagement_msgs::PerformanceConstPtr &  msg  ) 

Callback function for Performing Extended Action topic.

Parameters:
msg The message received

Definition at line 190 of file performing.h.

void RNode::performingLookCallback ( const engagement_msgs::PerformanceConstPtr &  msg  ) 

Callback function for Performing Look topic.

Parameters:
msg The message received

Definition at line 38 of file performing.h.

void RNode::performingNodCallback ( const engagement_msgs::PerformanceConstPtr &  msg  ) 

Callback function for Performing Nod topic.

Parameters:
msg The message received

Definition at line 155 of file performing.h.

void RNode::performingPointCallback ( const engagement_msgs::PerformanceConstPtr &  msg  ) 

Callback function for Performing Point topic.

Parameters:
msg The message received

Definition at line 225 of file performing.h.

void RNode::performingShakeCallback ( const engagement_msgs::PerformanceConstPtr &  msg  ) 

Callback function for Performing Shake topic.

Parameters:
msg The message received

Definition at line 120 of file performing.h.

void RNode::performingUtteranceCallback ( const engagement_msgs::SpeechConstPtr &  msg  ) 

Callback function for Performing Utterance topic.

Parameters:
msg The message received

Definition at line 264 of file performing.h.

bool RNode::recogAdjacencyPairService ( engagement_srvs::RobotAdjacencyPair::Request &  req,
engagement_srvs::RobotAdjacencyPair::Response &  res 
)

Callback function for Recognition Adjacency Pair service.

Parameters:
req The request message
res The response message

Definition at line 244 of file recognition.h.

bool RNode::recogDirGazeService ( engagement_srvs::RobotDirectedGaze::Request &  req,
engagement_srvs::RobotDirectedGaze::Response &  res 
)

Callback function for Recognition Directed Gaze service.

Parameters:
req The request message
res The response message

Definition at line 106 of file recognition.h.

bool RNode::recogMFGazeService ( engagement_srvs::RobotMutualFacialGaze::Request &  req,
engagement_srvs::RobotMutualFacialGaze::Response &  res 
)

Callback function for Recognition Mutual Facial Gaze service.

Parameters:
req The request message
res The response message

Definition at line 180 of file recognition.h.

bool RNode::recogStatisticsService ( engagement_srvs::ActorStatistics::Request &  req,
engagement_srvs::ActorStatistics::Response &  res 
)

Callback function for Recog Statistics service.

Parameters:
req The request message
res The response message

Definition at line 41 of file recognition.h.

void RNode::relayToActors ( std::string  topic,
ros::Message *  message 
)

This message was received and needs to be relayed to all the Actors.

Parameters:
topic The topic
message The message

Definition at line 191 of file rnode.cpp.

void RNode::spawnThread (  ) 

Spawn a new master thread.

Definition at line 375 of file rnode.cpp.

void * RNode::spin ( void *  param  )  [static, private]

Spin the master thread, otherwise exit.

Parameters:
param The param to the spin method
Returns:
The return for the spin method

Definition at line 352 of file rnode.cpp.

void RNode::startSharedGaze (  ) 

Start the shared gaze.

Definition at line 159 of file rnode.cpp.

void RNode::subscribe (  ) 

Subscribe to all the incoming topics for the RNode.

Definition at line 101 of file rnode.cpp.

void RNode::updateOldThreads (  ) 

Join any old threads that exist.

Definition at line 402 of file rnode.cpp.

void RNode::visionExtendedActionCallback ( const engagement_msgs::PerformanceConstPtr &  msg  ) 

Callback function for Vision Extended Action topic.

Parameters:
msg The message received

Definition at line 363 of file vision.h.

void RNode::visionFaceCallback ( const engagement_msgs::ActorIDStatusConstPtr &  msg  ) 

Callback function for Vision Face topic.

Parameters:
msg The message received

Definition at line 399 of file vision.h.

void RNode::visionFacialGazeCallback ( const engagement_msgs::PerformanceConstPtr &  msg  ) 

Callback function for Vision Facial Gaze topic.

Parameters:
msg The message received

Definition at line 38 of file vision.h.

void RNode::visionLookCallback ( const engagement_msgs::PerformanceConstPtr &  msg  ) 

Callback function for Vision Look topic.

Parameters:
msg The message received

Definition at line 112 of file vision.h.

void RNode::visionNodCallback ( const engagement_msgs::PerformanceConstPtr &  msg  ) 

Callback function for Vision Nod topic.

Parameters:
msg The message received

Definition at line 327 of file vision.h.

void RNode::visionPointCallback ( const engagement_msgs::PerformanceConstPtr &  msg  ) 

Callback function for Vision Point topic.

Parameters:
msg The message received

Definition at line 203 of file vision.h.

void RNode::visionShakeCallback ( const engagement_msgs::PerformanceConstPtr &  msg  ) 

Callback function for Vision Shake topic.

Parameters:
msg The message received

Definition at line 291 of file vision.h.


Member Data Documentation

pthread_t* RNode::master_thread_ [private]

Pointer to the master thread.

Definition at line 63 of file rnode.h.

std::vector<pthread_t*> RNode::old_threads_ [private]

The vector of old threads.

Definition at line 66 of file rnode.h.

ros::Subscriber RNode::performing_ext_action_sub_ [private]

Subscriber for the performing extended action message.

Definition at line 96 of file rnode.h.

ros::Subscriber RNode::performing_look_sub_ [private]

Subscriber for the performing look message.

Definition at line 88 of file rnode.h.

ros::Subscriber RNode::performing_nod_sub_ [private]

Subscriber for the performing nod message.

Definition at line 94 of file rnode.h.

ros::Subscriber RNode::performing_point_sub_ [private]

Subscriber for the performing point message.

Definition at line 90 of file rnode.h.

ros::Subscriber RNode::performing_shake_sub_ [private]

Subscriber for the performing shake message.

Definition at line 92 of file rnode.h.

ros::Subscriber RNode::performing_utterance_sub_ [private]

Subscriber for the performing utterance message.

Definition at line 98 of file rnode.h.

ros::ServiceServer RNode::recog_adjacency_pair_srv_ [private]

The recognition adjacency pair service.

Definition at line 85 of file rnode.h.

ros::ServiceServer RNode::recog_dir_gaze_srv_ [private]

The recognition directed gaze service.

Definition at line 81 of file rnode.h.

ros::ServiceServer RNode::recog_mf_gaze_srv_ [private]

The recognition mutual facial gaze service.

Definition at line 83 of file rnode.h.

ros::ServiceServer RNode::recog_statistics_srv_ [private]

The recognition statistics service.

Definition at line 79 of file rnode.h.

Keep track of the total times for shared gaze.

Definition at line 75 of file rnode.h.

unsigned long RNode::shared_gaze_start_ [private]

Keep track of the start time of shared gaze.

Definition at line 72 of file rnode.h.

ros::Publisher RNode::status_pub_ [private]

Publisher for recognition human status messages.

Definition at line 104 of file rnode.h.

ros::Subscriber RNode::vision_face_sub_ [private]

Subscriber for the vision face message.

Definition at line 101 of file rnode.h.

double RNode::window_size_ [private]

The size of the window to use.

Definition at line 69 of file rnode.h.


The documentation for this class was generated from the following files:
  • engagement_recognition/src/recognition/rnode/rnode.h
  • engagement_recognition/src/recognition/rnode/callbacks/performing.h
  • engagement_recognition/src/recognition/rnode/callbacks/recognition.h
  • engagement_recognition/src/recognition/rnode/callbacks/vision.h
  • engagement_recognition/src/recognition/rnode/rnode.cpp

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