A library to compute S-Curve trajectories. It can be used to generate motion profiles for robotics.
What is an S-Curve?
An S-Curve is a trajectory which is constrained to maximum jerk, acceleration and velocity. An S-Curve consists of 7 phases:
- constant maximum jerk until the desired acceleration is reached
- constant maximum acceleration phase
- constant minimum jerk until the desired velocity is reached with an acceleration of zero
- constant velocity phase
- constant minimum jerk until the minimum acceleration is reached
- constant minimum acceleration phase
- constant maximum jerk until the acceleration is zero and the desired position and end velocity is reached
In the picture below you can see an S-Curve Profile which goes from Position 0 to position 10 within 5.5 seconds with a start and end velocity of 0
, a maximum jerk of 3, a maximum acceleration of 2 and a maximum velocity of 3.

Example
use *;
let constraints = SCurveConstraints ;
let start_conditions = SCurveStartConditions ;
let input = SCurveInput;
let s_curve_tmp = s_curve_generator;
let s_curve = s_curve_tmp.1;
let params =s_curve_tmp.0;
for i in 0..101
License
Copyright (c) 2020 Marco Boneberger Licensed under either of Apache License, Version 2.0 or MIT license at your option.