Orientation of parts in the upward camera.

120 views
Skip to first unread message

Red Davies

unread,
Sep 11, 2016, 10:39:20 PM9/11/16
to OpenPnP

In many cases in my current job, my feeder is at one angle, the OpenCV work that is done is at another angle and the part is placed at a third, different angle.

I'm placing YC164 parts which are 0603 resistor packs that are packed at 90 degrees to the tape.  This makes things very confusing.

I have a small amount of run-out on my head so, if I place my nozzle centered over my up-camera and rotate 360 degrees the center forms a tiny circle (which, unfortunately is not so tiny when talking about 0603 sized-parts).

My question is this:

Is it possible to get OpenCV to do the part recognition at the angle the part will be placed?

Thanks,



Red

Jason von Nieda

unread,
Sep 11, 2016, 10:42:51 PM9/11/16
to OpenPnP
Red, we have support for this in most of the right places but have not tied it together yet. We probably just need to add this as a simple setting on the reference bottom vision class. If someone wants to take this on it should be a really simple change. Otherwise I will file an issue soon to get it done.

Jason
--
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 post to this group, send email to ope...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/064b3582-6106-477d-bdb9-ba38b909763e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Matt Brocklehurst

unread,
Sep 12, 2016, 1:38:40 AM9/12/16
to ope...@googlegroups.com
Hi Jason

Are you thinking of what I did?

Thanks 

Matt

Sent from my iPhone

Jason von Nieda

unread,
Sep 12, 2016, 1:41:08 AM9/12/16
to ope...@googlegroups.com
Yep, I think we just need a option to do final rotation for normal bottom vision using your code. Or did you add that as well? Can't check at the moment.

Matt Brocklehurst

unread,
Sep 12, 2016, 1:50:42 AM9/12/16
to ope...@googlegroups.com
Hi Jason

No i changed the interface so it could support it though, think it will just need an enabler checkbox somewhere - i’ll try and take a look in a bit

Matt

Matt Brocklehurst

unread,
Sep 12, 2016, 6:04:07 AM9/12/16
to ope...@googlegroups.com
Is there some logic why it doesn't do this by default...

I think the way this works (i'd need to dig into it properly) is if the part is mounted on a feeder say at 90*, then the code will do the initial pick and then rotate the nozzle 90* CCW to get the part to 0*
Then it moves over the up camera, scans the part, and applies any rotation needed to get the part to exactly 0*
The part then moves to the final location and it gets rotated to its final location at this point.

Is there any benefit to this (all the different rotations), than just to pick the part up at 90*, rotate it to its final rotation, then scan it with the camera to make sure its at the final rotation, and if not, keep rotating it until it is, before going and placing it?

I'm not sure if its an evolution thing, if i've got it wrong, or if theres some benefit to doing it the original way? :-)



Matt

To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+unsubscribe@googlegroups.com.

To post to this group, send email to ope...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/064b3582-6106-477d-bdb9-ba38b909763e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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+unsubscribe@googlegroups.com.

To post to this group, send email to ope...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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+unsubscribe@googlegroups.com.

To post to this group, send email to ope...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/8F22BAA6-B763-4E6E-A122-2C0EAA4514E3%40mattbrocklehurst.co.uk.
For more options, visit https://groups.google.com/d/optout.

--
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+unsubscribe@googlegroups.com.

Graeme Bridge

unread,
Sep 12, 2016, 6:25:39 AM9/12/16
to OpenPnP
what about polarity on components the camera doesn't know which end is which but if you set the feeder up and it adds the correction at point of pic the adjustments are to the already polarity correct orientation
Matt

To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.

To post to this group, send email to ope...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/064b3582-6106-477d-bdb9-ba38b909763e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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 post to this group, send email to ope...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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 post to this group, send email to ope...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/8F22BAA6-B763-4E6E-A122-2C0EAA4514E3%40mattbrocklehurst.co.uk.
For more options, visit https://groups.google.com/d/optout.

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

