New Trajectory Planner - Testers/programs wanted
A linuxcnc developer has made some impressive improvements to linuxcnc trajectory planner. At this point we think it may be stable enough to have a wider group test it.
Some history.
Currently the trajectory planner in linuxcnc uses parabolic blends to transition between segments. It also has the limitation that it has to be able to stop by the end of the next segment. (effectively making have 1 segment look-ahead.) For most things - this isn't a problem. As you get into higher speeds like routing and such - the limitation starts to show itself.
Robert (the developer working on this) has added circular blending to the TP. This allows him to calculate what is need to look further ahead in the programmed path. (As I understand it - the math is harder with parabolic blends). He has not solved for every segment-segment transition. Currently he has look-ahead working for
Line-line transitions
Tangent line-arc transitions
Tangent arc-arc transitions
He hopes to study other transitions and add them in the future. His main plan was getting line-line transitions working as that is what a lot of 3d tool paths out of cam software produces. Any unhanded transitions fall back to parabolic blends. (so it still blend but has to slow back down to current TP performance)
Here is an example of the performance increase - this config is 500ipm - 30in/sec^2 (sorry - pretty crappy video)
Old vs New TP - YouTube
The current tp peaks somewhere around 100ipm(first run) - the new tp peaks over 400ipm(second run)
To test this you need to build the rip version of linuxcnc.
These are the basic steps..
You will want to get familiar with this
LinuxCNC Documentation Wiki: Installing LinuxCNC
The basic steps in terminal
git clone git://git.linuxcnc.org/git/linuxcnc.git linuxcnc-beta
cd linuxcnc-beta
git remote add github-robE https://github.com/robEllenberg/linuxcnc-mirror.git
git fetch github-robE
git checkout -b 3d-blend-arc-techdemo github-robE/circular-blend-arc-beta
cd src
./autogen.sh
./configure --enable-run-in-place
make
sudo make setuid
cd..
. ./scripts/rip-environment
linuxcnc
^ that should launch the run in place version linuxcnc with the new TP... :)
It is basically the same as the wiki link except it is also pulling the patches from Robs branch.
You are almost done... There are some changes to the ini file
In the [TRAJ] section you need to add a few lines
ARC_BLEND_ENABLE = 1
ARC_BLEND_FALLBACK_ENABLE = 1
ARC_BLEND_OPTIMIZATION_DEPTH = 50
ARC_BLEND_SMOOTHING_THRESHOLD = 0.4
So - to run the RIP version
Open terminal
cd linuxcnc-beta
. ./scripts/rip-environment
linuxcnc
This is still pretty new - so be careful and let us know of any issues..
Also - if you have some gcode programs that you think would be a good test for the new tp - please post them.
sam
Re: New Trajectory Planner - Testers/programs wanted
This all sounds great. Any idea of when will it become part of the standard release?
Van
Re: New Trajectory Planner - Testers/programs wanted
from what I understand - it will go into master (development version) after the 2.6 release. This is the to-do list before the 2.6 release. (lots of things being worked on atm.) LinuxCNC Documentation Wiki: Todo-2.6
Here are the latest directions for running the new TP.
These are the basic steps..
You will want to get familiar with this
LinuxCNC Documentation Wiki: Installing LinuxCNC
The basic steps in terminal
Code:
git clone git://git.linuxcnc.org/git/linuxcnc.git linuxcnc-rc3
cd linuxcnc-rc3
git branch --track circular-blend-arc-rc3 origin/circular-blend-arc-rc3
git checkout circular-blend-arc-rc3
cd src
./autogen.sh
./configure --enable-run-in-place
make
sudo make setuid
cd ..
. ./scripts/rip-environment
linuxcnc
^ that should launch the run in place version linuxcnc with the new TP...
It is basically the same as the wiki link except it is also pulling the patches from Robs branch.
You are almost done... There are some changes to the ini file
In the [TRAJ] section you need to add a few lines
ARC_BLEND_ENABLE = 1
ARC_BLEND_FALLBACK_ENABLE = 0
ARC_BLEND_OPTIMIZATION_DEPTH = 50
ARC_BLEND_GAP_CYCLES = 4
ARC_BLEND_RAMP_FREQ = 20
So - to run the RIP version
Open terminal
cd linuxcnc-rc3
. ./scripts/rip-environment
linuxcnc
There will be debs made soon and I will post the directions for that. (a little quicker/easier than building the above)
sam
3 Attachment(s)
Re: New Trajectory Planner - Testers/programs wanted
Here are some screen shots of some tochoidal paths. They are programmed at 3000mm/m (118ipm) With strait G64 (go as fast as you can but touch every segment) the current tp can only reach 760mm/m(30ipm) - if you say combine line segments that are within .1mm - it will peak at about twice that. (the plot is of velocity,x and y acceleration)
The new TP runs strait g64 at programmed feed. (last picture) plus nice sin/cos acceleration plots.
sam
Re: New Trajectory Planner - Testers/programs wanted
Quote:
I'm pleased to announce that Robert Ellenberg's new trajectory planner
has been merged into LinuxCNC. It is in the master branch, aka 2.7~pre,
what will become 2.7 later when it's released. It will be part of build
v2.7.0-pre0-550-gd699a06 and later. The new TP is not in 2.5 or 2.6,
those will keep working the same way they always have.
Robert's new trajectory planner improves LinuxCNC's ability to keep
machining speed up, while not violating the programmed feed rate or
machine velocity or acceleration constraints from the ini configuration.
Your G-code programs should still make the same parts as before, but
they should now adhere to the programmed feed rate more closely, and
thus cut better and run to completion more rapidly. The old trajectory
planner would sometimes slow down more than it needed to, the new one
does a better job.
Many thanks to Robert Ellenberg for all the coding and debugging, and to
Sam Sokolik and others for relentless testing.
Brave users of the master branch! Please keep an eye on your machines
and let us know if they misbehave in any way. (And let us know if your
machines run better than before!)
-- Sebastian Kuzminsky
The new TP behavior is on by default in master. If you have no TP
settings in your [TRAJ] section - linuxcnc defaults to.....
ARC_BLEND_ENABLE = 1
ARC_BLEND_FALLBACK_ENABLE = 0
ARC_BLEND_OPTIMIZATION_DEPTH = 50
ARC_BLEND_GAP_CYCLES = 4
ARC_BLEND_RAMP_FREQ = 100