Repository navigation
motion: keep the last pose as the forward's guess after a failed forward - #4757
Open
grandixximo wants to merge 1 commit into
Open
grandixximo wants to merge 1 commit into
grandixximo wants to merge 1 commit into
Conversation
With KINEMATICS_BOTH, motion seeds the forward of the feedback, and in joint mode of the command, with the pose of the cycle before; after one failed forward it seeded from world_home instead, every cycle until the forward solved again. For an iterative forward far from home that seed can fail again or converge to another pose with the same joints, and since that pose is a solution, the following cycles stay on it: the position reads wrong until the machine comes back near home. Home is now the guess only until the forward has solved once since all joints were homed; a failed forward puts back the pose it was given, which is the next guess. In the hexapod-sim geometry, over 23141 platform poses whose straight path from home the forward follows cycle by cycle, the forward started at home fails at 675 and lands on another pose at 319, all near the edges (X and Y at 15, tilts to 45 degrees, turns to 90); in the middle of the workspace it finds them all. tests/kins-forward-seed moves the platform to one of those, makes the forward fail for a few cycles with genhexkins.limit-iterations 0, and requires the feedback and the joint mode command to come back to the platform; without the change both stay on X-14.69 Y-14.81 Z31.67 A28.6 B18.2 C97.1.
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.
With KINEMATICS_BOTH, motion starts the forward kinematics of the feedback (and, in joint mode, of the command) from the pose of the cycle before. After one failed forward it starts from
world_homeinstead, every cycle until the forward solves again. For an iterative forward far from home, that start can fail again, or converge to another platform pose with the same joint positions. Because that pose is a real solution, the following cycles stay on it: the position reads wrong until the machine comes back near home. The joints do not jump, since the other pose has the same joints, but the DRO is wrong and so is the start of the next path in world coordinates.With this change, home is the starting guess only until the forward has solved once since all joints were homed. A failed forward puts back the pose it was given, and that is the next guess.
How often it matters, in the hexapod-sim geometry (genhexkins defaults, home 0 0 20 0 0 0): over 23141 platform poses whose straight path from home the forward follows cycle by cycle (X and Y to 15, Z 8 to 38, tilts to 45 degrees, turns to 90), the forward started at home fails at 675 and lands on another pose at 319, all of them near the edges. In the middle of the workspace (X and Y to 10, Z 14 to 26, tilts to 30, turns to 45) it finds all 10765. A forward started from the previous cycle never failed, so the trigger is something else going wrong for a cycle: a bad joint reading, a strut at or below zero length, a near-singular pose.
tests/kins-forward-seed moves the platform to X-15 Y-15 Z32 A30 B15 C90, makes the forward fail for a few cycles with
genhexkins.limit-iterationsset to 0, and requires the feedback, and the command in joint mode, to come back to the platform. On master both stay on X-14.69 Y-14.81 Z31.67 A28.6 B18.2 C97.1.