Skip to main content

The maker and his endeavours

Hi! I'm Abel "Abélix" Parodi, the guy that will be guiding you during this little trip through the simple, yet fulfilling process of giving Cozmo the robot the ability to obey voice commands. I mainly wrote this small blog in hopes of spreading a bit of curiosity about robotics and maybe, by the end of these entries, you might even consider starting your own projects related to this intriguing discipline.

Before we start, I'd like to tell you a bit of info about myself: by the time this was written, I'm currently studying Robotics Engineering at the University of Alicante, and I was asked by one of my teachers to invest four months developing a project that involved communication protocols. The year before that I had acquired this amazing piece of machinery named Cozmo, and I couldn't help myself: he deserved his place under the spotlight! My first idea came from a simple thought: "What if Cozmo could hear me?".

It seemed exciting, so I asked my teacher if there was any chance of me pulling such task out. He seemed to enjoy the idea and lended me his Google AIY Kit, which was the main axis driving this project forward. With it, I managed to establish a consistent communication bridge between the robot's AI and Google's, all via a Raspberry Pi 3B. Throughout this blog you will be shown how I managed to slowly but surely get the first "Hello world!" program done, as well as some other implementations of the concept of voice-based HMI (Human-Machine Interface) applied to our little "self-aware" fellow.

Let's get going!

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'...