fix pipeline defaults for nozzle runout compensation #739
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When using one of the larger nozzle tips on my LumenPnP v4.0.0 for the first time and trying to do the nozzle runout compensation, I was greeted with a strange looking heatmap and either a badly aligned nozzle tip or errors due to vision misdetects. When taking a closer look, I found the diamater values in the cv-pipeline to be out of place for this nozzle tip. After fixing this, I went through all the other nozzle tips and fixed them all in a consistent manner.
The following table shows the nozzle tips and various diameters in pixels. For my machine I determined 0.0350 mm/px and the template machine.xml lists 0.0368 mm/px. I consider my measurement to be more accurate because of the unknown accuracy of the template file and the general impression that it probably isn't the most accurate. None the less I used 0.0355 mm/px for this calculation, in case I'm a bit off and to slightly reflect the template file.
The fist column lists the previous values from the machine.xml in the cv-pipeline as min/max. The second column contains the nominal diameter based on the above mm/px value. The last row show the values I suggest in this PR, as the nominal value ±10% and rounded to the nearest integer, away from the nominal value.
From this table one can easily see, why vision failed on the larger nozzle tips: DetectCircularSymmetry was looking for symmetry in a pixel range where there is at worst just a black patch.
I don't know if this is the case but one could argue that the larger nozzle tips are detected by their throat, but not only is this out of focus but also offset from the centre in a machine configured with the template file. Therefore I suggest an additional change.
User KevinDWolf brought this to my attention on Dec. 3rd in discord by asking if the slanted nozzle as seen by the bottom camera is something to be concerned with. I noticed myself as well that the bottom camera sees the nozzle tip from the side and moves sideways by a considerable amout, when moving along the z-axis. I was close to disassembling the camera mount but Stephen confirmed there to be a -60 (px?) offset configured in the bottom camera. Although Stargirl and Stephen assured this to not significantly affect things and not actually causing any problems, this offset has no business being there. And I'm not so sure about this not being an issue after all.