It seems there’s a problem with drawing circles? I’m using the latest 1.1 software.
I’m not sure if this is new or not.
I created a program in blockly to draw a 150 mm circle… It then touches one side of
the circle, the center and then the other side. Here’s the problem:
-
The move commands (the touches) work fine. First a touch to (-75, 0, z),
then a touch at (0, 0, z), then a touch at (75, 0, z). This proves my piece
of paper has a correctly sized circle (I also measured it with calipers …) -
However, a circle specified with (-75, 0 , z), (0, 75, z) and (75, 0, z) is too big on one side!
To draw a circle, one specifies three points on it, right? The current position and
two more, right?
Please check my sanity! I can’t think of what I might be doing wrong …
Thanks,
Andre
Here’s a video of the test (my robot is attached from above):
https://drive.google.com/open?id=1LKj97DjKIFQnR7lxdXQqs_YGoU32Dy1n
Here’s the code produced by blockly:
#!/usr/bin/env python3
# Software License Agreement (BSD License)
#
# Copyright (c) 2019, UFACTORY, Inc.
# All rights reserved.
#
# Author: Vinman <vinman.wen@ufactory.cc> <vinman.cub@gmail.com>
"""
# Notice
# 1. Changes to this file on Studio will not be preserved
# 2. The next conversion will overwrite the file with the same name
"""
import sys
import time
import threading
"""
# xArm-Python-SDK: https://github.com/xArm-Developer/xArm-Python-SDK
# git clone git@github.com:xArm-Developer/xArm-Python-SDK.git
# cd xArm-Python-SDK
# python setup.py install
"""
from xarm import version
from xarm.wrapper import XArmAPI
print('xArm-Python-SDK Version:{}'.format(version.__version__))
arm = XArmAPI('10.2.0.10')
arm.clean_warn()
arm.clean_error()
arm.motion_enable(True)
arm.set_mode(0)
arm.set_state(0)
time.sleep(1)
params = {'speed': 100, 'acc': 2000, 'angle_speed': 20, 'angle_acc': 500, 'events': {}, 'variables': {}}
# Register error/warn changed callback
def error_warn_change_callback(data):
if data and data['error_code'] != 0:
arm.set_state(4)
sys.exit(1)
arm.register_error_warn_changed_callback(error_warn_change_callback)
# Move To Home
print('Moving to Home Pose')
params['speed'] = 100
if arm.error_code == 0:
arm.reset()
arm.set_tcp_offset([0, 0, 0, 0, 0, 0])
arm.set_state(0)
if arm.error_code == 0:
arm.set_position(*[300.0, 0.0, 600.0, 0.0, -90.0, 180.0], speed=params['speed'], mvacc=params['acc'], radius=-1.0, wait=True)
if arm.error_code == 0:
arm.set_position(*[-148.3, 0.0, 589.6, 0.0, 0.0, 180.0], speed=params['speed'], mvacc=params['acc'], radius=-1.0, wait=True)
print('At Home Pose')
while True:
if arm.error_code == 0:
arm.set_position(*[-30.0, 0.0, 700.0, 0.0, 0.0, 180.0], speed=params['speed'], mvacc=params['acc'], radius=-1.0, wait=True)
if arm.error_code == 0:
arm.set_position(*[0.0, 0.0, 730.0, 0.0, 0.0, 180.0], speed=params['speed'], mvacc=params['acc'], radius=-1.0, wait=True)
if arm.error_code == 0:
arm.set_position(*[30.0, 0.0, 700.0, 0.0, 0.0, 180.0], speed=params['speed'], mvacc=params['acc'], radius=-1.0, wait=True)
if arm.error_code == 0:
arm.set_position(*[75.0, 0.0, 730.0, 0.0, 0.0, 180.0], speed=params['speed'], mvacc=params['acc'], radius=-1.0, wait=True)
if arm.error_code == 0:
arm.set_position(*[-30.0, 0.0, 700.0, 0.0, 0.0, 180.0], speed=params['speed'], mvacc=params['acc'], radius=-1.0, wait=True)
if arm.error_code == 0:
arm.set_position(*[-75.0, 0.0, 730.0, 0.0, 0.0, 180.0], speed=params['speed'], mvacc=params['acc'], radius=-1.0, wait=True)
if arm.error_code == 0:
arm.move_circle([0.0, 75.0, 730.0, 0.0, 0.0, 180.0], [75.0, 0.0, 730.0, 0.0, 0.0, 180.0], 99.72222222222223, speed=params['speed'], mvacc=params['acc'], wait=True)
if arm.error_code == 0:
arm.move_circle([0.0, -75.0, 730.0, 0.0, 0.0, 180.0], [0.0, 75.0, 730.0, 0.0, 0.0, 180.0], 99.72222222222223, speed=params['speed'], mvacc=params['acc'], wait=True)
if arm.error_code == 0:
arm.set_position(*[-148.3, 0.0, 589.6, 0.0, 0.0, 180.0], speed=params['speed'], mvacc=params['acc'], radius=-1.0, wait=True)
if arm.error_code == 0:
arm.reset()