Repository navigation
motion: check circular moves against axis soft limits #4619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Rimas2200
wants to merge
2
commits into
LinuxCNC:2.9
Choose a base branch
from
Rimas2200:fix/joint-path-limits
base: 2.9
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| loadrt [KINS]KINEMATICS | ||
| loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS | ||
| addf motion-command-handler servo-thread | ||
| addf motion-controller servo-thread | ||
|
|
||
| net xpos joint.0.motor-pos-cmd => joint.0.motor-pos-fb | ||
| net ypos joint.1.motor-pos-cmd => joint.1.motor-pos-fb | ||
| net zpos joint.2.motor-pos-cmd => joint.2.motor-pos-fb | ||
| net estop iocontrol.0.user-enable-out => iocontrol.0.emc-enable-in |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does
circle->spiralcome out as for an R-word arc, where the interpreter computes the centre so both radii are equal? Is it exactly 0, or a few ulps? If it is 1e-15, which branch does this test send that circle down, and what doesR/(2k)mean in the spiral branch withkat that size?Try
G0 X-36.2949 Y44.4302thenG2 X-96.1034 Y10.8100 R-109.857against densepmCirclePoint()sampling.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, you're right. I tried your example and got
spiral = -1.42e-14, so it takes the spiral branch. The Y bounds come back as[10.81, 44.43], while sampling gives about[-173.21, 46.50]. That's a pretty big miss.The code doesn't actually calculate
R/(2k)- that's only in the comment - but the sign checks near the tan poles break down withkthis small. The current tests don't catch it. Thanks for the example, this needs fixing.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll fix it when I'm back at my PC. I'll switch to atan2 for finding the inflection points, so tiny k doesn't break the sign checks near the tan poles. I'll add your example to the tests too, and check both signs of a one-ulp radius difference.