You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! This PR ports the three21kins kinematics solver from gomotion into LinuxCNC
There is a need for a simpler and more flexible kinematics solver in LinuxCNC for robot arms:
The existing genserkins module is generalized, but it can be complex and slow.
Conversely, pumakins is not very flexible, and writing custom kinematics modules for each new type of robot is quite tedious.
To bridge this gap, three21kins was 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.
Docs: New kinematics modules are expected to show up in a few places; pumakins is a good template since three21kins follows the same pattern:
A *loadrt three21kins* line in the SYNOPSIS and a === three21kins section in docs/src/man/man9/kins.9.adoc, describing the HAL pins (A1..A3, D1..D4, D6). Without this, users have to read the source to learn the pin names.
A row in the kinematics table in docs/src/hal/components.adoc.
An entry in the supported-modules list in docs/src/motion/switchkins.adoc, since the module implements the full switchkins setup.
NaN on unreachable targets (optional, non-blocking): In the inverse kinematics, both sqrt(sumSq) and sqrt(A3*A3 + D4*D4 - k*k) can receive negative arguments when the commanded pose is unreachable (or the wrist center falls inside the d23 cylinder). The result is NaN joint values returned with success status, and nothing upstream checks for NaN. Some hardening would be nice, for example clamping the sqrt arguments to >= 0 or returning nonzero so motion can report an inverse kinematics failure. I want to be clear that pumakins has the identical unguarded code and the gomotion original does too, so this is inherited behavior and in no way a blocker for this PR; consider it a suggestion for a follow-up improvement, possibly shared with pumakins.
@BsAtHome the mdi test fails sometime, have you also noticed this? I had it happen on #4280 merge build and here, not sure what's it about, was it happening before too, or is something new?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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!