Can you implement this python code to lock the TCP with the tool geometry?
I think it could be useful because when I do the reachability studies, I have to shift the geometry and then adjust the TCP. With this script, it shouldnt be a problem anymore.
Have you tried the Lock TCP plug-in? It was meant to lock a TCP in space when using an external axis (moving the base of the robot on a linear rail while keeping the TCP constant).
Let me know if that works for you! https://robodk.com/addin/com.robodk.plug...ginlocktcp
Sure I tried it but this has different function. In the moment the program has started, he calculates the relation between geometry pose and TCP. During execution, program keeps this transformation constant.
That results that TCP is being moved together with the geometry. I do a lot of reachability studies and have to position the geometry of the tool, adjust TCP, try to teach a program. In lot of cases I have to adjust the position of the tool and in that moment, the TCP usually stays at the initial position.
Hope I explained it correctly :-) I have attached the video how I am moving the geometry and the TCP is moving with it :-)
Sorry, I originally misunderstood your suggestion.
You want to be able to change the geometry of the tool object, while keeping the TCP location relative to the original 3D model?
Your script is very close. Instead of subtraction matrices, check the Mat.inv() function.
If you can port your script to an App, we can push it to our official online library.
You can email info@robodk.com and ask to get in touch with me if you are interested!