Coordinates mismatch between Klipper controller firmware and OpenPNP (offset issue)?

47 views
Skip to first unread message

Jake J

unread,
Nov 8, 2025, 2:59:33 PM (13 days ago) Nov 8
to OpenPnP
Hi,

I am building a basic Pick and place machine, but I'm having some issues configuring OpenPNP on it (likely due to my unfamiliarity with OpenPNP). I already had a BTT SKR Pico mainboard so the machine is running Klipper (the CNC optimised fork), which I understand is officially unsupported(?), but should work (based on a few projects like KliPiNP).

I have got OpenPNP connected to klipper using the TCP virtual serial port, and it appears to have interfaced without issue. Axis, pumps, lights are all working as designed and I can jog around and have got as far as (successful) primary and secondary fiducial locations and calibration.

However now, I have come to do nozzle runout calibration with the bottom camera. I have jogged the machine to identify the bottom camera location (and set it using the capture current location), but when I select place nozzle over camera it moves the gantry to the wrong position (OpenPNP thinks it has gone to the correct coordinates at X229, Y129, but Klipper reports the actual position of X254, Y163). I thought the machine had lost position so I homed and noticed that now a negative offset is present in OpenPNP when homed (X-25, Y-34) when it should be 0,0, which corresponds to the offset I had noticed before. It wasn't present during the prior primary/secondary fiducial calibration so I'm not sure what's changed (I was going through issues and solutions in order).

How can I correct for this offset, and what configuration may have caused it in the first place? 

Overall Klipper was working great until this offset issue appeared. My apologies if this is a silly question or have missed any info, I am still learning OpenPNP and the setup intricacies. 

I have attached my partially setup OpenPNP xml config, as well as log from the whole setup, and my klipper config for reference.

Does anyone have any advice? Does anyone who has used klipper have any setup tips also?

Thanks in advance,
Kind regards,
JJ
PNP Files.zip

Common Spotted Cuscus

unread,
Nov 8, 2025, 3:23:58 PM (13 days ago) Nov 8
to OpenPnP
<head-offsets units="Millimeters" x="-25.026712786155997" y="-34.485823865046186" z="0.0" rotation="0.0"/>
There's your delta.
Be aware of the machine vs nozzle vs camera location. Those could be all different.

Jake J

unread,
Nov 8, 2025, 4:25:46 PM (13 days ago) Nov 8
to OpenPnP
Ah perfect, thank you! Do you know what step in the setup may have caused this offset? I haven't applied any offsets manually so I'm guessing I have done one of the issues and solutions calibration steps wrong? I don't think I've got to the nozzle offset yet, that was my next step that involved the bottom camera (that was offset).

Am I correct in my assumption that the head (down looking) camera is "0,0", the nozzle is offset from that, and the bottom camera location is set the the nozzle and not the centre of the head camera? So the machine is aware of its true location, but OpenPNP will set a global offset to the nozzle and then readout that location instead of the true machine location? Ie in this case OpenPNP thinks the global offset to the nozzle is X-25, Y-34, so true home 0,0 it thinks the camera is at X-25, Y-34 (which in this case is wrong)?

Thanks again

Common Spotted Cuscus

unread,
Nov 8, 2025, 4:58:55 PM (12 days ago) Nov 8
to OpenPnP
To be honest, I'm not sure what exactly the intended way is. I'm finishing my first build too. (SKR Pico FTW! :) )
I couldn't find a definitive answer to what to align to machine coordinates.
If you have multiple nozzles then those must have different offsets, so maybe the head camera is better at 0,0 offset. In my current setup I have my one and only nozzle at 0,0 and my top camera is at an offset. I found this to be easier to track with visual homing and nozzle tip auto changer setup, but I don't think it really matters as long as you're aware what is what and where.

When you home the machine and set the zero location to 0,0 that refers to the machine coordinate. That is arbitrary. Whatever is at whichever location at the moment your home switches are triggered means 0,0.
Since your camera location can be more easily matched to a physical location (it is where your top camera is looking) you can determine that is where your machine 0,0 actually is in the real world. If your cam offset is -25,-34 then this means that your machine location is +25,+34 from the point the camera is looking at.
The nozzle location derives similarly.
What helped for me is to think in terms of the fixed frame of the machine and imagine coordinates of the table. E.g. the middle of my table is 100,100 and I want the cam to show up right above it, then with your offsets the machine coordinates will read 125,134, but that is irrelevant as long as the camera is looking at where it should be.

Don't quote me on this though. Others might have a better method, or even some sort of official explanation. If I remember correctly there is a wiki article on coordinate systems, but I found it only moderately helpful.
Btw if you didn't know above the jog controls you can select your frame of reference and based on that the DRO will display camera or head coordinates.

Jake J

unread,
Nov 8, 2025, 6:20:59 PM (12 days ago) Nov 8
to OpenPnP
Congrats on finishing your first build! No matter the project it feels like hardware is the easy part, the software config is always the real challenge lol.

I love the pico, its compactness (and low cost) for the features it has are brilliant. My machine is custom with a belted Z, it has space for 2 nozzles offset either side of the X plate, however as I didn't know if any of my design was going to work I am just going with a single nozzle for now. I like your idea of having the nozzle at 0,0, then having the camera offset (my camera is attached to the centre (in X, Y) of the X plate as I don't have a whole lot of X travel) and I think I'm going to try that. I have a digital assembly of my machine so I can use the model to get the XY offsets of the camera from the nozzle (then I guess manually tune it from there?)

That makes sense, I am so used to absolute coordinates on the machine I never stopped to think that the vision would introduce "virtual" coordinates. I also didn't know you could set the DRO readout vision vs head. I will have to look and mess around with that tomorrow (thanks). The wikis have been a great help, but also have greatly confused me at times (likely due to my lack of familiarity with the software I guess).

If we assume my camera is the real 0,0 (with the camera being located exactly in the centre of the X plate), then the nozzle (in the left position) being -25,-34 offset from the centre of the camera is understandable (although I think its too much, which might explain the position error - I can check the offset in the digital model though). 

I think I will sleep on it and come back to the machine tomorrow with your answer and have a play. 

Thanks for your help!

bert shivaan

unread,
Nov 14, 2025, 8:08:15 AM (7 days ago) Nov 14
to ope...@googlegroups.com
I think the DRO will show for whatever you have selected in the dropdown at the jog area. So if your nozzle is selected, maybe that explains the difference?

I did not read all the posts above, so PLEASE forgive me if I am too far off base 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/70ac3cbd-ffd1-42b9-a6ac-47a03ab04163n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages