A General Multi-Segment Minimum Jerk Trajectory Toolbox (V1)

A toolbox that can generate and plot the multi-segment minimum jerk trajectory with any number of waypoints (boundary conditions are needed)

You are now following this Submission

** Please note that there are two versions of this code. This version (V1), which requires only the boundary conditions and another version (V2), which allows for setting constraints at all of the waypoints. For version 2, please visit:

https://www.mathworks.com/matlabcentral/fileexchange/78631-a-general-multi-segment-minimum-jerk-trajectory-toolbox-v2

This is a toolbox that can be used to generate and plot the multi-segment minimum jerk trajectory that satisfies the following:
1) Passes through any number of waypoints at certain times.
2) Satisfies certain boundary conditions for velocity and acceleration (Initial and final velocity and acceleration).

Features:
1) It is a straightforward package as everything is in one file and all the user needs is to enter very few inputs, then run the code.
2) It is general, which means that it works with 2D and 3D trajectories and can deal with any number of waypoints.

Inputs:
1) Positions of the waypoints (2D or 3D).
2) The desired time of each waypoint.
3) The desired initial and final velocity and acceleration.

Outputs:
1) The simulation time vector (t) in case the user wants to perform further analysis.
2) The Coefficient Vector (C), which contains all the coefficients of the 5th degree polynomials of the position trajectory segments. It has a dimension (6n), where n is the number of trajectory segments. The first 6 elements are the coefficients of the first trajectory segment, the second 6 elements are for the second segment and so on so forth. for each segment, the first coefficient is associated with (t^5) and the so on until the 6th coefficient in the segment which is associated with (t^0).
3) The minimum jerk trajectory and the corresponding trajectory for the velocity and the acceleration (PP, VV, AA) each as a matrix of size (d,n), where d is the dimension of the problem (2D or 3D) and n is the number of trajectory segments.
4) The minimum jerk trajectory and the corresponding trajectory for the velocity and the acceleration (POS, VEL, ACC) each as a piecewise function of time. This is a piecewise matrix of size (d,n), where d is the dimension of the problem (2D or 3D) and n is the number of trajectory segments.
5) The minimum jerk trajectory and the corresponding trajectory for the velocity and the acceleration (P, V, A) each as a numerical matrix. The numerical values are obtained after substituting the trajectory time into the piecewise function. This is a matrix of size (tt,n), where tt is the dimension of the simulation time vector and n is the number of trajectory segments.
6) Several plot such as: Position vs time (each direction on a separate subplot), Velocity vs time (each direction on a separate subplot), Acceleration vs time (each direction on a separate subplot), The path of motion (in 2D or 3D), The velocity path of motion (in 2D or 3D), The acceleration path of motion (in 2D or 3D).

Cite As

Hassan Alkomy (2026). A General Multi-Segment Minimum Jerk Trajectory Toolbox (V1) (https://www.mathworks.com/matlabcentral/fileexchange/75384-a-general-multi-segment-minimum-jerk-trajectory-toolbox-v1), MATLAB Central File Exchange. Retrieved .

Tags

Add Tags

Add the first tag.

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.4

update description

1.0.3

Change the title to add version 1 (V1)

1.0.2

More organized code and better explanation in the title and the description

1.0.1

Fixing a typo in the summary.

1.0.0