mirror of
https://github.com/ROB-535-F21-Team-3/Control-Project.git
synced 2025-08-17 16:42:44 +00:00
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
This commit is contained in:
38
Deliverables/ROB535_ControlProject_part2_Team3.m
Normal file
38
Deliverables/ROB535_ControlProject_part2_Team3.m
Normal file
@@ -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
|
||||||
|
|
@@ -58,8 +58,8 @@ function [Y,U,t_total,t_update] = forwardIntegrate()
|
|||||||
|
|
||||||
% compute control inputs, and record the time consumption
|
% compute control inputs, and record the time consumption
|
||||||
t_temp = toc(TIMER);
|
t_temp = toc(TIMER);
|
||||||
%%%%%%%%%%%%%%%% THIS IS WHERE YOUR FUNCTION IS CALLED (replace in your team number). %%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%% THIS IS WHERE YOUR FUNCTION IS CALLED %%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
[Utemp, FLAG_terminate] = ROB535_ControlProject_part2_Team<your team number>(TestTrack,Xobs_seen,curr_state); %%
|
[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
|
% 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
|
% 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
|
Reference in New Issue
Block a user