Vision Homing Failing

399 views
Skip to first unread message

Jeff Schultz

unread,
Feb 22, 2021, 6:15:05 PM2/22/21
to OpenPnP
Hello all. I recently changed my chmt36va over the smoothieware and openPNP and have been making slow but steady progress. Currently I am stuck at getting OpenPNP to recognize a homing fiducial. Any advice on the proper way to set this up?

Any insight is greatly appreciated!

tony...@att.net

unread,
Feb 22, 2021, 7:56:15 PM2/22/21
to OpenPnP
Please set you logging level to Trace, run a homing cycle, and post you log file, machine.xml, and debug images.

Tony

Jeff Schultz

unread,
Feb 22, 2021, 9:10:02 PM2/22/21
to OpenPnP
Attached ... It gets a red square most of them now but never locks on home.

machine.xml
OpenPnP.log

Jeff Schultz

unread,
Feb 22, 2021, 9:12:31 PM2/22/21
to OpenPnP

tony...@att.net

unread,
Feb 22, 2021, 10:08:23 PM2/22/21
to OpenPnP
It looks like your visual homing is working ok.  It actually completed successfully here:
2021-02-22 21:04:49.607 ReferenceFiducialLocator DEBUG: FIDUCIAL-HOME averaged location is at (174.282066, 65.405212, 0.000000, 0.000000 mm) 

It's the next step that is failing.  It appears you need to adjust your Nozzle Tip Calibration pipeline as it is getting too many vision misdetects as reported here:
2021-02-22 21:04:50.791 MessageBoxes DEBUG: Error: java.lang.Exception: Too many vision misdetects. Check pipeline and threshold.

Tony

Jeff Schultz

unread,
Feb 23, 2021, 9:26:31 AM2/23/21
to OpenPnP
Thank you! Have not touched that yet so I will look into that. Had no idea that played into the visual homing.

Jeff Schultz

unread,
Feb 23, 2021, 10:08:47 AM2/23/21
to OpenPnP
got it homing now... thank you!

tony...@att.net

unread,
Feb 23, 2021, 11:16:11 AM2/23/21
to OpenPnP
I've argued unsuccessfully in the past that failure of Nozzle Tip Calibration shouldn't prevent the machine from homing - see this conversation:
https://groups.google.com/g/openpnp/c/p1oQwx1Kcog

Anyway, glad to hear you got it working.

Tony

ma...@makr.zone

unread,
Feb 23, 2021, 1:48:12 PM2/23/21
to ope...@googlegroups.com

I just checked in the source code:

  1. Nozzle Tip calibration is not enabled by default
  2. And even if it is enabled by the user, the default trigger is NozzleTipChangeInJob.

So by (double) default, no calibration should be happening on homing.

Only when the user deliberately choses the calibration trigger MachineHome or NozzleTipChange, is it calibrated on homing.

The thinking is that if the user wants to calibrate on homing, there is very likely a lot of runout (like on my machine) so working without calibration is pointless. Hence the current reasoning that if calibration is made part of homing, then it must also fail homing if unsuccessful.

But like I proposed in that discussion, we could add more options, or a checkbox.

_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/5766d1b1-2e28-492f-bbe1-875061a3494dn%40googlegroups.com.

ma...@makr.zone

unread,
Feb 23, 2021, 2:09:05 PM2/23/21
to ope...@googlegroups.com

I'm already working on the nozzle tips (probing) and there will be another homing cycle relevant calibration (Z table surface calibration/touch off). So it makes sense to add checkboxes on both these calibrations.

For the nozzle tip Calibration, it only appears when one of the homing-active Recalibration triggers is selected:

You can then switch it off.

_Mark

ma...@makr.zone

unread,
Feb 23, 2021, 2:11:42 PM2/23/21
to ope...@googlegroups.com

(btw. already fixed the typo in the tooltip).

tony...@att.net

unread,
Feb 23, 2021, 2:29:29 PM2/23/21
to OpenPnP
Hi Mark,

