Calibration Issues: Fitness Too Low

Yep, my new data is not resolving to good fitness in calibration-simulation (or my new ui), but old data is (at least on calibration-simulation).

I’ll publish a new index.html.gz from my branch in the interstitial thread tonight once I make just a couple more tweaks to the calibration graph to make it “usable” as a test for more feedback on it. I refactored my new code a bit to get it separate from the other files so it will be easier to merge going forward (with a few exceptions).

As to my issues, I will post my new data on my other thread…

1 Like

Dino wrote:

@bar, I have a 2438x1066 frame. Able to get through calibration after dealing with a belt jam on the new firmware. My frame is a piece of plywood. I only need a small work area in the center. I used the fully 3d printed anchors that were uploaded in the forums by Dan Bunby (they work amazingly by the way). I used the 0.67 and 0.68 firmware and have very low fitness on both calibration runs:

That size frame can cut a 1765x180 area, so any calibration outside of that area
will run into grief.

http://lang.hm/maslow/maslow4_frame.html

shrinking the width to 1800 wide would give you a workable area of 1047x410

shrinking the wideth to 1500 would give you a workable area of 720x520

David Lang

1 Like

Do you think this is the behavior that we were seeing before with the math choking?

I don’t know. I did put this in CalibrationSimulation to check the numbers and it also came up with about the same (.16) on 10000x. @Ethan and I were just messaging about maybe making a github page or maybe a standalone tool for this data analysis vs having it in the constrained environment of the ESP32. pulling in the calculatesCalibrationStuff.js from the main project or something like that.

2 Likes

I think that is a FANTASTIC idea.

I think there is a lot of room for improvement on that algorithm

I wish I had the math chops to help more.

I was brainstorming ideas, and I was thinking that if we were to get a measurement with tl and br slack and bl and tr tight, we would be able to constrain tr points to a path along the circle (really arc, since it has to be positive x and y) from 0,0 to that radius. I don’t know if that helps at all… I’m sure you folks that do have the math chops already know and have considered this.

1 Like

For anyone who didn’t see the other thread, this idea is now live, see Standalone Calibration Simulator - #3 by ronlawrence3

1 Like

@bar re: overly extended belts, can you make the calibration routine not move
more than a small amount without pausing to tension belts? it would slow things
down, but prevent the belts from getting caught up in the gears.

David Lang

2 Likes

Yes, we could totally do that. It would be slow but it would work for sure.

1 Like

Bar wrote:

Yes, we could totally do that. It would be slow but it would work for sure.

right now I think we need to do “slow, but reliable” while we continue to try
and figure out what’s wrong with the faster approach.

David Lang

1 Like

Big news regarding my setup: Calibration is working great after updating to firmware 0.69 (nice!)

I did all of the same things as my original post, only this time it got to fitness 1.11! Thanks to @bar for the new algorithm! Can provide full log if that would help people.

The only problem that remains is that there is occasionally some slack in one belt when jogging the sled around after taking slack. Is that normal?

3 Likes

Same general issue and setup as OP, but firmware is v0.71.

Concrete anchors on flat driveway, OSB spoilboard.

Settings:

Here are the results:

