Add three21kins analytical kinematics solver - #4270
Conversation
|
Leaving it here for visibility, looks good to me, thank you |
|
Two pieces of feedback looking at it again: Docs: New kinematics modules are expected to show up in a few places; pumakins is a good template since three21kins follows the same pattern:
NaN on unreachable targets (optional, non-blocking): In the inverse kinematics, both |
| #include <hal.h> | ||
| #include <kinematics.h> | ||
|
|
||
| #include "three21kins.h" |
There was a problem hiding this comment.
Is there a reason why you need to have the include file? It seems only used by this kinematics. You can just add the defined at the top here.
| #define THREE21_A1 (*(haldata->a1)) | ||
| #define THREE21_A2 (*(haldata->a2)) | ||
| #define THREE21_A3 (*(haldata->a3)) | ||
| #define THREE21_D1 (*(haldata->d1)) | ||
| #define THREE21_D2 (*(haldata->d2)) | ||
| #define THREE21_D3 (*(haldata->d3)) | ||
| #define THREE21_D4 (*(haldata->d4)) | ||
| #define THREE21_D6 (*(haldata->d6)) |
There was a problem hiding this comment.
You are using these several times in the code below. Reading these values is expensive because they are volatile.
Having these at the right time as a local version is cheaper and better for the compiler to optimize. But, you should be smart when and where which variables are required.
Hello! This PR ports the
three21kinskinematics solver from gomotion into LinuxCNCThere is a need for a simpler and more flexible kinematics solver in LinuxCNC for robot arms:
genserkinsmodule is generalized, but it can be complex and slow.pumakinsis not very flexible, and writing custom kinematics modules for each new type of robot is quite tedious.To bridge this gap,
three21kinswas ported from the gomotion repository, just like our other kinematics modules. I'm hopeful it would be of use to many 6-DOF arm + wrist style robot arms.As a practical example, I have already switched my own robot arm to use this solver.
Please let me know if you have any feedback or suggestions!