scurve trajectory planner
- yrsiddhapura
- Offline
- Premium Member
-
Less
More
- Posts: 134
- Thank you received: 5
21 Aug 2025 03:14 - 21 Aug 2025 03:15 #333746
by yrsiddhapura
Replied by yrsiddhapura on topic scurve trajectory planner
I would love to use on mine horizontal boring mill. Does it supports Mesa based setup ?
Last edit: 21 Aug 2025 03:15 by yrsiddhapura.
Please Log in or Create an account to join the conversation.
- Grotius
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 2419
- Thank you received: 2348
21 Aug 2025 08:12 #333750
by Grotius
Replied by Grotius on topic scurve trajectory planner
Pcw had no luck on Mesa. The install script
destroyed his home directory back then.
This was done by a rm -rf command
wich can do nasty things so we dont use that any more for cleaning up environment.
I only tested it on Ethercat with el2124 driven steppers and delta servo.
destroyed his home directory back then.
This was done by a rm -rf command
wich can do nasty things so we dont use that any more for cleaning up environment.
I only tested it on Ethercat with el2124 driven steppers and delta servo.
The following user(s) said Thank You: yrsiddhapura
Please Log in or Create an account to join the conversation.
- heaven
- Offline
- Junior Member
-
Less
More
- Posts: 34
- Thank you received: 3
24 Oct 2025 13:29 #337053
by heaven
Replied by heaven on topic scurve trajectory planner
Hi Grotis, your work is absolutely impressive! I've been diving into LinuxCNC and your code to better understand motion control, and it's been a fantastic learning experience. I have a couple of questions I'd love your insights on:
Does your S-curve motion profile support an online trajectory generator like Ruckig for multi-axis systems?
Regarding LinuxCNC, I'm still unclear on how the trajectory planner functions. Could you provide a detailed explanation of how it processes a command like G1 to generate inputs for the kinematic module? Specifically, what roles do the trajectory planner and generator play in this process?
Does your S-curve motion profile support an online trajectory generator like Ruckig for multi-axis systems?
Regarding LinuxCNC, I'm still unclear on how the trajectory planner functions. Could you provide a detailed explanation of how it processes a command like G1 to generate inputs for the kinematic module? Specifically, what roles do the trajectory planner and generator play in this process?
Please Log in or Create an account to join the conversation.
- endian
-
- Offline
- Elite Member
-
Less
More
- Posts: 302
- Thank you received: 113
09 Nov 2025 19:27 #338124
by endian
Replied by endian on topic scurve trajectory planner
Hello,
Is here any capable gentelman which understands Grotius repo with scurve trajectory planner and can help others with them?
thanks End
Is here any capable gentelman which understands Grotius repo with scurve trajectory planner and can help others with them?
thanks End
Please Log in or Create an account to join the conversation.
- abs32
- Offline
- Senior Member
-
Less
More
- Posts: 68
- Thank you received: 1
14 Nov 2025 15:03 #338359
by abs32
Replied by abs32 on topic scurve trajectory planner
Colleagues, does this apply for version 2.8.4?
Please Log in or Create an account to join the conversation.
- grandixximo
-
- Away
- Premium Member
-
Less
More
- Posts: 145
- Thank you received: 246
01 Jan 2026 11:13 #340833
by grandixximo
Replied by grandixximo on topic scurve trajectory planner
github.com/grandixximo/linuxcnc
I've committed a working multi axis s-curve optional trajectory planner in this fork, happy to get some feedback from the community, it is based on master.
I've committed a working multi axis s-curve optional trajectory planner in this fork, happy to get some feedback from the community, it is based on master.
The following user(s) said Thank You: akb1212, tommylight, tivoi, endian, Alexandrion, nwallace, Unlogic
Please Log in or Create an account to join the conversation.
- fsabbatini
- Offline
- Senior Member
-
Less
More
- Posts: 43
- Thank you received: 70
26 Jan 2026 02:17 #341918
by fsabbatini
Replied by fsabbatini on topic scurve trajectory planner
Good job my friend!
Can you provide any paper or info of the math background you used for it?
Can you provide any paper or info of the math background you used for it?
Please Log in or Create an account to join the conversation.
- grandixximo
-
- Away
- Premium Member
-
Less
More
- Posts: 145
- Thank you received: 246
26 Jan 2026 05:52 - 26 Jan 2026 05:55 #341920
by grandixximo
Replied by grandixximo on topic scurve trajectory planner
The sp_scurve code is based on S-curve (7-segment) trajectory planning mathematics, which uses jerk-limited motion profiles derived from the kinematics equations of motion.
Mathematical Foundation
The core math is based on third-order polynomial motion equations with controlled jerk (rate of change of acceleration):
Position: P(t) = P₀ + V₀·t + ½·A₀·t² + ⅙·J·t³
Velocity: V(t) = V₀ + A₀·t + ½·J·t²
Acceleration: A(t) = A₀ + J·t
These equations appear explicitly throughout the code (e.g., lines sp_scurve.c:187-197, 842-844, 1089-1091).
Key Mathematical Components
7-Segment S-Curve Profile - The trajectory is divided into 7 phases (S0-S6/n0-n6):
S0: Increasing jerk (acceleration ramps up)
S1: Constant acceleration
S2: Decreasing jerk (acceleration ramps down to 0)
S3: Constant velocity (cruise)
S4: Decreasing jerk (deceleration begins)
S5: Constant deceleration
S6: Increasing jerk (deceleration ramps to 0)
Cubic Equation Solving - The solve_cubic() function at lines 80-184 solves cubic equations using Cardano's formula and trigonometric method for finding roots.
There is a Newton-Raphson Method - The solute() function at lines 54-68 uses Newton-Raphson iteration to solve polynomial equations, but it is not in use, Cardano's formula is computationally superior.
Stopping Distance Calculation - Based on the relationship Amax² = V·J + 0.5·a² (line 949), derived from integrating the jerk-limited motion equations.
Attribution
The code credits go to 杨阳 (Yang Yang) as the original author, he also referenced a Chinese technical document at doc88.com/p-9119146814737.html for the S-curve formulation.
Mathematical Foundation
The core math is based on third-order polynomial motion equations with controlled jerk (rate of change of acceleration):
Position: P(t) = P₀ + V₀·t + ½·A₀·t² + ⅙·J·t³
Velocity: V(t) = V₀ + A₀·t + ½·J·t²
Acceleration: A(t) = A₀ + J·t
These equations appear explicitly throughout the code (e.g., lines sp_scurve.c:187-197, 842-844, 1089-1091).
Key Mathematical Components
7-Segment S-Curve Profile - The trajectory is divided into 7 phases (S0-S6/n0-n6):
S0: Increasing jerk (acceleration ramps up)
S1: Constant acceleration
S2: Decreasing jerk (acceleration ramps down to 0)
S3: Constant velocity (cruise)
S4: Decreasing jerk (deceleration begins)
S5: Constant deceleration
S6: Increasing jerk (deceleration ramps to 0)
Cubic Equation Solving - The solve_cubic() function at lines 80-184 solves cubic equations using Cardano's formula and trigonometric method for finding roots.
There is a Newton-Raphson Method - The solute() function at lines 54-68 uses Newton-Raphson iteration to solve polynomial equations, but it is not in use, Cardano's formula is computationally superior.
Stopping Distance Calculation - Based on the relationship Amax² = V·J + 0.5·a² (line 949), derived from integrating the jerk-limited motion equations.
Attribution
The code credits go to 杨阳 (Yang Yang) as the original author, he also referenced a Chinese technical document at doc88.com/p-9119146814737.html for the S-curve formulation.
Last edit: 26 Jan 2026 05:55 by grandixximo.
The following user(s) said Thank You: akb1212, Derriell
Please Log in or Create an account to join the conversation.
Time to create page: 0.083 seconds