Skip to main content

Introduction

This next project will be destined to the creation of a set of unified libraries and communication protocols that allow the connection between the "Voice Kit" module from Google's AIY and the leisure robot "Cozmo", from Anki. Given the inability of this last one of verbally communicating with the user, but with the possibility of reproducing pre-programmed sentences, our objective will be integrating a purely spoken human-machine interface, where we will prescind from any graphical interfaces in order to command the robot through his various tasks.

In order to achieve our goals, we will need the appropiated materials. Given that both Cozmo's SDK interface and AIY's Voice Kit libraries are compatible with Linux (and therefore, Raspbian), we will choose the same Raspberry Pi 3b where the Voice Kit image needs to be installed as our CPU to manage all communication protocols between the devices. In turn, the component list will be as follows:

- 1 AIY Voice Kit from Google Inc.
- 1 Cozmo robot from Anki
- 1 Raspberry Pi 3b
- 1 SD card with at least a 16GB capacity
- 1 mobile device with an Android OS (Huawei MYA-L11 running Android 6.0 in our case)
- 1 monitor
- 1 mouse
- 1 keyboard
- Wiring needed to connect these last four components to our Raspberry
- 1 Ethernet connector leading to an active port or, in its absence, a WiFi adaptor with an active Internet connection

By the end of this blog, we should have been able to establish the communication protocols used to connect both our Cozmo robot and the various peripherials of the AIY's Voice Kit to our Raspberry, executing a "Hello world" kind of program to verify the whole system works fine. The aforementioned program should only be triggered by the user via voice commands.

Comments

Popular posts from this blog

Hello world!

To conclude this first series of posts, and before we dwell into other projects, we will write a simple program that verifies we managed to perform all steps correctly, and therefore we are capable of freely using the bridges established between Cozmo, the Voice Kit and our smartphone. In order to access the various examples which will allow us to create the first test program, we should open the "Dev terminal", which can be found on the Desktop, and navigate our way to the voice examples. (use "cd aiyprojects-raspbian/src/examples/voice" to do so). Our "Hello world" will be based on the program "assistant_library_with_local_commands_demo.py", which allows the user to create custom voice commands to be executed or interpreted by the AIY's Voice Kit. To create such new command, we should first create a string that represents the words the user should say. For instance, if we wish Cozmo to say some words when asked to, we can use the string ...

Hardware setup

In order to properly illustrate our setup's assembly progress, we will divide it in two sections which we will later join together. On one hand, we will show the required configuration for our Cozmo robot and, on the other, the Voice Kit's, aiding the process with images and simple schemes. We will start off with the connection setup between our Cozmo robot and the Raspberry Pi 3B. As seen on the scheme above, the connection between these two devices is pretty straight-forward: just accomodate the robot in his charger, connecting it to any nearby power point, and activate the Wi-Fi communication protocols between our smartphone and the device. These protocols are predefined in the Cozmo mobile app, and don't require any additional intervention by the user aside from connecting to the appropiated network using the password displayed on Cozmo's screen (in case the password doesn't appear, we can turn on said screen by manually raising and lowering his lift). ...

Software setup

Given that Raspbian's OS is a comfortable environment to work with Python, and provided that the libraries and programs in charge of controlling both the Voice Kit and Cozmo are avaliable in the same language, it will be the one we will be using to write our scripts and future programs. But before this, it's required that we obtain the appropiated libraries for an optimal communication between the robot and our board, while verifying the kit is working accordingly. We will start off by making the adequated checks regarding this last one: According to the user manual associated to the AIY's Voice Kit, in order to check both the microphone and speaker are working fine, it will be necessary to execute the Python script "Check audio.py".    After executing it from the LXTerminal, our output shows the program has been executed successfuly and, because of this, we can safely assume both peripherials are working. Next up, we need to check our Raspberry Pi'...