Hej,
I am developing a URCap which can automatically calibrate the TCP using a few sensors. During the installation part, I define a new custom TCP, which is then used as the basis for calibrating from a program node. In there, it simply notes the X,Y,Z offsets between the custom TCP and the current TCP, and sets the global TCP with “set_tcp()”.
The problem is, that this calibrated value works only as long as the user does not change the TCP. As soon as the user switches to some other TCP, the calibrated pose is forgotten.
There are ways to store that pose, for example through “get_TCP_offset”, but that requires the user to manage that variable every time the TCP is changed. What would be ideal instead, is that the custom TCP I defined earlier would get adjusted. Then the user does not have to use any URScript. However I have tried to find a method or class that allows for that and I have come empty handed. For example, the “TCPContributionModel” specifically notes that it can be used only during installation.
Is there some other class that deals with that problem during program runtime? Is there perhaps some other way? Or does UR simply prohibit changes to the TCPs during runtime?
Thanks
We are just about to try what you describe and ran into the same problem. You can send a name as second parameter to set_tcp() but I have no idea why and to what use as we have not been able to load it again.
We have been thinking of saving the offset TCP in a variable and reload that each time we need the TCP and just leave the TCP setting to use the current TCP in move.
But we only calibrate when we setup the robot it feels good to save that new TCP “for real” as it will be used until the next day.
Hej
Can you share some resource where it depicts you can also send a name in set_tcp()?. I have not seen that in the Script Manual, but perhaps it is outdated. That would work great for me, so I am eager to try it.
As for your case, I can confirm that saving the TCP offsets into a variable and then using set_tcp() each time you want to use it, is working fine. It is just a bit of hassle. Nevertheless, I am curious, if you only want to calibrate once a day, why are you not using the TCP setup in the Installation tab? You can save the TCPs there, and it will even remain after the robot restarts (if you save the installation).
Mvh
We want to make the TCP calibration automatic for it to be easy and quick for any operator to be able to start the robot and to make sure its always calibrated. Its also a good way to learn how to do it for future projects.
From scriptmanualG5:
Hej
I see, I can imagine that would be much faster and easier for everyone involved. If I may ask, what method do you use to calibrate the TCP? Is it an off-the-shelf solution or your custom program?
Thanks for the screenshot of the manual. Turns out I was just using the old version. Though it is still a mystery to me how that name can be used later on.
Mvh