community-projects
community-projects copied to clipboard
generic IK controller
Beware, you committed a binary pyc
file.
Also, it would be nice to include a README.md to explain the purpose of this controller and how it is supposed to work (with an example of robot). Ideally you should add a demo world file as well.
.pyc is in gitignore... ohhh because of manual upload. And yes, I can add that
Should be done now. I seperated the generic controller from the ik_module and the target_spawn module. This way, people can very easily use this ik_module in their own code with these 3 lines:
from ik_module import inverseKinematics
supervisor = Supervisor()
ik = inverseKinematics(supervisor)
ikResults = ik.get_ik(target_pos, target_rot=None)
So it get's decoupled, from where the target_pos and optionally target_rot comes from
now it's pretty clean, well commented and error robust (at least in my testing). Please test it yourself, and also see if you understand the code. There might be a few operations that are not clear and should be split up into multiple with additional comments
I found a weird issue. when running the generic controller for the first time, it crashes. Resetting the simulation fixes it. And after that it doesnt occur again
Also there is issues with robotic arms that have grippers included. We'll have to find a way to, ideally, automatically exclude those, or at least detect and prompt the user to manually define which links to use
I fixed the None bounds issue. However, there is still an issue on the ikpy side, when having a joint with torque or velocity limits, but no position limits. I made a PR on their side, hopefully it get's implemented soon. https://github.com/Phylliade/ikpy/pull/94
This PR is very old. Shall we review it again now that https://github.com/Phylliade/ikpy/pull/94 is merged or shall we close it?