Testing needed automatic calibration grid generation

@bar started a github issue to have the system automatically figure out the calibration grid size and number of points to measure. I jumped in and directed the AI to clean it up a bit.

It’s now ready for testing. It needs to be tested on different frame sizes, and it defaults to positioning the measurement points up to 400mm apart (configurable in maslow.yaml)

you can see the changes at Implement automatic calibration grid sizing with safety constraints by Copilot · Pull Request #349 · BarbourSmith/FluidNC · GitHub and Automatically compute calibration grid size with configurable spacing and support for non-symmetrical grids by Copilot · Pull Request #346 · BarbourSmith/FluidNC · GitHub
or just try the firmware at Implement automatic calibration grid sizing with safety constraints · BarbourSmith/FluidNC@18fab56 · GitHub
save your maslow.yaml file before you start. This needs to be tested on different size frames to see if it

  1. runs
  2. doesn’t have the belts get too slack during calibration
  3. produces reasonable anchor locations (very close to your previous ones)
1 Like

I’m willing to give it a go, uploaded the firmware. Ran a Find the anchors. All appeared to be going well, until the Maslow headed for a dive off the table. I was half expecting that so I was ready and shut off power to the M4.

Maslow-serial (71).log (50.2 KB)

Problem: the size of the automatically generated grid.

X not a problem but table is 2400 x 1200mm. Suggest we still need to set a max height and width parameters for workspace, especially when anchor points are extended like mine.

Generated values

Maslow_calibration_grid_width_mm_X: 1715.947754
Maslow_calibration_grid_height_mm_Y: 1469.984863
Maslow_calibration_grid_size: 7

kinematics:
MaslowKinematics:
tlX: -164.199997
tlY: 4022.899902
tlZ: 10.000000
trX: 4519.600098
trY: 3987.500000
trZ: 10.000000
blX: 0.000000
blY: 0.000000
blZ: 10.000000
brX: 4553.200195
brY: 0.000000
brZ: 10.000000
beltEndExtension: 1000.000000
armLength: 123.400002
maxSegmentLength: 5.000000
fixedZ: false

1 Like

In the last link above

download the firmware-package file, unzip it and you should have firmware.bin
that you can load

set the grid size to 0 x and 0 y and then when you run a calibration, it should
pick the size and pick points to use within that (minimum of 3 in each
direction, by default, 400mm spacing)

keep track of the number of points it picks, how big an area it uses (I’m not
sure how much detail it puts in the logs, something I’ll look at soon)

but the real question is how good the anchor points that it picks are compared
to what you currently have from the old process and the resulting fitness score

David Lang

Hi David,
I managed to work that out eventually, loaded the firmware and ran. I then set the dimensions to 2400 x 1200mm for the work surface and ran it again. It ignored what I had put and headed off the table at the same place. i didn’t save the log files the second time. It actually got to the same place much quicker the 2nd run with the values in the yaml file. I will compare the anchor points and fitness score, rememering it has not completed a run due to me having to stop it.

Regards

Ian

I managed to work that out eventually, loaded the firmware and ran. I then set
the dimensions to 2400 x 1200mm for the work surface and ran it again. It
ignored what I had put and headed off the table at the same place.

that’s a good point, we haven’t had it check the work area size, it’s just been
checking against the frame size.

what is the frame size again? (roughtly)

i didn¢t
save the log files the second time. It actually got to the same place much
quicker the 2nd run with the values in the yaml file. I will compare the
anchor points and fitness score, rememering it has not completed a run due to
me having to stop it.

I think this is going to use fewer points by default with the current setting

David Lang

New: Original:
MaslowKinematics: MaslowKinematics:
tlX: -164.000000 tlX: -164.800003
tlY: 4022.800049 tlY: 4033.500000
tlZ: 10.000000 tlZ: 10.000000
trX: 4519.000000 trX: 4509.899902
trY: 3987.800049 trY: 3998.300049
trZ: 10.000000 trZ: 10.000000
blX: 0.000000 blX: 0.000000
blY: 0.000000 blY: 0.000000
blZ: 10.000000 blZ: 10.000000
brX: 4553.200195 brX: 4543.600098
brY: 0.000000 brY: 0.000000
brZ: 10.000000 brZ: 10.000000
beltEndExtension: 1000.000000 beltEndExtension: 1000.000000
armLength: 123.400002 armLength: 123.400002
maxSegmentLength: 5.000000 maxSegmentLength: 5.000000
fixedZ: false

