Direction until distance

I’m trying to sand different sizes of box shaped sinks with a Cobot ur10e. I use direction until distance with the custom vector in a part of my program.(I use the tablet to program)
With the custom vector, it goes diagonally to my center point. That’s good, but the problem is that the distance is 15 mm diagonally to the center point. But not 15 mm straight down. Here are 2 pictures that show a difference between 2 sizes of sinks and what the problem is.


You can see that I measure the sink and end up in the bottom right corner to sand “1”. But there is a difference in the distance it goes down.

I would like to know if I could make the until distance a variable, and what the formula could be to make the variable, so it always goes 15 mm straight down.

If you point the tool X or Y axis towards the center/end of vector, and you pick Direction: Tool (as you already have) and choose the X or Y axis, then it should move 15mm towards the center and not 15mm along the Base X/Y.

There’s also the script function interpolate_pose(), but it does not use distances but percentages instead. With this, you can get a pose between two other poses by telling how far between the poses you want the resulting pose to be.

1 Like