The initial and very rough form of the
construction algorithm. Any object
consisting of many interlocking
pieces can be assembled by the results
obtained by running this simulation.
And not just that, but perhaps assembled in the
most efficient way. (I should be able to add
efficiency parameters to the heuristics)
In order to find out how to assemble a fully
formed object is Dissembled and the information
is replayed in order to assemble it.
Hence these steps are for Deconstruction
The Reconstruction animation should look lovely.
The parts of a work piece are stored in a convex format.
(An enclosed volume)
1 Assume all objects have same mass to vol density
2 Find the Center of mass of the collection of objects
3. Construct a sphere with center as the center of mass
4. Find intersecting pieces
5. Jiggle pieces until collision free movement is detected
6. If not detected for any piece expand radius and repeat
7 if detected jiggle room make the adjustment update the pieces
8 Repeat until no pieces are TOUCHING and there is a BUFFER around
(could also at this point expand the pieces outward such they lay
on a sphere
9 Now replay the motions in reference
You now have location rotation data for objects
Now you have to figure out how to convert that to physical codes your
machines can understand. I'm thinking non torque based motion would
be best so that maximum precision could be obtained. Using sensor
feedback is a must anyway.
(non torque based systems feedback speed control and screw thread distance measurement)
I began with a rough algorithm that I've been thinking
over. And from here I move towards more concrete
definitions of it's parts.
1 Assume all objects have same mass to vol density
The easiest to use is 1 unit per volume element.
2 Find the Center of mass of the OBJECT BY
Calculating the Center of Mass of each object.
Store those, then find the average position
of those center of masses.
3 CONSTRUCT A SPHERE with center at the center of mass
Literally construct or set up the equation.
It depends on whether I do this in Blender or not.
4 Increment Radius of sphere
5 Find intersecting pieces
Blender has intersection functions.
I have to recode them into
something else or just use them.
6 Jiggle pieces UNTIL collision free movement is detected
jiggle_pieces
Must be some function that accepts a part and varies it's position
and perhaps rotation. And then compares that change in position to
whether or not it is in contact with any other piece.
This is the most important step for it determines how pieces will begin
to unravel from the object we are making.
7 IF not detected REPEAT steps 4 through 6
8 IF detected jiggle_room
THEN make the adjustment update the pieces
Move the pieces by the amount you can and
record that movement in the piece_history.
9 Repeat Steps 4 through 9
UNTIL no pieces are TOUCHING
AND there is a BUFFER space between pieces
For clarity we could expand the pieces outward such
that they will lay on a sphere.
10 By this point we should have data for how to move Each piece
away from all the other pieces. We may even find that it is
impossible with some pieces. But now that we have this data
assembling the object is a matter of replaying
all this piece_history data.
And converting that information into GCode for your
robotic assembly system.
A more advanced system should be able to handle
unexpected breakage or piece deforms as it is processing
the materials. But this is just the basic plan for
how to assemble any object that is made up of solid pieces
connected together.
NOTES
GCode needs Real time error correction