New Fitness: 1.0323172063018835

Old Fitness: 0.9344646834958773

4.046m x 4.674m measured with a laser. approx 160mm longer TL → TR length BL → BR

Diagional 6046 x 6173 mm

Ok, a new one to try, this one adds a sanity check for wide, but short frames
it also adds a block of output to tell us what it’s doing.
something along the lines of:

Calibration area sanity check: angle at top = 115.8 degrees (should be < 140)
=== Calibration Grid Configuration ===
Grid dimensions: 909.6mm × 909.6mm
Calibration area: 0.8 m² (827437.3 mm²)
Grid size: 9×9 = 81 points
Frame dimensions: 2438.4mm × 2438.4mm
Clearance from edges: 764.4mm (width), 764.4mm (height)

the new firmware is available at:

David Lang

that’s looking pretty good for an incomplete run.

David Lang

Ian, don’t try this one yet, it will create a calibration area that goes off the
top of your workpiece.

David Lang

Just about too, thanks for the heads up

Ian Abbott wrote:

4.046m x 4.674m measured with a laser. approx 160mm longer TL → TR length BL → BR

Diagional 6046 x 6173 mm

Thanks, that’s a big frame. it needs ~14.2 of the 14.5’ of belt, so be very
careful in the corners, some people have reported having the belts pull off the
spools when they got too close to being fully extended.

I’ve got a new firmware blob that limits the max calibration area to 8’ wide and
4’ high

give this a try Implement automatic calibration grid sizing with safety constraints and adaptive validation · BarbourSmith/FluidNC@18fab56 · GitHub

David Lang

Not a big problem, I have 1000 mm Alumimium extensions on all belts, so don’t come close to extending that far.

Will try this version soon. By the way, where are you. I am in Australia.

Ian Abbott wrote:

Just about too, thanks for the heads up

@bar 's first cut was to set the calibration area to 50% of frame size (just
over 2.2m x 2m in your case). I refined that to the shape of the frame, but move
a bit inside the green (about 2m x 1.8m square in your case. both of which would
have gone way outside the area of your spoilboard

This latest version stays within a 4x8’ working area, which may still not be
enough, so watch it.

David Lang

Ian Abbott wrote:

Not a big problem, I have 1000 mm Alumimium extensions on all belts, so don¢t come close to extending that far.

I was wondering if that was you, but not badly enough to go hunting for your
posts

Will try this version soon. By the way, where are you. I am in Australia.

Phoenix, AZ, it’s getting close to midnight here.

David Lang

Not good, same again, M4 attempting suicide at the same cliff.

Maslow-serial (73).log (23.7 KB)

Maslow-serial (71).log (50.2 KB)

It overwrote the dimensions again in Maslow.yaml

Not good, same again, M4 attempting suicide at the same cliff.

Maslow-serial (73).log (23.7 KB)

looking at this log, it is trying to use a calibration area of 1719.862mm x
1466.688mm

that seems reasonable for X, but is taller than it should be in Y

where did it try to go off the edge?

David Lang

Ian Abbott wrote:

4.046m x 4.674m measured with a laser. approx 160mm longer TL → TR length BL → BR

Diagional 6046 x 6173 mm

I see your wasteboard/workpiece settings are zero, what is your Z offsets? are
they zero as well?

David Lang

David Lang wrote:

Not good, same again, M4 attempting suicide at the same cliff.

hmm, the AI is saying that wasn’t the version of firmware that had the 4x8 limit
in it, try this one

I don’t know if I sent you the wrong link, or you confused the two (I’m looking
forward to the enhanced versioning getting merged, I will admit that I got a
thrill of seeing your maslow check for a new version, even with autoupdate
disabled :slight_smile:

David Lang

Sorry thought you must have given up for the night. Will give this one a go, but I’m pretty sure I loaded the latest version. Offsets are 10mm, wall mounts are pretty close to level, an earlier version had a problem (probably divide by zero when I set them to 0)

start of 4th iteration bottom right going down.

1 Like