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

**URL:** <https://forum.universal-robots.com/t/how-to-make-make-a-half-circle-centered-at-a-virtual-point/24152>\
**Category:** Technical Questions\
**Created:** [September 30, 2022, 1:55am UTC](https://forum.universal-robots.com/t/how-to-make-make-a-half-circle-centered-at-a-virtual-point/24152 "2022-09-30T01:55:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon27094550](https://avatars.discourse-cdn.com/v4/letter/a/e99b99/32.png) [@anon27094550](https://forum.universal-robots.com/u/anon27094550)\
**Post date:** [September 30, 2022, 1:55am UTC](https://forum.universal-robots.com/t/how-to-make-make-a-half-circle-centered-at-a-virtual-point/24152/1 "2022-09-30T01:55:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![efn](https://avatars.discourse-cdn.com/v4/letter/e/35a633/32.png) [@efn](https://forum.universal-robots.com/u/efn)\
**Post date:** [September 30, 2022, 4:35am UTC](https://forum.universal-robots.com/t/how-to-make-make-a-half-circle-centered-at-a-virtual-point/24152/2 "2022-09-30T04:35:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![m.hammerton](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@m.hammerton](https://forum.universal-robots.com/u/m.hammerton)\
**Post date:** [September 30, 2022, 7:10am UTC](https://forum.universal-robots.com/t/how-to-make-make-a-half-circle-centered-at-a-virtual-point/24152/3 "2022-09-30T07:10:44Z")

</div>

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+r_cos(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

---

<div class="post-metadata">

**Author:** ![anon27094550](https://avatars.discourse-cdn.com/v4/letter/a/e99b99/32.png) [@anon27094550](https://forum.universal-robots.com/u/anon27094550)\
**Post date:** [October 4, 2022, 3:29pm UTC](https://forum.universal-robots.com/t/how-to-make-make-a-half-circle-centered-at-a-virtual-point/24152/4 "2022-10-04T15:29:53Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![anon27094550](https://avatars.discourse-cdn.com/v4/letter/a/e99b99/32.png) [@anon27094550](https://forum.universal-robots.com/u/anon27094550)\
**Post date:** [October 4, 2022, 3:31pm UTC](https://forum.universal-robots.com/t/how-to-make-make-a-half-circle-centered-at-a-virtual-point/24152/5 "2022-10-04T15:31:43Z")

</div>

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

BTW, what did you put for “Wash\_Stn” in Temp\_Pos?

---

<div class="post-metadata">

**Author:** ![m.hammerton](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@m.hammerton](https://forum.universal-robots.com/u/m.hammerton)\
**Post date:** [October 5, 2022, 6:14am UTC](https://forum.universal-robots.com/t/how-to-make-make-a-half-circle-centered-at-a-virtual-point/24152/6 "2022-10-05T06:14:01Z")

</div>

dlee34,  
Glad I could help.

The Wash\_Stn is the Plane feature
