How to make make a half circle centered at a virtual point?

Hi,
our research team has UR10e and uses RTDE in Python.
We want to let the robot make a half circle centered at a virtual point.
For example, the gripper is holding the center of a 20 cm stick.
A pen is attached to one end of the stick and the other end should be the center of the half circle.
How can we make a 20 cm radius half circle in this case?
The idea we were able to think about was to fix the latter end as the main coordinate of the robot.
But, we couldn’t figure it out.
Could you please provide any suggestions?
Thank you in advance.

I don’t know if this is a proper way of doing it, but it should work to change the TCP of the robot to the end of the stick (the center point of the radius), read the current TCP pos and then change the robot’s Rz to a new position (180 deg offset for half a circle).

Another solution could be to use the MoveP CircleMove to generate a “perfect” half circle. I have not worked a lot with running a robot using RTDE and Python, but you should be able to write three positions for the CircleMove.

dlee34,
I did something similar but with URScript.
I was using a camera to find parts on a rack.

My approach was to generate X and Y position lists based on get_target_tcp_pose()
using trigonometry populated the X Y positions on the curve of the arc.
FYI. I was keeping my tool orientation the same for all points and I was doing a full circle
this is my code.
I had 10 positions but you would only need 2 or 3

def Circle_Path(): # Circumferance of Part.
global r = 7.5/1000 # Radius of circle in
global a = 0 #In radians
global i = 0 # position in list

Centre_Pos = get_target_tcp_pose() # Get current TCP position
Temp_Pos = pose_trans(inv(Wash_Stn),Centre_Pos)
global cx = Temp_Pos[0] # Extract X position
global cy = Temp_Pos[1] # Extract Y position

global x_Pos_list=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] # List of X 10 positions
global y_Pos_list=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] # List of Y 10 positions

while a < 6.59715: #Radians = to 360 degrees
x_Pos_list[i] = cx+rcos(a) # Calculate X position
y_Pos_list[i] = cy+r
sin(a) # Calculate Y position
sleep(0.1)
a = a+0.31416 # Increment number of Radians
i = i+1 # Increment list position
end
end

def update_pos():
Temp_Pos[0] = x_Pos_list[j] # Update X position from List
Temp_Pos[1] = y_Pos_list[j] # Update Y position from List
global Circle_Point = Temp_Pos #Update MoveP position
global try = True
end

You would also need to modify your RZ with each position update so your orientation moves with your X,Y Offset

This is what I wanted to do, but the problem is that MoveP is not working with UR_RTDE…
Anyway, thanks for sharing your opinion!

Thanks a lot, Hammerton.
This is really helpful for our case.

BTW, what did you put for “Wash_Stn” in Temp_Pos?

dlee34,
Glad I could help.

The Wash_Stn is the Plane feature