Versions Compared

Key

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

Once you connected a robot to the the Social Interaction Cloud (SIC), you want to make it do something. One of the available APIs is the Python API, which enables you to implement and run a wide range of robot behaviors. This brief guide introduces the main components and concepts of the this API and provides some code samples that can be used as a starting point.

...

The first main component is the AbstractSICConnector class. It requires the IP address of the SIC and the type of robot you have connected (‘nao’ or ‘pepper’). It sets up the connection to the SIC and enables you to send action commands to the robot and receive data generated by either the robot or the SIC itself. The data contains events (e.g. when a button is pressed ‘LeftBumperPressed' or when an action is finished 'WakeUpDone’) or the results of certain actions (e.g. a recognized intent after a speech recognition attempt). A full list of the available actions and events can be found here [TODO add reference].

The AbstractSICConnector class is abstract, meaning that itself does not do anything with the incoming data. To process the incoming data you can implement your own concrete SIC Connector class by inheriting the AbstractSICConnector class and overriding the empty event handlers. In the below MyConnector example, you see that it uses the AbstractSICConnectorclass as a parent, inheriting all its methods. Two things have been added. First of all, the on_robot_event method is overridden to print all the events generated by the robot. Secondly, a run method is added that sends actions to the robot.

...