It seems to me that homing only has to do with axis.  IMHO, if the axis are all homed the machine state should be Homed.  If you need to have a nozzle tip calibrated to perform a pick, then shouldn't it be the pick that fails if the required nozzle tip is not calibrated?

In any case, the error dialog that pops up during Nozzle Tip Calibration need to say more than just "Too many vision misdetects. Check pipeline and threshold."  Maybe, "Nozzle Tip Calibration aborted - too many vision misdetects. Check pipeline and threshold."  At least that way the operator won't be confused about whether it is Visual Homing or Nozzle Tip Calibration that's failing.

Tony

Clemens Koller

unread,
Feb 23, 2021, 8:33:24 PM2/23/21
to ope...@googlegroups.com
Hi!

Maybe it's related to your error:
Are you sure that a kind of end-of-move is detected properly prior the Nozzle Tip Calibration is started?
The hint that you should check the pipeline and threshold seems to be misleading in this case as there are other causes for failing the calibration possible.
I am still debugging in this corner.

I also attached is a patch to remove the mandatory home-run in case of a failing nozzle calibration. IMO machine homing and the nozzle calibration are detached and independent tasks.
(patch against latest develop b3bc577)

If you want, you could try my IMO pretty robust and precise nozzle tip calibration pipeline based on MatchedTemplate - but you need to crop and create a nozzle<size>-calib.png out of the written nozzlex-write.png templates (examples attached).
And - I've polished my Nozzle tips to be reflective / white in the camera image for maximum contrast! YMMV

(BTW: Visual Homing is based on a similar pipeline, however the target are concentric rings (donuts))

Regards,

Clemens

