End-effector parameter missing in `ikine_XX` methods
See original GitHub issueHello robotics-toolbox-python
team,
First off, I have to say it’s wonderful that you brought this toolbox to Python, and even better, that this project is led by the creator of the original Matlab version! Big fan of Professor Corke and his work.
Describe the bug
I’m currently working on a model of a Kinova Gen3 to compute forward and inverse kinematics to pass into a Webots simulation. This arm has multiple end-effector options which requires passing an argument specifying the end-effector type to the solver. There is a parameter end
to pass this argument to the fkine
method but that parameter is absent for ikine_XX
methods.
Environment
- Your OS (MacOS, Linux, Windows): Linux (Mint 20.1)
- Your Python version: 3.8.5
Version information Did you install from PyPI or GitHub? Conda install from conda-forge repo What version number? roboticstoolbox-python 0.10.1
To Reproduce Load a model of a manipulator with multiple end-effector options (e.g. Kinova Gen 3) and select an end-effector:
kvG3 = rtb.models.URDF.KinovaGen3()
end = kvG3.ee_links[0].name # 'camera_link'
Calculate an end-pose transform, then use ikine_XX
to calculate joint positions:
Tr = kvG3.fkine(kvG3.qr, end=end)
IK_sol = kvG3.ikine_LM(Tr)
Python raises a ValueError
that an end-effector must be specified:
Note how fkine
(above) takes an end
argument to specify this but ikine_XX
methods do not. There does not seem to be a way to add an end-effector option:
IK_sol = kvG3.ikine_LM(Tr, end=end)
TypeError: ikine_LM() got an unexpected keyword argument 'end'
import inspect
print(inspect.getfullargspec(kvG3.ikine_LM).args)
['self', 'T', 'q0', 'mask', 'ilimit', 'rlimit', 'tol', 'L', 'Lmin', 'search', 'slimit', 'transpose']
Expected behavior
ikine_XX
methods take an additional argument end
to specify the end-effector. Perhaps better would be to make it an attribute of the robot class with a default value for arms with multiple end-effector options.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:7 (2 by maintainers)
This is a good solution and should be added to the codebase. The idea of a default EE is also a good one. We are rather inconsistent about tool transforms,
fkine
has it, and therefore so shouldikine
, but it does at least default to the attribute of the Robot class.Should be fixed now, let me know if problems persist