|
| function | Trajectory (in options) |
| | Trajectory Class constructor.
|
| |
| function | copy (in obj) |
| | get a copy of the Trajectory object
|
| |
| function | addWaypoints (in obj, in t_start, in t_stay, in pos, in ori) |
| | Add waypoints to the trajectory.
|
| |
| function | setSamplingFrequency (in obj, in fs) |
| | set the sampling frequency
|
| |
| function | getSamplingFrequency (in obj) |
| | get the sampling frequency
|
| |
| function | plotWaypoints (in obj, in ax, in options) |
| | plot the waypoints
|
| |
| function | reduce (in obj) |
| | return the waypoints table in a reduced format
|
| |
| function | importTab (in obj, in tab) |
| | import a waypoints table
|
| |
| function | getTab (in obj) |
| | export the waypoints table
|
| |
| function | setTab (in obj, in tab) |
| | set the waypoints table
|
| |
| function | sortTab (in obj) |
| | sort the waypoints table in ascending order of start time
|
| |
| function | cleanTab (in obj) |
| | clean the waypoints table
|
| |
| function | getInterpMethods (in obj) |
| | get the interpolation methods
|
| |
| function | setInterpMethods (in obj, in methods) |
| | set the interpolation methods
|
| |
| function | generateTrajectory (in obj, in options) |
| | Generate the trajectory from the waypoints table.
|
| |
| function | getTrajectory (in obj) |
| | get the trajectory timetable
|
| |
| function | getIsGenerated (in obj) |
| |
|
| Constant Property | tabVarNames = [ |
| | names of the variables in the waypoints table
|
| |
| Constant Property | tabVarTypes = [ |
| | types of the variables in the waypoints table
|
| |
| Constant Property | interpMethodsPos = [ |
| | available interpolation methods for position
|
| |
| Constant Property | interpMethodsOri = [ |
| | available interpolation methods for orientation
|
| |
| Constant Property | trajVarNames = [ |
| | names of the variables in the trajectory table
|
| |
| Constant Property | trajVarTypes = [ |
| | types of the variables in the trajectory table
|
| |
| Constant Property | trajVarUnits = [ |
| | units of the variables in the trajectory table
|
| |
| Property | fs |
| | sampling frequency in Hz
|
| |
| Property | tab |
| | waypoints table
|
| |
| Property | traj |
| | trajectory table
|
| |
| Property | interpMethodPos |
| | interpolation method of the position
|
| |
| Property | interpMethodOri |
| | interpolation method of the orientation
|
| |
| Property | isGenerated |
| | flag if the trajectory is generated and up to date
|
| |
Trajectory Class for generating and manipulating trajectories from waypoints.
The Trajectory class is used to generate and manipulate trajectories from waypoints. The waypoints are defined by their start time, stay time, position, and orientation. The trajectory is generated by interpolating the position and orientation between the waypoints.
% Example usage:
% Add waypoints to the trajectory
t_start = seconds([0, 5, 10, 15]);
t_stay = seconds([5, 5, 5, 5]);
pos = [0,0,0; 1,1,1; 2,2,2; 3,3,3];
ori = quaternion([1,0,0,0; 0.7071,0,0.7071,0; 0.7071,0,0,0.7071; 0,0,0,1]);
traj.addWaypoints(t_start, t_stay, pos, ori);
% Plot the waypoints
% Generate the trajectory
traj.generateTrajectory();
% Get the trajectory
Trajectory Class for generating and manipulating trajectories from waypoints.
function Trajectory(in options)
Trajectory Class constructor.
Property traj
trajectory table
see also the more detailed example in trajectoryExample.m
- Copyright
- see the file LICENSE in the root directory of the repository
- Examples
- derivation1KalmanFilter.m, derivation2KalmanFilter.m, derivation3RtsSmoother.m, derivation4ExtendedKalmanFilter.m, trajectoryExample.m, and waypointsToMeasurementsExample.m.
Definition at line 36 of file Trajectory.m.
| function addWaypoints |
( |
in | obj, |
|
|
in | t_start, |
|
|
in | t_stay, |
|
|
in | pos, |
|
|
in | ori ) |
Add waypoints to the trajectory.
addWaypoints(obj,t_start,t_stay,pos,ori) adds waypoints to the trajectory from the inputs. The waypoints are defined by their start time, stay time, position, and orientation.
- Parameters
-
| t_start | - Start time of each waypoint (duration array) |
| t_stay | - Duration of each waypoint (duration array) |
| pos | - Position of each waypoint (Nx3 double array) |
| ori | - Orientation of each waypoint (quaternion array) |
- Return values
-
- Note
- The inputs must have the same height.
| function generateTrajectory |
( |
in | obj, |
|
|
in | options ) |
Generate the trajectory from the waypoints table.
generateTrajectory(obj) generates the trajectory from the waypoints table using the default settings. For the generation of the trajectory, the position is interpolated to get a trajectory with the selected sampling frequency matching the waypoints.
generateTrajectory(obj, options) generates the trajectory from the waypoints table using custom settings specified by the options structure.
- Parameters
-
| options | (optional) - Custom settings for the trajectory generation |
| options.pos | (optional) - Interpolation method for position |
| options.ori | (optional) - Interpolation method for orientation |
| options.fs | (optional) - Sampling frequency in Hz |
- Examples
- trajectoryExample.m, and waypointsToMeasurementsExample.m.