JeanElsner / panda-py

Python bindings for real-time control of Franka Emika robots.
https://jeanelsner.github.io/panda-py/
Apache License 2.0
77 stars 14 forks source link

Change lock/unlock API call based on platform type #19

Closed alberthli closed 6 months ago

alberthli commented 6 months ago

This PR distinguishes between the Panda and the FR3 when initializing the Desk object, since the API calls seem to be different between platform type. Resolves #18.

New usage:

import panda_py
desk = panda_py.Desk(hostname, user, password, platform="fr3")  # or `platform="panda"`
desk.unlock()
JeanElsner commented 6 months ago

Hi, thank you very much for this PR! Does this mean that the rest of the Desk functions (rebooting, taking control of FCI etc.) work as intended? If you like you can add this parameter to the entry-points as well. Otherwise I will do this after merging.

alberthli commented 6 months ago

Yes, those functionalities seem to work as intended. I made the requested changes, though I haven't tested them yet, as I don't currently have time. Please let me know if there are other requests.

JeanElsner commented 6 months ago

I tested this on a Panda robot today, thanks again for this PR!