M4 Coordinate System

While waiting for my M4 (#1238) I’ve been following others’ experiences and have become particularly interested in the calibration process and its artifact, the coordinate system.

I’m going to apologize in advance for what will be a somewhat long post, and note that I don’t think that any of this is going to solve any problems- so feel free to ignore it and work on important things…

As I understand it, the initial values entered in maslow.yaml do two things- set the process used based on a vertical or horizontal orientation, and the area to the used for the calibration. This second process takes a rectangle defined by four X,Y coordinate points that represent the nominal locations of the anchor points-

  • Bottom Left (BLX, BLY)
  • Bottom Right (BRX,BRY)
  • Top Left (TLX, TLY)
  • Top Right (TRX, TRY)

and then offsets each side ‘inward’ by the calibration offset to define a smaller area for the calibration.

So far, so good.

All the examples I have seen follow this same pattern, but it leads to some questions-

  • Since the default frame size is 8x10 for a 4x8 (I apologize to the rest of the world for the choice of units…) workspace, is the same calibration offset always used for the X and Y directions?
  • Is there any advantage to intentionally setting the initial anchor point in a manner that will yield a calibration area equal to the intended workspace?
  • Since the four anchors can be explicitly defined, do they have to form a rectangle?
  • For example, if the anchors are intentionally arranged in a trapezoid, can or should it be defined thus for calibration?

In every example I have seen, the bottom left anchor is always defined as the origin (BLX=0,BLY=0) and the X axis passes through the bottom left and bottom right anchors (BRY=0) and the results of the calibration process appear to always generate results that conform to this- including potentially having negative coordinate values. In particular, here-

@bar only reported the non-zero values, which appears to confirm that they are essentially fixed.

  • Is this always the case?
  • Is the bottom left anchor always the origin?
  • Does the X axis always pass through the two bottom anchors?
  • Assuming that the above is true, does this mean that the edge a panel to be machined must be set exactly parallel to this X axis line?

Also, there has been many comments that the dimensions of the anchors and the workspace can be expanded or shrunk from the default 4x8, but in every case it appears that the space is defined as a rectangle with the longer side on the X axis (landscape) -or a square.

  • Can the longer axis be on the Y axis (portrait)?

Lastly, the fitness result appears to relate to how well the calculated anchor locations correlate to (or deviate from) the full set of test points.

  • Is this a dimensionless measure on a scale of 0 to 1?
  • Is there any reasonable way to calculate some real world accuracy metric from this value?

and here’s my first answer…

And here’s another

1 Like
  • Since the default frame size is 8x10 for a 4x8 (I apologize to the rest of the world for the choice of units…) workspace, is the same calibration offset always used for the X and Y directions?

currently yes

  • Is there any advantage to intentionally setting the initial anchor point in a manner that will yield a calibration area equal to the intended workspace?
  • Since the four anchors can be explicitly defined, do they have to form a rectangle?

no, they can be offset in a roughly rectangular shape, but if you move an anchor
by a foot, the maslow should still work, it’s just the area that can be
effectively worked may change.

  • For example, if the anchors are intentionally arranged in a trapezoid, can or should it be defined thus for calibration?

it doesn’t matter, the calibration doesn’t assume a perfect rectangle, so it
also handles a trapezoid parallelagram, or other distorted shapes.

In every example I have seen, the bottom left anchor is always defined as the
origin (BLX=0,BLY=0) and the X axis passes through the bottom left and bottom
right anchors (BRY=0) and the results of the calibration process appear to
always generate results that conform to this- including potentially having
negative coordinate values. In particular, here-

@bar only reported the non-zero values, which appears to confirm that they are essentially fixed.

  • Is this always the case?

yes

  • Is the bottom left anchor always the origin?

yes

  • Does the X axis always pass through the two bottom anchors?

yes, although I have called out to Bar that we need the ability to rotate the
axis to handle this case.

  • Assuming that the above is true, does this mean that the edge a panel to be machined must be set exactly parallel to this X axis line?

see above.

Also, there has been many comments that the dimensions of the anchors and the
workspace can be expanded or shrunk from the default 4x8, but in every case it
appears that the space is defined as a rectangle with the longer side on the X
axis (landscape) -or a square.

  • Can the longer axis be on the Y axis (portrait)?

yes

Lastly, the fitness result appears to relate to how well the calculated anchor locations correlate to (or deviate from) the full set of test points.

  • Is this a dimensionless measure on a scale of 0 to 1?
  • Is there any reasonable way to calculate some real world accuracy metric from this value?

bar will have to answer the details.

David Lang

2 Likes

I have recommended to Bar that after a minimal calibration, the user be given
the ability to manually drive to the 4 corners of their desired workspace,
rather than trying to get them to set an offset from the anchor points.

that would also give the ability to rotate the axis when the corners aren’t
directly in line with the axis.

David Lang

2 Likes

I agree, so far you are spot on :smiley:

It was up until this morning. I just separated the offsets into an X offset and a Y offset so that we have the option to make them different.

I think so. I think that the accuracy is generally better in the area where the calibration has been run so (just as a hypothetical) if we were to run the calibration exclusively on the left side of the frame and then exclusively cut things on the right side of the frame the accuracy would be worse…I think. That is entirely a hunch based on no real data.

This is exactly the kind of thing that I’m excited to start testing once we have more machines out in the world and more folks willing to try experimenting.

They can be in any locations. Each one has its own X and Y coordinates. We get to pick the frame of reference so we’ve declared that the bottom left is always (0,0) and the bottom right is (?,0) because that simplifies the math.

Ah I should have kept reading, you already figured it out :smiley:

The X,Y reference frame is defined by those two points but it’s arbitrary, we can define it any way that we want, that was just a simple option. I generally go for roughly parallel to that line, but I don’t usually measure or anything.

When you tell the machine to cut a straight line 600mm in the X direction, it will be parallel to that line.

Yes, absolutely.

I haven’t experimented with wildly non-rectangular frames, but I think that as long as the initial guesses for the anchor point locations are reasonably good, the calibration process should work for any shape. Rectangles are just easy to measure and common.

No, it’s a number inversely proportional to the average error in the measurements so a perfect calibration would result in an infinite score. Ultimately I’d like to get it up into the 2-3 range which is totally possible I think. It’s more of a sanity check than anything else. It lets us know if something has gone really wrong.

Not really. It tells us how well the numbers that we put into the system fit to computing anchor points, but it’s easy to artificially increase the number by sampling fewer points close together since those are likely to have less difference between them. This is also probably indicative of something else being missing from the calculation like belt stretch.

These are FANTASTIC questions. It sounds to me like you have a good core understanding of the system.

I think so. I think that the accuracy is generally better in the area where
the calibration has been run so (just as a hypothetical) if we were to run the
calibration exclusively on the left side of the frame and then exclusively cut
things on the right side of the frame the accuracy would be worse…I think.
That is entirely a hunch based on no real data.

I agree with this. the belt anchors are not symmetrical, and so one side will
differ from the other side.

the wider apart the points are that the sled can be while doing it’s belt length
testing, the more any errors will grow, and so it becomes easier to detect and
correct for them.

so if you calibrate on a 1 ft square in the middle of your work area, you will
be significantly less accurate out near the edges of a 4x8 ft sheet.

I don’t know if it works the other way. If you were to do a calibration at each
corner and the center top/bottom (6 points), that may be pretty darn good for
the center of the work area. But it may not, testing and hacking on the
calibration routine would be needed.

but even if it’s pretty good, doing many points will be better

but it may be that you can do a many point test once, then it can do a quick
test to see if it’s still the same on the next startup.

They can be in any locations. Each one has its own X and Y coordinates. We get to pick the frame of reference so we’ve declared that the bottom left is always (0,0) and the bottom right is (?,0) because that simplifies the math.

see my prior comments about the need to be able to rotate the axis around (0,0)
so that the right bottom is not always (?,0) to correct for frame error.

The X,Y reference frame is defined by those two points but it’s arbitrary, we
can define it any way that we want, that was just a simple option. I generally
go for roughly parallel to that line, but I don’t usually measure or anything.

you don’t do anything where you try to use the factory edge of the wood, or cut
really close to the edge.

if you were to put a stop in place, and then put your workpiece against that
stop, and then found that stop was not parallel to the axis, it can be hard to
correct it.

I haven’t experimented with wildly non-rectangular frames, but I think that as
long as the initial guesses for the anchor point locations are reasonably
good, the calibration process should work for any shape. Rectangles are just
easy to measure and common.

it would be interesting to try a 3 motor triangle on a flat surface. Bar started
off always thinking in terms of a near vertical frame, and there you really want
two anchors to share the weight, and are limited in your possible vertical
space.

With the ability to have it horizontal on your driveway, the idea of having a
triangle of anchors, but further out than a rectangle would need to be to cover
the same work area, would be a possibility.

David Lang

2 Likes

I vote for this to be a high priority FW upgrade. One thing I intend to do with mine is use it as a panel saw, and for that I need to work accurately with respect to the as-manufactured edges of the panel.

1 Like