Here is the source code for both Loki and Turtle in a single zip file.
Note that Loki and Turtle are evolving robots. The code is constantly changing, along with the hardware. So, expect to see code commented out, or #defines that turn code on and off. Also, there is some “dead” code, for example there are data structures to support sensors that are no longer used on one or both robots. This code is my active project, just for fun. It makes sense to me, but it might not make sense to you.
This code is posted as example code for how to do things like getting started with OpenCV, Kinect, talk to servos and motor controllers, voice recognition, etc. You should cut and paste whatever helps you. If you want to use the full code as is, this is an advanced project, which requires a good understanding of Visual Studio and C++, including the ability to modify project files so you can remove any dependencies on external functionality you don’t need.
Release Notes – Please Read this! Important info to get you started!
1/15/2013: NEW! External dependency problems Fixed, and Arduino Support!
By popular request, I have converted all my PIC code to Arduino! This also might make some good sample code for anyone wanting to use an Arduino as a sensor interface to a PC. Download it here: 2013-01-26-LokiRobot.zip.
9/25/2012: This includes a single zip file that includes OpenCV 1.1. Note that this is an update in progress. If you want OpenCV examples, I suggest you use the prior update below. If you just want a simple install, with core functionality, install this one. This “Should” just work, but I don;t have a “clean” system to test it on. See “READ ME TO INSTALL.txt” for simplified instructions (you can ignore all the instruction in the prior updates!) Download it here: Loki 2012-09-25.zip
7/24/2012: New – moved to Microsoft Kinect 1.5 SDK, and moved Kinect Depth detection and speech recognition to a C# project, to take advantage of Kinect’s excellent microphone phased array. Works really well. Also added some new tricks. Try “Loki, which way is north?” and “Loki, Follow me” . Here’s the updated source: LokiSource2.zip
I have also posted a copy of OpenCV 1.1, that is compatible with the current code (I am moving to 2.x, but not there yet). Just unzip and copy to “C:\opencv”. If you get any errors about “xxx.dll not found” when you run, you may have to edit your PATH environment variable and add “C:\OpenCV\bin”.
1/10/2012: Loki and Turtle source code, all in C++, using the non-Microsoft Open Kinect SDK: LokiSource.zip