Get Latest MiGIO
MiGIO-2 - Updated Project Sample Code, C/C++ (Should fix libsasl.dll problem).
Matrix.h - Simple C++ Matrix library. You can just include the header file and use it as follows:
m = 5;
v = m * v; // Easy right?
What is MiGIO?
MiGIO (Mini Golems Input / Output) is a set of starter tools in C++ for projects. It is particularly designed for VC++ on 32 bit Windows systems. However, Neil has adapted the Rovio part of it for Linux as well. You are welcome to base your projects on this code or write your own and use this as a reference.
What are Golems? Golems is Mike's trademark for his life's work. Golems are one of the original myths of human-made life forms in history. Golems are man-like beasts made of clay from the Hebrew Talmud / Kabbalah. In the 16th century a Rabbi of Prague purportedly built such a monster to protect his people. Assuming that you have seen Terminator, you can figure out what happens. In fact, this story is one of the origins of Frankenstein.
What does MiGIO do?
MiGIO is a simple pre-alpha set of tools to connect to robots and cameras. You're welcome to base your projects directly on it / grab code out of it or just use it as a reference. When you run it the first time, you should see four windows pop up:
- Console - The main application. Anything printed in the program will show up there.
- Data/Camera0.jpg - Currently grabs images from the web of real-time Atlanta downtown traffic.
- Data/Camera1.jpg - Probably won't show anything.
- Status Window (with Pleo picture) - Keeps track of actuator commands and sensor values for your robot.
The basic idea of MiGIO is that your projects will involve control loops that input sensors (both from the robot in the case of Pleo and from an external camera for both). Your program will process / reason about these sensors and make decisions about which actuator commands to apply. Then the process will repeat.
Currently, MiGIO just provides a way of capturing sensor input and sending actuator output with a simple (few lines of code) example for each robot. The video input is displayed in the "Data/CameraX" windows. Any other sensors and actuator commands can be displayed in the "Robot Status" window.
Note, MiGIO was not designed to be very efficient (just to give you some starter code). You are more than welcome to improve its performance
Lets you select the robot you are working with. If you uncomment Rovio, you'll get Rovio.
Likewise if you uncomment Pleo, you'll get Pleo. You can also edit the other settings that will affect what the program does. Any changes here requires a recompile.
- "Data" directory
This must be in the same directory as the executable (or the project if running from the
IDE). It contains all the configuration files and any downloaded images. Changes to the configuration files do not require a recompile.
Lists off any cameras you want the program to show/process. A camera is just a JPG that is available on some http web address. In the case of ROVIO cameras and your overhead setup, this image will continuously change and MiGIO is configured to continuously update to the latest image.
Just add to the list (up to 20).
Empty file - I suggest you use this for information about the robot (it's IP or serial
information). You can also create your own config files in this directory and read from
them. This might be easier that recompiling during testing.
- RobotIntefrace (cpp/h)
Just a standin, selects from "RobotInterfacePleo" or "RobotInterfaceRovio" based on the
#define in "Configuration.h"
- RobotIntefrace (h) - Variables
The two RobotInterface (h) files both have arrays for actuatorValues, binarySensors and contSensors. Similarly, they have arrays for actuatorNames, binaryNames, contNames. These arrays are primarily for display purposes. Whatever is in them will get displayed in the Status Window. Currently, for example, the Pleo places its sensor values into the binarySensor arrays and its commanded actuator values into the actuatorValues array.
Feel free to use these as you like / re-size them to whatever you find useful. If they are re-sized and the "numActuators/numBinary …" variables are updated correctly then the visual display will handle them properly.
Each robot has its own code for reading sensors and writing actuator commands. For Rovio, both are achieved over HTTP with the CURL libraries. For Pleo, we use the WinAPI serial interface. Of course you're welcome to modify or replace these in any way you like.
On any Windows 32 system, you should be able to open the solution ".sln" file and compile directly. You may need to go into menus "Project -> Properties -> Configuration Properties -> Linker -> Input" and modify the OpenCV library names to match the ones you have on your system.
On Linux, there is a Makefile. Please speak with Neil if necessary.
Regardless of whether you have a robot connected, MiGIO should compile and run, popping up the 4 windows described above. If you have a Pleo connected it should then command the Pleo to spin its tail. The Rovio should move back-and-forth. In both cases you should see a recent image of downtown Atlanta traffic.
For Pleo, if you hold down the various sensors (foot contacts, touch sensors on the neck and back), you will see the appropriate lights light up in the Status Window. Note that this is all starter code and quite slow. You can make this work MUCH faster if you put the time into it.
Assuming that all of this works for you, what's next is up to you. You have an interface between your computer and the robot. You'll notice that the code that makes the robot move is only a few lines long. Come up with your own strategies / controllers to do NEW stuff!