Project: engagement_generation
License: BSD
Dependencies:
Used by:
None
All Packages
|
edu::wpi::hri::gen::policy::TurnPositionPolicy Class Reference
List of all members.
Classes |
class | APWaiter |
Public Member Functions |
APWaiter | apply (EBMLList list, String position, String actor, boolean firstTurn, boolean delay, String delayTarget) throws Exception |
void | shutdown () |
| TurnPositionPolicy (NodeHandle handle, Logger logger, BMLEmitListener emit, boolean full) throws RosException |
Private Member Functions |
void | execBackchannel (EBMLList list) |
void | execBeginning (boolean firstTurn, String actor) |
void | execDelay (EBMLList list, String delayTarget) |
void | execEnd (EBMLList list, String actor) |
Private Attributes |
final ServiceClient
< RobotAdjacencyPair.Request,
RobotAdjacencyPair.Response,
RobotAdjacencyPair > | apsrv |
final Publisher< Speech > | bcpub |
final BMLEmitListener | emit |
final boolean | full |
final Logger | logger |
APWaiter | waiter |
Detailed Description
The TurnPositionPolicy has one job, to add behaviors corresponding to the actions required to take when completing one turn of an adjacency pair. The actions to take are decided based on if the turn is a first turn and the position of the turn given. The actions taken can be found by the following table:
Position | Policy |
Beginning | if first turn: start a Robot Initiated AP |
Middle | - |
End | Execute MFG after all other actions |
Full | Perform Beginning and End Policies |
- Author:
- Aaron Holroyd (aholroyd (at) wpi (dot) edu)
Definition at line 90 of file TurnPositionPolicy.java.
Constructor & Destructor Documentation
edu::wpi::hri::gen::policy::TurnPositionPolicy::TurnPositionPolicy |
( |
NodeHandle |
handle, |
|
|
Logger |
logger, |
|
|
BMLEmitListener |
emit, |
|
|
boolean |
full | |
|
) |
| | throws RosException [inline] |
Create a new Turn Position Policy
- Parameters:
-
| handle | THe node handle to connect the ap client to. |
| logger | The logger to base this Policy's logger on. |
| emit | The emit object to register emits with. |
| full | True to use MFG and BC connection events, false not to. |
- Exceptions:
-
| RosException | if the publisher to recognition can not be created |
Definition at line 113 of file TurnPositionPolicy.java.
Member Function Documentation
APWaiter edu::wpi::hri::gen::policy::TurnPositionPolicy::apply |
( |
EBMLList |
list, |
|
|
String |
position, |
|
|
String |
actor, |
|
|
boolean |
firstTurn, |
|
|
boolean |
delay, |
|
|
String |
delayTarget | |
|
) |
| | throws Exception [inline] |
Determine the actions to complete for the given situation.
- Parameters:
-
| list | The list to add the behaviors to. |
| position | The position in the turn of this fragment. |
| actor | The actor to whom the fragment is directed. |
| firstTurn | True for the first turn of a AP, false otherwise. |
| delay | True if this fragment should hold or delay the turn. |
| delayTarget | The target to look at if it is a delay, if not provided UP_RIGHT is used. |
- Returns:
- The APWaiter which will return the response of the actor if the AP should be waited for.
- Exceptions:
-
| Exception | If the parameters given are invalid |
Definition at line 160 of file TurnPositionPolicy.java.
void edu::wpi::hri::gen::policy::TurnPositionPolicy::execBackchannel |
( |
EBMLList |
list |
) |
[inline, private] |
void edu::wpi::hri::gen::policy::TurnPositionPolicy::execBeginning |
( |
boolean |
firstTurn, |
|
|
String |
actor | |
|
) |
| | [inline, private] |
The only thing for this method to complete is to cre if (interest != null) { HumanAdjacencyPair ap = new HumanAdjacencyPair(); ap.action = res.action; interest.call(ap); }ate a new APWaiter which will wait for the AP to complete. This is done for Beginning and Full turn positions.
Definition at line 201 of file TurnPositionPolicy.java.
void edu::wpi::hri::gen::policy::TurnPositionPolicy::execDelay |
( |
EBMLList |
list, |
|
|
String |
delayTarget | |
|
) |
| | [inline, private] |
void edu::wpi::hri::gen::policy::TurnPositionPolicy::execEnd |
( |
EBMLList |
list, |
|
|
String |
actor | |
|
) |
| | [inline, private] |
This method must create the appropriate behaviors for an end of turn position. This means firing an MFG and creating the behaviors which go along with an MFG.
- Parameters:
-
| list | The list to append the behaviors to. |
Definition at line 214 of file TurnPositionPolicy.java.
void edu::wpi::hri::gen::policy::TurnPositionPolicy::shutdown |
( |
|
) |
[inline] |
Member Data Documentation
The documentation for this class was generated from the following file:
|