community-projects icon indicating copy to clipboard operation
community-projects copied to clipboard

generic IK controller

Open Simon-Steinmann opened this issue 4 years ago • 9 comments

Simon-Steinmann avatar Aug 18 '20 14:08 Simon-Steinmann

Beware, you committed a binary pyc file.

omichel avatar Aug 18 '20 14:08 omichel

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.

omichel avatar Aug 18 '20 14:08 omichel

.pyc is in gitignore... ohhh because of manual upload. And yes, I can add that

Simon-Steinmann avatar Aug 18 '20 15:08 Simon-Steinmann

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

Simon-Steinmann avatar Aug 18 '20 17:08 Simon-Steinmann

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

Simon-Steinmann avatar Aug 18 '20 18:08 Simon-Steinmann

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

Simon-Steinmann avatar Aug 18 '20 18:08 Simon-Steinmann

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

Simon-Steinmann avatar Aug 19 '20 08:08 Simon-Steinmann

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

Simon-Steinmann avatar Aug 28 '20 12:08 Simon-Steinmann

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?

omichel avatar Sep 06 '21 11:09 omichel