Fiducial Homing Vision pipeline breaking

72 views
Skip to first unread message

Samuel Craven

unread,
Jul 11, 2024, 11:42:13 AM (10 days ago) Jul 11
to OpenPnP
Hello,

I have a CHMT36VA that has had smoothie firmware flashed to it. It was originally acquired and flashed by a different department at the university where I work, and they gave it to me a few weeks ago to get running. They never set it up with visual homing, which I understand is much more precise than only using limit switches, so I followed the fiducial homing guide as carefully as I could and placed a fiducial at the same Z level as our PCB's will be placed at. I've attached an image of the central vision homing fiducial below.

The problem I'm running into is that the fiducial vision pipeline seems to incorrectly detect the fiducial away from where it actually is. These errors will cascade so that about 1/2 the time when I tell the machine to home, it will get farther and farther off target until it gives up with a 'fiducial too far' error.

I'm using the stock fiducial detection pipeline - I did specialize it for the homing fiducial but then I reset it to default.

If you could give me any tips on fixing this I would really appreciate it! I've tried to include as much relevant information as I can below, let me know if any more is needed.

-as far as I know, this is the stock down-looking camera that came with the machine

-I'm using openPNP version 2024-02-08_07-03-33.5dd12c7


Homing fiducial.jpg
Fiducial home vision pipeline.txt
incorrect circle detection while homing.png
homing log.txt
Test fiducial homing log.txt
Camera info.png
Table wide view.jpg
incorrect circle detection.png

mark maker

unread,
Jul 11, 2024, 12:07:28 PM (10 days ago) Jul 11
to ope...@googlegroups.com

> so I followed the fiducial homing guide as carefully as I could

Do you mean Issues & Solutions?

If not, please retry using Issues & Solutions, it is much easier and more precise. If you already have visual homing enabled, disable it (on the Head) and then press Find Issues & Solutions to let it propose the solution.

https://github.com/openpnp/openpnp/wiki/Issues-and-Solutions

Looking at your camera image I see a lot of colorful sensor noise. And I don't see any of the typical unevenness of LED ring lighting. Do you have lighting installed? If not, you must absolute add lighting first, and only then proceed. Otherwise you'll just limp from problem to problem.

The overshooting you describe, might be explained, when you weren't consistent with your use of Primary and Secondary calibration fiducial.

In the photo (below) of the machin ehoming (I assume) it seems your camera is above the higher fiducial. That's okay, as long as this is and remains your primary fiducial, and if it corresponds to the PCB surface Z level

It is also okay, when the secondary fiducial is lower than the primary fiducial, but that's not how it is usually demonstrated in the video and Wiki. As long as you remain aware of your choice and consistently use it your way that's fine. First and foremost, the "confetti" test must then be done at the higher level. If you confused the primary/secondary fiducial between calibrations, please redo them in the right way.

_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/9b062a49-9909-4365-ae43-50c6db38b704n%40googlegroups.com.

Samuel Craven

unread,
Jul 12, 2024, 2:55:44 PM (9 days ago) Jul 12
to OpenPnP
Hi Mark,

Thank you for your response. I looked into it and as far as I am aware, the CHM-T36VA doesn't come with any LEDs mounted on the head (though there is a strip of them along the bottom of the X-gantry), so there wasn't going to be an especially easy way for me to add lighting in the short term. Instead I played around with the vision pipeline for the homing fiducial - all I did really was add a threshold step so that smaller color imperfections wouldn't trigger the circular symmetry detector. This has worked very consistently over the course of about 15 homing operations since I implemented it, and I have since managed to get the placement accuracy dialed in well, so I think it is what I will stick with for now. I'll definitely look into adding lights as well though because having to change the pipeline for any new fiducial would be a hassle.

As for the primary/secondary calibration fiducials, I am aware of that and took care to keep them in the same order every time.


Thanks!


Sam Craven



<cv-pipeline>
   <stages>
      <cv-stage class="org.openpnp.vision.pipeline.stages.ImageCapture" name="image" enabled="true" default-light="true" settle-option="Settle" count="1"/>
      <cv-stage class="org.openpnp.vision.pipeline.stages.ImageWriteDebug" name="deb0" enabled="false" prefix="fidloc_source_" suffix=".png"/>
      <cv-stage class="org.openpnp.vision.pipeline.stages.BlurGaussian" name="blur" enabled="true" kernel-size="3" property-name="BlurGaussian"/>
      <cv-stage class="org.openpnp.vision.pipeline.stages.Threshold" name="0" enabled="true" threshold="250" auto="false" invert="false"/>
      <cv-stage class="org.openpnp.vision.pipeline.stages.DetectCircularSymmetry" name="circular" enabled="true" min-diameter="15" max-diameter="100" max-distance="200" search-width="0" search-height="0" max-target-count="1" min-symmetry="1.2" corr-symmetry="0.0" outer-margin="0.2" inner-margin="0.4" sub-sampling="8" super-sampling="8" symmetry-score="OverallVarianceVsRingVarianceSum" property-name="fiducial" diagnostics="true" heat-map="false"/>
      <cv-stage class="org.openpnp.vision.pipeline.stages.ConvertModelToKeyPoints" name="results" enabled="true" model-stage-name="circular"/>
      <cv-stage class="org.openpnp.vision.pipeline.stages.DrawCircles" name="draw" enabled="true" circles-stage-name="circular" thickness="1">
         <color r="255" g="255" b="0" a="255"/>
         <center-color r="255" g="153" b="0" a="255"/>
      </cv-stage>
      <cv-stage class="org.openpnp.vision.pipeline.stages.ImageWriteDebug" name="deb1" enabled="false" prefix="fidloc_results_" suffix=".png"/>
   </stages>
</cv-pipeline>
Fiducial vision pipeline with threshold.png

mark maker

unread,
Jul 13, 2024, 2:51:30 PM (8 days ago) Jul 13
to ope...@googlegroups.com

> all I did really was add a threshold step so that smaller color imperfections wouldn't trigger the circular symmetry detector.

It would be better to increase the kernel size of the BlurGaussian.

Also as long as lighting is not improved, be extra conservative with the Camera Settling:

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

_Mark

Reply all
Reply to author
Forward
0 new messages