Solved Parsing error when loading height map
-
I am trying to load a height map into Duet web control, but i get the following error when running G29 S1
"Error: G29: Failed to load height map from file 0:/sys/heightmap.csv: failed to parse grid parameters"
Context:
The printer doesn't have a probe so I made the height map measurements manually and plotted them into the .csv file. The syntax should be correct, and I can't find a typo or anything that should interfere.The height map:
heightmap.csvor here:
RepRapFirmware height map file v2 xmin,xmax,ymin,ymax,radius,spacing,xnum,ynum 0,1700,0,900,,10,17,10 0.60,0.50,0.40,0.40,0.40,0.40,0.40,0.30,0.30,0.40,0.40,0.50,0.50,0.60,0.70,0.90,1.10 0.40,0.40,0.30,0.30,0.20,0.20,0.20,0.20,0.20,0.20,0.30,0.35,0.45,0.50,0.70,0.80,1.05 0.30,0.20,0.20,0.10,0.10,0.10,0.05,0.00,0.00,0.00,0.10,0.20,0.30,0.45,0.60,0.80,1.00 0.20,0.10,0.00,-0.10,-0.10,-0.10,-0.15,-0.20,-0.20,-0.20,-0.10,-0.10,0.15,0.28,0.45,0.68,0.90 0.10,0.00,-0.10,-0.20,-0.20,-0.30,-0.30,-0.30,-0.22,-0.22,-0.18,-0.05,0.02,0.18,0.40,0.60,0.90 0.10,0.00,-0.10,-0.20,-0.30,-0.40,-0.40,-0.40,-0.30,-0.30,-0.20,-0.15,-0.10,0.00,0.28,0.50,0.80 0.10,0.00,-0.15,-0.28,-0.40,-0.45,-0.40,-0.40,-0.20,-0.25,-0.20,-0.20,-0.05,0.16,0.40,0.70,0.70 0.18,-0.05,-0.20,-0.30,-0.40,-0.40,-0.40,-0.40,-0.40,-0.35,-0.30,-0.25,-0.15,0.05,0.30,0.60,0.90 0.10,-0.10,-0.20,-0.30,-0.40,-0.40,-0.40,-0.40,-0.38,-0.35,-0.28,-0.20,-0.20,0.08,0.25,0.60,0.90 0.10,-0.10,-0.28,-0.38,-0.40,-0.44,-0.40,-0.40,-0.38,-0.35,-0.30,-0.28,-0.20,0.00,0.20,0.55,0.90
Hope there is something I'm missing; anyone see something wrong here?
Thank you,
Søren
-
@sbNielsen what mainboard are you using?
-
@jay_s_uk
M115
FIRMWARE_NAME: RepRapFirmware for Duet 3 MB6HC FIRMWARE_VERSION: 3.5.0-rc.1++ ELECTRONICS: Duet 3 MB6HC v1.02 or later FIRMWARE_DATE: 2023-12-07 12:53:53 -
Just tried to load this height map instead and it works!
What is the issue, with the syntax on the first 3 lines or?RepRapFirmware height map file v2 generated at 2024-05-08 10:04, min error -0.135, max error 0.460, mean 0.168, deviation 0.111 axis0,axis1,min0,max0,min1,max1,radius,spacing0,spacing1,num0,num1 X,Y,20.00,280.00,10.00,170.00,-1.00,10.00,10.00,27,17 -0.046, -0.129, -0.088, -0.023, -0.013, -0.061, -0.062, -0.036, -0.009, -0.010, 0.011, 0.006, -0.049, 0.000, -0.051, 0.024, 0.006, 0.026, 0.024, 0.091, 0.102, 0.126, 0.159, 0.142, 0.083, 0.093, 0.132 -0.135, -0.086, -0.059, -0.026, 0.021, 0.012, -0.022, 0.003, -0.030, 0.058, 0.013, -0.020, 0.031, 0.044, -0.028, 0.023, 0.052, 0.110, 0.098, 0.109, 0.132, 0.116, 0.193, 0.161, 0.160, 0.094, 0.074 -0.114, -0.070, -0.028, -0.012, -0.046, -0.019, 0.051, -0.029, 0.014, -0.001, 0.048, -0.011, 0.036, -0.002, 0.040, 0.029, 0.132, 0.151, 0.151, 0.141, 0.112, 0.153, 0.150, 0.190, 0.143, 0.202, 0.154 -0.040, -0.021, -0.006, -0.014, -0.040, 0.046, 0.049, 0.111, 0.048, 0.051, 0.106, 0.104, 0.033, 0.036, 0.111, 0.106, 0.065, 0.161, 0.118, 0.161, 0.184, 0.214, 0.138, 0.166, 0.166, 0.176, 0.158 -0.058, -0.028, -0.001, 0.039, 0.039, 0.051, 0.061, 0.074, 0.072, 0.073, 0.069, 0.051, 0.071, 0.126, 0.109, 0.156, 0.176, 0.138, 0.140, 0.220, 0.231, 0.171, 0.171, 0.218, 0.201, 0.220, 0.168 0.012, -0.027, 0.011, 0.112, 0.112, 0.093, 0.044, 0.083, 0.078, 0.101, 0.082, 0.080, 0.084, 0.162, 0.144, 0.100, 0.139, 0.232, 0.137, 0.232, 0.220, 0.234, 0.238, 0.198, 0.257, 0.193, 0.234 0.001, 0.029, 0.067, 0.060, 0.048, 0.082, 0.139, 0.127, 0.167, 0.138, 0.130, 0.122, 0.145, 0.089, 0.121, 0.156, 0.198, 0.243, 0.201, 0.199, 0.241, 0.189, 0.221, 0.270, 0.312, 0.228, 0.235 -0.009, 0.063, 0.076, 0.087, 0.118, 0.089, 0.038, 0.129, 0.115, 0.146, 0.164, 0.121, 0.139, 0.120, 0.131, 0.107, 0.178, 0.206, 0.279, 0.285, 0.242, 0.260, 0.217, 0.220, 0.281, 0.244, 0.165 -0.003, 0.086, 0.085, 0.126, 0.111, 0.141, 0.139, 0.126, 0.150, 0.138, 0.178, 0.152, 0.170, 0.094, 0.118, 0.181, 0.200, 0.250, 0.231, 0.277, 0.313, 0.225, 0.316, 0.297, 0.251, 0.249, 0.213 0.011, 0.029, 0.094, 0.125, 0.139, 0.153, 0.166, 0.139, 0.132, 0.171, 0.199, 0.189, 0.137, 0.119, 0.153, 0.172, 0.238, 0.246, 0.252, 0.297, 0.256, 0.281, 0.306, 0.270, 0.244, 0.197, 0.227 0.045, 0.082, 0.107, 0.089, 0.159, 0.132, 0.184, 0.182, 0.213, 0.195, 0.196, 0.197, 0.198, 0.166, 0.226, 0.224, 0.278, 0.230, 0.212, 0.243, 0.298, 0.322, 0.293, 0.265, 0.273, 0.221, 0.191 0.069, 0.043, 0.041, 0.181, 0.133, 0.142, 0.202, 0.229, 0.225, 0.225, 0.228, 0.220, 0.146, 0.157, 0.201, 0.229, 0.199, 0.317, 0.292, 0.292, 0.272, 0.311, 0.319, 0.321, 0.262, 0.236, 0.248 0.044, 0.066, 0.070, 0.140, 0.167, 0.197, 0.251, 0.256, 0.241, 0.199, 0.191, 0.218, 0.224, 0.166, 0.195, 0.251, 0.251, 0.241, 0.252, 0.256, 0.317, 0.314, 0.329, 0.366, 0.337, 0.326, 0.269 0.072, 0.124, 0.104, 0.149, 0.144, 0.226, 0.301, 0.221, 0.224, 0.242, 0.206, 0.260, 0.197, 0.242, 0.240, 0.287, 0.242, 0.292, 0.341, 0.299, 0.300, 0.274, 0.324, 0.339, 0.304, 0.302, 0.314 0.122, 0.185, 0.169, 0.196, 0.242, 0.248, 0.262, 0.255, 0.252, 0.215, 0.266, 0.221, 0.259, 0.301, 0.304, 0.233, 0.297, 0.289, 0.316, 0.294, 0.340, 0.308, 0.386, 0.324, 0.319, 0.351, 0.298 0.118, 0.187, 0.199, 0.243, 0.256, 0.259, 0.267, 0.306, 0.271, 0.243, 0.245, 0.274, 0.304, 0.293, 0.279, 0.258, 0.295, 0.304, 0.324, 0.319, 0.348, 0.407, 0.345, 0.364, 0.338, 0.317, 0.326 0.146, 0.183, 0.242, 0.186, 0.262, 0.319, 0.326, 0.330, 0.350, 0.259, 0.333, 0.272, 0.251, 0.271, 0.269, 0.269, 0.281, 0.344, 0.326, 0.339, 0.312, 0.460, 0.377, 0.400, 0.390, 0.313, 0.337
-
@sbNielsen The first few lines in your csv file have incorrect parameters incorrect. See mine for an example:
RepRapFirmware height map file v2 generated at 2024-03-27 21:04, min error -0.091, max error 0.109, mean 0.004, deviation 0.056 axis0,axis1,min0,max0,min1,max1,radius,spacing0,spacing1,num0,num1 X,Y,-85.00,85.00,-85.00,85.00,-1.00,42.50,42.50,5,5 ...
Note my bed has 0,0 in the centre, not the front left corner. Also, I don't think the date and min/max/mean and deviation part of the first line is needed, but the "RepRapFirmware height map file v2" is.
During probing, rows of points are recorded in the csv as the probing is done, so the first line of points is the front of the bed, starting at min X min Y, then increasing in X. The second row increases in Y, starting again a min X (though is actually probed from the max X end, as the probing follows an S-shape path up the bed).
Also, update your firmware to a release eg 3.5.2, rather than use an old release candidate (3.5.0-rc.1++).
Ian
-
RepRapFirmware height map file v2 generated at 2024-16-07 19:04, min error -0.45, max error 1.10, mean 0.083, deviation 0.387 axis0,axis1,min0,max0,min1,max1,radius,spacing0,spacing1,num0,num1 X,Y,0.00,1700.00,0.00,900.00,,10.00,10.00,17,10 0.600, 0.500, 0.400, 0.400, 0.400, 0.400, 0.400, 0.300, 0.300, 0.400, 0.400, 0.500, 0.500, 0.600, 0.700, 0.900, 1.100 0.400, 0.400, 0.300, 0.300, 0.200, 0.200, 0.200, 0.200, 0.200, 0.200, 0.300, 0.350, 0.450, 0.500, 0.700, 0.800, 1.050 0.300, 0.200, 0.200, 0.100, 0.100, 0.100, 0.050, 0.000, 0.000, 0.000, 0.100, 0.200, 0.300, 0.450, 0.600, 0.800, 1.000 0.200, 0.100, 0.000, -0.100, -0.100, -0.100, -0.150, -0.200, -0.200, -0.200, -0.100, -0.100, 0.150, 0.280, 0.450, 0.680, 0.900 0.100, 0.000, -0.100, -0.200, -0.200, -0.300, -0.300, -0.300, -0.220, -0.220, -0.180, -0.050, 0.020, 0.180, 0.400, 0.600, 0.900 0.100, 0.000, -0.100, -0.200, -0.300, -0.400, -0.400, -0.400, -0.300, -0.300, -0.200, -0.150, -0.100, 0.000, 0.280, 0.500, 0.800 0.100, 0.000, -0.150, -0.280, -0.400, -0.450, -0.400, -0.400, -0.200, -0.250, -0.200, -0.200, -0.050, 0.160, 0.400, 0.700, 0.700 0.180, -0.050, -0.200, -0.300, -0.400, -0.400, -0.400, -0.400, -0.400, -0.350, -0.300, -0.250, -0.150, 0.050, 0.300, 0.600, 0.900 0.100, -0.100, -0.200, -0.300, -0.400, -0.400, -0.400, -0.400, -0.380, -0.350, -0.280, -0.200, -0.200, 0.080, 0.250, 0.600, 0.900 0.100, -0.100, -0.280, -0.380, -0.400, -0.440, -0.400, -0.400, -0.380, -0.350, -0.300, -0.280, -0.200, 0.000, 0.200, 0.550, 0.900
I have a difficult time spotting any differences in syntax/structure between mine (above) and the example i posted before, but somehow my map will not load, and the other one will.
With ^ this map i still get the
Error: G29: Failed to load height map from file 0:/sys/heightmap.csv: failed to parse grid parameters -
@sbNielsen The main reason for it not loading is that you need to set radius to -1.
You don't need anything on the first line after "RepRapFirmware height map file v2", if these have been copied from somewhere else and are not accurate.
However, there's also a couple of mistakes. You need 18 X axis points, to go from 0 to 1700mm, other wise it goes from 0 to 1600. Also, the spacing is 100 for both axes, not 10. So first three lines should be:
RepRapFirmware height map file v2 axis0,axis1,min0,max0,min1,max1,radius,spacing0,spacing1,num0,num1 X,Y,0.00,1700.00,0.00,900.00,-1,100.00,100.00,18,10
And you need to add an extra probe point value on each line of the probed points.
Ian
-
Strange, even though I get the error message, that it failed to load, I can still preview the map in the 'height map' tab.
And it corresponds correctly with the coordinates and the expected value.
Does that mean that it is loaded anyway or?
-
@sbNielsen No, the Height Maps plugin just shows the points, it doesn't load it. Use either
G29 S1
or in DWC go to Control > Dashboard > Machine Movement and click on the 'Compensation and Calibration' drop down menu. I guess the plugin parses the file in a different, and less exacting, way from the firmware.Ian
-
@sbNielsen Did you update your firmware from the old release candidate (3.5.0-rc.1++) you are currently running?
Ian
-
Ah yes, you are right!
I corrected the mistakes you pointed out:
RepRapFirmware height map file v2 axis0,axis1,min0,max0,min1,max1,radius,spacing0,spacing1,num0,num1 X,Y,0.00,17000.00,0.00,9000.00,-1.00,100.00,100.00,18,10 0.600, 0.500, 0.400, 0.400, 0.400, 0.400, 0.400, 0.300, 0.300, 0.400, 0.400, 0.500, 0.500, 0.600, 0.700, 0.900, 1.100 0.400, 0.400, 0.300, 0.300, 0.200, 0.200, 0.200, 0.200, 0.200, 0.200, 0.300, 0.350, 0.450, 0.500, 0.700, 0.800, 1.050 0.300, 0.200, 0.200, 0.100, 0.100, 0.100, 0.050, 0.000, 0.000, 0.000, 0.100, 0.200, 0.300, 0.450, 0.600, 0.800, 1.000 0.200, 0.100, 0.000, -0.100, -0.100, -0.100, -0.150, -0.200, -0.200, -0.200, -0.100, -0.100, 0.150, 0.280, 0.450, 0.680, 0.900 0.100, 0.000, -0.100, -0.200, -0.200, -0.300, -0.300, -0.300, -0.220, -0.220, -0.180, -0.050, 0.020, 0.180, 0.400, 0.600, 0.900 0.100, 0.000, -0.100, -0.200, -0.300, -0.400, -0.400, -0.400, -0.300, -0.300, -0.200, -0.150, -0.100, 0.000, 0.280, 0.500, 0.800 0.100, 0.000, -0.150, -0.280, -0.400, -0.450, -0.400, -0.400, -0.200, -0.250, -0.200, -0.200, -0.050, 0.160, 0.400, 0.700, 0.700 0.180, -0.050, -0.200, -0.300, -0.400, -0.400, -0.400, -0.400, -0.400, -0.350, -0.300, -0.250, -0.150, 0.050, 0.300, 0.600, 0.900 0.100, -0.100, -0.200, -0.300, -0.400, -0.400, -0.400, -0.400, -0.380, -0.350, -0.280, -0.200, -0.200, 0.080, 0.250, 0.600, 0.900 0.100, -0.100, -0.280, -0.380, -0.400, -0.440, -0.400, -0.400, -0.380, -0.350, -0.300, -0.280, -0.200, 0.000, 0.200, 0.550, 0.900
Now i get this error message:
Error: G29: Failed to load height map from file 0:/sys/heightmap.csv: number expected at line 3 column 136If i flip the num0, num1 values around so num0=10 and num1=18 I get this error:
Error: G29: Failed to load height map from file 0:/sys/heightmap.csv: failed to read line from file -
@droftarts
No will do it now! -
@droftarts said in Parsing error when loading height map:
@sbNielsen Did you update your firmware from the old release candidate (3.5.0-rc.1++) you are currently running?
Ian
Updated firmware to latest, still getting the error messages described above
-
axis0,axis1,min0,max0,min1,max1,radius,spacing0,spacing1,num0,num1 X,Y,0.00,17000.00,0.00,9000.00,-1.00,100.00,100.00,18,10
You have changed the axis length from 1700mm to 17000mm, and 900mm to 9000mm?! Also, you only have 17 points for each line of the probe data; you need 18 to go to from 0 (the first point) to 1700 (the 18th and last point) in 100mm steps.
Ian
-
@droftarts said in Parsing error when loading height map:
axis0,axis1,min0,max0,min1,max1,radius,spacing0,spacing1,num0,num1 X,Y,0.00,17000.00,0.00,9000.00,-1.00,100.00,100.00,18,10
You have changed the axis length from 1700mm to 17000mm, and 900mm to 9000mm?! Also, you only have 17 points for each line of the probe data; you need 18 to go to from 0 (the first point) to 1700 (the 18th and last point) in 100mm steps.
Ian
Damn it, I change things to quick and then I fuck it up, sorry!
It works now! The main issues was the missing 18th column in the grid..
I feel stupid and happy haha, thank you for your help and patience!
To anybody reading this in the future, here is the .csv file that ended up working:
RepRapFirmware height map file v2 axis0,axis1,min0,max0,min1,max1,radius,spacing0,spacing1,num0,num1 X,Y,0.00,1700.00,0.00,900.00,-1.00,100.00,100.00,18,10 0.600, 0.500, 0.400, 0.400, 0.400, 0.400, 0.400, 0.300, 0.300, 0.400, 0.400, 0.500, 0.500, 0.600, 0.700, 0.900, 1.100, 1.100 0.400, 0.400, 0.300, 0.300, 0.200, 0.200, 0.200, 0.200, 0.200, 0.200, 0.300, 0.350, 0.450, 0.500, 0.700, 0.800, 1.050, 1.050 0.300, 0.200, 0.200, 0.100, 0.100, 0.100, 0.050, 0.000, 0.000, 0.000, 0.100, 0.200, 0.300, 0.450, 0.600, 0.800, 1.000, 1.000 0.200, 0.100, 0.000, -0.100, -0.100, -0.100, -0.150, -0.200, -0.200, -0.200, -0.100, -0.100, 0.150, 0.280, 0.450, 0.680, 0.900, 0.900 0.100, 0.000, -0.100, -0.200, -0.200, -0.300, -0.300, -0.300, -0.220, -0.220, -0.180, -0.050, 0.020, 0.180, 0.400, 0.600, 0.900, 0.900 0.100, 0.000, -0.100, -0.200, -0.300, -0.400, -0.400, -0.400, -0.300, -0.300, -0.200, -0.150, -0.100, 0.000, 0.280, 0.500, 0.800, 0.800 0.100, 0.000, -0.150, -0.280, -0.400, -0.450, -0.400, -0.400, -0.200, -0.250, -0.200, -0.200, -0.050, 0.160, 0.400, 0.700, 0.700, 0.700 0.180, -0.050, -0.200, -0.300, -0.400, -0.400, -0.400, -0.400, -0.400, -0.350, -0.300, -0.250, -0.150, 0.050, 0.300, 0.600, 0.900, 0.900 0.100, -0.100, -0.200, -0.300, -0.400, -0.400, -0.400, -0.400, -0.380, -0.350, -0.280, -0.200, -0.200, 0.080, 0.250, 0.600, 0.900, 0.900 0.100, -0.100, -0.280, -0.380, -0.400, -0.440, -0.400, -0.400, -0.380, -0.350, -0.300, -0.280, -0.200, 0.000, 0.200, 0.550, 0.900, 0.900
-
-