A General Multi-Segment Min. Crackle Trajectory Toolbox (V1)

A toolbox that can generate and plot the multi-segment min. crackle trajectory with any number of waypoints (boundary conditions are needed)
17 Downloads
Updated 27 Jul 2020

View License

** 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/78625-a-general-multi-segment-min-crackle-trajectory-toolbox-v2

This is a toolbox that can be used to generate and plot the multi-segment minimum crackle trajectory that satisfies the following:
1) Passes through any number of waypoints at certain times.
2) Satisfies certain boundary conditions for velocity, acceleration, jerk and snap (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, acceleration, jerk and snap.

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 9th degree polynomials of the position trajectory segments. It has a dimension (10n), where n is the number of trajectory segments. The first 10 elements are the coefficients of the first trajectory segment, the second 10 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 10th coefficient in the segment which is associated with (t^0).
3) The minimum crackle 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 crackle 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 crackle 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 (2024). A General Multi-Segment Min. Crackle Trajectory Toolbox (V1) (https://www.mathworks.com/matlabcentral/fileexchange/78628-a-general-multi-segment-min-crackle-trajectory-toolbox-v1), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2020a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.1

update title

1.0.0