Bottom Camera position changed

157 views
Skip to first unread message

zzimdog

unread,
Apr 1, 2023, 12:47:34 AM4/1/23
to OpenPnP
Not sure what happened here. All bottom cam operations and calibrations have been good up until this point. Visual homing is working. I have not done any new I&S stuff and had just added my board, job and 1 feeder. Everything looked good there. So I decided to add the rest of the nozzles and ten do a feeder pick and place operation. I added nozzle 2 went to I&S it showed up needing calibration. I pressed the button to move nozzle over camera as instructed. It moved to a location other than where the camera was. I then went to bottom camera and pressed the button to move camera to the coordinates and it zipped over and smashed into the rail. Safety override is not checked off.

Any suggestions on what would cause these coordinates to change? The step right before this happened I did an unload nozzle and it moved to the manual location I had previously setup so it still knew where it was.

I will reset the coordinates but am hoping that this kind of thing does nto keep happening.

Thanks,

Mike

zzimdog

unread,
Apr 1, 2023, 1:22:51 AM4/1/23
to OpenPnP
Rest the coordinates for the bottom camera position by moving nozzle over camera lowering nozzle to board height and centering. Captured via camera position and then tried via tool position.pressed apply.  I cleared this log post before starting this time.  I manually set z height to -7 as I don't trust it to raise it if it goes off in the weeds again. 
I then raised the nozzle and moved 100 mm to the right.  pushed tool to move to bottom camera position and that worked. I then moved nozzle 110mm to the right Clicked on center tool under I&S and it did not return to the spot I had just defined.  

No idea what is going on now other tan it must be time to call it a day ;)
NT2 calibration.png
nt2calibration.log

mark maker

unread,
Apr 1, 2023, 7:06:50 AM4/1/23
to ope...@googlegroups.com

> Rest the coordinates for the bottom camera position by moving nozzle over camera lowering nozzle to board height and centering. Captured via camera position and then tried via tool position.pressed apply.

See the contradiction? If the nozzle's position is the one you want to capture, you also need to use the tool capture button:

Coordindates in OpenPnP are neutral. But all the so-called Head-Mountables on a Head have different offsets. Using the right buttons (camera or tool) is therefore important. And then also the selecting the right tool in Machine Controls is important. Note, if a camera is currently selected, it will take the Nozzle that was last selected, as tool.

It is easier to use Issues & Solutions to do that stuff. Just enable Include Solved? and Reopen the solution. Then read instructions extra carefully:

_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/9f97e52a-6599-4bb3-8c62-2104e077695cn%40googlegroups.com.

zzimdog

unread,
Apr 1, 2023, 12:12:40 PM4/1/23
to OpenPnP
I did use the capture tool position and am not sure how I am contradicting myself. It can get  a little confusing with the camera and tool position at least when you are just starting out. So the first time I did it with the camera as it kind of becomes the normal button you use so made the mistake.  I then noticed this and did it with the the tool position. and it still did not work. There is something wrong here. If you read the second post. I reset the coordinates and then moved the head away 100 mm and then pressed the goto coordinate key and everything was good. I then moved 110 mm away. Went into I&S and pressed the move nozzle to tool and it does not go to the same spot. I have used I&S for pretty much everything and think it is very useful.

I am documenting my steps again. as I have just turned on the lightplacer to do it with a fresher mind ;)

Procedure:
1) Homed machine
2) cleared log
3) click position tool over camera
4) lower Z to -35 everything looks good
5) Raise Z to -5 
6) move 200 mm right
7) goto I&S enable NT2 calibration
8)  click on center nozzle over tool ( Nozzle now shows in lower left quadrant )
9) lower nozzle to -35 (coordinates show x -68.02 y 58.441 z -35) nozzle way off through I&S 
10) raise nozzle to -5
11) move 210mm to the right
12) goto bottom camera position location and click on position tool over camera (camera still raised shows it slightly high in top right quadrant)
13)  Lower z to -35 (tool is exactly over cross hairs . 
14 copy log and attach to this post. 

So something is wrong here with I&S I understand I may have some camera settings that are off maybe and I am sure lots of other stuff as I have only done what was asked from I&S so far except the stuff in the advanced milestone as it does not seem like something I would need at this time.  I really do appreciate all the help and was thinking it would be helpful to document the stuff I am noticing from a complete newbie perspective to contribute that way as I cannot offer much more to the project at this time. I am thinking maybe this is causing frustration more then it might help though ;)

Thanks,

Mike
nt2calibrationnextday.png
bugnt2.log

Mike Z

unread,
Apr 1, 2023, 1:23:41 PM4/1/23
to ope...@googlegroups.com
Now attempting to reset the bottom camera position through I&S and then doing nozzle calibration. 
1) cleared logs
2) nozzle location above position set in machine cameras where I left off ( x-64.633 y 64.020 z -35)
3) raise z 30mm
4) uncheck solved and switch back to nozzle NT1 as per instructions of using smallest nozzle. 
5) jog nozzle down to -35 (nozzle NT1 came right on crosshairs)
6) set feature diameter to inside air bore. turns solid green shows diameter 13 pixels score of 4.5
7) receive error message that preliminary calibration cannot be performed because advanced calibration is already active. 

