Labels

Saturday, May 11, 2013

Working on the Blackboard Implementation

I have taken some time off from the electronics portion of my projects to concentrate on the software. I have been using the very affordable Bouml UML case tool (http://www.bouml.fr) to put together a design. The tool is very good at being able to generate C++ (and other languages) shells of programs. Then you take the source code generated and modify it using Qt Creator as the IDE.

I keep the design and source code on a USB stick and plug it into my Mac Mini or Work laptop, both running VMWare with Ubuntu VMs containing my code. I was able to get Bouml license keys to run a copy in both VMs, legitimate of course according to the developers license agreement. With this setup, I can work on the source code development at home, and also at the office during lunch and before work starts. Since the code is being run and tested in a Linux environment, it should transfer easily to the RPi when the time comes, via the USB stick. I will probably end up with close to a hundred classes in the design so I wanted to use some tools that made sense.

I have been working on the overall Blackboard implementation and have made several design decisions along the way.

1. I have decided to implement the Control Plan(s) as a StateChart. The advantage with this is that I can reuse the Command Processor pattern, and be able to setup portions of the plans that might be orthogonal (happening in parallel) while still being able to create the linkages via XML definitions.

2. The StateChart design pattern is developed after a paper by Yacoub and Ammar entitled "A Pattern Language of StateCharts."  I will be able to use this pattern in the Blackboard Controller implementation as well.

3. I will also be using some elements of a design pattern by Liebenau entitled "InferenceFramework: An object-oriented framework for constructing rule-based systems." He has some pretty good ideas in the paper. I hope to use his ideas in the construction of the blackboard data structure itself.

4. keeping with my original idea of building the knowledge structures and execution sequences via a definition in an XML file will go a long way in keeping my sanity as I develop test and rework the AI portion of the Robot. Besides, I like tinkering anyway.