uarm-developer / pyuarm Goto Github PK
View Code? Open in Web Editor NEWuArm python library (uArm Metal only)
License: MIT License
uArm python library (uArm Metal only)
License: MIT License
Hello,
I have made a simple "learning mode" app, but when I play with the pump via uarm.set_pump(True)
, error appear on terminal (not always, 50% of the time).
the strangest thing is the the uarm itself continue moving, activating/deactivating pump without any problem...
Here is the log on my terminal:
trying to move
moved
trying to activate vacuum
vacum activated
trying to move
pyuarm - ERROR - Communication| ERROR: send #181 G0 X77.21 Y153.12 Z175.22 F300.0
, received error from robot:
moved
trying to move
pyuarm - ERROR - Communication| ERROR: send #183 G0 X89.65 Y302.27 Z125.57 F300.0
, received error from robot: $182 OK V2.2.1
moved
trying to deactivate vacuum
pyuarm - ERROR - Communication| ERROR: send #185 M231 V0
, received error from robot: $184 OK V2.2.1
vacum deactivated
trying to move
pyuarm - ERROR - Communication| ERROR: send #187 G0 X52.26 Y151.1 Z144.89 F300.0
, received error from robot: $186 OK V2.2.1
moved
I tried running some of the functions and the program kept getting hung...
readAngle and writeAngle don't seem to work, so when I try to attach all servos using uarmAttach(), the program gets stuck on line 82.
I was able workaround by manually attaching each servo and setting the uarm_status=1. With this, I'm able to use writeServoAngle() and moveTo(), but still not able to use writeAngle or readAngle().
I am with a Uarm Swift pro. I install pyuarm by using pip.
Connected my uarm and it can be played with Uarm Studio. Uarm studio showed firmware is 3.1.5.
sudo python -m pyuarm.tools.list_uarms
0 ports found
and I cannot use it. are there any documents for more detailed steps to use this library?
After I updated the firmware to version 1.7.2, the function detach_all_servos() is not working anymore. None servo was detached.
I have a Mac with Python virtual environment Python 3.7.3 && pip 20.2.3 but after successfully running pip install pyuarm
running python -m pyuarm.tools.firmware -d
gives the following
error:
/Users/qliu/Documents/jia.com/jia_virtual_environment/bin/python: No module named pyuarm.tools.firmware.__main__; 'pyuarm.tools.firmware' is a package and cannot be directly executed
Hello,
I have this small procedure:
uarm = pyuarm.uArm()
uarm.attach_all_servos()
uarm.move_to(-9,-5,10, time_spend=5)
print uarm.read_coordinate()
uarm.detach_all_servos()
and every time that I set the "time_spend" (for the function move_to(..)) greater or equal to 5 I get the following error, but only if I use the read_coordinate() just after the calling.
I don't know if I should report issues here or if I should use the uFactory forum, please let me know.
-- Mss
Hi,
I tried to follow the instructions on http://developer.ufactory.cc/api/python/
But already the first entry points to a non-existing repository https://github.com/uArm-Developer/pyFirmata
How can I proceed? What can I do?
My goal is to use uArmForRos..
Thanks for your help!
After I enter Y to confirm in pyuarm.tools.calibrate step 2, uArm automatic move to another place in step 3. Then, I read the coordinate using uArm.read_coordinate()
. The output is [-6.38, -6.64, 19.32]
. Did I calibrate it in the right way? Following is the log of step 3.
3.0. Clearing Stretch Completed Flag in EEPROM.
3. Start Calibrate Stretch Offset
3.0 Moving uArm to Correct Place
minAngle_L: 457
minAngle_R: 118
initPosL: 126
initPosL: 125
initPosL: 124
initPosL: 123
3.1 Saving Stretch Offset into EEPROM
3.2 Mark Completed Flag in EEPROM
-13 -9
Calibration DONE!!
Hi,
I was trying to use the arm via Python in Anaconda, but I had the following error:
[Anaconda3] C:\Users\xxx>python
Python 3.5.1 |Anaconda 2.4.1 (64-bit)| (default, Jan 29 2016, 15:01:46) [MSC v.1
900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
from UArmForPython.uarm_python import Uarm
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\xxx\AppData\Local\Continuum\Anaconda3\lib\site-packages\u
armforpython-1.0.1-py3.5.egg\UArmForPython\uarm_python.py", line 220
g_l5 = (MATH_L2 + MATH_L3_math.cos(theta_2 / MATH_TRANS) + MATH_L4_math.cos(
theta_3 / MATH_TRANS));
^
TabError: inconsistent use of tabs and spaces in indentation
Hi, looking through the code, uarm_core.py in particular, I see a lot of use of the parameter server to store the angles and positions of the servos on the arm. These are then accessed by the report_* scripts which then publish the same position and angle data out to the appropriate topics.
Normally, the parameter server is used for getting/setting command-line options and passing parameters into a launch file. I'm curious why you're using it this way rather than publishing straight to the relevant topics from within uarm_core.py.
Also, please consider removing the interactive functionality in the various scripts. It makes it difficult to start them as part of a launch file.
Thanks!
Hi,
If I try to drive the uarm too far so that it returns an error, subsequent calls to set_position() also return errors/failure even if they are to valid positions. Is this expected? Do I have to do something to clear the error?
Thanks,
Randall.
e..g
Python 2.7.9 (default, Sep 17 2016, 20:26:04)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import pyuarm
myuarm=pyuarm.uarm.UArm()
pyuarm - INFO - pyuarm version: 2.2.5.3
pyuarm - INFO - Connecting from port - /dev/ttyUSB0...
pyuarm - INFO - Connected...
pyuarm - INFO - Firmware Version: 2.2.1
myuarm.set_position(50,50,100)
True
myuarm.set_position(-150,150,100)
True
myuarm.set_position(-150,150,100,speed=50)
False
myuarm.set_position(-150,250,100,speed=50)
True
myuarm.set_position(-150,250,250,speed=50)
pyuarm - ERROR - Communication| ERROR: send #15 G0 X-150.0 Y250.0 Z250.0 F50.0
, received error from robot:
False
myuarm.set_position(-150,250,100,speed=50)
pyuarm - ERROR - Communication| ERROR: send #17 G0 X-150.0 Y250.0 Z100.0 F50.0
, received error from robot: $16 OK V2.2.1
False
myuarm.set_position(-150,150,100,speed=50)
pyuarm - ERROR - Communication| ERROR: send #19 G0 X-150.0 Y150.0 Z100.0 F50.0
, received error from robot: $18 OK V2.2.1
False
in the code it is USB VID:PID=0403:6001
but for me, the hardware id part is: USB VID:PID=2341:0042
it'd be good to make this more configurable
This problem was self fixed :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.