Stopping here as I do not see the advanced calibration in solved so assume I would uncheck this outside of I&S and not sure 
what this accomplishes. It seems like the issue is maybe in advanced calibration which all settings are either default or set by I&S.

Maybe I&S moves to different locations based on different parameters then if working outside I&S. No idea how this stuff works but something 
seems odd. 



redoingbottom camerainI&S.png
redobottomcameraposin_iands.log

Mike Z

unread,
Apr 1, 2023, 1:41:57 PM4/1/23
to ope...@googlegroups.com
So I decided to just try to calibrate NT2 manually and see how that goes. 
1) Nozzle is still above camera. 
2) Enabled the calibrate checkbox. 
3) clicked the position tool over camera button
4) moves to same coordinates as I&S 

I assume to do anything further I just need to disable the advanced calibration as I am thinking this is where the problem is.

Mike Z

unread,
Apr 1, 2023, 1:47:24 PM4/1/23
to ope...@googlegroups.com
Here are screenshots looks like maybe this secondary z setting it picks up and maybe because of my diffuser view?
Guess I am going to need to breakdown and make changes outside of I&S. Hopefully don't have another start from 
scratch after this. 

Mike
advancedcalsettings.png
advancedcalsettings2.png
advancedcalsettings3.png

Mike Z

unread,
Apr 1, 2023, 2:06:33 PM4/1/23
to ope...@googlegroups.com
Never mind on the z. I just realized that it should have nothing to do with this issue and it shows in the diagnostics
where it thinks the bottom camera is. I guess this is only updated through I&S setting bottom position and if 
you use the set position under machine settings directly it is not affecting this. 

I am too new to make any suggestions or judgements but if this is the way it is going to work maybe on the interface 
there is a checkbox that if you uncheck it then the buttons show up to manually set up things. Like if you are using
I&S then the buttons for capture positions etc in all machine settings that are controlled by I&S are greyed out? 

I guess this is not a big problem as it seems like for the most part people in the group are all way beyond this step 
and having issues with more advanced stuff. But if another yahoo like me joins it seems like destiny for them
to struggle through this like I have and it is not at all intuitive to just jump into I&S and go through solved stuff
to find when it sets up the bottom camera position. Unsolve it then try it.
 Find out first you need to disable advanced  calibration then go back through I&S for each of them again when most likely you are having a bottom camera issue
you goto it in machine settings. It has the button to navigate to its position and then right beside it a way to capture that 
position. Surely I am not the only one who would click it and think okay now my position is set. Test it and it returns 
to the right spot everything looks good until you go back to I&S for something. 

Mike

tonyl...@gmail.com

unread,
Apr 1, 2023, 10:05:02 PM4/1/23
to OpenPnP
I don't know if this is adding to the confusion but the four Location entries (X, Y, Z, and Rotation) on the camera's Position tab should NOT be manually changed either by typing in the boxes or by using any of the capture location buttons on that tab if Advanced Calibration is active (the Enable advanced calibration to override old style image transforms and distortion correction settings check box is checked on the Advance Calibration tab). This is a bug in the GUI and need to be fixed to prevent further confusion. Those settings should be disabled if Advanced calibration is active just like the Units per Pixels settings on the General Configuration tab.

Tony

Mike Z

unread,
Apr 1, 2023, 10:17:27 PM4/1/23
to ope...@googlegroups.com
I think having all the buttons disabled that you can not use without having to go disable I&S or advanced calibration or anything else that by using them screws something up would definitely make it less confusing :0 

I am back in the I&S trying to fix stuff now and waiting 15 to 30 minutes for it to do it's thing is not bad the first couple times but after about the 10th time it gets to be too much. So definitely want to keep from changing something outside of the place it is supposed to be changed to a minimum ;)

mark maker

unread,
Apr 2, 2023, 4:45:15 AM4/2/23
to ope...@googlegroups.com

Mike,

I don't understand what the problem is supposed to be, exactly.

I&S is not doing something "magical". All it does is help you set the exact same settings you see, and can manually modify, in the Machine Setup.

What it does, is guiding and instructing and sometimes vision-assisting you to do it right, and - very important! - in the right order. Some things in OpenPnP are built on top of each other like a house of cards. Your head offsets and the bottom camera position are prime examples of this. Those are needed early so we can measure other things later, taking offsets and positions into account. If you change those offsets and position manually, you really, really, really need to know what you are doing. It is easy to quickly invalidate many, many settings, calibrations and captured locations are built on top of these, to make the house of cards tumble down!

Therefore: Stick with I&S, and if this process leaves you in the rain somehow, report it here, so either we can point you along, or we can improve I&S. If you start to trial&error your way out of the situation, things can deteriorate quickly.

Or then be prepared to fully understand the house of cards, and to live with its delicacy. Needs time an patience for that, hear from you in some weeks 😉.

_Mark

mark maker

unread,
Apr 2, 2023, 5:30:28 AM4/2/23
to ope...@googlegroups.com

Tony,

I remember this differently, but I might be mistaken.

Remember, we wanted Advanced Calibration to be additive, rather than to just overwrite (and lose) the uncalibrated offsets:

    @Override
    public Location getCalibratedHeadOffsets(LocationOption... options) {
        if (! Arrays.asList(options).contains(LocationOption.SuppressCameraCalibration)) {
            return getHeadOffsets().add(advancedCalibration.getCalibratedOffsets());
        }
        else {
            return getHeadOffsets();
        }
    }

We specifically wanted that to make it irrelevant whether Precision Head Offsets Calibration or Advanced Camera Calibration comes first, and each can now be revised independently, including IMHO setting offsets manually. For all I know it is the same thing for the bottom camera, in the absence of a head the "head offsets" are just taken as the absolute camera location.

For that purpose, in addition to the raw getHeadOffsets(), we introduced the second Method getCalibratedHeadOffsets(). Then we carefully revised each call to the old getHeadOffsets() to see if they wanted raw or calibrated. The former obviously for the calibration itself, the latter for all other uses, including I believe the bottom camera position. But again, I might be mistaken.

See also this discussion (it was still "work in progress", though, disregard point 8 for instance):

https://github.com/openpnp/openpnp/pull/1297#issuecomment-953573739

_Mark

tonyl...@gmail.com

unread,
Apr 2, 2023, 9:55:53 AM4/2/23
to OpenPnP
Mark,

Yes, I agree with what you are saying but I still see no reason to change the raw getHeadOffsets() (what is displayed on the Position tab) when Advanced calibration is active.  When Advanced Calibration is active, the true position of the camera is  getHeadOffsets().add(advancedCalibration.getCalibratedOffsets()) so allowing the operator to change the raw  getHeadOffsets() will just mess-up the true camera position rather than fix it.

Tony

mark maker

unread,
Apr 2, 2023, 10:49:30 AM4/2/23
to ope...@googlegroups.com

Yes, I agree that this will more likely mess things up, than fix anything. Like I said this is a "house of cards".

But on the other hand, I'm very reluctant to lock users out completely, and imposing unconditional control by I&S and other calibration functionality. We could easily lock ourselves out in circular dependencies etc., especially when something is not working right and you have to revisit stuff, find workarounds. Sometimes, a manual calibration is still a valid fall-back, IMHO.

We made sure the Advanced Camera Calibration is a black box. It applies the tilt offsets as a relative distance, and in complete encapsulation together with the pixel warping. Anything outside the box can be treated as before. We also still have the nozzle tip calibration, that actually calibrates the precision bottom camera position each time the machine is homed or a nozzle tip loaded. These third offsets (that may also compensates nozzle tilt) are applied on top of the basic and calibration offsets.

Between those two it can become useful to be able to adjust the camera position, e.g. after changing the coordinate system reference of the machine. Example: after having tinkered with the machines X axis, or the controller homing settings, a user wanted to shift everything in X by 3.2mm to the right. So they could go through all the already captured locations and adjust them manually, including the bottom camera position and the homing fiducial. A zero-sum adjustment, no need to redo the bottom camera Advanced Calibration.

I know this is exotic, but it happens (I did that twice 😁)

_Mark

Mike Z

unread,
Apr 2, 2023, 12:06:39 PM4/2/23
to ope...@googlegroups.com
Hi Mark,
I think I&S has been great but agree that tweaking things when it doesn't work is necessary.  Obviously I have no idea what I am doing on here yet and was just giving the perspective of a new user.  From my perspective it seems that while I am trying to get setup and going while using I&S and not understanding that it is using different offsets etc. It would save tons of time all around by disabling the ability of for instance changing the bottom camera position. 

For example I&S would not calibrate the new nozzle. It would not move to the correct position but also did not bring back up the bottom camera position as unsolved. So then I am looking through machine settings to see what changed.  I go to bottom camera click on go to position it goes where it should everything looks good. Go to I&S click on calibrate nozzle and it goes to a different position. That is the problem.

What I was saying was don't take the ability to tweak settings away but it would seem a positive action being required by the user to enable steps that will break I&S advanced settings.

For instance if there was a check box that need to be checked off to enable for instance the set nozzle position from the bottom camera settings. If I had a problem and was in looking at the position and it was off or whatever I would not be able to set it without knowing it may cause problems using I&S. If i uncheck the box then it would give me a warning that this would break advanced camera setup or whatever. It could then even unsolve the related settings so they reappear in I&S and guide the user. It may even keep new users from doing whatever caused the issue in the first place. 

I am not a programmer and this may not be feasible but hopefully it makes sense. There will always be that problem of documentation being outdated and new people joining so just putting out my experience to maybe help solve the frustration from those like yourself who take the time to help us along. 

I appreciate all the effort and hope this is not taken the wrong way. This group has been great and I hope to be able to get my machine up and running and be able to help field questions so you guys can stay focused on the advanced stuff. Getting closer I at least have my 3 nozzles defined and hopefully today I can get past why this thing thinks my reference strip feeder is going the wrong direction. Hopefully I am about to the stage of getting a job loaded and building my first board :)

Thanks,

Mike

Reply all
Reply to author
Forward
0 new messages