play_interaction()¶
Play a predefined interaction in the robot
Arguments¶
Arguments |
Type |
|
|---|---|---|
interaction_name |
|
Name of the predefined interaction. |
callback_feedback |
|
Callback synchronous method. |
callback_feedback_async |
|
Callback asynchronous method. |
callback_finish |
|
Callback synchronous finish method. |
callback_finish_async |
|
Callback asynchronous finish method. |
wait |
|
Wait until the end of the interaction before mooving to the next line of code. Default value is |
Return¶
None
Exceptions¶
RayaInteractionsWrongNameRayaInteractionsAlreadyRunning
See the complete interactions exceptions.
Usage example¶
from raya.application_base import RayaApplicationBase
class RayaApplication(RayaApplicationBase):
async def setup(self):
self.interactions = await self.enable_controller('interactions')
async def loop(self):
self.interactions.play_predefined_interaction(interaction_name = 'task_received')
self.finish_app()
async def finish(self):
self.log.info(f'Hello from finish()')