I'm trying to create a Python script which is creating a Circle with the MoveC movement command. Right now I cant make the robot do the circle. In these lines I'm reading a file which contains the center of a circle(data[i]) and r which is the radius of the circle. And it can't reach the target2 in the line:
Sample code:
Code:
robot.MoveC(targetA, targetB)
Sample code:
Code:
for i in range(len(data)):
pose_i = pose_ref # Use a different variable name for clarity
x, y, z = data[i][0], data[i][1], data[i][2]
xyz_values = [x, y, z]
print(xyz_values)
POINTA = xyz_values[0] + r, xyz_values[1], xyz_values[2]
POINTB = xyz_values[0], xyz_values[1] - r, xyz_values[2]
POINTC = xyz_values[0] - r, xyz_values[1], xyz_values[2]
POINTD = xyz_values[0], xyz_values[1] + r, xyz_values[2]
targetA = RDK.AddTarget("POINTA", frame)
targetB = RDK.AddTarget("POINTB", frame)
targetC = RDK.AddTarget("POINTC", frame)
targetD = RDK.AddTarget("POINTD", frame)
robot.MoveC(targetA, targetB) # First quarter (START → RIGHT → TOP)
robot.MoveC(targetB, targetC) # Second quarter (RIGHT → TOP → LEFT)
robot.MoveC(targetC, targetD) # Third quarter (TOP → LEFT → BOTTOM)
robot.MoveC(targetD, targetA) # Fourth quarter (LEFT → BOTTOM → START)