Modi1987 / iiwaPy

A python package for controlling Kuka iiwa from an external PC
MIT License
35 stars 11 forks source link

Tutorial_control_iiwa_from_gui.py Usage #3

Closed wafflecat closed 4 years ago

wafflecat commented 4 years ago

Safeea,

First of all, thank you for developing this toolbox. We managed to get the MATLAB client working, but would get more flexibility using the Python client.

The following two tutorials work,

  1. Tutorial_directServo.py
  2. Tutorial_getters.py

But we can't get Tutorial_control_iiwa_from_gui.py working. Could you advice us on how to use it?

Also, could you advice us on how to use the PTP functions like movePTPLineEEF() or movePTPJointSpace()?

We tried axkoenig's example code, but the code gets stuck at iiwa.movePTPJointSpace([0, 0, 0, 0, 0, 0, 0], rel_vel). "before" prints, but "after" doesn't.

from sunrisePy import sunrisePy
import time 

ip='172.31.1.147'
iiwa=sunrisePy(ip)
time.sleep(4)

pi = 3.1415
rel_vel = [0.15]

print("before")
iiwa.movePTPJointSpace([0, 0, 0, 0, 0, 0, 0], rel_vel)
print("after")
iiwa.movePTPHomeJointSpace(rel_vel)

iiwa.close()

Thanks for the help.

From, Isaac

Modi1987 commented 4 years ago

Dear Isaac:

I updated the PTP motion class, now the PTP motions are functional, check Tutorial_PTPmotion.py for an example.

Cheers!

wafflecat commented 4 years ago

Safeea,

Thank you for the update!

From, Isaac Ng