Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strip Feeder Auto Setup Improvements #411

Closed
se6astian-pi opened this issue Jan 15, 2017 · 5 comments
Closed

Strip Feeder Auto Setup Improvements #411

se6astian-pi opened this issue Jan 15, 2017 · 5 comments

Comments

@se6astian-pi
Copy link
Contributor

I oriented a 0402 tape in my machine as outlined here:
grafik

I then navigated to a "first part" and the autosetup recognizes it, then the "second part" (below) which the auto setup also recognizes. Then after the auto setup is complete the camera automatically moves to the index 0 part position which often happen to be on the wrong side of the holes - as the autosetup seems to be thinking the tape is oriented differently (reference hole position also indicates this - "next hole has higher Y coordinates").

Screencapturing of the process: https://www.youtube.com/watch?v=8wlNMj2uhqQ

@vonnieda
Copy link
Member

vonnieda commented Jan 15, 2017

Related to #224. This happens when the wrong holes are identified as the reference holes.

I have some ideas on how to fix this but I have not had time to really flesh them out. The basic idea is something like:

  • Instead of having the user click on two parts, have them click on the first part and drag in the direction of travel. This can be the entirety of the setup operation.
  • Use the vector they indicated to find the first reference hole by searching both sides of the tape. The user does not always follow the instructions in the graphic above, but we should be able to easily detect that by searching for holes in two spots.
  • If the direction of travel has been indicated incorrectly, just correct it internally by storing an indicator.
  • We can also use a similar search process to find the width of the tape. We will need to check both sides each time to make sure we're not seeing the holes from another tape. The hole that is closest to the expected distance based on tape specs is the winner. This may not be deterministic, and maybe won't work. Another option would be to just prompt the user at the start of auto setup to indicate the tape width. Tape width is the only variable that is "hard" to figure out.

@dimitarpenev
Copy link

Hello, I am not in the openpnp but, is it not possible the top camera identifying the direction of the tape looking at it and identifying the circles and rectangles?

@vonnieda
Copy link
Member

@dimitarpenev Yes, that's a good idea. There is definitely more we can do to try to recognize the shape of the tape. The rectangles are tricky because they can be of many different shapes, and they aren't always easy to "see" because of the tape color, but one thing we could do is look for lines that travel along the length of the holes indicating the edge of the tape.

This is one area where I'd really appreciate some help, in the form of code :) I have lots and lots of ideas, but not enough time to implement them! :)

@vonnieda
Copy link
Member

From #224:

  • Tell the user if not enough holes are found.
  • Abort if the calculated positions or pitch are not valid.

@vonnieda vonnieda changed the title Strip Feeder Auto Setup Orientation Issue Strip Feeder Auto Setup Improvements Apr 13, 2017
richard-sim added a commit to richard-sim/openpnp that referenced this issue Aug 28, 2017
- Auto Setup for ReferenceStripFeeder is now a lot smarter, more accurate, and is able to catch common setup issues
- Fixed issue where strips with 2mm part pitch could result in the reference holes being detected flipped depending on where on the two parts the user clicked
- Fixed issue where part pitch was calculated in the units of the camera, not necessarily millimeters
- User is notified if they selected parts in the wrong order for the orientation of the strip (ReferenceStripFeeder.getPickLocation() can be updated to handle this if we want, since we can detect it after all)
- Tightened the max distance from a component center to the feed hole centers to accurately reflect the spacing as defined in the T/R standard and thus reduce false-positives for adjacent strips
- Multiple, full lines of strip holes are detected and grouped appropriately, and only the correct line of holes are used for the selected parts/strip (some spacing is still required between adjacent strips, but it is much reduced and more reliable)
vonnieda added a commit that referenced this issue Aug 29, 2017
…elop

* richard-sim-ReferenceStripFeeder-Improvements:
  Minor updates and cleanup. Result image is now based on original, rather than modified.
  Updated CHANGES.md document for the PR
  Corrected getHoleDistanceMax() to match EIA-481.
  Missed than an auto-generated method didn't follow the style guidelines!
  Addressing issue #411, Strip Feeder Auto Setup Improvements - Auto Setup for ReferenceStripFeeder is now a lot smarter, more accurate, and is able to catch common setup issues - Fixed issue where strips with 2mm part pitch could result in the reference holes being detected flipped depending on where on the two parts the user clicked - Fixed issue where part pitch was calculated in the units of the camera, not necessarily millimeters - User is notified if they selected parts in the wrong order for the orientation of the strip (ReferenceStripFeeder.getPickLocation() can be updated to handle this if we want, since we can detect it after all) - Tightened the max distance from a component center to the feed hole centers to accurately reflect the spacing as defined in the T/R standard and thus reduce false-positives for adjacent strips - Multiple, full lines of strip holes are detected and grouped appropriately, and only the correct line of holes are used for the selected parts/strip (some spacing is still required between adjacent strips, but it is much reduced and more reliable)
  Added auto-thresholding to the default CvPipeline for ReferenceStripFeeder to better detect tape holes and eliminate false-positives in noisy camera images
@vonnieda
Copy link
Member

Fixed in #628

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants