







--
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 visit https://groups.google.com/d/msgid/openpnp/06c75d6a-cf11-4f32-a11f-bb9fa2401b1bn%40googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/openpnp/9f0b422f-4870-4cdc-ae9b-ea9853740a89n%40googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/openpnp/CABUTZN96Gyfs19K9vdtCckvErMiSrJQPuukM6T%2BMbkbvq9A2hQ%40mail.gmail.com.
--
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 visit https://groups.google.com/d/msgid/openpnp/3b9fe3d9-099b-4a1c-8fdf-d0bb75fdd585n%40googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/openpnp/06513fca-4203-4928-bffb-9ace18375d11n%40googlegroups.com.



Have you tried cropping the image down to a square before running Advanced calibration? There are entries on the Advanced calibration tab that lets you set the cropping.





> 1. The code is correct as is - LED should switch on/off for each capture.
> This would mean that there are some controller implementations out there
> (especially/at least) the ones that uses soft pwm setting on
> smoothieware that are likely to fail. This may also be depending on how
> fast the serial comm's are between controller and OpenPnP - in my case,
> the 'OK' will arrive in a matter of micro seconds. On a slower comm's,
> it will probably be milliseconds, increasing the chance that the
> controller will turn the light on properly before the OK has arrived to
> the PC, and image are captured. But also the frame rate of the camera
> will come to play here. In my setup, a new capture will arrive within
> 0-9ms, and the higher frame rate, the higher the chance there's a frame
> available exactly after the controller OK, but before the controller has
> commenced the light on.
> Actually, I can 100% accept if this is the way to view this. But I also
> don't want to just consider my own setup, where I can change my
> controller FW/setup. What do you think?
>
I think you'd have to use the settling feature to take this into
account...
Did you tried to configure the light as digital output? Does
it switch faster then?
Do you see a glitch in the image if you switch
the light off and on while taking a picture?
> 2. The best way (IMHO) to deal with this, would be if there's a way to
> peek forward to the next step in the job processor, to see if the next
> step is also 'align', and if so, not switch off the up light in the
>
I'm sorry, I don't think that's possible.
> 3. Another way would be to always switch the up light off in the
> placement steps.
> But this is not so nice (IMO), since it is not symmetric with the switch
> on. And also would leave the light on, on discard cycles etc.
>
That shall work. You'd need to find all possible routes after bottom
vision to safely switch the light off.
> 3. Another way would be to always switch the up light off in the
> placement steps.
> But this is not so nice (IMO), since it is not symmetric with the switch
> on. And also would leave the light on, on discard cycles etc.
>
That shall work. You'd need to find all possible routes after bottom
vision to safely switch the light off.Yeah, I think this will work, but I think it will have a cost on the readability of the code, and maybe introducing bugs here or there.
--
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 visit https://groups.google.com/d/msgid/openpnp/9dc647ab-5f16-4db2-b2f2-9d17329878ban%40googlegroups.com.
I mean one of the methods to make sure the camera image is stable before
it is used for bottom vision. One is a delay which you could use to make
sure the light is on and the camera has adapted to it.
Ok, even with digital it might fail. If the light is switched while the
sensor is taking an image, this image will get distorted. With rolling
shutters this is always the case, so a delay of a full frame is required.
But in fact the switching of the light affects the
image and hence settling is required for compensation.
> I am actually not sure about when the openCV image is taken, it might
> well be the last buffered image that is returned, so that would mean
> that the light have to be on for at least one frame time (~9ms in my
> case) prior to the call, to be sure.
>
Image capture is part of the pipeline. It just requests the next image
from the camera. What ever "next" means in this context...
(Side note: I once tried to put bottom vision
processing into a dedicated thread which fails because the image capture
requires exclusive access to the "machine" which is not available if the
machine thread forks a bottom vision thread. If at the end of your
improvements the image capture is relocated outside of the pipeline,
this would provide new opportunities...)
Starting a PR is always a good idea
This might be of a problem as long as the light is switched off/on: the
image you're requesting, has been captured earlier. So in fact you might
read the image, that was captured *before* the light was switched off by
the other camera. Adding some settling delay could surfer as a
workaround as long as the light issue has not been solved in a better
way. I expect, that 1 frame time shall be enough.
> For future top cam upgrade, I have a spare AR0234 camera (same as I use
> in the bottom vision). Hopefully it will make the QR code reading a bit
> less unreliable. But that time I will do real tests against a rolling
> shutter camera before deciding to use one over the other.
>
So far, I don't have experience with global shutter camera in bottom
vision, I've to admit. However, I'd love to understand why rolling
shutters might settle faster then global.
[...]> There are still several smaller ones, but they will not bring too
much
> time improvements on their own.
> I'd like to reach 4k pph, before calling it quits, but I'm not sure this
> will be possible without threading cv.
>
You're already pretty fast compared to other videos I've seen. And you
shall get another ~10% by upgrading to the 2.5 test version with Tobi's
improvements to the JobProcessor in choosing better pair of placements.
Yes. In fact you can choose among six methods how settling is handled.
Basically you need a delay to make sure the image the camera has been
captures was take when you requested it (see discussions above). In
addition there might be mechanical reasons why one would add more delays
to wait until the machine/head/nozzle is in a steady state to avoid that
the image that is captured by a rolling shutter camera is distorted. One
method would be to take two images and calculate their difference. If
"large", assume the machine is still moving/shaking to much. For global
shutter cameras like yours, there shall be no such motion induced
distortion (suppose your exposure time is short enough). I'd therefore
try to use FixedTime settling with 2 1/fps. (IIRC Mark once explained,
that he had to add the CV based motion settling methods to handle the
poor mechanics of the liteplacer which would otherwise require a very
long fix delay.) You may also check your logs for the actual settling
time required.
> The results I shared earlier in this thread, showed that my previous cam
> imx290 (rolling shutter) at 60FPS, was faster esp. taking into
> consideration that the frame rate where half of the AR0234.
> I think there are two reasons coming to play; The AR0234 is nosier, and
> the image of a non-still rolling shutter capture is much more deformed,
> which might make it easier for the cv motion comparison to find the
> difference faster. Motion cv checking takes longer time on AR0234 (don't
> remember exact number anymore), and is more variable.
> It is hard to investigate fully which of the above theories is more true
> over the other. I have much more de noise on the AR0234 to accomplish
> the same thing, and still it takes more time. And also I let it have a
> slightly higher threshold of what is considered still enough.
> Mind you - I'm talking about differences in a couple of 10ms at most.
> And now memory of the old setup is fading away.
>
Noise in the sensor can be fighted against using more light and shorter
exposure times... (I suppose a lens with a larger aperture is no option
for you anymore.) (Also keep in mind, that exposure time limited the
refresh rate. A short exposure time is needed to reach the promised
frame rates.)
Going down is limited by the motor and going up by the spring where the
spring is the weaker of the two. You might add a small wire between the
cam wheel and the sledge it pushes to let it pull up faster.
I'd say executing bottom vision in parallel with motion
shall be the most effective one as it would safe you about 80ms (If I
recall the numbers you claimed correctly). SUPPOSE, you get it right in
the first go. Otherwise it will cost you much more then 80ms.
Jan
Ideally, I'd like to find a way not to switch LED off from the previous shot, but then we need to move the control of the up light from the pipeline process() (ImageCapture.java), and get some knowledge about "entering pit/leaving pit" instead.
Ideally, I'd like to find a way not to switch LED off from the previous shot, but then we need to move the control of the up light from the pipeline process() (ImageCapture.java), and get some knowledge about "entering pit/leaving pit" instead.I now have an experimental implementation of this here:

--
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 visit https://groups.google.com/d/msgid/openpnp/889dff72-e211-46dc-89b5-c3ce03c547bdn%40googlegroups.com.
--
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 visit https://groups.google.com/d/msgid/openpnp/2967bc1f-aad0-4a14-96bc-e98ef46d58b0n%40googlegroups.com.
>the lights came on. and note the discontinuity in timestamps - there is a 1 second gap before it goes on to the next placementRemember that I am stepping through the job!
--
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 visit https://groups.google.com/d/msgid/openpnp/52f43e56-692b-4f2c-9d85-b16372f30d3bn%40googlegroups.com.
I do! But why would it turn on after first placement? I mean, how is this related to the up-camera :-? Or does this setting mean that basically LED is always kept on?Oh, well. Thanks for pointing this out, sorry for the false alarm. :-)
--
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 visit https://groups.google.com/d/msgid/openpnp/d61096c4-51f6-45fc-9e29-e154750778b9n%40googlegroups.com.

Many thanks for letting us participate in your improvements! Almost 4k
cph is very impressive for a dual-nozzle diy machine as seen on this list!
Looking at your video I'm wondering wether you checked if
pick-feed-pick has a better performance compared to feed-pick-pick. On
my boards, feed-pick-pick is significantly faster and it is less likely
to cause misspicks if the exposed part gets lost during board swap.
Did you considered loading your machine with more boards?
Did you played around with the new coodination (CommandStillstand) and
delay in controller features? That shall provide some gain as well. (It
at least will not slow the machine down.)
According to your video, your feeder and camera setup is very reliable
resulting in just a single image capture. So for more performance
parallel vision processing
> I calculated that the rocker movement is the limiting speed factor.
(going from one pick location to the other pick location, passing safe Z).
The reason why there might be a difference and possible missed
optimization is, that the multi-nozzle optimization only considers the
pick locations when choosing a path. If a feed operation requires a head
motion, that is not taken into account because the feed currently does
not expose it.
One might think of adding that, but that might lead to other issues
because if your picking twice from the same feeder and one feed exposes
two parts, the first step will always be the feed and the second pick
does not recognize, that there will be no feed required... I have not
good idea yet how to solve that...
> Yes, I hope I have it correctly, I only have full stop on camera,
drag pin, and vacuum. I think this is a rather big improvement.
>
Vacuum? Do you still use vacuum part on detection?
Basically you shall
use "CommandStillstand" for "Before Actuation?" (let the controller
finish pending motion before changing and actuator) and
"WaitForStillstand" for "Before Read?" (wait until the controller has
confirmed, that all pending motion has finished). If you do not need the
confirmation, you can continue queuing new commands (in OpenPnP, the com
link, the controllers input buffer...).
> This is with both parallel image capture AND parallel vision processing!
Oh! I did not noticed that! How did you overcome the machine task
synchronization/locking the camera within the bottom vision pipeline?
> But, yes I am toying with the thought of threading also the settle
camera alignment, and have the placement coordinate calculation continue
in the main thread.
> (the way I have it currently, is that the first nozzle/camera that
the motion planner moves to the shot location, becomes the settle camera
and during settle, it spawns the threads for the other camera(s), and
sync all last images once settle is done, then threads off all but the
settle camera into alignment threads.
> If this was done, I guess, over 30ms could be saved. But the tricky
part is then, if the alignment fails - it would have to go back from, I
guess, the first placement position to shot location again.
> As it is now, if alignment fails (or extra shots are needed) it falls
back to sequential alignment on all nozzles, so it does not even save
the "good ones", to keep it simple.
> But like you say - the alignment looks to be pretty solid, so maybe
traveling back from placement position one might not be too bad, if it
rarely happens.
>
You shall estimate how far your head can move while processing images.
Then you could start by moving just that portion. Once image processing
has finished, you can send the finial coordinates (or come back). Under
normal conditions, the head will be at full speed when the new
destination is send and the controller can combine the two into a fluent
motion (with a minor bend).
> I am currently optimizing FW on the smoothie controller, to reduce
placement time by shutting off the vacuum valve before component lands
in paste. Also doing the pick sequence vacuum opt. in the same time (but
here, the gain is smaller). I have ditched the old temp-hack that was
before, and are doing it properly this time. Hopefully I'll have that
working by the week end. It will then be the controller that does
everything regarding vacuum, and then I can also ditch the wait for
stillstand as a bonus.
>
That's a cool idea! Do you think that could be handled in OpenPnP? Lets
say like move to target location at save z, go down a little bit, switch
the valve and continue to the target location? (With CommandStillstand
coordination it might work, or one could use G0 and the extruder module...)
How would one find the perfect delay?
> know), it is not easy to keep the pockets on an 'even bases' during
> multiple runs.
>
You can enforce it by following the recommendation to synchonize #boards
in the job with #nozzles with #identical parts. If you lets say have two
nozzles, that could carry part A and you have one of this parts per
board, you shall setup your job with a multiple of two boards.
But only if the delay is choosen wisely, it is faster... I've configured
it that way with 30ms dwell time. (if you manage to get the valve to
open earlier, then this could be reduced makeing it even nicer...)
>
> > But, yes I am toying with the thought of threading also the settle
> camera alignment, and have the placement coordinate calculation
> continue
> in the main thread.
> If I, spawn vision 'part on check' threads in the beginning of the
> settlement (after fist image capture), once the settle is ready, I can
> use the 'part on' result to decide if it is worth taking the risk to
> continue to place position before doing the part alignment.