Runout Calibration Issue

309 views
Skip to first unread message

Kenny Truong

unread,
Jul 28, 2020, 1:00:04 PM7/28/20
to OpenPnP
Hello,

I am trying to calibrate the nozzle tip following the instructions here: https://github.com/openpnp/openpnp/wiki/Nozzle-Tip-Calibration-Setup

I've adjusted my CV pipeline and seem to be getting good results in the preview window (see picture below) i.e. only 1 circle detected at multiple orientations
Annotation 2020-07-28 114706.png

However, when I attempt to calibrate it seems to fail every time. I have the allowed misdetects set to 5, just 1 below the number of circle divisions to see if I can get even 1 good detect. I also have the offset threshold set to a high number currently to ensure it's not a contributing factor. The fact that not even 1 out of 6 of the images was detected properly makes me think something else may be going on here? If anyone has seen this before let me know, thanks!
Annotation 2020-07-28 115029.png

Log Included Below:
2020-07-28 11:43:22.318 ReferenceHead DEBUG: H1.moveToSafeZ(1.0)
2020-07-28 11:43:22.319 ReferenceNozzle DEBUG: N1.moveToSafeZ(1.0)
2020-07-28 11:43:22.328 ReferenceCamera DEBUG: TopCam.moveToSafeZ(1.0)
2020-07-28 11:43:22.329 ReferenceActuator DEBUG: A1.moveToSafeZ(1.0)
2020-07-28 11:43:22.330 ReferenceNozzle DEBUG: N1.moveTo((22.725000, 14.427000, 10.000000, -180.000000 mm), 1.0)
2020-07-28 11:43:22.358 ReferenceNozzle DEBUG: N1.moveTo((22.725000, 14.427000, 4.000000, -180.000000 mm), 1.0)
2020-07-28 11:43:22.359 GcodeDriver DEBUG: sendCommand(G0   Z-6.0000  F7500 ; Send standard Gcode move, 5000)...
2020-07-28 11:43:22.360 GcodeDriver DEBUG: sendCommand(serial://COM18 G0   Z-6.0000  F7500 ; Send standard Gcode move, 5000) => [ok]
2020-07-28 11:43:22.360 GcodeDriver DEBUG: sendCommand(M400 ; Wait for moves to complete before returning, 5000)...
2020-07-28 11:43:23.686 GcodeDriver DEBUG: sendCommand(serial://COM18 M400 ; Wait for moves to complete before returning, 5000) => [ok]
2020-07-28 11:43:23.687 ReferenceNozzleTipCalibration DEBUG: [nozzleTipCalibration]starting measurement; angleStart: -180.0, angleStop: 180.0, angleIncrement: 60.0, angleSubdivisions: 5
2020-07-28 11:43:23.687 ReferenceNozzleTipCalibration DEBUG: [nozzleTipCalibration]i: 0, measureAngle: -180.0
2020-07-28 11:43:23.687 ReferenceNozzle DEBUG: N1.moveTo((22.725000, 14.427000, 4.000000, -180.000000 mm), 1.0)
2020-07-28 11:43:24.030 ReferenceNozzleTipCalibration DEBUG: [nozzleTipCalibration]i: 1, measureAngle: -120.0
2020-07-28 11:43:24.030 ReferenceNozzle DEBUG: N1.moveTo((22.725000, 14.427000, 4.000000, -120.000000 mm), 1.0)
2020-07-28 11:43:24.031 GcodeDriver DEBUG: sendCommand(G0    E-120.0000 F7500 ; Send standard Gcode move, 5000)...
2020-07-28 11:43:24.031 GcodeDriver DEBUG: sendCommand(serial://COM18 G0    E-120.0000 F7500 ; Send standard Gcode move, 5000) => [ok]
2020-07-28 11:43:24.032 GcodeDriver DEBUG: sendCommand(M400 ; Wait for moves to complete before returning, 5000)...
2020-07-28 11:43:24.758 GcodeDriver DEBUG: sendCommand(serial://COM18 M400 ; Wait for moves to complete before returning, 5000) => [ok]
2020-07-28 11:43:25.093 ReferenceNozzleTipCalibration DEBUG: [nozzleTipCalibration]i: 2, measureAngle: -60.0
2020-07-28 11:43:25.094 ReferenceNozzle DEBUG: N1.moveTo((22.725000, 14.427000, 4.000000, -60.000000 mm), 1.0)
2020-07-28 11:43:25.094 GcodeDriver DEBUG: sendCommand(G0    E-60.0000 F7500 ; Send standard Gcode move, 5000)...
2020-07-28 11:43:25.095 GcodeDriver DEBUG: sendCommand(serial://COM18 G0    E-60.0000 F7500 ; Send standard Gcode move, 5000) => [ok]
2020-07-28 11:43:25.095 GcodeDriver DEBUG: sendCommand(M400 ; Wait for moves to complete before returning, 5000)...
2020-07-28 11:43:25.823 GcodeDriver DEBUG: sendCommand(serial://COM18 M400 ; Wait for moves to complete before returning, 5000) => [ok]
2020-07-28 11:43:26.140 ReferenceNozzleTipCalibration DEBUG: [nozzleTipCalibration]i: 3, measureAngle: 0.0
2020-07-28 11:43:26.140 ReferenceNozzle DEBUG: N1.moveTo((22.725000, 14.427000, 4.000000, 0.000000 mm), 1.0)
2020-07-28 11:43:26.141 GcodeDriver DEBUG: sendCommand(G0    E0.0000 F7500 ; Send standard Gcode move, 5000)...
2020-07-28 11:43:26.142 GcodeDriver DEBUG: sendCommand(serial://COM18 G0    E0.0000 F7500 ; Send standard Gcode move, 5000) => [ok]
2020-07-28 11:43:26.142 GcodeDriver DEBUG: sendCommand(M400 ; Wait for moves to complete before returning, 5000)...
2020-07-28 11:43:26.867 GcodeDriver DEBUG: sendCommand(serial://COM18 M400 ; Wait for moves to complete before returning, 5000) => [ok]
2020-07-28 11:43:27.190 ReferenceNozzleTipCalibration DEBUG: [nozzleTipCalibration]i: 4, measureAngle: 60.0
2020-07-28 11:43:27.191 ReferenceNozzle DEBUG: N1.moveTo((22.725000, 14.427000, 4.000000, 60.000000 mm), 1.0)
2020-07-28 11:43:27.191 GcodeDriver DEBUG: sendCommand(G0    E60.0000 F7500 ; Send standard Gcode move, 5000)...
2020-07-28 11:43:27.192 GcodeDriver DEBUG: sendCommand(serial://COM18 G0    E60.0000 F7500 ; Send standard Gcode move, 5000) => [ok]
2020-07-28 11:43:27.192 GcodeDriver DEBUG: sendCommand(M400 ; Wait for moves to complete before returning, 5000)...
2020-07-28 11:43:27.918 GcodeDriver DEBUG: sendCommand(serial://COM18 M400 ; Wait for moves to complete before returning, 5000) => [ok]
2020-07-28 11:43:28.230 ReferenceNozzleTipCalibration DEBUG: [nozzleTipCalibration]i: 5, measureAngle: 120.0
2020-07-28 11:43:28.231 ReferenceNozzle DEBUG: N1.moveTo((22.725000, 14.427000, 4.000000, 120.000000 mm), 1.0)
2020-07-28 11:43:28.231 GcodeDriver DEBUG: sendCommand(G0    E120.0000 F7500 ; Send standard Gcode move, 5000)...
2020-07-28 11:43:28.232 GcodeDriver DEBUG: sendCommand(serial://COM18 G0    E120.0000 F7500 ; Send standard Gcode move, 5000) => [ok]
2020-07-28 11:43:28.232 GcodeDriver DEBUG: sendCommand(M400 ; Wait for moves to complete before returning, 5000)...
2020-07-28 11:43:28.976 GcodeDriver DEBUG: sendCommand(serial://COM18 M400 ; Wait for moves to complete before returning, 5000) => [ok]
2020-07-28 11:43:29.289 ReferenceNozzle DEBUG: N1.moveTo((22.725000, 14.427000, 4.000000, 180.000000 mm), 1.0)
2020-07-28 11:43:29.289 GcodeDriver DEBUG: sendCommand(G0    E180.0000 F7500 ; Send standard Gcode move, 5000)...
2020-07-28 11:43:29.290 GcodeDriver DEBUG: sendCommand(serial://COM18 G0    E180.0000 F7500 ; Send standard Gcode move, 5000) => [ok]
2020-07-28 11:43:29.290 GcodeDriver DEBUG: sendCommand(M400 ; Wait for moves to complete before returning, 5000)...
2020-07-28 11:43:30.016 GcodeDriver DEBUG: sendCommand(serial://COM18 M400 ; Wait for moves to complete before returning, 5000) => [ok]
2020-07-28 11:43:30.016 ReferenceNozzle DEBUG: N1.moveToSafeZ(1.0)
2020-07-28 11:43:30.016 GcodeDriver DEBUG: sendCommand(G0   Z0.0000  F7500 ; Send standard Gcode move, 5000)...
2020-07-28 11:43:30.017 GcodeDriver DEBUG: sendCommand(serial://COM18 G0   Z0.0000  F7500 ; Send standard Gcode move, 5000) => [ok]
2020-07-28 11:43:30.017 GcodeDriver DEBUG: sendCommand(M400 ; Wait for moves to complete before returning, 5000)...
2020-07-28 11:43:31.344 GcodeDriver DEBUG: sendCommand(serial://COM18 M400 ; Wait for moves to complete before returning, 5000) => [ok]
2020-07-28 11:43:31.353 MessageBoxes DEBUG: Error: java.lang.Exception: Too many vision misdetects. Check pipeline and threshold.

Tony Luken

unread,
Jul 28, 2020, 3:18:55 PM7/28/20
to OpenPnP
Is the nozzle tip being lowered to the correct height?  In your log I see:
2020-07-28 11:43:23.687 ReferenceNozzle DEBUG: N1.moveTo((22.725000, 14.427000, 4.000000, -180.000000 mm), 1.0)
That doesn't seem correct.  It should be lowering the nozzle down to your bottom camera's z position.  You also need to tune the pipeline with the nozzle lowered to that position.  Also your current pipeline doesn't appear to be detecting the center of the nozzle tip.

Tony

Kenny Truong

unread,
Jul 29, 2020, 11:05:29 AM7/29/20
to OpenPnP
I believe the tip is being lowered to the correct height? When calibrating the pipeline I bring the nozzle to the camera by clicking the "Position tool over bottom camera" button which brings the image into focus, and then during the calibration I'm able to see through the bottom camera viewfinder the nozzle drop down into focus and then rotate through the 6 points.

Would this ImageWriteDebug stage be helpful at all in diagnosing this? I've enabled it but I can't seem to find where it outputs the photos.

Annotation 2020-07-29 100310.png

Mike Menci

unread,
Jul 29, 2020, 11:15:02 AM7/29/20
to OpenPnP
Check  under .openpnp2 this two folders

Mike

Kenny Truong

unread,
Jul 29, 2020, 11:23:21 AM7/29/20
to OpenPnP
Thanks, found them.
It seems none of the 6 photos had any circles detected? This seems peculiar as when I've configured the CV pipeline I've tested it with the nozzle at 10 degree increments and it always returns one circle on the tip.
 runoutCalibration1621179621188622146.pngrunoutCalibration1669827482178160797.pngrunoutCalibration2248014888190188533.pngrunoutCalibration7193326893532007729.pngrunoutCalibration9143974654765132860.pngrunoutCalibration799017196910216457.png

Mike Menci

unread,
Jul 29, 2020, 11:51:28 AM7/29/20
to OpenPnP
You will not find Red line circle in this folder .... This is normal.
You should play with the pipline settings until all positions (5 in my case) are recognised by pipline and you get no error not recognizing nozzle.

Mike

Marek T.

unread,
Jul 29, 2020, 12:16:21 PM7/29/20
to OpenPnP
I don't lower nozzle over the camera and calibration works ok.
This is only the pipeline issue probably.

ma...@makr.zone

unread,
Jul 29, 2020, 12:51:39 PM7/29/20
to ope...@googlegroups.com

Have you enabled the full logging level?

If I recall this correctly, I think there are usually more results logged than what I see in the log you copied. They might point to the error.

_Mark

--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/b2ba0b46-961a-4e61-8cd7-166e9bbbe605o%40googlegroups.com.

Kenny Truong

unread,
Jul 29, 2020, 1:01:11 PM7/29/20
to OpenPnP
The global log level was previously at "DEBUG"; I just set it to "TRACE".

"TRACE" Log
2020-07-29 11:59:17.452 Scripting TRACE: Scripting.on NozzleCalibration.Starting
2020-07-29 11:59:17.453 ReferenceHead DEBUG: H1.moveToSafeZ(1.0)
2020-07-29 11:59:17.453 ReferenceNozzle DEBUG: N1.moveToSafeZ(1.0)
2020-07-29 11:59:17.456 ReferenceCamera DEBUG: TopCam.moveToSafeZ(1.0)
2020-07-29 11:59:17.459 ReferenceActuator DEBUG: A1.moveToSafeZ(1.0)
2020-07-29 11:59:17.459 ReferenceNozzle DEBUG: N1.moveTo((22.725000, 14.427000, 10.000000, 3060.000000 mm), 1.0)
2020-07-29 11:59:17.461 ReferenceNozzle DEBUG: N1.moveTo((22.725000, 14.427000, 10.000000, 3060.000000 mm), 1.0)
2020-07-29 11:59:17.463 ReferenceNozzleTipCalibration DEBUG: [nozzleTipCalibration]starting measurement; angleStart: -180.0, angleStop: 180.0, angleIncrement: 60.0, angleSubdivisions: 5
2020-07-29 11:59:17.463 ReferenceNozzleTipCalibration DEBUG: [nozzleTipCalibration]i: 0, measureAngle: -180.0
2020-07-29 11:59:17.463 ReferenceNozzle DEBUG: N1.moveTo((22.725000, 14.427000, 10.000000, 3060.000000 mm), 1.0)
2020-07-29 11:59:17.465 Scripting TRACE: Scripting.on Camera.BeforeSettle
2020-07-29 11:59:17.715 Scripting TRACE: Scripting.on Camera.BeforeCapture
2020-07-29 11:59:17.739 Scripting TRACE: Scripting.on Camera.AfterCapture
2020-07-29 11:59:17.739 Scripting TRACE: Scripting.on Camera.AfterSettle
2020-07-29 11:59:17.791 ReferenceNozzleTipCalibration DEBUG: [nozzleTipCalibration]i: 1, measureAngle: -120.0
2020-07-29 11:59:17.792 ReferenceNozzle DEBUG: N1.moveTo((22.725000, 14.427000, 10.000000, 3120.000000 mm), 1.0)
2020-07-29 11:59:17.792 GcodeDriver DEBUG: sendCommand(G0    E3120.0000 F7500 ; Send standard Gcode move, 5000)...
2020-07-29 11:59:17.792 GcodeDriver TRACE: [serial://COM18] >> G0    E3120.0000 F7500 ; Send standard Gcode move
2020-07-29 11:59:17.793 GcodeDriver TRACE: [serial://COM18] << ok
2020-07-29 11:59:17.803 GcodeDriver DEBUG: sendCommand(serial://COM18 G0    E3120.0000 F7500 ; Send standard Gcode move, 5000) => [ok]
2020-07-29 11:59:17.803 GcodeDriver DEBUG: sendCommand(M400 ; Wait for moves to complete before returning, 5000)...
2020-07-29 11:59:17.804 GcodeDriver TRACE: [serial://COM18] >> M400 ; Wait for moves to complete before returning
2020-07-29 11:59:18.519 GcodeDriver TRACE: [serial://COM18] << ok
2020-07-29 11:59:18.520 GcodeDriver DEBUG: sendCommand(serial://COM18 M400 ; Wait for moves to complete before returning, 5000) => [ok]
2020-07-29 11:59:18.520 Scripting TRACE: Scripting.on Camera.BeforeSettle
2020-07-29 11:59:18.771 Scripting TRACE: Scripting.on Camera.BeforeCapture
2020-07-29 11:59:18.792 Scripting TRACE: Scripting.on Camera.AfterCapture
2020-07-29 11:59:18.795 Scripting TRACE: Scripting.on Camera.AfterSettle
2020-07-29 11:59:18.843 ReferenceNozzleTipCalibration DEBUG: [nozzleTipCalibration]i: 2, measureAngle: -60.0
2020-07-29 11:59:18.844 ReferenceNozzle DEBUG: N1.moveTo((22.725000, 14.427000, 10.000000, 3180.000000 mm), 1.0)
2020-07-29 11:59:18.844 GcodeDriver DEBUG: sendCommand(G0    E3180.0000 F7500 ; Send standard Gcode move, 5000)...
2020-07-29 11:59:18.844 GcodeDriver TRACE: [serial://COM18] >> G0    E3180.0000 F7500 ; Send standard Gcode move
2020-07-29 11:59:18.845 GcodeDriver TRACE: [serial://COM18] << ok
2020-07-29 11:59:18.845 GcodeDriver DEBUG: sendCommand(serial://COM18 G0    E3180.0000 F7500 ; Send standard Gcode move, 5000) => [ok]
2020-07-29 11:59:18.845 GcodeDriver DEBUG: sendCommand(M400 ; Wait for moves to complete before returning, 5000)...
2020-07-29 11:59:18.845 GcodeDriver TRACE: [serial://COM18] >> M400 ; Wait for moves to complete before returning
2020-07-29 11:59:19.571 GcodeDriver TRACE: [serial://COM18] << ok
2020-07-29 11:59:19.571 GcodeDriver DEBUG: sendCommand(serial://COM18 M400 ; Wait for moves to complete before returning, 5000) => [ok]
2020-07-29 11:59:19.572 Scripting TRACE: Scripting.on Camera.BeforeSettle
2020-07-29 11:59:19.822 Scripting TRACE: Scripting.on Camera.BeforeCapture
2020-07-29 11:59:19.848 Scripting TRACE: Scripting.on Camera.AfterCapture
2020-07-29 11:59:19.849 Scripting TRACE: Scripting.on Camera.AfterSettle
2020-07-29 11:59:19.906 ReferenceNozzleTipCalibration DEBUG: [nozzleTipCalibration]i: 3, measureAngle: 0.0
2020-07-29 11:59:19.906 ReferenceNozzle DEBUG: N1.moveTo((22.725000, 14.427000, 10.000000, 3240.000000 mm), 1.0)
2020-07-29 11:59:19.907 GcodeDriver DEBUG: sendCommand(G0    E3240.0000 F7500 ; Send standard Gcode move, 5000)...
2020-07-29 11:59:19.907 GcodeDriver TRACE: [serial://COM18] >> G0    E3240.0000 F7500 ; Send standard Gcode move
2020-07-29 11:59:19.907 GcodeDriver TRACE: [serial://COM18] << ok
2020-07-29 11:59:19.908 GcodeDriver DEBUG: sendCommand(serial://COM18 G0    E3240.0000 F7500 ; Send standard Gcode move, 5000) => [ok]
2020-07-29 11:59:19.908 GcodeDriver DEBUG: sendCommand(M400 ; Wait for moves to complete before returning, 5000)...
2020-07-29 11:59:19.908 GcodeDriver TRACE: [serial://COM18] >> M400 ; Wait for moves to complete before returning
2020-07-29 11:59:20.635 GcodeDriver TRACE: [serial://COM18] << ok
2020-07-29 11:59:20.635 GcodeDriver DEBUG: sendCommand(serial://COM18 M400 ; Wait for moves to complete before returning, 5000) => [ok]
2020-07-29 11:59:20.635 Scripting TRACE: Scripting.on Camera.BeforeSettle
2020-07-29 11:59:20.885 Scripting TRACE: Scripting.on Camera.BeforeCapture
2020-07-29 11:59:20.909 Scripting TRACE: Scripting.on Camera.AfterCapture
2020-07-29 11:59:20.910 Scripting TRACE: Scripting.on Camera.AfterSettle
2020-07-29 11:59:20.960 ReferenceNozzleTipCalibration DEBUG: [nozzleTipCalibration]i: 4, measureAngle: 60.0
2020-07-29 11:59:20.961 ReferenceNozzle DEBUG: N1.moveTo((22.725000, 14.427000, 10.000000, 3300.000000 mm), 1.0)
2020-07-29 11:59:20.962 GcodeDriver DEBUG: sendCommand(G0    E3300.0000 F7500 ; Send standard Gcode move, 5000)...
2020-07-29 11:59:20.962 GcodeDriver TRACE: [serial://COM18] >> G0    E3300.0000 F7500 ; Send standard Gcode move
2020-07-29 11:59:20.971 GcodeDriver TRACE: [serial://COM18] << ok
2020-07-29 11:59:20.971 GcodeDriver DEBUG: sendCommand(serial://COM18 G0    E3300.0000 F7500 ; Send standard Gcode move, 5000) => [ok]
2020-07-29 11:59:20.971 GcodeDriver DEBUG: sendCommand(M400 ; Wait for moves to complete before returning, 5000)...
2020-07-29 11:59:20.971 GcodeDriver TRACE: [serial://COM18] >> M400 ; Wait for moves to complete before returning
2020-07-29 11:59:21.697 GcodeDriver TRACE: [serial://COM18] << ok
2020-07-29 11:59:21.697 GcodeDriver DEBUG: sendCommand(serial://COM18 M400 ; Wait for moves to complete before returning, 5000) => [ok]
2020-07-29 11:59:21.697 Scripting TRACE: Scripting.on Camera.BeforeSettle
2020-07-29 11:59:21.949 Scripting TRACE: Scripting.on Camera.BeforeCapture
2020-07-29 11:59:21.999 Scripting TRACE: Scripting.on Camera.AfterCapture
2020-07-29 11:59:21.999 Scripting TRACE: Scripting.on Camera.AfterSettle
2020-07-29 11:59:22.072 ReferenceNozzleTipCalibration DEBUG: [nozzleTipCalibration]i: 5, measureAngle: 120.0
2020-07-29 11:59:22.075 ReferenceNozzle DEBUG: N1.moveTo((22.725000, 14.427000, 10.000000, 3360.000000 mm), 1.0)
2020-07-29 11:59:22.075 GcodeDriver DEBUG: sendCommand(G0    E3360.0000 F7500 ; Send standard Gcode move, 5000)...
2020-07-29 11:59:22.076 GcodeDriver TRACE: [serial://COM18] >> G0    E3360.0000 F7500 ; Send standard Gcode move
2020-07-29 11:59:22.076 GcodeDriver TRACE: [serial://COM18] << ok
2020-07-29 11:59:22.076 GcodeDriver DEBUG: sendCommand(serial://COM18 G0    E3360.0000 F7500 ; Send standard Gcode move, 5000) => [ok]
2020-07-29 11:59:22.077 GcodeDriver DEBUG: sendCommand(M400 ; Wait for moves to complete before returning, 5000)...
2020-07-29 11:59:22.077 GcodeDriver TRACE: [serial://COM18] >> M400 ; Wait for moves to complete before returning
2020-07-29 11:59:22.802 GcodeDriver TRACE: [serial://COM18] << ok
2020-07-29 11:59:22.803 GcodeDriver DEBUG: sendCommand(serial://COM18 M400 ; Wait for moves to complete before returning, 5000) => [ok]
2020-07-29 11:59:22.804 Scripting TRACE: Scripting.on Camera.BeforeSettle
2020-07-29 11:59:23.055 Scripting TRACE: Scripting.on Camera.BeforeCapture
2020-07-29 11:59:23.106 Scripting TRACE: Scripting.on Camera.AfterCapture
2020-07-29 11:59:23.107 Scripting TRACE: Scripting.on Camera.AfterSettle
2020-07-29 11:59:23.182 ReferenceNozzle DEBUG: N1.moveTo((22.725000, 14.427000, 10.000000, 3420.000000 mm), 1.0)
2020-07-29 11:59:23.183 GcodeDriver DEBUG: sendCommand(G0    E3420.0000 F7500 ; Send standard Gcode move, 5000)...
2020-07-29 11:59:23.183 GcodeDriver TRACE: [serial://COM18] >> G0    E3420.0000 F7500 ; Send standard Gcode move
2020-07-29 11:59:23.184 GcodeDriver TRACE: [serial://COM18] << ok
2020-07-29 11:59:23.184 GcodeDriver DEBUG: sendCommand(serial://COM18 G0    E3420.0000 F7500 ; Send standard Gcode move, 5000) => [ok]
2020-07-29 11:59:23.184 GcodeDriver DEBUG: sendCommand(M400 ; Wait for moves to complete before returning, 5000)...
2020-07-29 11:59:23.184 GcodeDriver TRACE: [serial://COM18] >> M400 ; Wait for moves to complete before returning
2020-07-29 11:59:23.911 GcodeDriver TRACE: [serial://COM18] << ok
2020-07-29 11:59:23.911 GcodeDriver DEBUG: sendCommand(serial://COM18 M400 ; Wait for moves to complete before returning, 5000) => [ok]
2020-07-29 11:59:23.911 ReferenceNozzle DEBUG: N1.moveToSafeZ(1.0)
2020-07-29 11:59:23.913 MessageBoxes DEBUG: Error: java.lang.Exception: Too many vision misdetects. Check pipeline and threshold.


ma...@makr.zone

unread,
Jul 29, 2020, 1:27:18 PM7/29/20
to ope...@googlegroups.com

Hmmm... at least we now know for sure, that in deed there are no circles detected at all, otherwise it would log a trace (too many, too far out).

There seems to be a slight difference when you are in Pipeline Edit vs. when calibration runs.

The only thing that come to mind that might be different is CameraSettling (the nozzle is not moving/vibrating as much) and/or Lighting (if you switch them at all):

https://github.com/openpnp/openpnp/wiki/Camera-Settling

https://github.com/openpnp/openpnp/wiki/Scripting#CameraBeforeSettle

The Pipeline might be unstable if your thresholds are very "borderline". Try experimenting with the HoughCircle parameters. 

You can also experiment with a real calibration "action" image by debug writing the captured image (without any stages applied) and then loading that image in the Pipeline Editor by temporarily inserting/enabling a LoadImage stage and disabling the CaptureImage stage.

_Mark

Tony Luken

unread,
Jul 29, 2020, 1:29:17 PM7/29/20
to OpenPnP
Mike,

Are you sure?   I think with the pipeline shown the red circles should be in the debug images (the DrawCircles stage is before the ImageWriteDebug stage).  My pipeline isn't exactly the same so I use DrawKeyPoints instead of DrawCircles (just before the ImageWriteDebug stage) and the keyPoints do appear in the debug images.

Tony

Kenny Truong

unread,
Jul 29, 2020, 1:44:15 PM7/29/20
to OpenPnP
Interestingly, the red circles appear in the debug images if I go into the pipeline editor, but don't appear when the images are taken during calibration.
This seems to support Mark's idea that somehow something very different is happening in the pipeline editor vs. during the actual calibration.

Mike Menci

unread,
Jul 29, 2020, 3:22:32 PM7/29/20
to OpenPnP
Tony No to first folder and
Yes to second folder
Mike
runoutCalibration4714077498229371540.png
runoutCalibration4980455621903995520.png
VisionFolders.openpnp2.png

Kenny Truong

unread,
Aug 3, 2020, 12:16:19 PM8/3/20
to OpenPnP
Still struggling with this issue, my debug images don't contain any detected points when the pipeline is called through the calibration, but the points appear just fine when I'm inside the pipeline editor.
I've posted an image of my pipeline below, if anyone else has a known-good pipeline for nozzle runout calibration could they share it as well?Annotation 2020-08-03 111541.png

Marek T.

unread,
Aug 3, 2020, 12:25:24 PM8/3/20
to OpenPnP
                           <pipeline>
                              <stages>
                                 <cv-stage class="org.openpnp.vision.pipeline.stages.ImageCapture" name="9" enabled="true" settle-first="true"/>
                                 <cv-stage class="org.openpnp.vision.pipeline.stages.ConvertColor" name="1" enabled="true" conversion="Bgr2Gray"/>
                                 <cv-stage class="org.openpnp.vision.pipeline.stages.BlurMedian" name="4" enabled="true" kernel-size="3"/>
                                 <cv-stage class="org.openpnp.vision.pipeline.stages.MaskCircle" name="3" enabled="true" diameter="200"/>
                                 <cv-stage class="org.openpnp.vision.pipeline.stages.Threshold" name="2" enabled="true" threshold="190" auto="true" invert="false"/>
                                 <cv-stage class="org.openpnp.vision.pipeline.stages.MaskCircle" name="5" enabled="true" diameter="100"/>
                                 <cv-stage class="org.openpnp.vision.pipeline.stages.SimpleBlobDetector" name="results" enabled="true" threshold-step="10.0" threshold-min="50.0" threshold-max="220.0" repeatability="2" dist-between-blobs="10.0" color="true" color-value="0.0" area="true" area-min="25.0" area-max="5000.0" circularity="false" circularity-min="0.800000011920929" circularity-max="-1.0" inertia="true" inertia-ratio-min="0.10000000149011612" inertia-ratio-max="-1.0" convexity="true" convexity-min="0.949999988079071" convexity-max="-1.0"/>
                                 <cv-stage class="org.openpnp.vision.pipeline.stages.ImageRecall" name="0" enabled="true" image-stage-name="9"/>
                                 <cv-stage class="org.openpnp.vision.pipeline.stages.DrawKeyPoints" name="7" enabled="true" key-points-stage-name="results">
                                    <color r="255" g="0" b="204" a="255"/>
                                 </cv-stage>
                              </stages>

Marmelade

unread,
Aug 3, 2020, 2:22:49 PM8/3/20
to OpenPnP
Hi Kenny,

Maybe your light is not perfect - i do not have all this shiny reflections.

Try to detect the inner circle, because it is more black than the rest.
Adjust mask diameter, threshold and circle diameters for every nozzle size.

<cv-pipeline id="PL1566159705964" name="NT502">
   <stages>
     
<cv-stage class="org.openpnp.vision.pipeline.stages.ImageCapture" name="1" enabled="true" settle-first="true"/>
     
<cv-stage class="org.openpnp.vision.pipeline.stages.MaskCircle" name="2" enabled="true" diameter="100"/>
     
<cv-stage class="org.openpnp.vision.pipeline.stages.ConvertColor" name="3" enabled="true" conversion="Rgb2Gray"/>
     
<cv-stage class="org.openpnp.vision.pipeline.stages.BlurMedian" name="4" enabled="true" kernel-size="5"/>
     
<cv-stage class="org.openpnp.vision.pipeline.stages.Threshold" name="5" enabled="true" threshold="45" auto="false" invert="false"/>
     
<cv-stage class="org.openpnp.vision.pipeline.stages.DetectCirclesHough" name="results" enabled="true" min-distance="100" min-diameter="42" max-diameter="45" dp="1.0" param-1="120.0" param-2="5.0"/>
     
<cv-stage class="org.openpnp.vision.pipeline.stages.ImageRecall" name="7" enabled="true" image-stage-name="2"/>
     
<cv-stage class="org.openpnp.vision.pipeline.stages.DrawCircles" name="8" enabled="true" circles-stage-name="results" thickness="2">
         
<color r="255" g="255" b="0" a="255"/>
         
<center-color r="255" g="0" b="0" a="255"/>
     
</cv-stage>
   
</stages>
</cv-pipeline>

Kenny Truong

unread,
Aug 7, 2020, 3:22:42 PM8/7/20
to OpenPnP
I've attached a video of my process, maybe this will be helpful.

I've added bottom lighting now but the calibration is still failing 6 out of 6 positions, and yet when going into the pipeline editor it seems to work just fine.
The debug images from the calibration don't contain any of the detected circles while the debug images from the editor do, otherwise the images seem identical. (e.g. good lighting, focus)
Any more ideas? It doesn't seem to be an issue with the CV pipeline as even if it isn't perfect it seems unlikely it would fail 6/6 during calibration and then work nearly 100% of the time inside the editor itself?

Any help/ideas appreciated, thanks!

Log Below:

2020-08-07 14:12:04.140 Scripting TRACE: Scripting.on NozzleCalibration.Starting
2020-08-07 14:12:04.141 ReferenceHead DEBUG: H1.moveToSafeZ(1.0)
2020-08-07 14:12:04.141 ReferenceNozzle DEBUG: N1.moveToSafeZ(1.0)
2020-08-07 14:12:04.142 ReferenceCamera DEBUG: DownLookCam.moveToSafeZ(1.0)
2020-08-07 14:12:04.142 ReferenceActuator DEBUG: vacAct.moveToSafeZ(1.0)
2020-08-07 14:12:04.143 ReferenceNozzle DEBUG: N1.moveTo((-14.534000, 15.610000, 5.600000, -540.000000 mm), 1.0)
2020-08-07 14:12:04.143 GcodeDriver DEBUG: sendCommand(G0    E-540.0000 F5000 ; Send standard Gcode move, 5000)...
2020-08-07 14:12:04.144 GcodeDriver TRACE: [serial://COM18] >> G0    E-540.0000 F5000 ; Send standard Gcode move
2020-08-07 14:12:04.145 GcodeDriver TRACE: [serial://COM18] << ok
2020-08-07 14:12:04.145 GcodeDriver DEBUG: sendCommand(serial://COM18 G0    E-540.0000 F5000 ; Send standard Gcode move, 5000) => [ok]
2020-08-07 14:12:04.146 GcodeDriver DEBUG: sendCommand(M400 ; Wait for moves to complete before returning, 5000)...
2020-08-07 14:12:04.146 GcodeDriver TRACE: [serial://COM18] >> M400 ; Wait for moves to complete before returning
2020-08-07 14:12:06.145 GcodeDriver TRACE: [serial://COM18] << echo:busy: processing
2020-08-07 14:12:06.428 GcodeDriver TRACE: [serial://COM18] << ok
2020-08-07 14:12:06.428 GcodeDriver DEBUG: sendCommand(serial://COM18 M400 ; Wait for moves to complete before returning, 5000) => [echo:busy: processing, ok]
2020-08-07 14:12:06.429 ReferenceNozzle DEBUG: N1.moveTo((-14.534000, 15.610000, 5.600000, -540.000000 mm), 1.0)
2020-08-07 14:12:06.429 ReferenceNozzleTipCalibration DEBUG: [nozzleTipCalibration]starting measurement; angleStart: -180.0, angleStop: 180.0, angleIncrement: 60.0, angleSubdivisions: 5
2020-08-07 14:12:06.429 ReferenceNozzleTipCalibration DEBUG: [nozzleTipCalibration]i: 0, measureAngle: -180.0
2020-08-07 14:12:06.430 ReferenceNozzle DEBUG: N1.moveTo((-14.534000, 15.610000, 5.600000, -540.000000 mm), 1.0)
2020-08-07 14:12:06.431 Scripting TRACE: Scripting.on Camera.BeforeSettle
2020-08-07 14:12:06.681 Scripting TRACE: Scripting.on Camera.BeforeCapture
2020-08-07 14:12:06.727 Scripting TRACE: Scripting.on Camera.AfterCapture
2020-08-07 14:12:06.727 Scripting TRACE: Scripting.on Camera.AfterSettle
2020-08-07 14:12:06.798 ReferenceNozzleTipCalibration DEBUG: [nozzleTipCalibration]i: 1, measureAngle: -120.0
2020-08-07 14:12:06.798 ReferenceNozzle DEBUG: N1.moveTo((-14.534000, 15.610000, 5.600000, -480.000000 mm), 1.0)
2020-08-07 14:12:06.798 GcodeDriver DEBUG: sendCommand(G0    E-480.0000 F5000 ; Send standard Gcode move, 5000)...
2020-08-07 14:12:06.798 GcodeDriver TRACE: [serial://COM18] >> G0    E-480.0000 F5000 ; Send standard Gcode move
2020-08-07 14:12:06.799 GcodeDriver TRACE: [serial://COM18] << ok
2020-08-07 14:12:06.799 GcodeDriver DEBUG: sendCommand(serial://COM18 G0    E-480.0000 F5000 ; Send standard Gcode move, 5000) => [ok]
2020-08-07 14:12:06.799 GcodeDriver DEBUG: sendCommand(M400 ; Wait for moves to complete before returning, 5000)...
2020-08-07 14:12:06.799 GcodeDriver TRACE: [serial://COM18] >> M400 ; Wait for moves to complete before returning
2020-08-07 14:12:07.642 GcodeDriver TRACE: [serial://COM18] << ok
2020-08-07 14:12:07.643 GcodeDriver DEBUG: sendCommand(serial://COM18 M400 ; Wait for moves to complete before returning, 5000) => [ok]
2020-08-07 14:12:07.643 Scripting TRACE: Scripting.on Camera.BeforeSettle
2020-08-07 14:12:07.894 Scripting TRACE: Scripting.on Camera.BeforeCapture
2020-08-07 14:12:07.944 Scripting TRACE: Scripting.on Camera.AfterCapture
2020-08-07 14:12:07.945 Scripting TRACE: Scripting.on Camera.AfterSettle
2020-08-07 14:12:08.031 ReferenceNozzleTipCalibration DEBUG: [nozzleTipCalibration]i: 2, measureAngle: -60.0
2020-08-07 14:12:08.031 ReferenceNozzle DEBUG: N1.moveTo((-14.534000, 15.610000, 5.600000, -420.000000 mm), 1.0)
2020-08-07 14:12:08.031 GcodeDriver DEBUG: sendCommand(G0    E-420.0000 F5000 ; Send standard Gcode move, 5000)...
2020-08-07 14:12:08.032 GcodeDriver TRACE: [serial://COM18] >> G0    E-420.0000 F5000 ; Send standard Gcode move
2020-08-07 14:12:08.033 GcodeDriver TRACE: [serial://COM18] << ok
2020-08-07 14:12:08.033 GcodeDriver DEBUG: sendCommand(serial://COM18 G0    E-420.0000 F5000 ; Send standard Gcode move, 5000) => [ok]
2020-08-07 14:12:08.033 GcodeDriver DEBUG: sendCommand(M400 ; Wait for moves to complete before returning, 5000)...
2020-08-07 14:12:08.033 GcodeDriver TRACE: [serial://COM18] >> M400 ; Wait for moves to complete before returning
2020-08-07 14:12:08.874 GcodeDriver TRACE: [serial://COM18] << ok
2020-08-07 14:12:08.874 GcodeDriver DEBUG: sendCommand(serial://COM18 M400 ; Wait for moves to complete before returning, 5000) => [ok]
2020-08-07 14:12:08.875 Scripting TRACE: Scripting.on Camera.BeforeSettle
2020-08-07 14:12:09.126 Scripting TRACE: Scripting.on Camera.BeforeCapture
2020-08-07 14:12:09.149 Scripting TRACE: Scripting.on Camera.AfterCapture
2020-08-07 14:12:09.150 Scripting TRACE: Scripting.on Camera.AfterSettle
2020-08-07 14:12:09.208 ReferenceNozzleTipCalibration DEBUG: [nozzleTipCalibration]i: 3, measureAngle: 0.0
2020-08-07 14:12:09.208 ReferenceNozzle DEBUG: N1.moveTo((-14.534000, 15.610000, 5.600000, -360.000000 mm), 1.0)
2020-08-07 14:12:09.208 GcodeDriver DEBUG: sendCommand(G0    E-360.0000 F5000 ; Send standard Gcode move, 5000)...
2020-08-07 14:12:09.208 GcodeDriver TRACE: [serial://COM18] >> G0    E-360.0000 F5000 ; Send standard Gcode move
2020-08-07 14:12:09.209 GcodeDriver TRACE: [serial://COM18] << ok
2020-08-07 14:12:09.210 GcodeDriver DEBUG: sendCommand(serial://COM18 G0    E-360.0000 F5000 ; Send standard Gcode move, 5000) => [ok]
2020-08-07 14:12:09.210 GcodeDriver DEBUG: sendCommand(M400 ; Wait for moves to complete before returning, 5000)...
2020-08-07 14:12:09.211 GcodeDriver TRACE: [serial://COM18] >> M400 ; Wait for moves to complete before returning
2020-08-07 14:12:10.053 GcodeDriver TRACE: [serial://COM18] << ok
2020-08-07 14:12:10.053 GcodeDriver DEBUG: sendCommand(serial://COM18 M400 ; Wait for moves to complete before returning, 5000) => [ok]
2020-08-07 14:12:10.053 Scripting TRACE: Scripting.on Camera.BeforeSettle
2020-08-07 14:12:10.305 Scripting TRACE: Scripting.on Camera.BeforeCapture
2020-08-07 14:12:10.331 Scripting TRACE: Scripting.on Camera.AfterCapture
2020-08-07 14:12:10.332 Scripting TRACE: Scripting.on Camera.AfterSettle
2020-08-07 14:12:10.389 ReferenceNozzleTipCalibration DEBUG: [nozzleTipCalibration]i: 4, measureAngle: 60.0
2020-08-07 14:12:10.389 ReferenceNozzle DEBUG: N1.moveTo((-14.534000, 15.610000, 5.600000, -300.000000 mm), 1.0)
2020-08-07 14:12:10.389 GcodeDriver DEBUG: sendCommand(G0    E-300.0000 F5000 ; Send standard Gcode move, 5000)...
2020-08-07 14:12:10.389 GcodeDriver TRACE: [serial://COM18] >> G0    E-300.0000 F5000 ; Send standard Gcode move
2020-08-07 14:12:10.390 GcodeDriver TRACE: [serial://COM18] << ok
2020-08-07 14:12:10.390 GcodeDriver DEBUG: sendCommand(serial://COM18 G0    E-300.0000 F5000 ; Send standard Gcode move, 5000) => [ok]
2020-08-07 14:12:10.390 GcodeDriver DEBUG: sendCommand(M400 ; Wait for moves to complete before returning, 5000)...
2020-08-07 14:12:10.390 GcodeDriver TRACE: [serial://COM18] >> M400 ; Wait for moves to complete before returning
2020-08-07 14:12:11.232 GcodeDriver TRACE: [serial://COM18] << ok
2020-08-07 14:12:11.233 GcodeDriver DEBUG: sendCommand(serial://COM18 M400 ; Wait for moves to complete before returning, 5000) => [ok]
2020-08-07 14:12:11.233 Scripting TRACE: Scripting.on Camera.BeforeSettle
2020-08-07 14:12:11.483 Scripting TRACE: Scripting.on Camera.BeforeCapture
2020-08-07 14:12:11.541 Scripting TRACE: Scripting.on Camera.AfterCapture
2020-08-07 14:12:11.542 Scripting TRACE: Scripting.on Camera.AfterSettle
2020-08-07 14:12:11.595 ReferenceNozzleTipCalibration DEBUG: [nozzleTipCalibration]i: 5, measureAngle: 120.0
2020-08-07 14:12:11.595 ReferenceNozzle DEBUG: N1.moveTo((-14.534000, 15.610000, 5.600000, -240.000000 mm), 1.0)
2020-08-07 14:12:11.595 GcodeDriver DEBUG: sendCommand(G0    E-240.0000 F5000 ; Send standard Gcode move, 5000)...
2020-08-07 14:12:11.595 GcodeDriver TRACE: [serial://COM18] >> G0    E-240.0000 F5000 ; Send standard Gcode move
2020-08-07 14:12:11.596 GcodeDriver TRACE: [serial://COM18] << ok
2020-08-07 14:12:11.596 GcodeDriver DEBUG: sendCommand(serial://COM18 G0    E-240.0000 F5000 ; Send standard Gcode move, 5000) => [ok]
2020-08-07 14:12:11.596 GcodeDriver DEBUG: sendCommand(M400 ; Wait for moves to complete before returning, 5000)...
2020-08-07 14:12:11.597 GcodeDriver TRACE: [serial://COM18] >> M400 ; Wait for moves to complete before returning
2020-08-07 14:12:12.437 GcodeDriver TRACE: [serial://COM18] << ok
2020-08-07 14:12:12.438 GcodeDriver DEBUG: sendCommand(serial://COM18 M400 ; Wait for moves to complete before returning, 5000) => [ok]
2020-08-07 14:12:12.438 Scripting TRACE: Scripting.on Camera.BeforeSettle
2020-08-07 14:12:12.689 Scripting TRACE: Scripting.on Camera.BeforeCapture
2020-08-07 14:12:12.738 Scripting TRACE: Scripting.on Camera.AfterCapture
2020-08-07 14:12:12.739 Scripting TRACE: Scripting.on Camera.AfterSettle
2020-08-07 14:12:12.808 ReferenceNozzle DEBUG: N1.moveTo((-14.534000, 15.610000, 5.600000, -180.000000 mm), 1.0)
2020-08-07 14:12:12.808 GcodeDriver DEBUG: sendCommand(G0    E-180.0000 F5000 ; Send standard Gcode move, 5000)...
2020-08-07 14:12:12.808 GcodeDriver TRACE: [serial://COM18] >> G0    E-180.0000 F5000 ; Send standard Gcode move
2020-08-07 14:12:12.809 GcodeDriver TRACE: [serial://COM18] << ok
2020-08-07 14:12:12.809 GcodeDriver DEBUG: sendCommand(serial://COM18 G0    E-180.0000 F5000 ; Send standard Gcode move, 5000) => [ok]
2020-08-07 14:12:12.809 GcodeDriver DEBUG: sendCommand(M400 ; Wait for moves to complete before returning, 5000)...
2020-08-07 14:12:12.809 GcodeDriver TRACE: [serial://COM18] >> M400 ; Wait for moves to complete before returning
2020-08-07 14:12:13.652 GcodeDriver TRACE: [serial://COM18] << ok
2020-08-07 14:12:13.652 GcodeDriver DEBUG: sendCommand(serial://COM18 M400 ; Wait for moves to complete before returning, 5000) => [ok]
2020-08-07 14:12:13.653 ReferenceNozzle DEBUG: N1.moveToSafeZ(1.0)
2020-08-07 14:12:13.659 MessageBoxes DEBUG: Error: java.lang.Exception: Too many vision misdetects. Check pipeline and threshold.
2020-08-07 14:12:42.004 Scripting TRACE: Scripting.on Camera.BeforeSettle
2020-08-07 14:12:42.255 Scripting TRACE: Scripting.on Camera.BeforeCapture
2020-08-07 14:12:42.282 Scripting TRACE: Scripting.on Camera.AfterCapture
2020-08-07 14:12:42.283 Scripting TRACE: Scripting.on Camera.AfterSettle
2020-08-07 14:12:48.411 Scripting TRACE: Scripting.on Camera.BeforeSettle
2020-08-07 14:12:48.661 Scripting TRACE: Scripting.on Camera.BeforeCapture
2020-08-07 14:12:48.687 Scripting TRACE: Scripting.on Camera.AfterCapture
2020-08-07 14:12:48.688 Scripting TRACE: Scripting.on Camera.AfterSettle
2020-08-07 14:12:49.171 Scripting TRACE: Scripting.on Camera.BeforeSettle
2020-08-07 14:12:49.421 Scripting TRACE: Scripting.on Camera.BeforeCapture
2020-08-07 14:12:49.456 Scripting TRACE: Scripting.on Camera.AfterCapture
2020-08-07 14:12:49.457 Scripting TRACE: Scripting.on Camera.AfterSettle
2020-08-07 14:12:49.915 Scripting TRACE: Scripting.on Camera.BeforeSettle
2020-08-07 14:12:50.166 Scripting TRACE: Scripting.on Camera.BeforeCapture
2020-08-07 14:12:50.209 Scripting TRACE: Scripting.on Camera.AfterCapture
2020-08-07 14:12:50.210 Scripting TRACE: Scripting.on Camera.AfterSettle
2020-08-07 14:12:52.915 ReferenceNozzle DEBUG: N1.moveTo((-14.534000, 15.610000, 5.600000, -280.000000 mm), 1.0)
2020-08-07 14:12:52.915 GcodeDriver DEBUG: sendCommand(G0    E-280.0000 F5000 ; Send standard Gcode move, 5000)...
2020-08-07 14:12:52.915 GcodeDriver TRACE: [serial://COM18] >> G0    E-280.0000 F5000 ; Send standard Gcode move
2020-08-07 14:12:52.916 GcodeDriver TRACE: [serial://COM18] << ok
2020-08-07 14:12:52.916 GcodeDriver DEBUG: sendCommand(serial://COM18 G0    E-280.0000 F5000 ; Send standard Gcode move, 5000) => [ok]
2020-08-07 14:12:52.916 GcodeDriver DEBUG: sendCommand(M400 ; Wait for moves to complete before returning, 5000)...
2020-08-07 14:12:52.916 GcodeDriver TRACE: [serial://COM18] >> M400 ; Wait for moves to complete before returning
2020-08-07 14:12:54.238 GcodeDriver TRACE: [serial://COM18] << ok
2020-08-07 14:12:54.239 GcodeDriver DEBUG: sendCommand(serial://COM18 M400 ; Wait for moves to complete before returning, 5000) => [ok]
2020-08-07 14:12:55.986 Scripting TRACE: Scripting.on Camera.BeforeSettle
2020-08-07 14:12:56.237 Scripting TRACE: Scripting.on Camera.BeforeCapture
2020-08-07 14:12:56.262 Scripting TRACE: Scripting.on Camera.AfterCapture
2020-08-07 14:12:56.263 Scripting TRACE: Scripting.on Camera.AfterSettle
2020-08-07 14:12:56.802 Scripting TRACE: Scripting.on Camera.BeforeSettle
2020-08-07 14:12:57.053 Scripting TRACE: Scripting.on Camera.BeforeCapture
2020-08-07 14:12:57.069 Scripting TRACE: Scripting.on Camera.AfterCapture
2020-08-07 14:12:57.070 Scripting TRACE: Scripting.on Camera.AfterSettle
2020-08-07 14:12:57.787 Scripting TRACE: Scripting.on Camera.BeforeSettle
2020-08-07 14:12:58.038 Scripting TRACE: Scripting.on Camera.BeforeCapture
2020-08-07 14:12:58.080 Scripting TRACE: Scripting.on Camera.AfterCapture
2020-08-07 14:12:58.081 Scripting TRACE: Scripting.on Camera.AfterSettle
2020-08-07 14:12:58.603 Scripting TRACE: Scripting.on Camera.BeforeSettle
2020-08-07 14:12:58.853 Scripting TRACE: Scripting.on Camera.BeforeCapture
2020-08-07 14:12:58.868 Scripting TRACE: Scripting.on Camera.AfterCapture
2020-08-07 14:12:58.868 Scripting TRACE: Scripting.on Camera.AfterSettle
2020-08-07 14:13:00.418 ReferenceNozzle DEBUG: N1.moveTo((-14.534000, 15.610000, 5.600000, -380.000000 mm), 1.0)
2020-08-07 14:13:00.419 GcodeDriver DEBUG: sendCommand(G0    E-380.0000 F5000 ; Send standard Gcode move, 5000)...
2020-08-07 14:13:00.419 GcodeDriver TRACE: [serial://COM18] >> G0    E-380.0000 F5000 ; Send standard Gcode move
2020-08-07 14:13:00.420 GcodeDriver TRACE: [serial://COM18] << ok
2020-08-07 14:13:00.420 GcodeDriver DEBUG: sendCommand(serial://COM18 G0    E-380.0000 F5000 ; Send standard Gcode move, 5000) => [ok]
2020-08-07 14:13:00.420 GcodeDriver DEBUG: sendCommand(M400 ; Wait for moves to complete before returning, 5000)...
2020-08-07 14:13:00.420 GcodeDriver TRACE: [serial://COM18] >> M400 ; Wait for moves to complete before returning
2020-08-07 14:13:01.742 GcodeDriver TRACE: [serial://COM18] << ok
2020-08-07 14:13:01.743 GcodeDriver DEBUG: sendCommand(serial://COM18 M400 ; Wait for moves to complete before returning, 5000) => [ok]
2020-08-07 14:13:02.914 Scripting TRACE: Scripting.on Camera.BeforeSettle
2020-08-07 14:13:03.165 Scripting TRACE: Scripting.on Camera.BeforeCapture
2020-08-07 14:13:03.205 Scripting TRACE: Scripting.on Camera.AfterCapture
2020-08-07 14:13:03.206 Scripting TRACE: Scripting.on Camera.AfterSettle
2020-08-07 14:13:03.778 Scripting TRACE: Scripting.on Camera.BeforeSettle
2020-08-07 14:13:04.029 Scripting TRACE: Scripting.on Camera.BeforeCapture
2020-08-07 14:13:04.049 Scripting TRACE: Scripting.on Camera.AfterCapture
2020-08-07 14:13:04.049 Scripting TRACE: Scripting.on Camera.AfterSettle
2020-08-07 14:13:04.595 Scripting TRACE: Scripting.on Camera.BeforeSettle
2020-08-07 14:13:04.846 Scripting TRACE: Scripting.on Camera.BeforeCapture
2020-08-07 14:13:04.866 Scripting TRACE: Scripting.on Camera.AfterCapture
2020-08-07 14:13:04.867 Scripting TRACE: Scripting.on Camera.AfterSettle
2020-08-07 14:13:06.282 ReferenceNozzle DEBUG: N1.moveTo((-14.534000, 15.610000, 5.600000, -480.000000 mm), 1.0)
2020-08-07 14:13:06.283 GcodeDriver DEBUG: sendCommand(G0    E-480.0000 F5000 ; Send standard Gcode move, 5000)...
2020-08-07 14:13:06.283 GcodeDriver TRACE: [serial://COM18] >> G0    E-480.0000 F5000 ; Send standard Gcode move
2020-08-07 14:13:06.283 GcodeDriver TRACE: [serial://COM18] << ok
2020-08-07 14:13:06.284 GcodeDriver DEBUG: sendCommand(serial://COM18 G0    E-480.0000 F5000 ; Send standard Gcode move, 5000) => [ok]
2020-08-07 14:13:06.284 GcodeDriver DEBUG: sendCommand(M400 ; Wait for moves to complete before returning, 5000)...
2020-08-07 14:13:06.284 GcodeDriver TRACE: [serial://COM18] >> M400 ; Wait for moves to complete before returning
2020-08-07 14:13:07.605 GcodeDriver TRACE: [serial://COM18] << ok
2020-08-07 14:13:07.606 GcodeDriver DEBUG: sendCommand(serial://COM18 M400 ; Wait for moves to complete before returning, 5000) => [ok]
2020-08-07 14:13:08.275 Scripting TRACE: Scripting.on Camera.BeforeSettle
2020-08-07 14:13:08.526 Scripting TRACE: Scripting.on Camera.BeforeCapture
2020-08-07 14:13:08.572 Scripting TRACE: Scripting.on Camera.AfterCapture
2020-08-07 14:13:08.572 Scripting TRACE: Scripting.on Camera.AfterSettle
2020-08-07 14:13:09.151 Scripting TRACE: Scripting.on Camera.BeforeSettle
2020-08-07 14:13:09.402 Scripting TRACE: Scripting.on Camera.BeforeCapture
2020-08-07 14:13:09.422 Scripting TRACE: Scripting.on Camera.AfterCapture
2020-08-07 14:13:09.423 Scripting TRACE: Scripting.on Camera.AfterSettle
2020-08-07 14:13:09.891 Scripting TRACE: Scripting.on Camera.BeforeSettle
2020-08-07 14:13:10.142 Scripting TRACE: Scripting.on Camera.BeforeCapture
2020-08-07 14:13:10.167 Scripting TRACE: Scripting.on Camera.AfterCapture
2020-08-07 14:13:10.167 Scripting TRACE: Scripting.on Camera.AfterSettle


2020-08-07 14-11-54.mkv

Marmelade

unread,
Aug 7, 2020, 5:22:50 PM8/7/20
to OpenPnP
When getting images from bottom vision a good light is required.
You could try to improve it (e.g. strong uniformly light with correct camera exposure, switching off other lights during bottom vision).
To check what is going on during runout calibration insert a ImageWriteDebug right after ImageCapture and try to analyse this images in pipeline editor with ImageRead or post it, so that we can see the problem, too.

Tony Luken

unread,
Aug 7, 2020, 6:06:02 PM8/7/20
to OpenPnP
Kenny,

Verify that your Units Per Pixel is set correctly for the bottom camera as that could potentially be causing an issue.  You could also try inserting an ImageWriteDebug stage between each of the other stages so you can see what is happing with each stage as the calibration actually runs.  There is a small difference between running the pipeline in the editor versus how it is run during calibration so that may help you (and us) figure out where the problem is occurring.  From the pipeline editor, the maskCircle stage just defaults to masking a circle centered at the image center.  When running from the calibration code, the maskCircle stage is set to be centered at the expected measurement location (which should be the the center of the expected camera location) but that could be thrown off if your Units Per Pixel is not set correctly.

Tony

Marmelade

unread,
Aug 8, 2020, 6:20:48 AM8/8/20
to OpenPnP
On Saturday, August 8, 2020 at 12:06:02 AM UTC+2, Tony Luken wrote:
When running from the calibration code, the maskCircle stage is set to be centered at the expected measurement location (which should be the the center of the expected camera location) but that could be thrown off if your Units Per Pixel is not set correctly.

Oh yes, the radius (in the video) seems to be too small.

Kenny Truong

unread,
Aug 8, 2020, 11:08:53 AM8/8/20
to OpenPnP
Thanks for the idea, I'll take a look at my units per pixel when I'm back in Tuesday.
Marmelade, when you say the radius seems to be too small are you also referring to units per pixel or is this a separate setting?

Tony Luken

unread,
Aug 8, 2020, 11:44:04 AM8/8/20
to OpenPnP
Oh, and just to be clear, the units per pixel needs to be correct at the height at which you are running the nozzle calibration.

Tony

Marmelade

unread,
Aug 8, 2020, 12:30:02 PM8/8/20
to OpenPnP
On Saturday, August 8, 2020 at 5:08:53 PM UTC+2, Kenny Truong wrote:
Marmelade, when you say the radius seems to be too small are you also referring to units per pixel or is this a separate setting?

As Tony wrote, the UnitsPerPixel for both cameras have to be adjusted.

Kenny Truong

unread,
Aug 11, 2020, 1:47:30 PM8/11/20
to OpenPnP
Thank you! The units per pixel was never set up (still at 0), this fixed it!
Reply all
Reply to author
Forward
0 new messages