From 33945f64145bbedc169749088ddf9be3b270a134 Mon Sep 17 00:00:00 2001 From: Sravan Balaji Date: Tue, 30 Nov 2021 11:17:24 -0500 Subject: [PATCH] Re-Organize Files Again - Deliverables folder holds final files for submission - Experimentation holds scripts and things related to our development of a final solution - Simulation holds the provided files - Added template for part 2 submission with comments --- .../ROB535_ControlProject_part1_Team3.mat | Bin .../ROB535_ControlProject_part2_Team3.m | 38 ++++++++++++++++++ Main_Peter.m => Experimentation/Main_Peter.m | 0 .../part1_generate_trajectory.m | 0 .../reftrack_info.mat | Bin .../segments_info.mat | Bin .../xenia_final_project.m | 0 .../xenia_nonlinearopt.m | 0 TestTrack.mat => Simulation/TestTrack.mat | Bin .../forwardIntegrate.m | 4 +- .../forwardIntegrateControlInput.m | 0 .../generateRandomObstacles.m | 0 .../getTrajectoryInfo.m | 0 .../getTrajectoryInfo.p | Bin .../senseObstacles.m | 0 15 files changed, 40 insertions(+), 2 deletions(-) rename ROB535_ControlProject_part1_Team3.mat => Deliverables/ROB535_ControlProject_part1_Team3.mat (100%) create mode 100644 Deliverables/ROB535_ControlProject_part2_Team3.m rename Main_Peter.m => Experimentation/Main_Peter.m (100%) rename part1_generate_trajectory.m => Experimentation/part1_generate_trajectory.m (100%) rename reftrack_info.mat => Experimentation/reftrack_info.mat (100%) rename segments_info.mat => Experimentation/segments_info.mat (100%) rename xenia_final_project.m => Experimentation/xenia_final_project.m (100%) rename xenia_nonlinearopt.m => Experimentation/xenia_nonlinearopt.m (100%) rename TestTrack.mat => Simulation/TestTrack.mat (100%) rename forwardIntegrate.m => Simulation/forwardIntegrate.m (96%) rename forwardIntegrateControlInput.m => Simulation/forwardIntegrateControlInput.m (100%) rename generateRandomObstacles.m => Simulation/generateRandomObstacles.m (100%) rename getTrajectoryInfo.m => Simulation/getTrajectoryInfo.m (100%) rename getTrajectoryInfo.p => Simulation/getTrajectoryInfo.p (100%) rename senseObstacles.m => Simulation/senseObstacles.m (100%) diff --git a/ROB535_ControlProject_part1_Team3.mat b/Deliverables/ROB535_ControlProject_part1_Team3.mat similarity index 100% rename from ROB535_ControlProject_part1_Team3.mat rename to Deliverables/ROB535_ControlProject_part1_Team3.mat diff --git a/Deliverables/ROB535_ControlProject_part2_Team3.m b/Deliverables/ROB535_ControlProject_part2_Team3.m new file mode 100644 index 0000000..47a31bb --- /dev/null +++ b/Deliverables/ROB535_ControlProject_part2_Team3.m @@ -0,0 +1,38 @@ +function [Utemp, FLAG_terminate] = ROB535_ControlProject_part2_Team3(TestTrack,Xobs_seen,curr_state); +% [Utemp, FLAG_terminate] = ROB535_ControlProject_part2_Team3(TestTrack,Xobs_seen,curr_state) +% +% This script generates control inputs that avoid randomly generated +% obstacles along the test track +% +% INPUTS: +% TestTrack the structure loaded from TestTrack.mat +% +% Xobs_seen the output of the senseObstacles function +% +% curr_state taken from the last state in Y, where Y is the actual +% trajectory updated after forward integrating the +% vehicle dynamics using control inputs at every planning +% iteration +% +% OUTPUTS: +% Utemp an N-by-2 vector of control inputs that will be passed +% to forwardIntegrateControlInput. Utemp must have enough +% control inputs with time step 0.01 seconds to forward +% integrate vehicle dynamics for the next 0.5 seconds +% +% FLAG_terminate a binary flag set by the function to indicate when to +% stop the simulation. Setting this flag to 1 at a +% planning iteration indicates that, after integrating +% forward vehicle dynamics using the control inputs from +% Utemp for 0.5 seconds, the vehicle would have reached +% the goal. If this flag is set to 0, then it imples that +% the car would not reach the goal after forward +% integrating for 0.5 seconds. Note that, in the event +% that FLAG_terminate is never set to 1, the simulation +% would stop after 20 minutes so that we can process all +% the teams files in a timely manner. +% +% Written by: Sravan Balaji, Xenia Demenchuk, and Peter Pongsachai +% Created: 30 Nov 2021 +end + diff --git a/Main_Peter.m b/Experimentation/Main_Peter.m similarity index 100% rename from Main_Peter.m rename to Experimentation/Main_Peter.m diff --git a/part1_generate_trajectory.m b/Experimentation/part1_generate_trajectory.m similarity index 100% rename from part1_generate_trajectory.m rename to Experimentation/part1_generate_trajectory.m diff --git a/reftrack_info.mat b/Experimentation/reftrack_info.mat similarity index 100% rename from reftrack_info.mat rename to Experimentation/reftrack_info.mat diff --git a/segments_info.mat b/Experimentation/segments_info.mat similarity index 100% rename from segments_info.mat rename to Experimentation/segments_info.mat diff --git a/xenia_final_project.m b/Experimentation/xenia_final_project.m similarity index 100% rename from xenia_final_project.m rename to Experimentation/xenia_final_project.m diff --git a/xenia_nonlinearopt.m b/Experimentation/xenia_nonlinearopt.m similarity index 100% rename from xenia_nonlinearopt.m rename to Experimentation/xenia_nonlinearopt.m diff --git a/TestTrack.mat b/Simulation/TestTrack.mat similarity index 100% rename from TestTrack.mat rename to Simulation/TestTrack.mat diff --git a/forwardIntegrate.m b/Simulation/forwardIntegrate.m similarity index 96% rename from forwardIntegrate.m rename to Simulation/forwardIntegrate.m index d14e890..e4de4b9 100644 --- a/forwardIntegrate.m +++ b/Simulation/forwardIntegrate.m @@ -58,8 +58,8 @@ function [Y,U,t_total,t_update] = forwardIntegrate() % compute control inputs, and record the time consumption t_temp = toc(TIMER); - %%%%%%%%%%%%%%%% THIS IS WHERE YOUR FUNCTION IS CALLED (replace in your team number). %%%%%%%%%%%%%%%%%%%%%%%%%%% - [Utemp, FLAG_terminate] = ROB535_ControlProject_part2_Team(TestTrack,Xobs_seen,curr_state); %% + %%%%%%%%%%%%%%%% THIS IS WHERE YOUR FUNCTION IS CALLED %%%%%%%%%%%%%%%%%%%%%%%%%%% + [Utemp, FLAG_terminate] = ROB535_ControlProject_part2_Team3(TestTrack,Xobs_seen,curr_state); %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % FLAG_terminate = randi(2)-1 % GSIs: This line is just for us to debug. Feel free to play with it if you want % Utemp = rand(dt/0.01+1 + FLAG_terminate* (randi(10)-5),2); % GSIs: This line is just for us to debug. Feel free to play with it if you want diff --git a/forwardIntegrateControlInput.m b/Simulation/forwardIntegrateControlInput.m similarity index 100% rename from forwardIntegrateControlInput.m rename to Simulation/forwardIntegrateControlInput.m diff --git a/generateRandomObstacles.m b/Simulation/generateRandomObstacles.m similarity index 100% rename from generateRandomObstacles.m rename to Simulation/generateRandomObstacles.m diff --git a/getTrajectoryInfo.m b/Simulation/getTrajectoryInfo.m similarity index 100% rename from getTrajectoryInfo.m rename to Simulation/getTrajectoryInfo.m diff --git a/getTrajectoryInfo.p b/Simulation/getTrajectoryInfo.p similarity index 100% rename from getTrajectoryInfo.p rename to Simulation/getTrajectoryInfo.p diff --git a/senseObstacles.m b/Simulation/senseObstacles.m similarity index 100% rename from senseObstacles.m rename to Simulation/senseObstacles.m