I've been reading a lot of informative forum messages over the last month about interfacing with Rovio. I created a VB.NET RovioWrap class that encapsulates much of the Rovio Ver 1.2 API as well as implementing various forum message replies from people like "RoboSapienPet", "mt", and "Nocturnal".
You can check out the open source code at: http://www.codeplex.com/RovioWrap . Go to the "Source Code" tab and then "Browse" in the recent check ins. Feel free to use as you wish, just give credit where credit is due, like I did in the code to various members from this forum.
See videos at YouTube (search RovioWrap):
- See RovioWrap and Speech Recognition in action
- See RovioWrap introduction and explanation
- See RovioWrap - Wander routine computer controlled
Currently the RovioWrap class can do the following:
- Standard movement operations, head movement, light control
- Get all status information, like head position, x, y coords, etc.
- Get current camera image, change resolution
- Play WAV files out your Rovio Speaker
- Play TTS (Text to Speech) out of the Rovio Speaker
- Speech Recognition for blocks of 2 second captured Rovio microphone (working with the 'TrainedRovio.vb' window)
- Record WAV file from Rovio microphone (working, you can set the # of seconds to record)
- Turn blue lights on/off (for 5.00b10 patch - thx 'Nocturnal') (I'm doing something wrong, commented it out for now)
- 'Dog' application - window you can launch to exhibit "dog" like behavior (see 'TrainedRovio.vb' description below)
Some things RovioWrap will do soon:
- Adding capability to call ACL LISP code (for use in established AI programs, like SNePS)
- Adding Goto(x,y) even if you haven't pre-saved the path
A test program called RovioController is available to show you how to use it:
Provides some code to interface with Matlab to process images (like edge detection). This works, but I disabled it. Feel free to install Matlab and reenable it, but you will need a Matlab script as well as a directory structure similar to mine.
Provides code on how to move, get status, get images
A test program called TrainedRovio is available to show you how to use the Speech Recognition (be sure to unzip 'c-rovio.zip' to 'c:\rovio\' as it is used as a working directory):
It can recognize the following phrases and act appropriately:
- "Rovio", "Bark", "Hello", "Run forward", "Good dog"
- "Move left", "Move right", "Go back", "Go backwards", "Move back"
- "Go forward", "Move forward", "Slide left", "Slide right"
- "Turn around", "Turn left", "Turn right", "Spin", "Spin around"
- "Wander", "Speak", "Move backwards", "Move up"
- "Good bye", "Exit", "Sit up", "Down boy", "Down girl"
- "Attack of the show" - (I initially made it just 'attack' but it would mis-recognize that word for me, maybe they'll feature my YouTube video after I put it up!)
Some of the VB.NET code was adapted from C++ or C code from various sources, so I've made some modifications from the original code to fit into the VB.NET framework. Feel free to modify, post, criticize, or give props. And if you have any good code you want in the object, feel free to post or send it to me and I'll give the appropriate credit for it.
Enjoy, my fellow Rovioians!
---Sidekick [Go to http://www.codeplex.com/RovioWrap]
Join RoboSapienPet's cause, cause it takes to long to do anything without the source!