Serial Messages
[MSG:INFO: Channel auto report interval set to 50 ms]
[GC:G0 G54 G17 G21 G90 G94 M5 M9 T0 F0 S0]
[GC:G0 G54 G17 G21 G90 G94 M5 M9 T0 F0 S0]
[MSG:INFO: Caution: Unlocked]
[MSG:INFO: Retracting all belts]
[MSG:INFO: Top Left pulled tight with offset 0.000]
[MSG:INFO: Bottom Right pulled tight with offset -0.011]
[MSG:INFO: Top Right pulled tight with offset 0.000]
[MSG:INFO: Bottom Left pulled tight with offset -0.011]
[MSG:INFO: Extending all belts]
[MSG:INFO: All belts extended to center position]
[MSG:INFO: Measured waypoint 0]
[MSG:INFO: Center point deviation: TL: 0.101 TR: 8.015 BL: -29.491 BR: -21.906]
[MSG:INFO: Measured waypoint 1]
[MSG:INFO: Measured waypoint 2]
[MSG:INFO: Measured waypoint 3]
[MSG:INFO: Measured waypoint 4]
[MSG:INFO: Measured waypoint 5]
[MSG:INFO: Measured waypoint 6]
[MSG:INFO: Measured waypoint 7]
[MSG:INFO: Measured waypoint 8]
CLBM:[{bl:1785.90,   br:1795.71,   tr:1824.45,   tl:1819.65},{bl:1749.65,   br:1751.87,   tr:1878.13,   tl:1870.36},{bl:1538.88,   br:1949.15,   tr:2083.75,   tl:1698.40},{bl:1603.44,   br:2009.65,   tr:2029.17,   tl:1618.05},{bl:1689.52,   br:2073.80,   tr:1970.39,   tl:1543.71},{bl:1881.91,   br:1889.49,   tr:1750.52,   tl:1735.02},{bl:2085.42,   br:1696.14,   tr:1539.89,   tl:1955.61},{bl:2028.30,   br:1615.76,   tr:1606.31,   tl:2014.49},{bl:1969.45,   br:1541.43,   tr:1685.50,   tl:2076.72},]
Computing... This may take several minutesFitness: 0.5783368 in 100
Fitness: 0.5783368 in 200
Fitness: 0.5783368 in 300
Fitness: 0.5783368 in 400
Fitness: 0.5783368 in 500
Fitness: 0.5783368 in 600
Fitness: 0.5783368 in 700
Fitness: 0.5783368 in 800
Fitness: 0.5783368 in 900
Fitness: 0.5783368 in 1000

Calibration complete 
Calibration values:
Fitness: 0.5783368212827025
Maslow_tlX: -5.2
Maslow_tlY: 2006.0
Maslow_trX: 3018.4
Maslow_trY: 2006.0
Maslow_blX: 0.0
Maslow_blY: 0.0
Maslow_brX: 3004.7
Maslow_brY: 0.0
These values have been automatically saved for you.
[MSG:INFO: Measured waypoint 9]
[MSG:INFO: Measured waypoint 10]
[MSG:INFO: Measured waypoint 11]
[MSG:INFO: Measured waypoint 12]
[MSG:INFO: Measured waypoint 13]
[MSG:INFO: Measured waypoint 14]
[MSG:INFO: Measured waypoint 15]
[MSG:INFO: Measured waypoint 16]
[MSG:INFO: Measured waypoint 17]
[MSG:INFO: Measured waypoint 18]
[MSG:INFO: Measured waypoint 19]
[MSG:INFO: Measured waypoint 20]
[MSG:INFO: Measured waypoint 21]
[MSG:INFO: Measured waypoint 22]
[MSG:INFO: Measured waypoint 23]
[MSG:INFO: Measured waypoint 24]
CLBM:[{bl:1785.90,   br:1795.71,   tr:1824.45,   tl:1819.65},{bl:1749.65,   br:1751.87,   tr:1878.13,   tl:1870.36},{bl:1538.88,   br:1949.15,   tr:2083.75,   tl:1698.40},{bl:1603.44,   br:2009.65,   tr:2029.17,   tl:1618.05},{bl:1689.52,   br:2073.80,   tr:1970.39,   tl:1543.71},{bl:1881.91,   br:1889.49,   tr:1750.52,   tl:1735.02},{bl:2085.42,   br:1696.14,   tr:1539.89,   tl:1955.61},{bl:2028.30,   br:1615.76,   tr:1606.31,   tl:2014.49},{bl:1969.45,   br:1541.43,   tr:1685.50,   tl:2076.72},{bl:1909.54,   br:1462.64,   tr:1785.26,   tl:2157.69},{bl:1682.89,   br:1676.11,   tr:1968.62,   tl:1969.19},{bl:1463.57,   br:1900.65,   tr:2163.81,   tl:1784.76},{bl:1256.01,   br:2129.40,   tr:2366.54,   tl:1618.14},{bl:1326.96,   br:2177.65,   tr:2311.88,   tl:1523.21},{bl:1443.62,   br:2221.70,   tr:2253.36,   tl:1432.69},{bl:1497.61,   br:2288.88,   tr:2200.38,   tl:1347.90},{bl:1592.45,   br:2352.06,   tr:2153.40,   tl:1269.77},{bl:1763.04,   br:2153.85,   tr:1921.69,   tl:1468.05},{bl:1950.81,   br:1956.14,   tr:1695.08,   tl:1685.98},{bl:2150.70,   br:1771.74,   tr:1476.05,   tl:1911.36},{bl:2364.20,   br:1605.13,   tr:1268.52,   tl:2141.93},{bl:2299.79,   br:1509.89,   tr:1342.67,   tl:2188.98},{bl:2241.34,   br:1419.23,   tr:1428.84,   tl:2241.82},{bl:2188.35,   br:1334.08,   tr:1520.96,   tl:2299.60},{bl:2141.58,   br:1255.77,   tr:1616.98,   tl:2362.43},]
Computing... This may take several minutesFitness: 0.4204196 in 100
Fitness: 0.4225831 in 200
Fitness: 0.4233914 in 300
Fitness: 0.4233914 in 400
Fitness: 0.4233914 in 500
Fitness: 0.4233914 in 600
Fitness: 0.4233914 in 700
Fitness: 0.4233914 in 800
Fitness: 0.4233914 in 900
Fitness: 0.4233914 in 1000
Fitness: 0.4233914 in 1100
Fitness: 0.4233914 in 1200