On 23/02/2021 20.29, tony...@att.net wrote:
> Hi Mark,
>
> It seems to me that homing only has to do with axis.  IMHO, if the axis are all homed the machine state should be Homed.  If you need to have a nozzle tip calibrated to perform a pick, then shouldn't it be the pick that fails if the required nozzle tip is not calibrated?
>
> In any case, the error dialog that pops up during Nozzle Tip Calibration need to say more than just "Too many vision misdetects. Check pipeline and threshold."  Maybe, "Nozzle Tip Calibration aborted - too many vision misdetects. Check pipeline and threshold."  At least that way the operator won't be confused about whether it is Visual Homing or Nozzle Tip Calibration that's failing.
>
> Tony
>
> On Tuesday, February 23, 2021 at 1:11:42 PM UTC-6 ma...@makr.zone wrote:
>
> (btw. already fixed the typo in the tooltip).
>
> Am 23.02.2021 um 20:09 schrieb ma...@makr.zone:
>>
>> I'm already working on the nozzle tips (probing) and there will be another homing cycle relevant calibration (Z table surface calibration/touch off). So it makes sense to add checkboxes on both these calibrations.
>>
>> For the nozzle tip Calibration, it only appears when one of the homing-active Recalibration triggers is selected:
>>
>> You can then switch it off.
>>
>> _Mark
>>
>>
>> Am 23.02.2021 um 19:48 schrieb ma...@makr.zone:
>>>
>>> I just checked in the source code:
>>>
>>> 1. Nozzle Tip calibration is *not enabled by default *
>>> 2. And even if it is enabled by the user, the default trigger is *NozzleTipChangeInJob*.
>>>
>>> So by (double) default, *no calibration should be happening on homing*.
>>>
>>> Only when the user deliberately choses the calibration trigger *MachineHome *or *NozzleTipChange*, is it calibrated on homing.
>>>
>>> The thinking is that if the user wants to calibrate on homing, there is very likely a lot of runout (like on my machine) so working without calibration is pointless. Hence the current reasoning that if calibration is *made part of homing, *then it must also fail homing if unsuccessful.
>>>
>>> But like I proposed in that discussion, we could add /more /options, or a checkbox.
>>>
>>> _Mark
>>>
>>> Am 23.02.2021 um 17:16 schrieb tony...@att.net:
>>>> I've argued unsuccessfully in the past that failure of Nozzle Tip Calibration shouldn't prevent the machine from homing - see this conversation:
>>>> https://groups.google.com/g/openpnp/c/p1oQwx1Kcog <https://groups.google.com/g/openpnp/c/p1oQwx1Kcog>
>>>>
>>>> Anyway, glad to hear you got it working.
>>>>
>>>> Tony
>>>>
>>>> On Tuesday, February 23, 2021 at 9:08:47 AM UTC-6 designex...@gmail.com wrote:
>>>>
>>>> got it homing now... thank you!
>>>>
>>>> On Tuesday, February 23, 2021 at 9:26:31 AM UTC-5 Jeff Schultz wrote:
>>>>
>>>> Thank you! Have not touched that yet so I will look into that. Had no idea that played into the visual homing.
>>>>
>>>> On Monday, February 22, 2021 at 10:08:23 PM UTC-5 tony...@att.net wrote:
>>>>
>>>> It looks like your visual homing is working ok.  It actually completed successfully here:
>>>> 2021-02-22 21:04:49.607 ReferenceFiducialLocator DEBUG: FIDUCIAL-HOME averaged location is at (174.282066, 65.405212, 0.000000, 0.000000 mm) 
>>>>
>>>> It's the next step that is failing.  It appears you need to adjust your Nozzle Tip Calibration pipeline as it is getting too many vision misdetects as reported here:
>>>> 2021-02-22 21:04:50.791 MessageBoxes DEBUG: Error: java.lang.Exception: Too many vision misdetects. Check pipeline and threshold.
>>>>
>>>> Tony
>>>> On Monday, February 22, 2021 at 8:12:31 PM UTC-6 designex...@gmail.com wrote:
>>>>
>>>> Images:
>>>>
>>>> https://www.dropbox.com/s/nbqgluigpcc0b6o/org.openpnp.vision.pipeline.stages.ImageWriteDebug.zip?dl=0 <https://www.dropbox.com/s/nbqgluigpcc0b6o/org.openpnp.vision.pipeline.stages.ImageWriteDebug.zip?dl=0>
>>>>
>>>> --
>>>> 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/5766d1b1-2e28-492f-bbe1-875061a3494dn%40googlegroups.com <https://groups.google.com/d/msgid/openpnp/5766d1b1-2e28-492f-bbe1-875061a3494dn%40googlegroups.com?utm_medium=email&utm_source=footer>.
>>> --
>>> 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/b79c4d2d-1a66-9e14-d7d8-7de85bb3d4c0%40makr.zone <https://groups.google.com/d/msgid/openpnp/b79c4d2d-1a66-9e14-d7d8-7de85bb3d4c0%40makr.zone?utm_medium=email&utm_source=footer>.
>> --
>> 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/7744c6e0-1ae6-ebfb-6b3b-4c4ccfc61f9f%40makr.zone <https://groups.google.com/d/msgid/openpnp/7744c6e0-1ae6-ebfb-6b3b-4c4ccfc61f9f%40makr.zone?utm_medium=email&utm_source=footer>.
>
> --
> 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 <mailto:openpnp+u...@googlegroups.com>.
> To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/124f0c99-7cdf-4af7-9463-6ccf65185376n%40googlegroups.com <https://groups.google.com/d/msgid/openpnp/124f0c99-7cdf-4af7-9463-6ccf65185376n%40googlegroups.com?utm_medium=email&utm_source=footer>.
ReferenceNozzleTipCalibration-Homing-is-not-necessary-to-do-a-calib.patch
NozzleTipCalibation-20210224-cko.xml
nozzle1-calib.png
nozzle3-calib.png

Jeff Schultz

unread,
Feb 23, 2021, 8:59:04 PM2/23/21
to OpenPnP
Thanks all! I think I am really close :)

My last question for now is if there is an easy way to get the vacuum to start when either a job starts or a part pick is selected. I'm guessing there is a script of some sort and I will keep searching but it seems like someone on here can generally help much faster than the hours I've spent searching for things (Thank you so much again!)

Jeff

