Getting started
The Social Interaction Cloud (SIC) is a native python framework. It can be used via the social-interaction-cloud
python package. The framework uses Redis for message brokering. To help you get started you can clone the sic_applications
repository. Below you will find the basic instructions for cloning the repository and setting up the Social Interaction Cloud.
General prerequisites
Python >= 3.10, <= 3.12
Latest version of SIC
2.0.20
Install
Below you can find the installation instructions for Linux, MacOS, and Windows.
In these instructions we will perform git operations through a basic terminal and use Python's standard venv to create a virtual environment. If you're more familiar with other tools like PyCharm, VisualStudio, or Conda, feel free to use them instead. It is advised not to mix venvs. If you are going to use Python’s standard venv, do not mix it with your conda environment, as it might lead to unexpected behavior.
You can watch this video as well (Windows): Tutorial 1: Getting Started
Instructions
Running your first application
Running any application consists of two (or three) steps:
Start Redis
(Optional) Start a service, such as face detection
Run your program
Â
Â
We will cover two examples: running an application without a service (step 1 and 3) and with a service (step 1, 2, and 3).
Example 1: Running an application without a service
For this example we will show your computer’s camera output on your screen. The code for this example is available in the sic_applications/demos
folder and called demo_desktop_camera.py. An equivalent example showing Nao’s camera output can be found here Display an image from the robot
Step 1: starting Redis on your laptop
To enable communication between all your devices, we have to start Redis server. Make sure Redis is always up and running when you run any demos.
Step 3: running an application
To start the camera demo from the terminal, use the following commands.
If all goes well, a display should pop up showing you the camera output from your webcam!
And you should get the following output:
Troubleshoot
Example 2: running an application with a service
In this example we will use the face detection service to draw a bounding box around a face that is detected in your laptop camera feed. It uses the sic_applications/demos
demo_desktop_camera_facedetection.py.
The Available services page provides more details about which services are available, how to use them, and how to extend them.
Step 1: starting Redis on your laptop
It is the same as in example 1.
Step 2: run the service
Services might need additional dependencies installed before being able to run them. You can install them with the appropriate service tag. For example,
A service can easily be run by opening a new terminal and calling the run-service command, for example run-face-detection
or run-dialogflow
. See the Available services page for more info about the dependencies and run commands for each service.
Note: the --upgrade
ensures the new dependencies are installed if you already have previously installed the social interaction cloud.
For our example we will start the face-detection service.
If successful you should get the following output:
Step 3: run the application
Run the demo file demo_desktop_camera_facedetection.py.
If all goes well, a display should pop up showing a bounding box around the detected face! If the image appears upside down, go to line 34 in demo_desktop_camera_facedetection.py
and change the flip
parameter to -1.
And that's it! 🎉
Go have some fun with robots, see Getting started with the Nao robot | Starting SIC on the Robot (NAOv6) and Getting started with Franka Emika Research 3.