Project: engagement_generation

License: BSD

Dependencies:

Used by: None

All Packages

edu::wpi::hri::gen::comm::GazeKnowledge Class Reference

Inheritance diagram for edu::wpi::hri::gen::comm::GazeKnowledge:

List of all members.

Classes

class  LockListener

Public Member Functions

synchronized void addListener (GazeListener gl)
void call (Performance perf)
synchronized void gazeChanged (String target, boolean face, boolean lock)
 GazeKnowledge (NodeHandle handle, Logger logger, XMLInterface xml, BMLRealizer realizer) throws RosException
String getTarget ()
boolean isLocked ()
void setBottomListener (GazeListener gl)
void shutdown ()
boolean trySetGaze (String target)

Private Attributes

GazeListener bottomListener
final Subscriber< FlaggazeLockSub
final List< GazeListenerlisteners
boolean locked
final Logger logger
final Subscriber< PerformancelookSub
final BMLRealizer realizer
String target
final Publisher< EntitytriedPub
final XMLInterface xml

Detailed Description

The Gaze Knowledge class maintains the information about where the robot is looking and whether the current gaze is locked. An outside node can call the generation/set_gaze service to change the gaze to a position, lock the gaze if the outside node so chooses, and issue a timeout to change back to default behaviors. The default behavior policy is known by the ME advisor, and so the MEAdvisor must listen for changes of gaze on this object. This object also subscribes to the performing gaze as control is required to publish.

Author:
Aaron Holroyd (aholroyd (at) wpi (dot) edu)

Definition at line 65 of file GazeKnowledge.java.


Constructor & Destructor Documentation

edu::wpi::hri::gen::comm::GazeKnowledge::GazeKnowledge ( NodeHandle  handle,
Logger  logger,
XMLInterface  xml,
BMLRealizer  realizer 
) throws RosException [inline]

Create a new gaze knowledge object which knows how to handle change gaze requests and that will maintain the known state of the gaze for generation.

Parameters:
handle the node handle to provide the set_gaze service and subscribe to performing/look
logger The logger to log to
xml The xml interface to convert behaviors to bml strings
realizer The realizer to change the gaze through

Definition at line 95 of file GazeKnowledge.java.


Member Function Documentation

synchronized void edu::wpi::hri::gen::comm::GazeKnowledge::addListener ( GazeListener  gl  )  [inline]

Add a listener to changes of gaze status. This includes target changes and lock changes.

Parameters:
gl the new gaze listener to inform of changes later.

Definition at line 158 of file GazeKnowledge.java.

void edu::wpi::hri::gen::comm::GazeKnowledge::call ( Performance  perf  )  [inline]

Definition at line 215 of file GazeKnowledge.java.

synchronized void edu::wpi::hri::gen::comm::GazeKnowledge::gazeChanged ( String  target,
boolean  face,
boolean  lock 
) [inline, virtual]

This method is a helper method for automatically informing the listeners of gaze changes.

Parameters:
target The new target
face True if the target is a face
lock True if the gaze is locked.

Implements edu::wpi::hri::gen::comm::GazeListener.

Definition at line 207 of file GazeKnowledge.java.

String edu::wpi::hri::gen::comm::GazeKnowledge::getTarget (  )  [inline]

Get the id of the target which is currently being looked at.

Returns:
The target id.

Definition at line 129 of file GazeKnowledge.java.

boolean edu::wpi::hri::gen::comm::GazeKnowledge::isLocked (  )  [inline]
Returns:
True if another module has locked the gaze.

Definition at line 136 of file GazeKnowledge.java.

void edu::wpi::hri::gen::comm::GazeKnowledge::setBottomListener ( GazeListener  gl  )  [inline]

Set the last gaze listener so that it can be informed to update all of the gazes.

Parameters:
gl The last on the food chain gaze listener.

Definition at line 147 of file GazeKnowledge.java.

void edu::wpi::hri::gen::comm::GazeKnowledge::shutdown (  )  [inline]

Shutdown the gaze knowledge by closing the services and subscribers

Definition at line 118 of file GazeKnowledge.java.

boolean edu::wpi::hri::gen::comm::GazeKnowledge::trySetGaze ( String  target  )  [inline]

Attempt to set the gaze of the Robot to the given target. Return true if the gaze was set properly, false if it was not.

Parameters:
target The new target to look at.
Returns:
True for success, false for failure.

Reimplemented from edu::wpi::hri::gen::comm::GazeListener.

Definition at line 171 of file GazeKnowledge.java.


Member Data Documentation

Definition at line 68 of file GazeKnowledge.java.

Definition at line 75 of file GazeKnowledge.java.

Definition at line 74 of file GazeKnowledge.java.

Definition at line 72 of file GazeKnowledge.java.

Definition at line 69 of file GazeKnowledge.java.

Reimplemented from edu::wpi::hri::gen::comm::GazeListener.

Definition at line 73 of file GazeKnowledge.java.

Definition at line 70 of file GazeKnowledge.java.

final XMLInterface edu::wpi::hri::gen::comm::GazeKnowledge::xml [private]

Definition at line 77 of file GazeKnowledge.java.


The documentation for this class was generated from the following file:

engagement_generation
Author(s): Aaron Holroyd (aholroyd (at) wpi (dot) edu)
autogenerated on Fri Sep 9 10:35:44 2011