Matt Brocklehurst

unread,
Sep 12, 2016, 6:39:29 AM9/12/16
to ope...@googlegroups.com
Hi Graeme

Thats true, it would have to take into account the feeder rotation, placement rotation and board rotation when it brings it over the top of the up camera - which we now pass through to the up camera alignment interface. I suppose it might make things a bit messy if you don't have an up-camera defined though, i.e. where would all the rotation happen

Matt




To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+unsubscribe@googlegroups.com.

To post to this group, send email to ope...@googlegroups.com.

Cri S

unread,
Sep 12, 2016, 7:34:00 AM9/12/16
to OpenPnP
Please don't make that option default, it's insane.

Matt Brocklehurst

unread,
Sep 12, 2016, 7:37:12 AM9/12/16
to ope...@googlegroups.com
Hi Cri

Whys it insane?  I was mearly asking what are the benefits for doing it the way its done - to me, its better to rotate once and then look at the final product with the camera and apply the correction, then to rotate from the feeder, then square it up with the camera, and then rotate it again for placement? But i could be missing  something big? :D

Matt

On Mon, Sep 12, 2016 at 12:34 PM, Cri S <phon...@gmail.com> wrote:
Please don't make that option default, it's insane.
--
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+unsubscribe@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.

Cri S

unread,
Sep 12, 2016, 8:27:57 AM9/12/16
to OpenPnP
On up looking vision, resulting rotation could be wrong and need cleanup. If having components at arbitrary angle, this cleanup is not easy.
Certain vision Algorithm need defined Angle.
Other algorithm match horizontal and vertical edges. If edges are 45 degree, noise it at maximum and threshold level could be insufficient. Having component rotated at arbitrary angle could mean, it's not visible completely.
Other Algorithm use upper and lower camera zone to check cog center after threshold and align according results.
Left/right is possible too.

Closed loop vision is possible and is usually used on components need high precision.
Check rotation as usually.
Then apply rotation offset and xy offset.
Redo up looking vision. If error is less limits, proceed, otherwise repeat position adjustment and camera capture again.
As this is usually a penalty from 1/4 to 1 second it's usually used only where components size and/or machine precision it's at limits.

Matt Brocklehurst

unread,
Sep 12, 2016, 8:42:20 AM9/12/16
to ope...@googlegroups.com
Hi Cri

Ah I see, so its much better for the up camera if all the parts are close to 0* so it can work out the error?

Matt

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.

Cri S

unread,
Sep 12, 2016, 10:31:07 AM9/12/16
to OpenPnP
I don't know the reason, but on Linux, moveToSafeZ(head) require a lot of time and
removing that call speeds up cph a lot.
Increase can be over 100%.
Another thing, on grbl driver, I do rotation separate from other move at different feedrate, usually 10 times or more.
I know others that use other driver and have configured rotation for 36 instead of 360 degree/rotation and on driver divide degree by 10.

For certain components, that works with simplier vision algorithm its possible to do what you ask,.
However its simpler to define feeder for it that on feed loads component on nozzle, do vision and the feedeePickUp position returned is simple NaN.
This because introduced FSM is like every problem is a nail and FSM is the Hammer. This is my personal view using itself a lot FSM but I'm convinced that Job planning and job placement is the heart of PNP where specialisation and verticalisation makes big differences.
As example, if uploking vision fails, it should
Use alernative algorithm. If that fails too it should check if there is no component on nozzleTip using vision and if that is confirmed check if component is picked up(if possible) if no, lover the feeder Z and try again.
Sure it's possible to do that with FSM but overhead is very high.On the other side, its possible to say, for this functionality you need dedicated sensor that generate exception.
If you camera fov is relative large,and calibrated, its possible for small components doing one vision lookup instead 2 if you need lookup such components and cannot relay on down looking cam and surface tension.
Another source of unnecessary delay is looking up feeder holes on drag and strip feeders requiring.

Reply all
Reply to author
Forward
0 new messages