Uarm Swift Pro set_position returns OK but arm doesn't actually move

Hi, I am trying to move the Uarm swift pro using python API and initially, when I installed the python API the commands I sent were working fine but then after update to firmware 4.3 when I try to send set_position commands it returns OK but the arm doesn’t actually move. The same happens when I try to send reset command. It’s funny because the arm would work fine once in a few times with the same script without any changes. if I send Gcode commands from Arduino it works fine. not sure what’s going on here.

Also when I try to print the current position using get_position and get_polar it gives me an error saying “ValueError - get_position - could not convert string to float: None”

Attached is the script I am trying to execute.

#!/usr/bin/env python

import os
import sys
import time
sys.path.append(os.path.join(os.path.dirname(file), ‘…/…/…’))
from uarm.wrapper import SwiftAPI

def main():
swift = SwiftAPI(filters={‘hwid’: ‘USB VID:PID=2341:0042’})

swift.waiting_ready(timeout=3)

device_info = swift.get_device_info()
print(device_info)

swift.set_speed_factor(1)
swift.set_mode(0)
speed = 20

swift.reset(speed=speed, wait=True)
time.sleep(2)

print(swift.get_power_status())
print(swift.get_device_info())
print(swift.get_limit_switch())
print(swift.get_gripper_catch())
print(swift.get_pump_status())
print(swift.get_mode())
print(swift.get_servo_attach(servo_id=0))
print(swift.get_servo_attach(servo_id=1))
print(swift.get_servo_attach(servo_id=2))
print(swift.get_servo_attach(servo_id=3))
print(swift.get_servo_angle())
print(swift.get_polar())
print(swift.get_position())
print(swift.get_analog(0))
print(swift.get_digital(0))


#_______Calibrate______

swift.set_position(x=180, y=180, z=30, speed=speed, wait=True)
print('Position 1 reached')
swift.set_position(x=180, y=-180, z=30, speed=speed, wait=True)
print('Position 2 reached')
swift.set_position(x=250, y=0, z=150, speed=speed, wait=True)
print('Position 3 reached')
swift.set_position(x=150, y=0, z=30, speed=speed, wait=True)
print('Position 4 reached')
swift.flush_cmd(wait_stop=True)

swift.reset(speed=speed, wait=True)
swift.disconnect()

if name == “main”:
main()

And here is the output of this script.

{‘device_type’: ‘SwiftPro’, ‘hardware_version’: ‘3.3.1’, ‘firmware_version’: ‘4.3.0’, ‘api_version’: ‘4.0.3’, ‘device_unique’: ‘50F14A43C1E0’}
True
{‘device_type’: ‘SwiftPro’, ‘hardware_version’: ‘3.3.1’, ‘firmware_version’: ‘4.3.0’, ‘api_version’: ‘4.0.3’, ‘device_unique’: ‘50F14A43C1E0’}
False
0
0
0
True
True
True
True
[90.3516, 129.6144, 144.4395]
[ERROR] 2018-12-27 10:39:17 [C:\Users\US16921\AppData\Local\Programs\Python\Python36\lib\site-packages\uarm_python_sdk-2.0.3-py3.6.egg\uarm\swift\utils.py:32]: ValueError - get_polar - could not convert string to float:
None
[ERROR] 2018-12-27 10:39:17 [C:\Users\US16921\AppData\Local\Programs\Python\Python36\lib\site-packages\uarm_python_sdk-2.0.3-py3.6.egg\uarm\swift\utils.py:32]: ValueError - get_position - could not convert string to float:
None
0
1
OK
Position 1 reached
Position 2 reached
Position 3 reached
Position 4 reached

Try increasing your speed to 5000.

That’s weird, we tried a few times with your code, same firmware version same Python SDK, but could not reproduce the issue. Was that happen every time on your uArm?

It was hardware issue. I got it to work with other arm that we had.

Oh, OK.