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

Arm Freezes #18

Open
tloanPhytec opened this issue Jun 3, 2019 · 7 comments
Open

Arm Freezes #18

tloanPhytec opened this issue Jun 3, 2019 · 7 comments

Comments

@tloanPhytec
Copy link

tloanPhytec commented Jun 3, 2019

I am running into an issue when using the dorna API on Windows, Linux, and a Raspberry Pi running Rasbian. I am able to successfully connect, update firmware, and operate the arm but the arm will eventually freeze up. This freeze up seems to occur anywhere between 20 and 200 .play() move commands on my Pi and an embedded linux board using the i.MX7 processor.

The freeze up takes a little longer (after 1000 commands or so) on my Windows 10 laptop.

Once the arm freezes, .device() says that I am still connected however I get nothing but empty packets when monitoring the USB with an analyzer. I have tried different USB cables for all of my platforms.

Upon running .command({“state”:[0,1,2]}) I can also see that there are still unfinished commands in the queue (state 0 and 1). I noticed that there are always multiple (up to 4) commands in the queue with the state 1 when checking the queue upon freezing.

All my platforms are using Python3.7.3 and using the latest dorna api from github (not from pip as I was advised by dorna) and running an identical python script that has the arm pick up and place an imaginary item (if you check out the script I posted you will see that it is intended for fruit).

Any assistance by any source will be greatly appreciated!
DornaDemo2.0.txt

@smhty
Copy link
Collaborator

smhty commented Jun 4, 2019

@tloanPhytec

I went over your code.
I think the reason that the arm freezes, lies in

le_grab = {"command":"move","prm":{"path":"line","movement":0,"speed":lin_speed,"jerk":jerk,"joint":[59, 30.5736, -100.25458000000003, -23.319000000000003, -58.0]}}  # lemon
li_grab = {"command":"move","prm":{"path":"line","movement":0,"speed":lin_speed,"jerk":jerk,"joint":[59, 33.9616, -101.04853000000003, -25.912999999999997, -58.0]}}

Basically, robot has to do some extra processing when it follows a line ("path": "line"). When the line segment is very short (happens in this code), the Arduino does not have enough time to process the path, and that might cause problem.

To test this, I changed the path parameter to joint, and re ran the code.

le_grab = {"command":"move","prm":{"path":"joint","movement":0,"speed":speed,"jerk":jerk,"joint":[59, 30.5736, -100.25458000000003, -23.319000000000003, -58.0]}}  # lemon
li_grab = {"command":"move","prm":{"path":"joint","movement":0,"speed":speed,"jerk":jerk,"joint":[59, 33.9616, -101.04853000000003, -25.912999999999997, -58.0]}}

I was also able to pass 500 commands with no problem, on Windows 10 machine.
If it is possible for you, I recommend you to do similar thing, or make line segment of the code longer.

Here is the script and the logs.

sample.txt
log.txt

@tloanPhytec
Copy link
Author

Thank you very much for this input. With your tips in mind I will attempt some further testing and report back.

@smhty
Copy link
Collaborator

smhty commented Jun 5, 2019

@tloanPhytec

Try this new code.
Basically I just changed one of the line commands to joint (the short one), and it runs with no problem on my Windows 10 computer.
sample.txt
log.txt

@tloanPhytec
Copy link
Author

@smhty

Is there no way to use linear movement commands with short move segments at this time? If the API isn’t handling the extra time needed to process these commands would a sleep statement following every linear move suffice or a slower speed?

Do you have any example scripts? I am particularly worried about employing the laser attachment without an example to learn from. At this time it sounds like I won’t be able to use this to cut small shapes with straight lines such as a star pattern. Is this correct?

@smhty
Copy link
Collaborator

smhty commented Jun 6, 2019

@tloanPhytec
Looks like it faces similar problem after a while if you use short line segments.
I recommend using the joint path until we investigate the issue.
Another thing: We believe that the problem comes from the firmware running on Arduino not the API.

@mfogelson
Copy link

mfogelson commented Jun 22, 2019

I have this same issue even when running the command as "joint".

When it does freeze, I also have to turn off all the power and disconnect usb from my computer otherwise I fail to connect. Sometimes it will load 2/7 packages when connecting and then disconnect.

At what rate can we send commands to the arduino?

EDIT:
I take back my statement all the freezing seems to do with setting path = 'line'
When setting path = 'line':

  1. Halt -> results in system freezing
  2. Play -> results in path being force completed and then system freezing

@metsanou-ulrich
Copy link

Bonjour c'est ma toute première fois d'utiliser le bras de robot dorna(Dorna simple et 6 axes). j'ai déjà fais tous les préléminaire de connexion. mais j'aimerais s'il vous plais un progamme de pick and place pour tester les mouvements et la pince liée au servomoteur

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

4 participants