hzeller / beagleg

G-code interpreter and stepmotor controller for crazy fast coordinated moves of up to 8 steppers. Uses the Programmable Realtime Unit (PRU) of the Beaglebone.
http://beagleg.org/
GNU General Public License v3.0
122 stars 51 forks source link

Detecting the anomaly acceleration in a segment #41

Closed LeonBrov closed 2 years ago

LeonBrov commented 6 years ago

I found a problem with the wrong speed determining for the segment in the planner. This occurs with short segments of the movement,followed by a change in the direction of motion. This is typical for the case when a straight line goes into an arc or circle. In these segments, due to a high initial speed and a short braking path in the segment,there is an acceleration exceeding the permissible limits. That as a result leads to an uncontrollable situation.

hzeller commented 6 years ago

Thanks for providing example code that exposes the problem! Having test code is always a good way to verify later if things have been fixed.

We know that at this point, the planner is not perfect yet and is a little too simplistic at times, and indeed for some short segments we have some optimizations that can violate the constraints. (Adding Hartley as CC, as he is thinking about the tradeoffs between 'optimal movement' vs. 'reasonable fast machine' tradeoffs).

Good news is, that I'll allocated some time this summer to bring the planner into a better shape.

If you would like to help out in the process, subscribe to beagleg-dev where we sometimes discuss the details.

Thanks, Henner.

On Wed, 20 Jun 2018 at 12:19, LeonBrov notifications@github.com wrote:

I found a problem with the wrong speed determining for the segment in the planner. This occurs with short segments of the movement,followed by a change in the direction of motion. This is typical for the case when a straight line goes into an arc or circle. In these segments, due to a high initial speed and a short braking path in the segment,there is an acceleration exceeding the permissible limits. That as a result leads to an uncontrollable situation.

You can view, comment on, or merge this pull request online at:

https://github.com/hzeller/beagleg/pull/41 Commit Summary

  • Detecting the anomaly acceleration in a segment

File Changes

Patch Links:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hzeller/beagleg/pull/41, or mute the thread https://github.com/notifications/unsubscribe-auth/AAImiVITpq7kRNSMPHKcANPXMEpYQ6K-ks5t-qAvgaJpZM4Uv1ql .

hzeller commented 2 years ago

So, uhm, a little late, but finally I have merged this PR as a planner fix is right around the corner (did ran .github/bin/run-clang-format.sh on it, as this had been added recently)

I have #if 0 out the test for now (as it is still failing), but Lenoardo is actually fixing the planner currently (#44) so when that is merged, this test can be enabled.

hzeller commented 2 years ago

Merged manually (with the #if 0 for now), so this can be closed.