Freesteel Blog » 2013 » September
I just spent a grey sky weekend down in Bristol investigating the cave surveying technology potential of this Hokuyo UTM-30LX-EW, that I bought with my much diminished pocket money.
I bought this one, as opposed to the slightly cheaper UTM-30LX that most robot research teams go for, because it is IP67 rated, as opposed to IP64. The IP Code says the first 6 means “Dust tight”, and second digit 7 means protected against “Immersion up to 1m” rather than 4, protected against “splashing of water”.
I know what caves are like.
I love Python, but its lack of multi-core support is killing us in the Adaptive Clearing strategy.
We’ve divided the algorithm into 8 separate threads that all work in a pipeline. Some of then can be operated in parallel (for example, the swirly Z-constant clearing strategy within an independent step-down level).
The heavy calculation is done in C++, but the high level toolpath planning, reordering, maintenance and selection from categories of start points is undertaken in Python.
While the C++ functions unlock the GIL (the Global Interpreter Lock) on entry, so that Python interpreter can carry on in parallel — and perhaps call another concurrent C++ function, this only gets us so far. Our limit is full use of two cores, which on a 4 or 8 core machine is a little embarrassing.
So we have two options, neither of which are good. One is to port our thousands of lines of Python code into C++ (which is not going to work as it will be too painful to debug this code yet again in another language that is much harder). And the second is to make Python multi-core.
Following my work attempting to create five axis toolpaths using tracking methods, I’ve fallen back to the more conventional techniques used to create 3-axis toolpaths of defining areas theoretically and then computing their boundaries.
For three-axis strategies almost everything is computed on an XY weave an efficient aligned subdividing structure. When things are aligned in this way it’s possible to be totally strict with the floating point calculations about what cell contains each point, and so rely on the topological and geometric reasoning being consistent.