WARNING FITNESS TOO LOW. DO NOT USE THESE CALIBRATION VALUES!

I’ve run into some other issues and thought I’d cleared them. Fully unspooled and then did retract all. Measured and remeasured.

Not sure what to try next. Let me know if any other info would be helpful.

(Feel like there should be a calibration megathread, but I didn’t see one. This seemed closest.)

1 Like

I took your CLBM and plugged it into the experimental calibration simulator we were playing around with making here (https://m4cal.etskinner.com/) and saw that point 14 (left center) is kind of scattered a bit so excluded it and got these numbers:

Calibration complete 
Calibration values:
Fitness: 0.7364656395327686
Maslow_tlX: -5.4
Maslow_tlY: 1982.0
Maslow_trX: 3022.9
Maslow_trY: 1999.6
Maslow_blX: 0.0
Maslow_blY: 0.0
Maslow_brX: 3020.8
Maslow_brY: 0.0

Then I saw that the center point looked a little off and excluded it too.

Calibration complete 
Calibration values:
Fitness: 0.9846289573468582
Maslow_tlX: -4.3
Maslow_tlY: 1980.8
Maslow_trX: 3023.6
Maslow_trY: 1999.6
Maslow_blX: 0.0
Maslow_blY: 0.0
Maslow_brX: 3022.8
Maslow_brY: 0.0

You could try entering in these in and try jogging around to see if this helps. I’m not sure why 0 and 14 were off in the algorithm.

2 Likes

Thanks Ron.

When you say entering these you mean save them to yaml file and see if the thing is properly calibrated by jogging and taking manual measurements?

1 Like

You could do it that way, but you can also just enter and click set on each value, and then click save on this screen:

and yes, jog the machine around and see if the belts remain tight and it moves like you think it should. You can also use these and re-run calibration and it may get even better numbers (it builds on itself).

2 Likes

I ran these numbers through a calibration and got fitness too low again. Didn’t try the jog and measure.

The bottom left belt never wants to retract fully. Going to disassemble and try to adjust the motors to give the gears a bit more breathing room and hope that helps everything.

1 Like