Home arrow Enthusiast Projects arrow WhiteBoxOS V1.0
WhiteBoxOS V1.0
Wednesday, 31 January 2007
Image This project is by Ernie Daniels, he has provided the information below.

You can down load the source etc for this project here: WhiteBoxOSv1.0.zip

*Update* Version 1.1 is here (see forum responses for details): WhiteBoxOSv1.1.zip

Please note: the term 'White Box' is used in the generic fashion, this software is not directly from White Box Robotics.

This is my initial release of WhiteBoxOS, version 1.0. This is a "Hello, world!" package, it's a basic PC-BOT control application, demonstrating how to access the PMD chipset on the M3 board. It is a single self-contained Visual C++ 6.0 project, written in C++. It relies on only a couple of operating system calls, which I have isolated in a package called "OSSupport" so that you can easily replace them. It does use the Boost libraries as I am quite fond of the "lexical_cast" operator. (Boost can be found at www.boost.org.)

I am releasing WhiteBoxOS under the GPL. Having finished up my consulting work for the time being, I plan to work actively on it for the next few months and continue to provide new releases. I am actively soliciting your help to make it better -- our robots need more and better code!!! I see no option but to patiently build it from the ground up. Sharing our work is by far the best option. If I can entice a few of you to help out, I will work out some version control, most likely with "Subversion" which is an open-source version control suite, compatible with Apache.

"What is it?"

The project will build a single executable called "Executive.exe". You will find a built version under "Source/Executive/Release/". You can also build it for debug and run your robot on a USB tether to observe how the code works. I put the Executive.exe on a memory stick, remote desktop into my robot, and run it right off the memory stick. I plan to work out a DOS-style .BAT file that will look for the memory stick and run Executive.exe if it is there.

"What does it do?"

The program will make your robot slowly wander around, under the control of a few simple behaviors. You start it by putting your hands in front of two of the "beak" IR sensors -- this is the "Start" and also the "Stop" signal. The robot will wander around until you signal it to "Stop". It wanders by scanning 30 degrees left or right, and then doing a short drive, then going back to scanning. There is an Avoid behavior that will bring the robot to a smooth stop if something gets too close (then it will scan again.) After you tell the robot to "Stop", the program will end, and it will write two text files -- "Logfile.txt" and "IntegerDB.txt". These are debugging tools, however "IntegerDB.txt" is also read back in the next time you start, and there are a couple of configuration parameters inside it -- M3 COM port being one of them. If your robot is not on COM3 you will want to edit this text file.

"Gotchas" -- A few things to be aware of:

Sensors -- I've configured my sensors with the two long range sensors on the bottom of the robot -- see "Executive.cpp" where I call "ProcessAnalogReading" -- easy for you to change but the sensor configuration is hardcoded at the moment so you'll have to change it in code.
Cliff detection -- there isn't any. It's not hard to add a new behavior "AvoidStairs" though.
PMD errors -- any error reported by C-Motion gets logged. I do see some "comm errors" and I am working on it, please feel free to help. I am polling the analog inputs a total of 240 times a second (8 sensors * 10 polls per second * 3 oversampling), which is much more aggressive than BRIAN does it -- see my wiki article "Performance Benchmarks".
Obstacle avoidance -- I'd say it's better than BRIAN at avoiding stuff, but it's not yet perfect. I'm not sure if it can be perfect with the current set of sensors, but I intend to keep working on it to get the most out of the standard sensor configuration.

"TO DO" list:

fix PMD comm errors
improve obstacle avoidance
work on sensor configuration
work on some sort of GUI or TCP interface
work on sensor auto-calibration
Work out how to compensate for the slack in robot's drive train
Ponder how to get the robot to "survey" an area, draw a map, orient itself, return to base, etc.


Discuss this article on the forums. (20 posts)
< Prev   Next >