A General Multi-Segment Minimum Jerk Trajectory Toolbox (V2)
** Please note that there are two versions of this code. This version (V2), which requires velocity and acceleration constraints at all waypoints. The other version, (V1), which requires the boundary conditions only can be found in :
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 conditions on the velocity and acceleration of all waypoints.
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 velocities and accelerations of all of the waypoints.
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).
Citar como
Hassan Alkomy, Jinjun Shan (2021). A General Multi-Segment Minimum Jerk Trajectory Toolbox (V2) (https://www.mathworks.com/matlabcentral/fileexchange/78631), MATLAB Central File Exchange. Retrieved March 24, 2021.
Compatibilidad con la versión de MATLAB
Compatibilidad con las plataformas
Windows macOS LinuxEtiquetas
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Descubra Live Editor
Cree scripts con código, salida y texto formateado en un documento ejecutable.