Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Parsing error when loading height map

    Scheduled Pinned Locked Moved Solved
    Tuning and tweaking
    heightmap
    3
    15
    379
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • sbNielsenundefined
      sbNielsen @droftarts
      last edited by

      @droftarts

      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

      droftartsundefined sbNielsenundefined 2 Replies Last reply Reply Quote 0
      • droftartsundefined
        droftarts administrators @sbNielsen
        last edited by droftarts

        @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

        Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

        1 Reply Last reply Reply Quote 0
        • sbNielsenundefined
          sbNielsen
          last edited by

          Screenshot 2024-07-17 at 13.33.39.png

          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?

          droftartsundefined 2 Replies Last reply Reply Quote 0
          • droftartsundefined
            droftarts administrators @sbNielsen
            last edited by

            @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

            Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

            sbNielsenundefined 1 Reply Last reply Reply Quote 0
            • droftartsundefined
              droftarts administrators @sbNielsen
              last edited by

              @sbNielsen Did you update your firmware from the old release candidate (3.5.0-rc.1++) you are currently running?

              Ian

              Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

              sbNielsenundefined 1 Reply Last reply Reply Quote 0
              • sbNielsenundefined
                sbNielsen @sbNielsen
                last edited by

                @sbNielsen

                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 136

                If 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

                droftartsundefined 1 Reply Last reply Reply Quote 0
                • sbNielsenundefined
                  sbNielsen @droftarts
                  last edited by

                  @droftarts
                  No will do it now!

                  1 Reply Last reply Reply Quote 0
                  • sbNielsenundefined
                    sbNielsen @droftarts
                    last edited by

                    @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

                    1 Reply Last reply Reply Quote 0
                    • droftartsundefined
                      droftarts administrators @sbNielsen
                      last edited by

                      @sbNielsen

                      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

                      Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

                      sbNielsenundefined 1 Reply Last reply Reply Quote 0
                      • sbNielsenundefined
                        sbNielsen @droftarts
                        last edited by

                        @droftarts said in Parsing error when loading height map:

                        @sbNielsen

                        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
                        
                        1 Reply Last reply Reply Quote 1
                        • dc42undefined dc42 marked this topic as a question
                        • dc42undefined dc42 has marked this topic as solved
                        • First post
                          Last post
                        Unless otherwise noted, all forum content is licensed under CC-BY-SA