38 % Properties that correspond to app components
39 properties (Access =
public)
40 TrajectoryAppUIFigure matlab.ui.Figure
41 gridMain matlab.ui.container.GridLayout
42 mossFeb2024Label matlab.ui.control.Label
43 Image matlab.ui.control.Image
44 gridTrajMenu matlab.ui.container.GridLayout
45 GridLayout matlab.ui.container.GridLayout
46 PlayButton matlab.ui.control.Button
47 GenerateButton matlab.ui.control.Button
48 TrajectoryGenerationLabel matlab.ui.control.Label
49 gridInterpolationMenu matlab.ui.container.GridLayout
50 SetSamplingFrequencyInputLabel matlab.ui.control.Label
51 SetSamplingFrequencyInput matlab.ui.control.NumericEditField
52 OrientationDropDown matlab.ui.control.DropDown
53 OrientationDropDownLabel matlab.ui.control.Label
54 PositionDropDown matlab.ui.control.DropDown
55 PositionDropDownLabel matlab.ui.control.Label
56 InterpolationSettingsLabel matlab.ui.control.Label
57 gridWaypointTableMenu matlab.ui.container.GridLayout
58 AutomaticallyCheckandSortCheckBox matlab.ui.control.CheckBox
59 btnPlotWaypoints matlab.ui.control.Button
60 CheckandSortButton matlab.ui.control.Button
61 WaypointTableSettingsLabel matlab.ui.control.Label
62 gridImportExportMenu matlab.ui.container.GridLayout
63 NewButton matlab.ui.control.Button
64 ExportButton matlab.ui.control.Button
65 ImportButton matlab.ui.control.Button
66 ImportandExportLabel matlab.ui.control.Label
67 lblTrajGen matlab.ui.control.Label
68 lblTrajDefinition matlab.ui.control.Label
69 gridTable matlab.ui.container.GridLayout
70 lblOrientationHelper matlab.ui.control.Label
71 gridTabLbls matlab.ui.container.GridLayout
72 lblTabOrientation matlab.ui.control.Label
73 lblTabPosition matlab.ui.control.Label
74 lblTabTimeInfo matlab.ui.control.Label
75 tabPoints matlab.ui.control.Table
79 properties (Access = private)
84 properties (Access = public)
85 appReturnValue % Return Value from a SubApp
88 methods (Access = private)
90 function tabPointsAddRow(app)
92 if height(app.tabPoints.Data) > 0
93 thisTStart = duration(app.tabPoints.Data.t_start(end),"InputFormat","mm:ss.SSS") + seconds(1);
94 thisTStart =
string(thisTStart,"mm:ss.SSS");
96 thisTStart = "00:00.000";
99 app.tabPoints.Data = [app.tabPoints.Data; {thisTStart,string(seconds(0),
"mm:ss.SSS"),0,0,0,1,0,0,0}];
102 function tabPointsEditCell(app, row, col)
105 cellData = app.tabPoints.Data{row,col};
109 prompt =
"Enter a new Start Time (mm:ss.SSS)";
112 val = inputdlg(prompt,title,inputSize,
string(cellData));
119 val = duration(val{1,1},
"Format",
"mm:ss.SSS");
121 errordlg(
"Wrong Format");
126 prompt =
"Enter a new Durartion (mm:ss.SSS)";
129 val = inputdlg(prompt,title,inputSize,
string(cellData));
136 val = duration(val{1,1},
"Format",
"mm:ss.SSS");
138 errordlg(
"Wrong Format");
143 prompt = ["X [m]","Y [m]","Z [m]"];
146 val = inputdlg(prompt,title,inputSize,
string(cellData));
153 val = str2double(val);
154 assert(numel(val)==3);
155 assert(any(isnan(val))==
false);
156 val = reshape(val,[1,3]);
158 errordlg(
"Wrong Format");
166 val = app.appReturnValue;
170 app.tabPoints.Data{row,col} = val;
174 function app = tabPointsUpdate(app)
179 if app.AutomaticallyCheckandSortCheckBox.Value
183 e = errordlg(err.message);
193 function trajToUiTable(app)
194 app.tabPoints.Data = app.appTrajectory.
reduce;
197 function uiTableToTraj(app)
198 app.appTrajectory.importTab(app.tabPoints.Data);
203 % Callbacks that
handle component events
204 methods (Access =
private)
206 % Code that executes after component creation
207 function startupFcn(app, traj)
210 traj (1,1) {mustBeA(traj,
"Trajectory")} =
Trajectory;
214 app.appTrajectory = traj;
217 % setup sampling frequency
219 app.SetSamplingFrequencyInput.ValueChangedFcn = createCallbackFcn(app, @SamplingFrequencyChanged,
false);
221 % setup interpolation methods
222 methods = app.appTrajectory.getInterpMethods;
223 app.PositionDropDown.Items = methods.pos;
224 app.PositionDropDown.Value = methods.posCurrent;
225 app.OrientationDropDown.Items = methods.ori;
226 app.OrientationDropDown.Value = methods.oriCurrent;
228 % setup
import button
229 app.ImportButton.ButtonPushedFcn = createCallbackFcn(app, @ImportButtonPushed, false);
231 % setup
export button
232 app.ExportButton.ButtonPushedFcn = createCallbackFcn(app, @ExportButtonPushed,
false);
235 app.NewButton.ButtonPushedFcn = createCallbackFcn(app, @NewButtonPushed,
false);
237 % setup check and sort button
238 app.CheckandSortButton.ButtonPushedFcn = createCallbackFcn(app, @tabPointsCheckandSort,
false);
240 % setup plot waypoints button
241 app.btnPlotWaypoints.ButtonPushedFcn = createCallbackFcn(app, @btnPlotWaypointsPushed,
false);
243 % setup generate button
244 app.GenerateButton.ButtonPushedFcn = createCallbackFcn(app, @GenerateButtonPushed,
false);
247 app.PlayButton.ButtonPushedFcn = createCallbackFcn(app, @PlayButtonPushed,
false);
251 % Double-clicked callback: tabPoints
252 function tabPointsDoubleClicked(app, event)
254 if isempty(event.InteractionInformation.Row) && isempty(event.InteractionInformation.Column)
255 app.tabPointsAddRow();
260 % Key release function: tabPoints
261 function tabPointsKeyRelease(app, event)
263 selection =
event.Source.Selection;
266 case 'delete' %
delete row
267 answer = questdlg(
"Delete all the Row(s) in the selection?",
"Delete?",
"Yes",
"Cancel",
"Cancel");
268 if strcmp(answer,
"Yes")
269 rows = selection(:,1);
270 event.Source.Data(rows,:) = [];
271 if height(event.Source.Data) == 0
276 case 'q' %open orientation helper app
278 row = selection(:,1);
279 assert(numel(row) == 1); %make sure only one row is selected
281 % open app and wait for it
283 uiwait(orientApp.OrientationAppUIFigure);
285 % insert the
new value
286 app.tabPoints.Data{row,6:9} = app.appReturnValue;
288 e = errordlg(
"Select only one Row!");
296 % Cell edit callback: tabPoints
297 function tabPointsCellEdit(app, event)
298 indices =
event.Indices;
299 newData =
event.NewData;
303 case {1,2} %start time, duration
304 if contains(newData,
':')
305 newTime = duration(newData,"Format","mm:ss.SSS");
307 newTime = seconds(str2double(newData));
309 assert(~isnan(newTime));
310 assert(~ismissing(newTime));
311 newData =
string(newTime,"mm:ss.SSS");
314 assert(~isnan(newData))
318 if event.EditData ==
'q' % special
case where the app is called
319 app.tabPoints.Data{indices(1),indices(2)} =
event.PreviousData;
323 assert(~isnan(newData))
325 % generate
new valid quaternion
326 newQuat = quaternion(app.tabPoints.Data{indices(1),6:9});
327 app.tabPoints.Data{indices(1),6:9} = newQuat.compact;
330 app.tabPoints.Data{indices(1),indices(2)} = newData;
332 e = errordlg(
"Wrong Input Format",
"Error",
"modal");
334 app.tabPoints.Data{indices(1),indices(2)} =
event.PreviousData;
341 % Key press function: tabPoints
342 function tabPointsKeyPress(app, event)
345 tabSize = size(app.tabPoints.Data);
346 selection =
event.Source.Selection;
349 case 'tab' % next cell
351 if numel(selection) == 2 %only one cell selected
352 if selection(2) < tabSize(2)
353 %
if possible, one cell to the right
354 event.Source.Selection(2) = selection(2) + 1;
356 %first cell of next row
357 event.Source.Selection(1) = selection(1) + 1;
358 event.Source.Selection(2) = 1;
363 %first cell of
new row
364 event.Source.Selection(1) = selection(1) + 1;
365 event.Source.Selection(2) = 1;
371 % Value changed function: SamplingFrequencyInput
372 function SamplingFrequencyChanged(app)
373 app.appTrajectory.setSamplingFrequency(app.SetSamplingFrequencyInput.Value);
376 % Value changed function: OrientationDropDown, PositionDropDown
377 function InterpolationDropDownValueChanged(app)
378 methods.pos = app.PositionDropDown.Value;
379 methods.ori = app.OrientationDropDown.Value;
380 app.appTrajectory.setInterpMethods(methods);
384 % Button pushed function: ImportButton
385 function ImportButtonPushed(app)
386 [file,path] = uigetfile(
'*.mat');
392 traj = load(fullfile(path,file));
393 assert(isfield(traj,
"traj"));
394 assert(isa(traj.traj,
"Trajectory"));
395 app.appTrajectory = traj.traj;
398 e = errordlg(
"File is not a valid Trajectory Object",
"Error",
"modal");
403 % Button pushed function: ExportButton
404 function ExportButtonPushed(app)
405 [file,path] = uiputfile(
'*.mat');
410 traj = app.appTrajectory;
413 save(fullfile(path,file),
"traj",
"-v7.3");
415 e = errordlg(
"Error while saving the Trajectory Object",
"Error",
"modal");
420 % Button pushed function: NewButton
421 function NewButtonPushed(app)
426 % Button pushed function: CheckandSortButton
427 function tabPointsCheckandSort(app)
433 % Button pushed function: btnPlotWaypoints
434 function btnPlotWaypointsPushed(app)
435 app.tabPointsCheckandSort;
436 fig = figure(
"Name",
"Waypoints",
"NumberTitle",
"off");
438 app.appTrajectory.plotWaypoints(ax);
442 % Button pushed function: GenerateButton
443 function GenerateButtonPushed(app)
444 app.GenerateButton.Enable =
false;
448 assert(height(app.tabPoints.Data) > 0);
450 e = errordlg(
"No Waypoints defined",
"Error",
"modal");
452 app.GenerateButton.Enable =
true;
457 app.appTrajectory.generateTrajectory;
460 m = msgbox(
"Trajectory generated",
"Success",
"modal");
463 app.GenerateButton.Enable =
true;
466 % Button pushed function: PlayButton
467 function PlayButtonPushed(app)
468 app.PlayButton.Enable =
false;
471 assert(app.appTrajectory.getIsGenerated);
473 e = errordlg(
"Trajectory not generated",
"Error",
"modal");
475 app.PlayButton.Enable =
true;
481 uiwait(trajPlayer.TrajectoryVisualizationUIFigure);
483 app.PlayButton.Enable =
true;
487 % Component initialization
488 methods (Access =
private)
490 % Create UIFigure and components
491 function createComponents(app)
493 % Create TrajectoryAppUIFigure and hide until all components are created
494 app.TrajectoryAppUIFigure = uifigure(
'Visible',
'off');
495 app.TrajectoryAppUIFigure.Position = [100 100 900 650];
496 app.TrajectoryAppUIFigure.Name =
'Trajectory App';
497 app.TrajectoryAppUIFigure.Icon =
'logo_zhaw.png';
500 app.gridMain = uigridlayout(app.TrajectoryAppUIFigure);
501 app.gridMain.ColumnWidth = {550,
'1x'};
502 app.gridMain.RowHeight = {
'2x',
'fit',
'1x', 60};
503 app.gridMain.Padding = [25 25 25 25];
506 app.gridTable = uigridlayout(app.gridMain);
507 app.gridTable.ColumnWidth = {
'fit'};
508 app.gridTable.RowHeight = {
'fit', 300,
'fit'};
509 app.gridTable.Padding = [0 0 0 0];
510 app.gridTable.Layout.Row = 2;
511 app.gridTable.Layout.Column = 1;
514 app.tabPoints = uitable(app.gridTable);
515 app.tabPoints.ColumnName = {
't start';
'duration';
'x';
'y';
'z';
'1';
'i';
'j';
'k'};
516 app.tabPoints.ColumnWidth = {70, 80, 50, 50, 50, 50, 50, 50, 50};
517 app.tabPoints.RowName = {};
518 app.tabPoints.ColumnSortable = [true false false false false false false false false];
519 app.tabPoints.ColumnEditable =
true;
520 app.tabPoints.CellEditCallback = createCallbackFcn(app, @tabPointsCellEdit,
true);
521 app.tabPoints.DoubleClickedFcn = createCallbackFcn(app, @tabPointsDoubleClicked,
true);
522 app.tabPoints.KeyPressFcn = createCallbackFcn(app, @tabPointsKeyPress,
true);
523 app.tabPoints.KeyReleaseFcn = createCallbackFcn(app, @tabPointsKeyRelease,
true);
524 app.tabPoints.Layout.Row = 2;
525 app.tabPoints.Layout.Column = 1;
528 app.gridTabLbls = uigridlayout(app.gridTable);
529 app.gridTabLbls.ColumnWidth = {150, 150, 200};
530 app.gridTabLbls.RowHeight = {
'1x'};
531 app.gridTabLbls.ColumnSpacing = 0;
532 app.gridTabLbls.RowSpacing = 0;
533 app.gridTabLbls.Padding = [0 0 0 0];
534 app.gridTabLbls.Layout.Row = 1;
535 app.gridTabLbls.Layout.Column = 1;
537 % Create lblTabTimeInfo
538 app.lblTabTimeInfo = uilabel(app.gridTabLbls);
539 app.lblTabTimeInfo.HorizontalAlignment =
'center';
540 app.lblTabTimeInfo.VerticalAlignment =
'bottom';
541 app.lblTabTimeInfo.FontWeight =
'bold';
542 app.lblTabTimeInfo.Layout.Row = 1;
543 app.lblTabTimeInfo.Layout.Column = 1;
544 app.lblTabTimeInfo.Text =
'Time Info [mm:ss.SSS]';
546 % Create lblTabPosition
547 app.lblTabPosition = uilabel(app.gridTabLbls);
548 app.lblTabPosition.HorizontalAlignment =
'center';
549 app.lblTabPosition.VerticalAlignment =
'bottom';
550 app.lblTabPosition.FontWeight =
'bold';
551 app.lblTabPosition.Layout.Row = 1;
552 app.lblTabPosition.Layout.Column = 2;
553 app.lblTabPosition.Text =
'Position [m]';
555 % Create lblTabOrientation
556 app.lblTabOrientation = uilabel(app.gridTabLbls);
557 app.lblTabOrientation.HorizontalAlignment =
'center';
558 app.lblTabOrientation.VerticalAlignment =
'bottom';
559 app.lblTabOrientation.FontWeight =
'bold';
560 app.lblTabOrientation.Layout.Row = 1;
561 app.lblTabOrientation.Layout.Column = 3;
562 app.lblTabOrientation.Text =
'Orientation';
564 % Create lblOrientationHelper
565 app.lblOrientationHelper = uilabel(app.gridTable);
566 app.lblOrientationHelper.HorizontalAlignment =
'center';
567 app.lblOrientationHelper.Layout.Row = 3;
568 app.lblOrientationHelper.Layout.Column = 1;
569 app.lblOrientationHelper.Text =
'select an orientation value and press ''q'' to open the Orientation Helper App.';
571 % Create lblTrajDefinition
572 app.lblTrajDefinition = uilabel(app.gridMain);
573 app.lblTrajDefinition.VerticalAlignment =
'bottom';
574 app.lblTrajDefinition.FontSize = 24;
575 app.lblTrajDefinition.FontWeight =
'bold';
576 app.lblTrajDefinition.Layout.Row = 1;
577 app.lblTrajDefinition.Layout.Column = 1;
578 app.lblTrajDefinition.Text =
'Trajectory Definition';
581 app.lblTrajGen = uilabel(app.gridMain);
582 app.lblTrajGen.VerticalAlignment =
'bottom';
583 app.lblTrajGen.FontSize = 24;
584 app.lblTrajGen.FontWeight =
'bold';
585 app.lblTrajGen.Layout.Row = 1;
586 app.lblTrajGen.Layout.Column = 2;
587 app.lblTrajGen.Text =
'Trajectory Generation';
589 % Create gridTrajMenu
590 app.gridTrajMenu = uigridlayout(app.gridMain);
591 app.gridTrajMenu.ColumnWidth = {
'1x'};
592 app.gridTrajMenu.RowHeight = {30,
'fit', 30,
'fit', 30,
'fit', 30,
'fit'};
593 app.gridTrajMenu.Padding = [0 0 0 0];
594 app.gridTrajMenu.Layout.Row = 2;
595 app.gridTrajMenu.Layout.Column = 2;
597 % Create ImportandExportLabel
598 app.ImportandExportLabel = uilabel(app.gridTrajMenu);
599 app.ImportandExportLabel.VerticalAlignment =
'bottom';
600 app.ImportandExportLabel.FontSize = 14;
601 app.ImportandExportLabel.FontWeight =
'bold';
602 app.ImportandExportLabel.Layout.Row = 1;
603 app.ImportandExportLabel.Layout.Column = 1;
604 app.ImportandExportLabel.Text =
'Import and Export';
606 % Create gridImportExportMenu
607 app.gridImportExportMenu = uigridlayout(app.gridTrajMenu);
608 app.gridImportExportMenu.ColumnWidth = {
'fit',
'fit',
'fit'};
609 app.gridImportExportMenu.RowHeight = {
'fit'};
610 app.gridImportExportMenu.Padding = [0 0 0 0];
611 app.gridImportExportMenu.Layout.Row = 2;
612 app.gridImportExportMenu.Layout.Column = 1;
614 % Create ImportButton
615 app.ImportButton = uibutton(app.gridImportExportMenu,
'push');
616 app.ImportButton.Tooltip = {
'Import a Trajectory object saved as a .mat file or similar.'};
617 app.ImportButton.Layout.Row = 1;
618 app.ImportButton.Layout.Column = 1;
619 app.ImportButton.Text =
'Import';
621 % Create ExportButton
622 app.ExportButton = uibutton(app.gridImportExportMenu,
'push');
623 app.ExportButton.Tooltip = {
'Export the Trajectory object saved as a .mat file or similar.'};
624 app.ExportButton.Layout.Row = 1;
625 app.ExportButton.Layout.Column = 2;
626 app.ExportButton.Text =
'Export';
629 app.NewButton = uibutton(app.gridImportExportMenu,
'push');
630 app.NewButton.Tooltip = {
'Empty the Workspace'};
631 app.NewButton.Layout.Row = 1;
632 app.NewButton.Layout.Column = 3;
633 app.NewButton.Text =
'New';
635 % Create WaypointTableSettingsLabel
636 app.WaypointTableSettingsLabel = uilabel(app.gridTrajMenu);
637 app.WaypointTableSettingsLabel.VerticalAlignment =
'bottom';
638 app.WaypointTableSettingsLabel.FontSize = 14;
639 app.WaypointTableSettingsLabel.FontWeight =
'bold';
640 app.WaypointTableSettingsLabel.Layout.Row = 3;
641 app.WaypointTableSettingsLabel.Layout.Column = 1;
642 app.WaypointTableSettingsLabel.Text =
'Waypoint Table Settings';
644 % Create gridWaypointTableMenu
645 app.gridWaypointTableMenu = uigridlayout(app.gridTrajMenu);
646 app.gridWaypointTableMenu.ColumnWidth = {
'fit',
'fit'};
647 app.gridWaypointTableMenu.RowHeight = {
'fit',
'fit'};
648 app.gridWaypointTableMenu.Padding = [0 0 0 0];
649 app.gridWaypointTableMenu.Layout.Row = 4;
650 app.gridWaypointTableMenu.Layout.Column = 1;
652 % Create CheckandSortButton
653 app.CheckandSortButton = uibutton(app.gridWaypointTableMenu,
'push');
654 app.CheckandSortButton.Tooltip = {
'Sorts the Waypoints Table, sorts it, removes double start times and reduces the duration if there''s time overlapping'};
655 app.CheckandSortButton.Layout.Row = 1;
656 app.CheckandSortButton.Layout.Column = 1;
657 app.CheckandSortButton.Text =
'Check and Sort';
659 % Create AutomaticallyCheckandSortCheckBox
660 app.AutomaticallyCheckandSortCheckBox = uicheckbox(app.gridWaypointTableMenu);
661 app.AutomaticallyCheckandSortCheckBox.Text =
'Automatically Check and Sort';
662 app.AutomaticallyCheckandSortCheckBox.Layout.Row = 1;
663 app.AutomaticallyCheckandSortCheckBox.Layout.Column = 2;
664 app.AutomaticallyCheckandSortCheckBox.Value =
true;
666 % Create btnPlotWaypoints
667 app.btnPlotWaypoints = uibutton(app.gridWaypointTableMenu,
'push');
668 app.btnPlotWaypoints.Tooltip = {
'Plots the Waypoints in a 3D Plot'};
669 app.btnPlotWaypoints.Layout.Row = 2;
670 app.btnPlotWaypoints.Layout.Column = 1;
671 app.btnPlotWaypoints.Text =
'Plot Waypoints';
673 % Create InterpolationSettingsLabel
674 app.InterpolationSettingsLabel = uilabel(app.gridTrajMenu);
675 app.InterpolationSettingsLabel.VerticalAlignment =
'bottom';
676 app.InterpolationSettingsLabel.FontSize = 14;
677 app.InterpolationSettingsLabel.FontWeight =
'bold';
678 app.InterpolationSettingsLabel.Layout.Row = 5;
679 app.InterpolationSettingsLabel.Layout.Column = 1;
680 app.InterpolationSettingsLabel.Text =
'Interpolation Settings';
682 % Create gridInterpolationMenu
683 app.gridInterpolationMenu = uigridlayout(app.gridTrajMenu);
684 app.gridInterpolationMenu.ColumnWidth = {
'fit',
'fit'};
685 app.gridInterpolationMenu.RowHeight = {
'fit',
'fit',
'fit'};
686 app.gridInterpolationMenu.Padding = [0 0 0 0];
687 app.gridInterpolationMenu.Layout.Row = 6;
688 app.gridInterpolationMenu.Layout.Column = 1;
690 % Create SetSamplingFrequencyInputLabel
691 app.SetSamplingFrequencyInputLabel = uilabel(app.gridInterpolationMenu);
692 app.SetSamplingFrequencyInputLabel.HorizontalAlignment =
'right';
693 app.SetSamplingFrequencyInputLabel.Layout.Row = 1;
694 app.SetSamplingFrequencyInputLabel.Layout.Column = 1;
695 app.SetSamplingFrequencyInputLabel.Text =
'fs [Hz]';
697 % Create SetSamplingFrequencyInput
698 app.SetSamplingFrequencyInput = uieditfield(app.gridInterpolationMenu,
'numeric');
699 app.SetSamplingFrequencyInput.Limits = [0 Inf];
700 app.SetSamplingFrequencyInput.Value = 200;
701 app.SetSamplingFrequencyInput.Layout.Row = 1;
702 app.SetSamplingFrequencyInput.Layout.Column = 2;
704 % Create PositionDropDownLabel
705 app.PositionDropDownLabel = uilabel(app.gridInterpolationMenu);
706 app.PositionDropDownLabel.HorizontalAlignment =
'right';
707 app.PositionDropDownLabel.Layout.Row = 2;
708 app.PositionDropDownLabel.Layout.Column = 1;
709 app.PositionDropDownLabel.Text =
'Position';
711 % Create PositionDropDown
712 app.PositionDropDown = uidropdown(app.gridInterpolationMenu);
713 app.PositionDropDown.Items = {
'none'};
714 app.PositionDropDown.ValueChangedFcn = createCallbackFcn(app, @InterpolationDropDownValueChanged,
false);
715 app.PositionDropDown.Layout.Row = 2;
716 app.PositionDropDown.Layout.Column = 2;
717 app.PositionDropDown.Value =
'none';
719 % Create OrientationDropDownLabel
720 app.OrientationDropDownLabel = uilabel(app.gridInterpolationMenu);
721 app.OrientationDropDownLabel.HorizontalAlignment =
'right';
722 app.OrientationDropDownLabel.Layout.Row = 3;
723 app.OrientationDropDownLabel.Layout.Column = 1;
724 app.OrientationDropDownLabel.Text =
'Orientation';
726 % Create OrientationDropDown
727 app.OrientationDropDown = uidropdown(app.gridInterpolationMenu);
728 app.OrientationDropDown.Items = {
'none'};
729 app.OrientationDropDown.ValueChangedFcn = createCallbackFcn(app, @InterpolationDropDownValueChanged,
false);
730 app.OrientationDropDown.Layout.Row = 3;
731 app.OrientationDropDown.Layout.Column = 2;
732 app.OrientationDropDown.Value =
'none';
734 % Create TrajectoryGenerationLabel
735 app.TrajectoryGenerationLabel = uilabel(app.gridTrajMenu);
736 app.TrajectoryGenerationLabel.VerticalAlignment =
'bottom';
737 app.TrajectoryGenerationLabel.FontSize = 14;
738 app.TrajectoryGenerationLabel.FontWeight =
'bold';
739 app.TrajectoryGenerationLabel.Layout.Row = 7;
740 app.TrajectoryGenerationLabel.Layout.Column = 1;
741 app.TrajectoryGenerationLabel.Text =
'Trajectory Generation';
744 app.GridLayout = uigridlayout(app.gridTrajMenu);
745 app.GridLayout.ColumnWidth = {
'fit',
'fit'};
746 app.GridLayout.RowHeight = {
'fit'};
747 app.GridLayout.Padding = [0 0 0 0];
748 app.GridLayout.Layout.Row = 8;
749 app.GridLayout.Layout.Column = 1;
751 % Create GenerateButton
752 app.GenerateButton = uibutton(app.GridLayout,
'push');
753 app.GenerateButton.Layout.Row = 1;
754 app.GenerateButton.Layout.Column = 1;
755 app.GenerateButton.Text =
'Generate';
758 app.PlayButton = uibutton(app.GridLayout,
'push');
759 app.PlayButton.Layout.Row = 1;
760 app.PlayButton.Layout.Column = 2;
761 app.PlayButton.Text =
'Play';
764 app.Image = uiimage(app.gridMain);
765 app.Image.Layout.Row = 4;
766 app.Image.Layout.Column = 1;
767 app.Image.HorizontalAlignment =
'left';
768 app.Image.ImageSource =
'logo_isc.png';
770 % Create mossFeb2024Label
771 app.mossFeb2024Label = uilabel(app.gridMain);
772 app.mossFeb2024Label.HorizontalAlignment =
'right';
773 app.mossFeb2024Label.VerticalAlignment =
'bottom';
774 app.mossFeb2024Label.FontColor = [0.502 0.502 0.502];
775 app.mossFeb2024Label.Layout.Row = 4;
776 app.mossFeb2024Label.Layout.Column = 2;
777 app.mossFeb2024Label.Text =
'moss, Feb 2024';
779 % Show the figure after all components are created
780 app.TrajectoryAppUIFigure.Visible =
'on';
784 % App creation and deletion
785 methods (Access =
public)
790 % Create UIFigure and components
791 createComponents(app)
793 % Register the app with App Designer
794 registerApp(app, app.TrajectoryAppUIFigure)
796 % Execute the startup function
797 runStartupFcn(app, @(app)startupFcn(app, varargin{:}))
804 % Code that executes before app deletion
807 % Delete UIFigure when app is deleted
808 delete(app.TrajectoryAppUIFigure)