I controll Swift by pyuf.
I want to know how to get the arm current position.
I have used uArm Metal by pyuarm.
I could get the current position to use get_position.
Bellow code is the testcode to controll swift and getposition.
But get_position return ‘None’.
Please tell me what to do.
import sys, os
from time import sleep
from uf.wrapper.swift_api import SwiftAPI
from uf.utils.log import *
swift = SwiftAPI() # default by filters: {‘hwid’: ‘USB VID:PID=2341:0042’}
print(“sleep 5 sec …”)
sleep(5)
goal1 = [250, 50, 150]
goal2 = [150, 0, 150]
print(“goal:”+str(goal1))
swift.set_position(goal1[0], goal1[1], goal1[2], speed = 10000)
sleep(1.5)
print(swift.get_position())
print(“goal:”+str(goal2))
swift.set_position(goal2[0], goal2[1], goal2[2], speed = 10000)
sleep(1.5)
print(swift.get_position())
uArm Serial No.: (the No. at the bottom of each uArm reading “UARM-040217004C”)
Operation System: Win(7)
uArm Controlling Method: Python (pyuf/library version:1.2)