Search code examples
nao-robotpepperchoregraphe

How to raise an event from a dialog with a string parameter


I want Pepper to play a video if I told him to do so (in a dialog). Currently I have implemented an behavior that plays videos. This video player is activated by an event named "Video/PlayVideo" and it plays the video provided by this event (the name of the video as a string parameter).

So how can I do it in my dialog? Below I have added an example how I am expecting this event to be called but I am not sure it could be done and how exactly the syntax is:

Edited:

u:(Start video) OK, I will start the video ^raisePlayVideoEvent("my_video.mp4")

This ^raisePlayVideoEvent is supposed to be an event from ALMemory. Also it could be 'LeftBumperPressed("my_video.mp4")' - event when left bumper pressed raised with the parameter "my_video.mp4".


Solution

  • To raise an event in dialog use $Video/PlayVideo=value (see qiChat documentation).

    By storing a value in an ALMemory key you are effectively also raising the event of the same name.