Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • 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 finished WakeUpDone)

    • the results of certain actions (e.g.: a recognised recognized intent after a speech recognition attempt)

...

In the example above:

  1. A connected Nao NAO robot will stand up, saying “You can tickle me by touching my head”

    1. To wait until the Nao NAO has finished standing up, the program is locked by the self.awake_lock.wait() statement.

      1. awake_lock is an a threading.Event() object, that blocks the main thread until the threading.Event() is set by calling self.awake_lock.set(). This is done in the awake callback function. This callback function is added to the wake_up action.

    2. Once the robot is finished standing up, awake is called, and the “lock is lifted”, allowing the program to continue.

  2. For 10 seconds will say “that tickles” every time you touch the sensor on the middle of its head.

  3. 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.

...