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

some issues about the `ik` functions #11

Closed elenacliu closed 5 months ago

elenacliu commented 9 months ago

hello, thank you very much for your work! I have tried it and it is so impressive! But I'm a little confused why in your ik function, q_7 is redundant joint? If it is only 6-DoF indeed, some waypoints may generate nan results. It can solve ik successfully if we do not fix the value of q_7.

elenacliu commented 9 months ago

Besides, what is the difference between ik and ik_full?

JeanElsner commented 9 months ago

Hi, the provided IK is analytical and derived geometrically in this paper. By fixing the redundant joint, the algorithm finds all solutions (i.e. different cases such as elbow/wrist up/down). The ik function will return the joint configuration that is case-consistent with the provided current joint configuration (so there will be no "jumps" if you use this function to compute a trajectory for instance). ik_full however will return up to 4 different solutions (the different cases). Additionally, I've chosen the default value for q_7 such that it's the robot's "natural" starting position, i.e. located far away from the joint limits.

elenacliu commented 9 months ago

Thank you for your reply. By the way, will you support some other solutions? For example, some numerical solutions?

JeanElsner commented 6 months ago

I'm currently not planning to implement other IK methods. However, both the robotics toolbox for python as well as the dqrobotics library include numerical IK for the Panda that can be easily used together with panda-py.