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. It 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. The software has been written in C++ under Linux.
![]() |
hexapod-1.1 distribution notes | Instructions for compiling and using the software. |
![]() |
hexapod-1.1.tar.gz (83Kb) | 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.
![]() |
Optimisation Technology Center | 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.
Jean-Pierre Merlet drew attention to the difficult problem of hexapod calibration, mentioned in 2.2 above. We had done a little work on this which had led us to believe that a simple solution was available. However we had totally overlooked the effect of noise on the mathematics. It is quite essential for the project to be able to use a machine to calibrate itself through some simple measurement strategy. We want to avoid the expense of otherwise unnecessary precision machining, and in any case the required precision would be almost impossible to obtain. Over the past few months we have put a lot of unanticipated effort into solving this problem, thankfully with considerable success.
Though the hexapod mechanism is kinematically non-linear, the response to small parameter changes when static is linear. That is, if one of the top joints is moved by a small amount dx in the x direction, say, and the resulting z movement of a measurement probe is dz, then a movement of 2*dx will produce a response of 2*dz. Ignoring joint inaccuracies, there are 6*3 top joint coordinates, 6 closed leg lengths, and 3 platform joint spacings whose precise values must be known for proper control of the mechanism. We can associate a correction variable with each of these values. The coefficients relating the correction variables to changes in calibration probe positions can be calculated for a given platform position. When calibration measurements are made with the platform in that position, these are the coefficients of linear equations which could be written relating variables to measurements ignoring noise. When noise is taken into account we get inequalities with the same coefficients.
These coefficients and inequalities can be generated by the software model following a simulated calibration strategy, and the inequalities solved by a linear programming solver such as lp_solve. We have looked at many strategies, some which do not provide enough data for a solution even without noise, some which can be solved easily with a high level of noise. Generally, the better the solution the more expensive the calibration equipment necessary to realise it. We have been particularly looking for a method which references a simple plane, taking z measurements only, which we believe would be easy to realise. Using simple measurement probes mounted on the platform at each joint position, we have a strategy which successfully solves for all the variables except the platform joint spacings. However those spacings can easily be accurately measured, and the strategy works if the effects of very small platform joint errors are treated as noise. It requires two lengths of probe, and rotation of the platform about the z axis.
This is ongoing work, but it appears to provide a firm foundation for exploring calibration strategies and for actual calibration computations. The method is applicable to any parallel kinematic mechanism, and may prove an important achievement of the project.
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.
![]() |
LME Hexapod Machine | ![]() |
Laboratory For Micro Enterprise |