"... and no one shall work for money, and no one shall work for fame; But each for the joy of the working, and each, in his separate star, shall draw the thing as he sees it, for the god of things as they are"

-Kipling

 

The Walnut Project

Background

Walnut is a project to write the software that will eventually control the micro robots of the FPath project.

The FPath project is an ongoing exploration of the Feynman Path to Nanotechnology and since the FPath project is so open-ended, the Walnut software does not have a fixed endpoint. It will be modified, rewritten and forked repeatedly as each iteration is reconfigured for a different goal. A list of the iterations and their main features is provided below. If you wish to have a specific version you will need to download or clone based off of the GitHub Commit ID.

The name Walnut is derived from Waldo (the Heinlein story) and a kernel - the controlling core of an operating system. Thus Walnut contains the kernel behind the movements of the Waldos in the FPath project.

Walnut is written in C# and is a Windows Media Foundation application with integrated image recognition functionality from the EmguCV library (a C# OpenCV Interface). The Tanta project provides the basics of the ability to process a stream of data from a Webcam via Windows Media Foundation.

Video Documentation

Three short videos (11 min each) have been made to explain the design decisions behind the Walnut software, how it works and why it does what it does. These videos are the easiest way to get familiar with the Walnut software.

Part 1: Introduction to the Walnut Software
https://youtu.be/hjruZfx5GAw
Part 2: A Deeper Look at the Walnut Software
https://youtu.be/3JIUdZHgA5w
Part 3: A Demonstration of the Walnut Software
https://youtu.be/k5WKsLiTAsU

A Summary of the Walnut Versions

Below is a brief summary of the Walnut Versions.

Walnut 00.01.01 Commit ID: 9e5b761
Streams a webcam to the screen, can record the stream as an mp4 file. It also overlays each frame with timing information and can recognise Red, Green and Blue rectangles and display the center coordinates of each.
Walnut 00.02.01 Commit ID: c6d0e6f
Contains all the functionality of v00.01.01 but also has a client for the BeagleBoneBlack microcontroller and can exchange a typed object with it.
Walnut 00.02.02 Commit ID: e4fef89
Contains all the functionality of v00.02.01 but the WalnutClient can send up to six stepper motor control signals.
Walnut 00.02.03 Commit ID: 4902917
Built to support FPath Experiment 001 This experiment used image recognition to move a red square on a rotating platform as close as possible to a static green square off of that platform.
Walnut 00.02.04 Commit ID: d9a1b38
Built to support FPath Experiment 002 This experiment developed the ability to inject video images into the webcam stream processed by the Walnut software and to get that software to react to those images as if the virtual entity actually existed in the real world.
Walnut 00.02.05 Commit ID: ae0b457
Built to support FPath Experiment 003 This version contains code which implements the 2D control of DC Gear Motors via pulse width modulation. It is designed to identify red and green squares via image recognition and move the red square onto the position of the virtual green square.
Walnut 00.02.06 Commit ID: 424bddc
Built to support FPath Experiment 004 This version contains code which implements the controlled motion of a movable red circle over a virtual linear path drawn in the color green. The green path is removed as the circle moves over it. As the red circle moves along, it can lay down a colored "trail" which forms a return path. When there is no more of the green path to follow, the red circle will follow the return path back to the start.

The Source Code

All Walnut versions are open source and are released under the MIT License. You can download, clone or fork the Walnut software at the following address:

https://github.com/OfItselfSo/Walnut

Note that all of the versions expect to read from, and write to, a directory named D:\Dump\FPathData. This can be changed in the code of course but there is no particular provision to change this at runtime by the user in most versions.

Note also that if you are going to setup your own version of the Walnut software you'll probably want to contact me for assistance. There are a lot of things to configure and some of them are not especially obvious.

License

The contents of this web page are provided "as is" without any warranty of any kind and without any claim to accuracy. Please be aware that the information provided may be out-of-date, incomplete, erroneous or simply unsuitable for your purposes. Any use you make of the information is entirely at your discretion and any consequences of that use are entirely your responsibility. All source code is provided under the terms of the MIT License.

Acknowledgements

The icon used for the Walnut application is from the the lovely Windows 8 Iconset by Icons8.