The hexapod software model generates a wealth of design data for a given configuration, reporting geometry, resolution errors, forces and deformations as the platform is loaded and moved. The model provides solid model descriptions for a ray tracer which produces photo-realistic images. It computes calibration coefficients, and allows calibration strategies to be designed and tested using a linear programming solver. It is written in C++ under Linux, and is released under the terms of the GNU General Public License.
hexapod-1.1 distribution notes Instructions for compiling and using the software.
hexapod-1.1.tar.gz The current version.
The original work by John Storrs Workshop on which this project is based was done in a Unix environment. The recent development of Linux, a high quality free Unix-like system, made it the obvious choice here. Linux is a robust multi-tasking, multi-user, networked operating system with a long list of standard features. It supports 32-bit and 64-bit platforms, multiple CPUs and high performance networking and other peripherals. It gives easy access to the wealth of high-quality free software available today on the Internet, which includes the x-window system, window managers, compilers, www servers, database systems, word processors, graphics packages, and much more. Linux is a project of the Information Age, and a convincing demonstration of the power of IPR-free cooperation. There are an estimated 1,000,000 plus users world wide after only 5 years of development. We started tracking the Linux Project around 2 years ago, running it on standard PC hardware in tandem with MSWindows. In our experience and opinion, Linux is technically superior to Microsoft operating systems despite being a non-commercial cooperative development. We use MSWindows for CAD work only.
Project software is written in C++, a language particularly suited to the problem domain as the source shows. Apart from its general utility and compiled speed, two important features may be singled out: the class system, and operator overloading. We use the excellent tools from the Free Software Foundation (without which the Linux Project could never have begun) - the GNU C++ compiler, the debugger, and of course 'make'. Other high quality free software tools in use for the project include rcs and cvs (version management systems), DDD (a front end to the GNU debugger), POVray (a superb ray tracer), xgks (graphics kernel system), and lp_solve (a linear programming solver).
The mathematical complexity of the hexapod mechanism demands the use of the abstractions provided by vector and matrix methods. Operator overloading in C++ further simplifies expressions, allowing the ordinary arithmetic operators +-*/ to be used for vector and matrix operations. The advantages can be seen clearly in the HexapodMechanism class. There are a number of free C++ vector and matrix packages available. We use the excellent package provided by Jean-Francois Doue in Graphics Gems IV, modified and extended in small ways.
Hexapod calibration requires particular mathematical methods. The task is to use the mechanism to make a series of measurements, and to process the data to determine the exact values of mechanism parameters such as the top joint coordinates. Conventional methods are defeated by noise. A correspondent on the Internet newsgroup sci.math recommended Linear Programming methods for solving this problem. The calibration system in the model successfully follows this approach.
Links:
Optimization Center at Northwestern University A source of valuable information about linear programming and other optimisation techniques.
lp_solve The free linear programming solver we use.
The artifact and primitive classes implement the core of the hierarchical artifact modelling system required by the Computer Craftsmanship project. An artifact is composed of artifact and primitive instances. It can be viewed as a tree with artifact instances at the inner nodes and primitives at the leaves. Artifact instances have a transformation which is a property of the instance. Primitives are terminals which give substance to the artifact, which otherwise would be only empty mathematics. These classes are the beginning of a general purpose modelling system for artifact products of the Computer Craftsmanship system. The primitive classes will be much enlarged, extending the constructive solid geometry primitives, and implementing manufacturing features generated by simulated cutter motion. The present state of the classes is sufficient for this model of the hexapod architecture as its first test.
The hexapod classes use the artifact and primitive classes to construct a mathematical model of the LME hexapod machine. There is a class for each machine component which implements it in terms of sub-components and primitives. The principal elements are the frame and bed, which are static, and the mechanism, which is dynamic. Each of the main classes can generate its part of the machine geometry for ray tracing. The hexapod mechanism also implements the data generating and reporting functionality.
The HexapodMechanism class models the behaviour of the triangulated hexapod mechanism as the platform is moved. The computations involve extensive use of vector and matrix methods, and are a good demonstration of their power. The data reported is: (1) range checks to determine if the platform is within the working volume; (2) maximum and minimum values of significant angles for joint design; (3) leg forces and cutter displacement under given cutter loading; (4) positional errors due to leg actuator resolution; (5) calibration coefficients, relating parameter changes to measurement errors; (6) calibration simulation linear programming constraints for lp_solve.
The results of the model are verified internally, and the data output has been extensively checked for errors. The mechanism can behave in unexpected ways, as is shown for example by the calibration coefficient data, some of which looks simply wrong until one considers the kinematics carefully. Jean-Pierre Merlet, a parallel kinematic expert working at INRIA, Sophia Antipolis, has applied our design parameters to his hexapod software model. The similarity of the results checked by him provides additional confirmation of the correctness of our model.
The artifact and primitive classes implement a solid model generator which produces source code for POVray, a free ray tracer. The solid model information is complete; the model can be viewed from any position at any range. The rendered images provide valuable feedback on the model and the design parameters, as well as being of interest as pictures of the hexapod. Also implemented is a simple CAD data generator. This has proved less useful because it does not deal with hidden line removal.