...
action commands
use the methods available in the SIC connector
allow you to create your application using the SIC framework
data generated
contains events (e.g.: when a button is pressed
LeftBumperPressed
or when an action is finishedWakeUpDone
)the results of certain actions (e.g.: a recognised recognized intent after a speech recognition attempt)
...
In the example above:
A connected Nao NAO robot will stand up, saying “You can tickle me by touching my head”
To wait until the Nao NAO has finished standing up, the program is locked by the
self.awake_lock.wait()
statement.awake_lock
is an a threading.Event() object, that blocks the main thread until the threading.Event() is set by callingself.awake_lock.set()
. This is done in theawake
callback function. This callback function is added to thewake_up
action.
Once the robot is finished standing up,
awake
is called, and the “lock is lifted”, allowing the program to continue.
For 10 seconds will say “that tickles” every time you touch the sensor on the middle of its head.
After 10 seconds, the Nao NAO will sit down again.
A different callback function is that_tickles
. It is subscribed to the MiddleTactilTouched
event. Whenever the program is running, that_tickles
is called each time the middle head sensor is touched.
...