If I understand the question correctly, “yes, sort of” should be the answer.
Optical calibration currently works by the “machine is at x1, y1 but to get
there, I had to tell the machine to go to x2, y2”, which is really the same as
to what you stated.
right, and I’m wanting to be able to say “I told the machine to go to x2, y2 and
it really went to x1, y1”
same sort of data but with yours the x1y1 values are a nice grid and the x2y2
values wander, but I want to make sure that we can have x2y2 be a nice grid and
the x1y1 values wander.
This should mostly be checking to make sure that there are no hidden assumptions
that either side is a nice grid (or the size of the grid).
Right now optical calibration has two methods… error matrix and curve fit.
In error matrix, two regularly spaced 2D arrays (x1, y1 values) contains the
correction values x2-x1, y2-y1, respectively. The firmware uses interpolation
to determine how much correction needs to be applied to intermediate locations
not precisely on the nodes of the grid. If you had an array (list) of tuples
you could conceivably interpolate/extrapolate the values from the list to
create the regularly spaced arrays which will then be used by the controller.
could it be made to work with irregularly spaced arrays? find the 4 points that
surround you and interpelate from them? (probably by assuming that the error is
linear within the distorted box)
this would include potentially having different grid spacing in different areas.
I could see someone wanting to have a very accurate grid in the center of the
machine, but allow for a bigger, less accurate grid out near the edges.
or the method I mentioned offhand a few posts up where you have a very accurate
grid to measure, but it’s small, so you get points from it in one place, shift
it so there is overlap of the old and new locations, map the new location of the
grid based on the error matrix generated by the first location (extending your
known accurate area, but where the points measured by the second location are
rotated and at an odd offset from the poitns measured at the second location)
For curve fitting, an array (list) of tuples would work fine because its just
taking data points in.
how complex can the curves be? (is that an input parameter?)
My biggest concern is how accurate someone can measure X,Y locations of
arbitrary points.
I agree with the concerns.
Part of what I am thinking is to try and make a set of instructions to let
people try all these various methods they are proposing and see how they work in
the real world. It’s frustrating for all parties for people to post ideas and
for me to be the critic saying why they may not work. (and I will be wrong some
of the time and shoot down an idea that will work, which is why I try to give my
reasoning rather than just being the authority saying “this is a bad idea”)
But that’s the basis of holey maslow… measure distances
from multiple points and then solve for x,y based upon those distances. I
struggled with it in practice and moved to optical calibration to remove my
measurement inaccuracy from the equation.
Actually we have three approches here
-
(holey) input grid, modify machine dimensions to best fit the errors
no run-time correction
-
(optical matric), input grid,
runtime: calculate ‘correct’ coordinates given desired location and known
nearby errors (may be able to correct for a simplified or incomplete machine model)
-
(optical curves), input grid, map error curves
runtime: calculate ‘correct’ coordinates given desired location and error
curves (may be able to correct for a simplified or incomplete machine model)
The question of how to generate the grid is somewhat orthoginal to the question
of how you use the data. you started the optical approach to simplify taking the
measurements and I’m looking to decouple how to generate the error matrix from
how to use the error matrix
For Example:
A) make it so that you could use optical means to measure a grid and use the
holey approach to compute the ‘correct’ machine dimensions to match that.
B) make it so that people can measure a grid of points and use the matrix or
curve apporach to correct errors on the fly.
To do this, we would need to make all three approaches able to handle an
arbitrary size input grid that is not assumed to be regular in either real-world
or desired locations. (I think you are really close, if not already there)
This also means that we need to merge your firmware changes into the mainline.
As per the this tangent we are drifting on, the ability to use an error matrix
or error curve is independent of the way the error matrix is generated, so let’s
make it so that people can experiment. I think we will end up finding tricks
that we didn’t imagine.
David Lang