play_predefined_interaction()
  • 1 Minute to read

play_predefined_interaction()


Article summary

Play a predefined interaction in the robot

Arguments

ArgumentsType
inter_namestringname of the predefined interaction
waitbooleanWait until the end of the interaction before mooving to the next line of code. Default value is False

Return

None

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(inter_name = 'task_received')
        self.finish_app()

    async def finish(self):
        self.log.info(f'Hello from finish()')

Was this article helpful?