PushPullFeeder CV sprockets pipeline failing

119 views
Skip to first unread message

Roman Valls Guimerà

unread,
Mar 9, 2024, 7:52:27 PMMar 9
to OpenPnP
Hello,

I'm having concerning issues with the PushPullFeeder's sprocket CV pipeline:


It detects the holes seemingly correctly (and I can see them through drawcircles), but when I do "Preview Vision Features", a big red cross shows up in the camera view (see screenshots attached) and/or it tells me that no sprockets are detected... no relevant logs are shown for this action, not even in TRACE level. The default pipeline unfortunately detects holes in the neighboring feeders so we have to constrain the hole detection via MaskRectangle (see attached .xml).

What's a bit jarring as well is that the "Auto-Setup with Camera at Pick Location" wipes the custom pipeline and substitutes it with the default one, which does not work well for us, any tweaks from the default pipeline just gets wiped :/

Also on the automatic setup features of this feeder, I've noticed that the one click "+" automatic feeder adding feature, assumes that the feeders are mounted on the right hand side onwards... but we are mounting them from right to left, is it possible to have PushPullFeeder looking for the feeder on the left instead of the one on the right by default?

I'm using the latest OpenPnP test branch changes, as usual.

Thanks in advance for any insight!

feeder_cv_pipeline_draw_circles.png
no_sprocket_holes_recognized.png
feeder_cv_pipeline_circles.png
feeder_cv_pipeline_failing.png
cv_feeder_pipeline.xml.txt
machine.xml

PP.ca

unread,
Mar 10, 2024, 11:18:51 AMMar 10
to OpenPnP
Try to rotate the camera so the tape holes are at the top.

mark maker

unread,
Mar 10, 2024, 11:47:58 AMMar 10
to ope...@googlegroups.com

Hi Roman,

> It detects the holes seemingly correctly (and I can see them through drawcircles), but when I do "Preview Vision Features", a big red cross shows up in the camera view (see screenshots attached) and/or it tells me that no sprockets are detected... 

A red cross means there was no valid row of holes detected.

Note the vision-detected holes are filtered by some additional criteria after the pipeline:

  1. The exact size of the detected hole must match the EIA standard (1.5mm), within a certain tolerance.
  2. The holes must appear in a straight line.
  3. In the straight line, there must be at least two holes with a pitch of 4mm.
  4. The line must have a certain distance, not too close to the pick location, and not too far away either.

If you are having problems, then double check your camera 3D Units per Pixel calibration, i.e., preliminary or advanced camera calibration, best done with Issues & Solutions:

https://github.com/openpnp/openpnp/wiki/3D-Units-per-Pixel

Note, you need to redo these whenever you change anything relevant on your camera, camera mounting position (focal distance), camera video mode, etc. The same is true whenever you change the nozzle tip Z coordinate system (reference of Z).

Also note that the Z coordinate of the feeder must be set quite precisely, so that the Units per Pixel can be calculated accurately. These are needed to measure points (1) and (3) above, and it becomes even more important when you have a very wide/short lens (as many machines unfortunately tend to have).

If you have tapes with extremely off-standard size holes, report back. There is another tweak available, but I won't go into that yet. If your feeder config is very old, this might be an issue too.


> no relevant logs are shown for this action, not even in TRACE level.

That is in deed unfortunate, I'll fix it.

> is it possible to have PushPullFeeder looking for the feeder on the left instead of the one on the right by default?

Yes, but you can only use it from the third feeder. The second feeder you have to setup by pointing the camera to its pick location and pressing Auto-Setup.

Once this is done, it should have auto-learned the stride. Report back if this works for you or not (I don't think there was much testing into that).

See also the Wiki about that:

https://github.com/openpnp/openpnp/wiki/ReferencePushPullFeeder#the-next-feeder

> What's a bit jarring as well is that the "Auto-Setup with Camera at Pick Location" wipes the custom pipeline and substitutes it with the default one, which does not work well for us, any tweaks from the default pipeline just gets wiped :/

Yes (but also see below*). 

You should have gotten a fat warning that this not only wipes the pipeline but all the current settings of the feeder!

"This may overwrite all your current settings. Are you sure?"

And when this feeder is marked as a template then the following comes in addition, and in red:

"This feeder is marked as template. Are you really, really sure?"

What else can I do? 😉

See also the warning in the Wiki:

https://github.com/openpnp/openpnp/wiki/ReferencePushPullFeeder#locations-auto-setup


* Please also learn about template feeders, and what they can do for you (cloning settings):

https://github.com/openpnp/openpnp/wiki/ReferencePushPullFeeder#clone-settings

For instance you can pre-set the pipeline that works for you to be cloned to new feeders that way. In Auto-Setup, any new feeder will first try with the pipeline cloned from the template, and only if that fails, will it revert back to the stock pipelines.

_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/d1788924-9e36-449d-a407-5fcef45d5d64n%40googlegroups.com.

mark maker

unread,
Mar 10, 2024, 11:51:23 AMMar 10
to ope...@googlegroups.com

> Try to rotate the camera so the tape holes are at the top.

No!

PushPullFeeder supports all orientations, including non-90° angles.

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

mark maker

unread,
Mar 10, 2024, 12:30:05 PMMar 10
to ope...@googlegroups.com

The missing diagnostics are fixed in the OpenPnP test version.

See:
https://github.com/openpnp/openpnp/pull/1610

Allow some minutes to deploy the download:

https://openpnp.org/test-downloads/

_Mark

Roman Valls Guimerà

unread,
Mar 12, 2024, 4:34:06 AMMar 12
to OpenPnP
Thanks Mark for all directions and advice, I'll run some recalibration to get the 3D Units per pixel calibration right... but before doing so, here's what I'm getting in the log now when clicking "Preview Vision Features":

    2024-03-12 19:28:14.840 ReferencePushPullFeeder$FindFeatures DEBUG: Ransac algorithm has not found any lines of sprocket holes with 4.0mm pitch, allowed pitch and line tolerance is ±0.6mm

mark maker

unread,
Mar 12, 2024, 4:41:13 AMMar 12
to ope...@googlegroups.com

Note, to quickly validate whether the scale is right, use the "ruler" reticle on the camera view. The camera virtual Z must be at feeder Z. Then you should see if the sprocket hole pitch aligns with every 4th tick on the ruler.

_Mark

Roman Valls Guimerà

unread,
Apr 15, 2024, 8:41:54 AMApr 15
to OpenPnP
Thanks a ton for the hints Mark, we are getting closer to a working machine! To fix this particular issue, we adjusted the focal distance of the camera and upped the resolution a bit, here's a custom camera holder that my colleague Julio designed:


Basically it's more rigid that the stock Liteplacer camera holder and also maintains better focal distance (in our experience/tests). Now we don't get sprocket detection issues. Case closed but I'll open another thread for other failure modes, of course ;)
Reply all
Reply to author
Forward
0 new messages