Skip to content

Fluent Nao Events #5

Description

@dnajd

Get rid of my attempt at events and use this:
https://github.com/davesnowdon/naoutil/blob/master/naoutil/src/main/python/naoutil/memory.py

naoscript to be able to tie a script to a event like this

 nao.event.left_bumper(naoScriptId)

and have it fetch script 112 and trigger it when the left_bumper is pressed. :)
add a probability of happening and load in a couple of scripts... it could seem more autonomous

nao.left_bumper(112, .10)
nao.left_bumper(120, .10)
nao.left_bumper(20, .10)

So if the left bumper is touched, it iterates through saved events, each one having a 10 percent chance of happening. first one to happen takes the event.

Dave Snowdon: I'd be tempted to express that as a list of tuples:

nao.left_bumper([(.1, 112), (.1, 120), (.1, 20)])

Also want to do time based events, not sure how I would handle it, but ...

nao.event.time("1:00pm", naoScriptId, probabilityPercent)

Dave Snowdon: I think there is exsiting python code for scheduling

Also want to support others

nao.event.face_recog(naoScriptId, probabilityPercent)

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions