Is there a simple way to set the TCP ( in 2D ) by only changing X Y and RZ ?
Conditions:
- The tool axis is alway parallel to Z. ( RX and RY = 0° )
- Z is constant
You should be able to use the script function. Check the script manual for more useful functions if needed.
To use set_tcp() you have to know all the values.
I’m looking for a way to get / calc. / teach those values without tilting RX,RY.
If your TCP is a camera, it’s hard to maintain the focus distance while tilting. The result using the standard fuction to measure TCP leads to bad results.
Sorry but this is not my topic. get_tcp_offset provides the active TCP definition.
I need a replacement for the setup tool /General/TCP to calculate the TCP offset !
The standard setup tool requires to rotate the RX and RY axis. Which I don’t want !
If I simply move in X,Y and rotate by RZ, it should be sufficient to gain the TCP offsets.
It should be possible to move in 2 different poses to a given point.
I use the native TCP at tool flange ( with zero offset )
I can get the 2 poses by get_actual_tcp_pose(). This data should be sufficient to calculate the TCP offset.
Ah. I had to read your posts a couple of times, before I understood what you’re requesting.
If the existing Teach Wizard does not allow you to calculate the TCP by only moving X, Y and RZ, then there’s no “smart” feature in PolyScope that allows for this.
There exists different methods to calculating a TCP from 3-4 points in a sphere. You can find them on Google (I don’t know them personally). That could be worth a try.
I think there’s a little bit more to this. Camera calibration to robot is more involved then just setting a “tool” for the camera. You can always set a manual tool for the camera, by measuring the position of the camera relative to the robot tool flange en then use the camera focus distance as the Z value. Proper mounting should make this easy. Alternatively, let the camera image a sphere, like a ping-pong ball and let it compute the moments of that image. This will give you x/y/z offsets (size ration is a measure for z distance. Find 4 poses that give the same image moments and you have the 4 poses required for the TCP wizard.
Then secondly, you also need to calibratie image coordinates to the robot pose. But there’s an example for that in the UR download section
Thank you for your input. Today it’s exactly how we do it.
1st camera distortion is compensated (by chess board image)
2nd TCP by identify a sphere in 4 poses
But here is the issue: Find a proper distance by the "diameter’ of the sphere is not accurate.
It’s much better find the focus distance with flat image and check the edge sharpness.