Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repeated errors reported after set_position failure #10

Open
rbw42 opened this issue Mar 8, 2017 · 6 comments
Open

repeated errors reported after set_position failure #10

rbw42 opened this issue Mar 8, 2017 · 6 comments

Comments

@rbw42
Copy link

rbw42 commented Mar 8, 2017

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

@altjz
Copy link
Contributor

altjz commented Mar 10, 2017

Hi @rbw42 , you could checkout this new commit 0b6f95

@rbw42
Copy link
Author

rbw42 commented Mar 10, 2017

Hi altjz,
Well, that seems to have fixed the original problem, but now I have a new error:

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.4.0.10
>>> myuarm.connect()
pyuarm - INFO - Connecting from port - /dev/ttyUSB0...
>>> myuarm.set_position(-147.2,85.0,100.0,speed=50,wait=True)
pyuarm - ERROR - function - TypeError - 'NoneType' object is not iterable

The help for the UArm class methods like set_position() are now opaque, since they don't describe what the possible args are. Has the interface changed?

Cheers,
Randall.

@altjz
Copy link
Contributor

altjz commented Mar 10, 2017

Hi @rbw42 , Could you open the debug? And retry?

import pyuarm
arm = pyuarm.UArm(debug=True)

Provide your firmware version would be nice!

print(arm.firmware_version)

@rbw42
Copy link
Author

rbw42 commented Mar 10, 2017

Here you go

>>> import pyuarm
>>> arm = pyuarm.UArm(debug=True)
pyuarm - INFO - pyuarm version: 2.4.0.10
>>> arm.connect()
pyuarm - INFO - Connecting from port - /dev/ttyUSB0...
pyuarm - DEBUG - Received MSG: @1
>>> arm.set_position(-147.2,85.0,100.0,speed=50,wait=True)
pyuarm - DEBUG - Send #2 G0 X-147.2 Y85.0 Z100.0 F50.0
pyuarm - DEBUG - MSG Received: $2 OK
pyuarm - DEBUG - Send #3 M200
pyuarm - DEBUG - MSG Received: $3 OK V1
pyuarm - DEBUG - Send #4 M200
pyuarm - DEBUG - MSG Received: $4 OK V1
pyuarm - DEBUG - Send #5 M200
pyuarm - DEBUG - MSG Received: $5 OK V1
pyuarm - DEBUG - Send #6 M200
pyuarm - ERROR - function - TypeError - 'NoneType' object is not iterable
True
>>> pyuarm - DEBUG - MSG Received: $6 OK V1

BTW, I'm not a git guru. To get the commit version you mentioned, I did a git clone of the repo and then a git checkout 0b6f95. Let me know if I have to do something else. The original version I had installed was from installing via pip. That is uninstalled now.

@altjz
Copy link
Contributor

altjz commented Mar 10, 2017

Seems it caused by pyuarm didn't get a reply from check moving query.
Would you provide me the uArm firmware version and hardware version?
you could get them via

print(arm.firmware_version)
print(arm.hardware_version)

@rbw42
Copy link
Author

rbw42 commented Mar 12, 2017

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
>>> arm=pyuarm.uarm.UArm()
pyuarm - INFO - pyuarm version: 2.4.0.10
>>> arm.connect()
pyuarm - INFO - Connecting from port - /dev/ttyUSB0...
>>> arm.firmware_version
'2.2.1'
>>> arm.hardware_version
'2.1'

It was a 2016 Christmas present, so is presumably the most recent model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants