Cubic Interpolator
- ewlsey
- Away
- New Member
-
Less
More
- Posts: 6
- Thank you received: 2
06 Apr 2026 15:17 #345227
by ewlsey
Cubic Interpolator was created by ewlsey
Can someone help me understand how the cubic interpolator works? There doesn't seem to be any documentation explaining what it does. The only things I can find are for the old exact stop trajectory planner.
As far as I can tell control.c queries the trajectory planner, runs that data through the kinematics, then creates joint->coarse_pos data and adds it to cubic.c, which is the interpolator. It seems to repeat that until the interpolator is full.
Then it runs cubicInterpolate() which I guess takes joint->coarse_pos and interpolates it into joint->pos_cmd.
What are the course positions and where do they come from? Are they the beginning and end of a g code move or smaller segments created by the trajectory planner?
What is the interpolator doing? It seems to be trying to create a cubic spline, but what are the way points and were do they come from? How many points does it need?
On that note, is there something I'm missing that runs faster than the 1ms servo loop that needs position and velocity data from an interpolator?
Hopefully someone knows. The control.c program is full of comments to the effect of "this is how I think it works".
As far as I can tell control.c queries the trajectory planner, runs that data through the kinematics, then creates joint->coarse_pos data and adds it to cubic.c, which is the interpolator. It seems to repeat that until the interpolator is full.
Then it runs cubicInterpolate() which I guess takes joint->coarse_pos and interpolates it into joint->pos_cmd.
What are the course positions and where do they come from? Are they the beginning and end of a g code move or smaller segments created by the trajectory planner?
What is the interpolator doing? It seems to be trying to create a cubic spline, but what are the way points and were do they come from? How many points does it need?
On that note, is there something I'm missing that runs faster than the 1ms servo loop that needs position and velocity data from an interpolator?
Hopefully someone knows. The control.c program is full of comments to the effect of "this is how I think it works".
Please Log in or Create an account to join the conversation.
- andypugh
-
- Away
- Moderator
-
Less
More
- Posts: 19838
- Thank you received: 4626
06 Apr 2026 16:54 #345230
by andypugh
Replied by andypugh on topic Cubic Interpolator
This recent commit has me suspecting that it is in some way related to non-trivial kinematics.
github.com/LinuxCNC/linuxcnc/pull/3890
github.com/LinuxCNC/linuxcnc/pull/3890
Please Log in or Create an account to join the conversation.
Time to create page: 0.071 seconds