LinuxCNC S-Curve Accelerations

More
5 years 4 months ago #212725 by rmu
Replied by rmu on topic LinuxCNC S-Curve Accelerations

Grotius wrote: Hi,

@ Rmu,
If this linuxcnc repro is working out of the box, wich i don't know at the moment, would be helpfull.
Then a diff to master will tell us what has to be modified for the scurve implemenation.


It is just a few commits, and last I tried it rebased relatively cleanly on master. The math is in the ipython notebook, and there is another thread in this forum discussing the whole thing. github.com/rmu75/linuxcnc/blob/rs_6otp/src/emc/tp/tp.c#L2436 contains a description of the approach. Some familiarity with Bezier curves is expected, wikipedia should do it for starters. In principle it is the same what the tinyG thingy does, transplanted into the "execution" stage of the linuxcnc trajectory planner.

Caveat emptor, this thing is not finished and may explode your machine and/or computer, esp. if you use feed override (which will have very unpredictable effects).
The following user(s) said Thank You: Grotius

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago - 5 years 4 months ago #212734 by arvidb
Replied by arvidb on topic LinuxCNC S-Curve Accelerations

TheRoslyak wrote: hi arvidb
I start testing your branch "smooth1d".
I seem to have compiled everything correctly. maybe )
But I didn't notice the difference. Can you explain How to configure your function? for Dummies

Thanks for testing!

It's quite possible that most people won't notice much of a difference with jerk-limited planning. I think it will have the most effect on heavy machines with a very tight servo loop and where an MPG is used for jogging. How did you test it?

There should be no configuration needed. If the jerk-limited planner is active, you will see debug printouts such as these on the terminal each time a new move is planned:
Code:
Smooth1d::replan(), state [0.0, 0.0, 0.0, 9.44062555275579], s_target -498.5593744472442, v_limit 30.383333333333333, a_limit 502 Smooth1d::stop(), state [0.0, 0.0, -30.383333333333333, -0.4787863109007038]
Did you see such printouts? If not, make sure you are jogging in joint mode, since the joint planner is the only planner that I replaced. Once the machine is homed and in axis jog mode, the old planner is still used.
Last edit: 5 years 4 months ago by arvidb. Reason: Spelling...

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago #212735 by Grotius
Replied by Grotius on topic LinuxCNC S-Curve Accelerations
Hi rmu,

Thanks for the info. I will take a look soon. I have programmed 3d beziers before, but i want to stay at the scurve implemenation following the scientific papers.

For info. A hal s-curve component. It's really easy to test this component using the "demo-mode" hal pin.
github.com/grotius-cnc/hal-scurve

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago #212759 by arvidb
Replied by arvidb on topic LinuxCNC S-Curve Accelerations
I've pushed an update to my repo . If you've already cloned the repo, use 'git pull' to get the updated code.

Description of update: There was an omission in the build script (in the Submakefile for smooth1d) that could make fresh builds fail with "No such file or directory". This commit should fix that problem and also adds proper source file dependency checking, and a less intrusive integration into the main Makefile.

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago #212790 by rodw
Replied by rodw on topic LinuxCNC S-Curve Accelerations
Very exciting!
I think the other class of machine that should benefit from this work are light weight plasma cutters with acceleration > 5 m/s/s and 30-40 m/min rapids.

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago #212795 by rmu
Replied by rmu on topic LinuxCNC S-Curve Accelerations

Grotius wrote: Hi rmu,
For info. A hal s-curve component. It's really easy to test this component using the "demo-mode" hal pin.
github.com/grotius-cnc/hal-scurve


The tricky thing is not the generation of a jerk limited linear velocity profile but the planning of a trajectory in 2d/3d that respects acceleration- and accuracy-constraints (G64). The clothoid paper somebody posted looks very promising, but it would be a big project hacking that in.

Please Log in or Create an account to join the conversation.

Time to create page: 2.004 seconds
Powered by Kunena Forum