Repository navigation
pumakins: keep every joint within a half turn of the previous value - #4708
Draft
grandixximo wants to merge 1 commit into
Draft
grandixximo wants to merge 1 commit into
grandixximo wants to merge 1 commit into
Conversation
f5311b8 unwrapped the wrist, joints 4 and 6, which came straight from atan2() and jumped a whole turn when they crossed +-180. The arm joints were left as they were. Joint 1 is atan2(py, px) less another atan2, joint 3 a difference of two, and joint 2 the difference of joint 3 from a third, so each can come back a turn away from the joint that made the pose, not only at the boundary: the waist at 150 degrees returned -210. Motion takes that as a whole turn of the joint in one servo cycle. On the puma sim, with the waist jogged to 169 in joint mode, switching to world mode set joint 0 to -191, past the -170 soft limit, and every world move after it was refused. Every joint now goes through the same angleDiff() step as the wrist, onto the value within a half turn of the joint passed in. The wrist pitch, joint 5, as well, for one rule; at +-180 the wrist is folded back on itself and the test leaves it out. tests/pumakins-unwrap walks the waist, the shoulder and the elbow through +-180 each way as well as the wrist, the pose of each step from the forward and the inverse handed the joints of the step before. Without the change 120 of the 200 poses fail, on joints 1, 2 and 3.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Follow-up to #4586 (issue #4585), which unwrapped the wrist, joints 4 and 6. The arm joints have the same problem, and worse.
Joint 1 is
atan2(py, px)less another atan2, joint 3 a difference of two, and joint 2 the difference of joint 3 from a third. So each can come back a whole turn away from the joint that made the pose, not only when it crosses +-180. Motion takes that as a whole turn of the joint in one servo cycle.On the puma sim: jog the waist to 169 in joint mode and switch to world mode. On master, joint 0 becomes -191, past the -170 soft limit, and every world move after that is refused. With this change it stays at 169 and world jogs work. Below about 167 nothing shows with the arm reaching forward, because the D3 offset moves the wrap point; with the arm leaning back, the waist is a turn off anywhere.
The change
Every joint now goes through the same
angleDiff()step as the wrist, onto the value within a half turn of the joint passed in. That includes the wrist pitch, joint 5, so there is one rule for all six.Test
tests/pumakins-unwrapnow walks the waist, the shoulder and the elbow through +-180 in each direction as well as the wrist: the pose of each step from the forward, and the inverse handed the joints of the step before. On master 120 of the 200 poses fail, all on joints 1, 2 and 3. The wrist pitch is left out, since at +-180 the wrist is folded back on itself and joints 4 and 6 are not determined.Draft
This conflicts with #4702, which moves pumakins onto the parameter block. I will rebase it once #4702 merges and mark it ready then.