Enhance impedance control - #79
Conversation
|
Hi, I think this PR adds some really important functionality, but I will need some time to review it. I will get back to you once I have taken a look at it. Thank you very much for the PR, though! Best, |
|
Thanks for your willingness to take a look! Here are the two new Python examples running on an FR3.
trim.B82E2E43-2B00-4CC8-8B18-B52AE9AD1165.MOV
trim.247AD8D4-340B-481A-AF0C-A6783A8653C9.MOV |
f0e71ab to
e776619
Compare
|
Hello, thank you for sharing this work—the impedance control shown in the video looks very smooth and promising. I'm relatively new to robotics and have been evaluating open-source Python libraries for controlling the Franka Emika Panda. Currently, I'm using Deoxys, but I've observed noticeable jitter when performing impedance control, which affects trajectory tracking and force adjustment. I've also looked at FrankaPy, but it doesn't seem to provide a dedicated impedance control interface. Given the performance your library demonstrates, I'm very much looking forward to it… |
|
It's quite a good feature! I'm using it to use gello control franka use joint implance control! |
|
waiting for this to be approved! |
|
I set the fork to compile and release wheels in the meantime: https://github.com/nickswalker/franky/releases |
|
Hey guys, Sorry for the delay in merging this. I am currently super busy as I am pushing for NeurIPS (deadline is on the 6th of May). I cannot promise to merge this before the deadline, as I would like to review it thoroughly. However, I will try my best to do it as soon as I can. Best, |
f168fd3 to
46852c7
Compare
|
Really looking forward to seeing this land! |
The fork's release_wheels workflow produces a wheel with the same file name and version (1.1.3) as the upstream franky-control on PyPI. When users run `pip install --find-links <fork release> franky-control`, pip sees both sources and may pick the upstream PyPI wheel -- which is missing the enhance-impedance-control changes (PR TimSchneider42#79). Patch VERSION in CI to '1.1.3+impedance.libfranka.<ver>' so the produced wheel carries a PEP 440 local-version label that does not exist on PyPI. pip then prefers the local-label wheel from this fork unambiguously. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Brunch-Life <brunchlife@hotmail.com>
The fork's release_wheels workflow produces a wheel with the same file name and version (1.1.3) as the upstream franky-control on PyPI. When users run `pip install --find-links <fork release> franky-control`, pip sees both sources and may pick the upstream PyPI wheel -- which is missing the enhance-impedance-control changes (PR TimSchneider42#79). Patch VERSION in CI to '1.1.3+impedance.libfranka.<ver>' so the produced wheel carries a PEP 440 local-version label that does not exist on PyPI. pip then prefers the local-label wheel from this fork unambiguously. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Brunch-Life <brunchlife@hotmail.com>
The fork's release_wheels workflow produces a wheel with the same file name and version (1.1.3) as the upstream franky-control on PyPI. When users run `pip install --find-links <fork release> franky-control`, pip sees both sources and may pick the upstream PyPI wheel -- which is missing the enhance-impedance-control changes (PR TimSchneider42#79). Patch VERSION in CI to '1.1.3+impedance.libfranka.<ver>' so the produced wheel carries a PEP 440 local-version label that does not exist on PyPI. pip then prefers the local-label wheel from this fork unambiguously. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Brunch-Life <brunchlife@hotmail.com>
|
Sorry to keep you waiting for so long. I will have some time next week to review the code and merge the PR. |
The fork's release_wheels workflow produces a wheel with the same file name and version (1.1.3) as the upstream franky-control on PyPI. When users run `pip install --find-links <fork release> franky-control`, pip sees both sources and may pick the upstream PyPI wheel -- which is missing the enhance-impedance-control changes (PR TimSchneider42#79). Patch VERSION in CI to '1.1.3+impedance.libfranka.<ver>' so the produced wheel carries a PEP 440 local-version label that does not exist on PyPI. pip then prefers the local-label wheel from this fork unambiguously. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Brunch-Life <brunchlife@hotmail.com>
cdc7abb to
5b433be
Compare
|
We've been using the JointImpedenceTracker in 0 stiffness for collecting kinesthetic demonstrations lately and noticed that the joints aren't quite transparent. Went ahead and incorporated a simple friction compensation feedforward term (off by default), as I expect this will be a common use case. |
76b2e71 to
7eff7f0
Compare
48e909b to
38229e7
Compare
The fork's release_wheels workflow produces a wheel with the same file name and version (1.1.3) as the upstream franky-control on PyPI. When users run `pip install --find-links <fork release> franky-control`, pip sees both sources and may pick the upstream PyPI wheel -- which is missing the enhance-impedance-control changes (PR TimSchneider42#79). Patch VERSION in CI to '1.1.3+impedance.libfranka.<ver>' so the produced wheel carries a PEP 440 local-version label that does not exist on PyPI. pip then prefers the local-label wheel from this fork unambiguously. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Brunch-Life <brunchlife@hotmail.com>
The fork's release_wheels workflow produces a wheel with the same file name and version (1.1.3) as the upstream franky-control on PyPI. When users run `pip install --find-links <fork release> franky-control`, pip sees both sources and may pick the upstream PyPI wheel -- which is missing the enhance-impedance-control changes (PR TimSchneider42#79). Patch VERSION in CI to '1.1.3+impedance.libfranka.<ver>' so the produced wheel carries a PEP 440 local-version label that does not exist on PyPI. pip then prefers the local-label wheel from this fork unambiguously. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Brunch-Life <brunchlife@hotmail.com>
38229e7 to
f6b338b
Compare
The fork's release_wheels workflow produces a wheel with the same file name and version (1.1.3) as the upstream franky-control on PyPI. When users run `pip install --find-links <fork release> franky-control`, pip sees both sources and may pick the upstream PyPI wheel -- which is missing the enhance-impedance-control changes (PR TimSchneider42#79). Patch VERSION in CI to '1.1.3+impedance.libfranka.<ver>' so the produced wheel carries a PEP 440 local-version label that does not exist on PyPI. pip then prefers the local-label wheel from this fork unambiguously. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Brunch-Life <brunchlife@hotmail.com> # Conflicts: # .github/workflows/build_wheels.yml
f6b338b to
361ef4e
Compare
The fork's release_wheels workflow produces a wheel with the same file name and version (1.1.3) as the upstream franky-control on PyPI. When users run `pip install --find-links <fork release> franky-control`, pip sees both sources and may pick the upstream PyPI wheel -- which is missing the enhance-impedance-control changes (PR TimSchneider42#79). Patch VERSION in CI to '1.1.3+impedance.libfranka.<ver>' so the produced wheel carries a PEP 440 local-version label that does not exist on PyPI. pip then prefers the local-label wheel from this fork unambiguously. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Brunch-Life <brunchlife@hotmail.com> # Conflicts: # .github/workflows/build_wheels.yml
The fork's release_wheels workflow produces a wheel with the same file name and version (1.1.3) as the upstream franky-control on PyPI. When users run `pip install --find-links <fork release> franky-control`, pip sees both sources and may pick the upstream PyPI wheel -- which is missing the enhance-impedance-control changes (PR TimSchneider42#79). Patch VERSION in CI to '1.1.3+impedance.libfranka.<ver>' so the produced wheel carries a PEP 440 local-version label that does not exist on PyPI. pip then prefers the local-label wheel from this fork unambiguously. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Brunch-Life <brunchlife@hotmail.com> # Conflicts: # .github/workflows/build_wheels.yml
343c4ab to
87bf057
Compare
effad6f to
03cc84e
Compare
|
Hey @nickswalker, just a quick heads-up. I merged your changes into the master branch yesterday and added some refactoring. Unfortunately, I don't have time today to give you a full summary of my changes. Just want to let you know that with your recent edits, we are running danger to diverge. I will have more time to look into this on Monday and give you a full account of my refactoring. Btw, would you consider becoming a co-maintainer of franky? I think I could use some support, and I really appreciate the effort you have already put into this project! |
03cc84e to
7c6a3c6
Compare
9ccdee7 to
2707962
Compare
|
Thanks for doing the merge! Happy to help maintain. I rebased on your refactoring. The remaining items are not as important as what has already been merged:
|
|
It seems that the new TorqueStopMotion hangs forever in the sim tests. Perhaps the semantics for motion termination are different for torque motions than position/velocity motions in the robot/libfranka protocol. |
|
Maybe you already saw, but here is a brief summary of my changes:
I will look into the |
|
@nickswalker, I just merged the remaining changes. The If you are happy with the state of the code as it is, I think we can soon release it to PyPi. Again, thanks a lot for the PR! |
|
Great! The library users in our lab will be exercising these controllers and the desk API changes throughout the week, so I'd deem it releasable if they don't run into problems. |
|
Sounds good to me |
|
@nickswalker, bit of a random question, but would you be fine with switching franky to an MIT license? I would like to lower the legal barriers to using this library as much as possible, and I think now would be a good time for updating the license. |
|
Yes, I would endorse the next version being released under a permissive license. A quick look at git blame and it seems that the only other substantial contribution came from the original author. My understanding is we'd need their permission to change the license of code that they own the copyright to. Perhaps you could tag him in a new issue to obtain his consent? |
|
It would be extremely helpful to release this package under a more permissive license mostly because legal review inside companies (even for research only code) can sometimes be extremely slow for anything other than MIT licensed code |


Expand the impedance motion stack for both joint-space and Cartesian torque control. Adds tracking/reference-handle based impedance motions, introduces nullspace posture control for Cartesian impedance, adds joint-limit repulsion and shared torque safety utilities, and updates the Python API and docs accordingly.
Joint-space impedance
This was the primary motivation for this PR.
zero-stiffness kinesthetic teaching.
Cartesian impedance
ImpedanceMotion→
CartesianImpedanceBase, now that there is a distinctJointImpedanceMotion.Shared / API
TorqueStopfor cleanly ending impedance motions.ImpedanceMotion types weren't documented at all).
Examples
joint_impedance_tracker.py,cartesian_impedance_tracker.pyOpening to see if anyone has feedback.