Versions Compared

Key

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

SIC

SIC is a framework for quickly getting started with social robotics by making it simple to combine complex devices such as Nao’s and powerful services such as Google Dialogflow.

Installation

You can find the instructions on how to install the framework here: Install

Setup

Once installed to all devices you want to use, we can start the framework.

Starting SIC on your laptop

To enable communication between all your devices, we have to start Redis on some device. Start it on your laptop in the root framework sic folder (for MacOS: make sure Docker Desktop is running).

Code Block
languagebash
cd your/path/to/sic
docker compose up redis

This should start print Container sic-redis-1 Created which means Redis is up and running.

Starting SIC on the Robot

In a new terminal, start the framework on the robot using

Code Block
languagebash
cd sic/sic_framework/scripts/
sh ./start_robot.sh -h ROBOT_IP -n ROBOT_DEVICE_ID -b REDIS_IP

Where:

  • ROBOT_IP is the adress of the Nao or Pepper robot

  • ROBOT_DEVICE_ID can be any name as it is the device_id with which the robot will identify itself in the framework.

  • REDIS_IP Your laptop IP address (use ipconfig on windows or hostname -I on linux or ipconfig getifaddr en0 on mac)

Example command:

Code Block
languagebash
sh ./start_robot.sh -h 192.168.0.116 -n nao1 -b 192.168.0.181

This should show an output like

...

This guide assumes you already followed the steps here Getting started.

For example, to show the camera feed of the robot:

In the demo_nao_camera.py make sure to adjust the ip adress to the ip adress of your robot. If you press the chest button of the robot it will tell you it’s ip adress. Ensure you are on the same network as the robot, and then you are good to go!

To start the camera demo from the terminal, use the following commands.Note: it might take some time to start the demo file if the SIC has never been installed on the robot.

Ubuntu / Debian / macOS
Code Block
# Activate the same virtual environment where you pip installed 
# social-interaction-cloud in the installation steps
source venv_sic/bin/activate

# Go to sic_applications and the demo script
cd sic_applications/demos
python demo_nao_camera.py
Windows
Code Block
# Activate the same virtual environment where you pip installed 
# social-interaction-cloud in the installation steps
.\.venv_sic\Scripts\activate

# Go to sic_applications and the demo script
cd sic_applications\demos
python demo_nao_camera.py

And, you should get the following output:

Code Block
Starting SIC on /data/home/nao/.venv_sic/lib/python2.7/site-packages/sic_framework/devices/nao with redis ip 192.168.2.6
[SICComponentManager 192.168.2.7]: INFO:  - NaoqiSpeakerComponent
[SICComponentManager 192.168.2.7]: INFO:  - NaoqiButtonSensor
[SICComponentManager 192.168.2.7]: INFO:  - NaoqiAutonomousActuator
[SICComponentManager 192.168.2.7]: INFO:  - NaoqiMicrophoneSensor
[SICComponentManager 192.168.2.7]: INFO:  - NaoqiMotionActuator
[SICComponentManager 192.168.2.7]: INFO:  - NaoqiBottomCameraSensor
[SICComponentManager 192.168.2.7]: INFO:  - NaoqiStiffnessActuator
[SICComponentManager 192.168.2.7]: INFO:  - NaoqiMotionRecorderActuator
[SICComponentManager 192.168.2.7]: INFO:  - NaoqiTextToSpeechActuator
[SICComponentManager 192.168.2.7]: INFO:  - NaoqiTrackerActuator
[SICComponentManager 192.168.2.7]: INFO:  - NaoqiTopCameraSensor
[SICComponentManager 192.168.2.7]: INFO:  - NaoqiLookAtComponent

If all goes well, a display should pop up showing you the camera output of your robot!

API

The goal of SIC is to provide easy to use high level access to devices and services. To For example, to make a NAO robot say something, follow the startup instruction in https://socialrobotics.atlassian.net/wiki/spaces/CBSR/pages/2180415493/Install#Starting-SIC-on-the-Robot and run the following python script on your laptop.ENV VARIABLES! To see more functionality check out the sic_applications /demos folder!

Code Block
languagepy
from sic_framework.devices import SICApplicationNao
from sic_framework.devices.common_naoqi.naoqi_text_speakersto_speech import NaoqiTextToSpeechAction, NaoqiTextToSpeechRequest

nao class= DemoTextToSpeech(SICApplication):
    def run(self):
        nao3_action = self.connect(NaoqiTextToSpeechAction, device_id='nao1')
        nao3_actionNao(ip='192.168.0.151') # adjust this to the IP adress of your robot.

nao.tts.request(NaoqiTextToSpeechRequest("Hello world!"))


if __name__ == '__main__':
    test_app = DemoTextToSpeech()
    test_app.run()