"... 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

 

FPath_Ex004: Graphical Stigmergy

Background

FPath is a project to explore the possibilities of the Feynman Path to Nanotechnology. Essentially this means using tools to make small tools which then make smaller tools. See the main FPath Project page for more details.

This experiment demonstrates the controlled motion of a movable red circle over a linear path drawn in the color green. One interesting thing about this experiment is that the green path does not physically exist. It is entirely virtual and is only drawn on the screen by the Walnut control software.

Also demonstrated is the ability of the moving object to lay down a virtual path as it moves along and later follow that path back to the start point. This mechanism is called "Graphical Stigmergy"

The Goal

The target goal of this experiment is to:

Demonstrate 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.

FPath Ex_004 Line Following Example

This experiment is intended to be part of a larger toolkit which will hopefully be useful in future Feynman path experiments. If the path of a tool head can be continuously corrected independently of the quality of the actuators - closed loop control in other words - then a lot of errors can be removed. This is important because as you have machines make smaller machines, the effects of errors compound.

Achieving the Goal

The basic structure of the hardware is identical to that used in Experiment 003 but changes were made to the Walnut software. The starting point for this experiment is Walnut Server/Client version 00.02.05 and the changes made have been released as version 00.02.06.

The physical experimental apparatus uses various LEGO bricks extensively as the mobile apparatus. See the separate documentation of the Steggo Project and the discussion in Experiment 003 for more information.

Below is a specific list of the steps involved in reaching the goal. All of these steps are discussed in considerably more detail in the video which documents this experiment.

  1. Adapt the image recognition code in the Walnut Software version 00.02.05 to recognize circular objects rather than square ones. The object and color recognition code has been much improved in this version. The "flickering" evident in previous version as the objects were not recognized in some frames of the video stream has pretty much been eliminated.
  2. Adapt the overlay code to be able to write on the bitmap providing the backing store for the path. The access speed to the pixels of this bitmap have been much improved due to the implementation of a DirectBitmap object which holds the image data in managed memory rather than operating via GDI calls.
  3. Move the image recognition operation earlier in the video stream processing sequence so that the overlay of the path on the image happens after the object recognition has happened.
  4. Write code which can find the nearest pixel of a specified color to a given point. Rather than a raster scan, which would be slow, an algorythm which spirals out from a start point has been implemented.

The Result

The experiment was successful. A red circle mounted on the tool head of a motorized XY axis will follow a virtual green path to the end. The green path is removed as the red circle travels over it. An optional cyan colored path can be laid down as the red circle moves and the algorythms can then use that path to return to the start point.

Algorythmically, indirect coordination via the modification of the environment is called stigmergy. Interestingly, this is the way ants find their way about. As ants wander around they leave a trail of scent. When they want to return, they just follow the scent on the way back. Other ants can follow the same trail and they too will leave their scent. The stronger the scent, the more ants that will follow it so you can get lines of ants following a complex path to and from a food source - all without any central planning or control.

Since this behavior is called stigmergy when ants do it. I think I will refer to this particular technique as "Graphical Stigmergy".

Video of a red circle following a virtual green path and laying down a cyan trail and then following that back to the start point.

This experiment was also discussed in a post on the RepRap Blog: Graphical Stigmergy

This experiment is now complete. The Walnut software associated with this experiment can be found under Commit ID: ae0b457 on the GitHub repo.

Future Use

The implementation of Graphical Stigmergy capabilities in the Walnut software will probably be a valuable part of the tool kit used to move further down the Feynman Path and create smaller machines from larger ones. The idea is that a virtual path can be drawn and the tool head induced to follow that path. The error correcting, closed loop feedback, nature of the Walnut software should help remove cumulative errors.

License

The intellectual property rights to all new and/or original ideas and technologies documented under the FPath project and sub-projects are claimed in full by the author and are immediately released into the public domain under the terms of the MIT License. Any ideas, techniques, processes or methods of work documented in the FPath project and sub-projects must be considered to be prior art and must be cited in any patent applications.

The contents of the FPath project and sub-projects 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.