tony...@att.net

unread,
Feb 23, 2021, 10:45:13 PM2/23/21
to OpenPnP

Jeff Schultz

unread,
Feb 23, 2021, 10:58:11 PM2/23/21
to OpenPnP
Yessir. I have vac settings for each nozzle but for them to work they require that the overall vac system is running. OpenPnP properly operates the vacuum valves to direct the vacuum to the nozzle but does not turn on the vacuum pump itself which is setup as it's own actuator not tied to the head. I can manually turn it on and then start placement and it works.

Is there a list of events that can be used for script names? I assume there is something along the lines of "before/after placement " or "before/after job" but I have not found a list anywhere.

Jason von Nieda

unread,
Feb 23, 2021, 11:32:07 PM2/23/21
to ope...@googlegroups.com
Hi Jeff,

Add the actuator that controls the vacuum pump to the Head and then set the Vacuum Pump Actuator on the head:

Screen Shot 2021-02-23 at 10.31.24 PM.png


--
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.

ma...@makr.zone

unread,
Feb 24, 2021, 3:23:48 AM2/24/21
to ope...@googlegroups.com

> In any case, the error dialog that pops up during Nozzle Tip Calibration need to say more

Agreed. I think much of this discussion is actually caused by this misleading message.

In addition to changing just that one message, I wonder if the exception message box could be improved in a a general way, showing more info about the throwing class, like in the log.

> It seems to me that homing only has to do with axis.

Agreed. Homing makes sure the axes are precisely where the controller or OpenPnP thinks they are. With a considerable run-out you must determine the orientation of the rotation axis after power-up. Think of it as rotational axis homing. It's essentially the same function as with the other axes, only methodically different.

> If you need to have a nozzle tip calibrated to perform a pick, then shouldn't it be the pick that fails if the required nozzle tip is not calibrated?

Yes... But then why not simply keep the default NozzleTipChangeInJob recalibration option? It does exactly that.

... and No. On my machine I need the nozzle calibrated before I can even load or change a nozzle tip. Or open a BlindsFeeder cover before the pick. Run-out is 0.2mm, so the uncalibrated nozzle tip position will vary by 0.4mm. The machine is simply not ready before the nozzle tip is calibrated. Yes, I should replace the banged-up nozzle tip holder, but the argument is still valid with much smaller run-out.

Again, I consider the full homing cycle a good pre-flight test. Together with visual homing it essentially checks all the components of the machine, both top and bottom camera, lights, vision, settling etc.. No sense in postponing any trouble-shooting when it fails (again, I do agree the diagnostics are bad).

_Mark

Jeff Schultz

unread,
Feb 26, 2021, 2:52:29 PM2/26/21
to OpenPnP
The problem with this is that if I change it from the vacuum valve to the overall vacuum pump it will start the pump but trigger the valve to the specific nozzle unless I am missing something.

Jason von Nieda

unread,
Feb 26, 2021, 2:54:52 PM2/26/21
to ope...@googlegroups.com
Hi Jeff,

There should be three actuators: Pump, Nozzle 1 Solenoid, and Nozzle 2 Solenoid. You set the Pump one on the Head, and the Nozzle ones on the Nozzles. Once you have it configured like this then OpenPnP knows that any time it needs vacuum it will turn on the Pump actuator and the appropriate solenoid actuator. Once no nozzles are calling for vacuum it will turn off the Pump actuator.

Jason


tony...@att.net

unread,
Feb 26, 2021, 3:56:53 PM2/26/21
to OpenPnP
Just FYI - In my case, I like to keep the pump running once it has started so put the pump actuator on the machine rather than on the head.  Then I can use to manually turn on/off the pump when I like and it can also be called from a script at the end of a job to turn off the pump.  The solenoid valve actuator on the nozzle includes G code to not only actuate the solenoid valve but also to turn on the pump (but not to turn off the pump).  That way the pump start automatically on the first pick and stays on until the end of the job (or I manually turn it off).

Tony
Reply all
Reply to author
Forward
0 new messages