Package edu.tufts.hrilab.ava
Class AvaDisplayComponent
java.lang.Object
edu.tufts.hrilab.diarc.DiarcComponent
edu.tufts.hrilab.ava.AvaDisplayComponent
Class representing the display functionality on the screen of the Ava robot.
More specifically the high level interaction between Ava/DIARC and the granular canvas
-
Field Summary
Fields inherited from class edu.tufts.hrilab.diarc.DiarcComponent
executionLoopCycleTime, log, shouldRunExecutionLoop -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<org.apache.commons.cli.Option>Override this method to define command line options available in sub-class.voidavaDisplayDialogueCallback(Utterance utterance, boolean newAddition) Callback TRADE service to receive dialogue events and display them on the DisplayCanvas.voidvoidExposed TRADE service for clearing image on the DisplayCanvas.voidExposed TRADE service for clearing text on the DisplayCanvas.voiddeleteMedia(String path) voiddeletePresentationSlides(String presentationName) booleandisplayImageWithName(String imageName, long timeout) booleandisplayImageWithName(String imageName, Symbol timeoutSymbol) voidvoiddisplaySlideWithName(String presentationName, String imageName, long timeout) voiddisplayText(String text) Exposed TRADE service for displaying text on the DisplayCanvas.voiddisplayText(String text, long timeout) booleandisplayVideoMatching(String match) getImageNames(boolean includeFileEndings) Returns the list of uploaded image names currently used as idle images.getVideoNames(boolean includeFileEndings) intvoidprotected voidinit()Perform any component initialization.voidbooleanbooleanisVideoSaved(String name) booleanlearnNewPresentationAction(String presentationName, List<String> slideFilenames, long duration) booleanprotected voidparseArgs(org.apache.commons.cli.CommandLine cmdLine) Override this method to parse command line args in the sub-class.voidprotected voidbooleanvoidvoidregisterDialogueCallback(ai.thinkingrobots.trade.TRADEServiceInfo service) Registers avaDisplayDialogueCallback as the callback service for dialog events.voidvoidsetListeningIndicator(boolean visible) voidsetSuggestedInput(String suggestedInput) voidsetUserIdleImageNames(List<String> names) Sets which uploaded images are used as idle images.booleansetVideoVolume(int volume) booleansetVideoVolume(Symbol volumeSymbol) voidAny component that needs particular shutdown logic needs to override this method andvoidvoidMethods inherited from class edu.tufts.hrilab.diarc.DiarcComponent
attachShutdownHook, createInstance, createInstance, createInstance, executionLoop, getMyGroupConstraints, getMyGroups, getMyService, getMyServices, main, shutdown
-
Constructor Details
-
AvaDisplayComponent
public AvaDisplayComponent()
-
-
Method Details
-
init
protected void init()Description copied from class:DiarcComponentPerform any component initialization. This should not be used for setting local fields to default values as was the case in DIARC. This method is called after the constructor, and after parseArgs. Setting default values should be done in field declaration or in the constructor.- Overrides:
initin classDiarcComponent
-
refreshMedia
public void refreshMedia() -
postRegistrationInit
protected void postRegistrationInit()- Overrides:
postRegistrationInitin classDiarcComponent
-
getVideosDir
-
getUserImageDir
-
deleteMedia
-
stopIdleImageCycle
public void stopIdleImageCycle() -
startIdleImageCycle
public void startIdleImageCycle() -
hideListeningIndicator
public void hideListeningIndicator() -
setListeningIndicator
public void setListeningIndicator(boolean visible) -
registerDialogueCallback
public void registerDialogueCallback(ai.thinkingrobots.trade.TRADEServiceInfo service) Registers avaDisplayDialogueCallback as the callback service for dialog events. -
setSuggestedInput
-
displayImageWithName
-
displayImageWithName
-
displaySlideWithName
-
interruptDisplayImageWithName
public void interruptDisplayImageWithName() -
displayNextVideo
public void displayNextVideo() -
isVideoSaved
-
displayVideoMatching
-
isMediaPlaying
public boolean isMediaPlaying() -
cancelVideoPlayback
public void cancelVideoPlayback() -
pauseVideoPlayback
public void pauseVideoPlayback() -
resumeVideoPlayback
public void resumeVideoPlayback() -
clearImage
public void clearImage()Exposed TRADE service for clearing image on the DisplayCanvas. -
clearText
public void clearText()Exposed TRADE service for clearing text on the DisplayCanvas. -
displayText
Exposed TRADE service for displaying text on the DisplayCanvas.- Parameters:
text- string to display
-
displayText
-
avaDisplayDialogueCallback
Callback TRADE service to receive dialogue events and display them on the DisplayCanvas.- Parameters:
utterance- object from dialogue history
-
getVideoNames
-
getImageNames
-
getUserIdleImageNames
Returns the list of uploaded image names currently used as idle images. -
setUserIdleImageNames
Sets which uploaded images are used as idle images. Only image names that exist in userImages are stored. -
setVideoVolume
-
setVideoVolume
public boolean setVideoVolume(int volume) -
getVideoVolume
public int getVideoVolume() -
lowerVideoVolume
public boolean lowerVideoVolume() -
raiseVideoVolume
public boolean raiseVideoVolume() -
deletePresentationSlides
-
learnNewPresentationAction
-
additionalUsageInfo
Description copied from class:DiarcComponentOverride this method to define command line options available in sub-class. This should be paired with a parseArgs implementation.- Overrides:
additionalUsageInfoin classDiarcComponent- Returns:
-
parseArgs
protected void parseArgs(org.apache.commons.cli.CommandLine cmdLine) Description copied from class:DiarcComponentOverride this method to parse command line args in the sub-class. Called directly after construction to pass runtime values that will override default values. This should parse all the options that additionalUsageInfo provides.- Overrides:
parseArgsin classDiarcComponent
-
shutdownComponent
public void shutdownComponent()Description copied from class:DiarcComponentAny component that needs particular shutdown logic needs to override this method and- Overrides:
shutdownComponentin classDiarcComponent
-