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.
Getting started with SIC consists of a few basic steps:
Installing SIC on your device
Installing SIC on your robot
Starting Redis and SIC on your device
Starting SIC on your robot
Start your SICApplication to control the robot
You can find the instructions on how to install the framework here: Install
Once installed to all devices you want to use, we can start the framework.
To enable communication between all your devices, we have to start Redis on some device.
This can be done in two ways: By starting redis yourself or using docker. We recommend using docker as this makes starting other services easier later on.
Start it on your laptop in the root framework sic
folder (for MacOS and Windows: make sure Docker Desktop is running).
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.
In a terminal, start redis using
redis-server |
This script sets environment variables and start the framework on the robot. However, running scripts on windows is not very simple. If you cannot execute the scripts by calling them from a powershell terminal, open them using a text editor and copy the commands into the terminal manually. Remember to adjust variables such as IP addresses |
In a new terminal, start the framework on the robot using
cd sic/sic_framework/scripts/ sh ./start_robot.sh -h ROBOT_IP -n ROBOT_DEVICE_ID -b REDIS_IP # Windows: .\start_robot.ps1 ROBOT_IP ROBOT_DEVICE_ID 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:
sh ./start_robot.sh -h 192.168.0.116 -n nao1 -b 192.168.0.181 # Windows .\start_robot.ps1 192.168.0.116 nao1 192.168.0.181 |
This should show an output like
nao@nao:~/sic/sic_framework/devices$ python nao.py --robot_name nao1 Starting service manager with device id "nao1" with services: - NaoqiMicrophone - TopNaoCamera - BottomNaoCamera Starting service manager with device id "nao1" with services: - NaoMotionReplayAction - NaoMotionRecorderAction - NaoMotionAction - NaoMotionStreamConsumer - NaoqiTextToSpeechAction - NaoMotionStreamProducer - NaoqiTabletService |
To start a demo, for example to show pepper’s camera output on your screen, simply execute a python script with a SICApplication. Some demo’s are available in the docker/sic/sic_framework/tests
folder.
To start the camera demo from the terminal use the following commands.
cd docker/sic/sic_framework/tests export DB_IP=localhost export DB_PASS=changemeplease python3 demo_camera.py |
The enviornment variables (the export
command in the code above) need to be set. If you are using Pycharm to run the script, set these in the Run/Debug configuration
in the Environment variables
menu. Copy these two lines into the menu:
DB_IP=localhost DB_PASS=changemeplease |
If all went well, a display should pop up showing you the camera output of your robot!
The goal of SIC is to provide easy to use high level access to devices and services. 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
from sic_framework import SICApplication from sic_framework.devices.common_naoqi.naoqi_speakers import NaoqiTextToSpeechAction, NaoqiTextToSpeechRequest class DemoTextToSpeech(SICApplication): def run(self): nao3_action = self.connect(NaoqiTextToSpeechAction, device_id='nao1') nao3_action.request(NaoqiTextToSpeechRequest("Hello world!")) if __name__ == '__main__': test_app = DemoTextToSpeech() test_app.run() |