diff --git a/.SimulinkProject/Root.type.EntryPoints/f25bd945-366a-4a74-850b-d4504197d777.type.EntryPoint.xml b/.SimulinkProject/Root.type.EntryPoints/0e5d684a-29e1-4940-b697-d206e832d98e.type.EntryPoint.xml similarity index 79% rename from .SimulinkProject/Root.type.EntryPoints/f25bd945-366a-4a74-850b-d4504197d777.type.EntryPoint.xml rename to .SimulinkProject/Root.type.EntryPoints/0e5d684a-29e1-4940-b697-d206e832d98e.type.EntryPoint.xml index 4ec14a8a..1ac0c0fa 100644 --- a/.SimulinkProject/Root.type.EntryPoints/f25bd945-366a-4a74-850b-d4504197d777.type.EntryPoint.xml +++ b/.SimulinkProject/Root.type.EntryPoints/0e5d684a-29e1-4940-b697-d206e832d98e.type.EntryPoint.xml @@ -1,2 +1,2 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/.SimulinkProject/Root.type.EntryPoints/8fb87fa1-2a75-426a-94fc-317f002f4b37.type.EntryPoint.xml b/.SimulinkProject/Root.type.EntryPoints/c3899a51-1cdd-4673-93db-1a0291274960.type.EntryPoint.xml similarity index 83% rename from .SimulinkProject/Root.type.EntryPoints/8fb87fa1-2a75-426a-94fc-317f002f4b37.type.EntryPoint.xml rename to .SimulinkProject/Root.type.EntryPoints/c3899a51-1cdd-4673-93db-1a0291274960.type.EntryPoint.xml index 96097424..cf56457f 100644 --- a/.SimulinkProject/Root.type.EntryPoints/8fb87fa1-2a75-426a-94fc-317f002f4b37.type.EntryPoint.xml +++ b/.SimulinkProject/Root.type.EntryPoints/c3899a51-1cdd-4673-93db-1a0291274960.type.EntryPoint.xml @@ -1,2 +1,2 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/.SimulinkProject/Root.type.EntryPoints/83696142-1d8a-464e-b557-8fb4ead56065.type.EntryPoint.xml b/.SimulinkProject/Root.type.EntryPoints/ddd05973-9ab7-4944-b997-e18f47f8966c.type.EntryPoint.xml similarity index 74% rename from .SimulinkProject/Root.type.EntryPoints/83696142-1d8a-464e-b557-8fb4ead56065.type.EntryPoint.xml rename to .SimulinkProject/Root.type.EntryPoints/ddd05973-9ab7-4944-b997-e18f47f8966c.type.EntryPoint.xml index 4c3ca2f9..72cd13ff 100644 --- a/.SimulinkProject/Root.type.EntryPoints/83696142-1d8a-464e-b557-8fb4ead56065.type.EntryPoint.xml +++ b/.SimulinkProject/Root.type.EntryPoints/ddd05973-9ab7-4944-b997-e18f47f8966c.type.EntryPoint.xml @@ -1,2 +1,2 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/.SimulinkProject/Root.type.Files/Libraries.type.File/Vehicle.type.File/Tire.type.File/MFSwift.type.File/MFSwift_2312.type.File.xml b/.SimulinkProject/Root.type.Files/Libraries.type.File/Vehicle.type.File/Tire.type.File/MFSwift.type.File/MFSwift_2312.type.File.xml new file mode 100644 index 00000000..dc4e6254 --- /dev/null +++ b/.SimulinkProject/Root.type.Files/Libraries.type.File/Vehicle.type.File/Tire.type.File/MFSwift.type.File/MFSwift_2312.type.File.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.SimulinkProject/Root.type.Files/Libraries.type.File/Vehicle.type.File/Tire.type.File/MFSwift.type.File/MFSwift_2312.type.File/1.type.DIR_SIGNIFIER.xml b/.SimulinkProject/Root.type.Files/Libraries.type.File/Vehicle.type.File/Tire.type.File/MFSwift.type.File/MFSwift_2312.type.File/1.type.DIR_SIGNIFIER.xml new file mode 100644 index 00000000..1c0844ef --- /dev/null +++ b/.SimulinkProject/Root.type.Files/Libraries.type.File/Vehicle.type.File/Tire.type.File/MFSwift.type.File/MFSwift_2312.type.File/1.type.DIR_SIGNIFIER.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/.SimulinkProject/Root.type.Files/Libraries.type.File/Vehicle.type.File/Tire.type.File/MFSwift.type.File/MFSwift_2312.type.File/Tire_MFSwift.slx.type.File.xml b/.SimulinkProject/Root.type.Files/Libraries.type.File/Vehicle.type.File/Tire.type.File/MFSwift.type.File/MFSwift_2312.type.File/Tire_MFSwift.slx.type.File.xml new file mode 100644 index 00000000..dc4e6254 --- /dev/null +++ b/.SimulinkProject/Root.type.Files/Libraries.type.File/Vehicle.type.File/Tire.type.File/MFSwift.type.File/MFSwift_2312.type.File/Tire_MFSwift.slx.type.File.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.SimulinkProject/Root.type.Files/Libraries.type.File/sm_car_doc.type.File/sm_car_doc_overview_web.m.type.File.xml b/.SimulinkProject/Root.type.Files/Libraries.type.File/sm_car_doc.type.File/sm_car_doc_overview_web.m.type.File.xml new file mode 100644 index 00000000..dc4e6254 --- /dev/null +++ b/.SimulinkProject/Root.type.Files/Libraries.type.File/sm_car_doc.type.File/sm_car_doc_overview_web.m.type.File.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.SimulinkProject/Root.type.Files/Scripts_Data.type.File/Simscape_Vehicle_Library_Demo_Script_web.m.type.File.xml b/.SimulinkProject/Root.type.Files/Scripts_Data.type.File/Simscape_Vehicle_Library_Demo_Script_web.m.type.File.xml new file mode 100644 index 00000000..dc4e6254 --- /dev/null +++ b/.SimulinkProject/Root.type.Files/Scripts_Data.type.File/Simscape_Vehicle_Library_Demo_Script_web.m.type.File.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.SimulinkProject/Root.type.Files/Workflows.type.File/Exercises.type.File/Overview.type.File/Simscape_Vehicle_Templates_Exercises_web.m.type.File.xml b/.SimulinkProject/Root.type.Files/Workflows.type.File/Exercises.type.File/Overview.type.File/Simscape_Vehicle_Templates_Exercises_web.m.type.File.xml new file mode 100644 index 00000000..dc4e6254 --- /dev/null +++ b/.SimulinkProject/Root.type.Files/Workflows.type.File/Exercises.type.File/Overview.type.File/Simscape_Vehicle_Templates_Exercises_web.m.type.File.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.SimulinkProject/Root.type.References/02175530-8307-482d-8f80-ddc449aeae9a.type.Reference.xml b/.SimulinkProject/Root.type.References/3660e5d2-8d30-49c1-9e5b-e36fad4fedaa.type.Reference.xml similarity index 100% rename from .SimulinkProject/Root.type.References/02175530-8307-482d-8f80-ddc449aeae9a.type.Reference.xml rename to .SimulinkProject/Root.type.References/3660e5d2-8d30-49c1-9e5b-e36fad4fedaa.type.Reference.xml diff --git a/.SimulinkProject/Root.type.References/9365ba9e-a461-4608-8aab-230761aaf2a4.type.Reference.xml b/.SimulinkProject/Root.type.References/86438657-7825-4847-af5b-94b1349db145.type.Reference.xml similarity index 100% rename from .SimulinkProject/Root.type.References/9365ba9e-a461-4608-8aab-230761aaf2a4.type.Reference.xml rename to .SimulinkProject/Root.type.References/86438657-7825-4847-af5b-94b1349db145.type.Reference.xml diff --git a/Libraries/Event/Scene/Double_Lane_Change/Double_Lane_Change_trajectory_default.mat b/Libraries/Event/Scene/Double_Lane_Change/Double_Lane_Change_trajectory_default.mat index 030d0c73..7121c44d 100644 Binary files a/Libraries/Event/Scene/Double_Lane_Change/Double_Lane_Change_trajectory_default.mat and b/Libraries/Event/Scene/Double_Lane_Change/Double_Lane_Change_trajectory_default.mat differ diff --git a/Libraries/Event/Scene/Double_Lane_Change/sm_car_scenedata_double_lane_change.m b/Libraries/Event/Scene/Double_Lane_Change/sm_car_scenedata_double_lane_change.m index 657d64ec..3c009725 100644 --- a/Libraries/Event/Scene/Double_Lane_Change/sm_car_scenedata_double_lane_change.m +++ b/Libraries/Event/Scene/Double_Lane_Change/sm_car_scenedata_double_lane_change.m @@ -1,6 +1,6 @@ function scene_data = sm_car_scenedata_double_lane_change %% Floor and Grid parameters -% Copyright 2018-2020 The MathWorks, Inc. +% Copyright 2018-2022 The MathWorks, Inc. scene_data.Name = 'Double_Lane_Change'; scene_data.Dashes.pitch = 7.5; % m @@ -19,7 +19,13 @@ scene_data.Road.clr = [1 1 1]*0.5; % [R G B] scene_data.Road.opc = 1; % (0-1) scene_data.Road.x = 218.4; % m -scene_data.Road.y = -1.2; % m + +% Adjustments due to Unreal scene change in R2022b +if(verLessThan('matlab','9.13')) + scene_data.Road.y = -1.2; % m +else + scene_data.Road.y = -1.2-2.5; % m +end scene_data.Road.z = 0; % m scene_data.Road.roll = 0*pi/180; % rad scene_data.Road.pitch = 0*pi/180; % rad diff --git a/Libraries/Event/Scene/Double_Lane_Change/sm_car_trajectory_double_lane_change.m b/Libraries/Event/Scene/Double_Lane_Change/sm_car_trajectory_double_lane_change.m index fd0296c6..9415f4f0 100644 --- a/Libraries/Event/Scene/Double_Lane_Change/sm_car_trajectory_double_lane_change.m +++ b/Libraries/Event/Scene/Double_Lane_Change/sm_car_trajectory_double_lane_change.m @@ -1,10 +1,16 @@ function sm_car_trajectory_double_lane_change % Function to construct double-lane change maneuver -% Copyright 2018-2021 The MathWorks, Inc. +% Copyright 2018-2022 The MathWorks, Inc. cd(fileparts(which(mfilename))) % Parameters for trajectory -maneuver_lateral_offset = -3.35; % m + +% Adjustments due to Unreal scene change in R2022b +if(verLessThan('matlab','9.13')) + maneuver_lateral_offset = -3.35; % m +else + maneuver_lateral_offset = -3.35-2.5; % m +end cone_set_lat_separation = 4.2; % m % Longitudinal gate locations (m) diff --git a/Libraries/Event/sm_car_database_Maneuver.xlsx b/Libraries/Event/sm_car_database_Maneuver.xlsx index 76bd3702..d82796ae 100644 Binary files a/Libraries/Event/sm_car_database_Maneuver.xlsx and b/Libraries/Event/sm_car_database_Maneuver.xlsx differ diff --git a/Libraries/Event/sm_car_gen_init_database.m b/Libraries/Event/sm_car_gen_init_database.m index f8c200aa..3d80a608 100644 --- a/Libraries/Event/sm_car_gen_init_database.m +++ b/Libraries/Event/sm_car_gen_init_database.m @@ -2,7 +2,7 @@ % Define vehicle-level initial conditions for maneuvers % Vehicle position, orientation, initial speed, initial wheel speed % -% Copyright 2019-2020 The MathWorks, Inc. +% Copyright 2019-2022 The MathWorks, Inc. %% Vehicle-level data % Vehicle Name #Axles Wheel Radius (m) Init Z-Offset (m) @@ -184,10 +184,18 @@ %% Scene Double Lane Change, Slow Start InitSet.Double_Lane_Change.Type = 'Double_Lane_Change'; InitSet.Double_Lane_Change.Instance = ''; + +% Adjustments due to Unreal scene change in R2022b +if(verLessThan('matlab','9.13')) + sChassisY = -3.35; +else + sChassisY = -3.35-2.5; +end + InitSet.Double_Lane_Change.Data = {... 'aChassis','rad', 0, 0, 0; 'vChassis','m/s', 2.5, 0, 0; - 'sChassis','m', 5, -3.35, 0}; + 'sChassis','m', 5, sChassisY, 0}; %% Scene Double Lane Change, Slow Start InitSet.Double_Lane_Change_ISO3888.Type = 'Double_Lane_Change_ISO3888'; diff --git a/Libraries/Vehicle/Tire/MFSwift/MFSwift_2312/Tire_MFSwift.slx b/Libraries/Vehicle/Tire/MFSwift/MFSwift_2312/Tire_MFSwift.slx new file mode 100644 index 00000000..7351e551 Binary files /dev/null and b/Libraries/Vehicle/Tire/MFSwift/MFSwift_2312/Tire_MFSwift.slx differ diff --git a/Libraries/sm_car_doc/sm_car_doc_overview_web.m b/Libraries/sm_car_doc/sm_car_doc_overview_web.m new file mode 100644 index 00000000..b525a4f2 --- /dev/null +++ b/Libraries/sm_car_doc/sm_car_doc_overview_web.m @@ -0,0 +1 @@ +web('sm_car_doc_overview.html') \ No newline at end of file diff --git a/README.md b/README.md index cacc8a29..625e1fc5 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,15 @@ adjust the libraries so that variant can be selected. 3. Modify parameter values in the "Vehicle" data structure in the MATLAB workspace. ### **Release History** +**v2.16 -- April 2024** +1. Compatible with MF-Swift v2312 +2. Adjusted double-lane change to match Unreal scene (R2022b and higher) +3. Made project shortcuts compatible with MATLAB Online +4. Fixed capitalization error in sm_car_database_Maneuver.xlsx (...Hockenheim_F_ --> Hockenheim_f_) + +**v2.15 -- March 2024** +1. Compatible with R2024a. Updated scripts to run with Fast Restart + **v2.15 -- September 2023** 1. Mass and inertia of driver and passengers are adjustable 2. Added test harness to check driver and passenger mass diff --git a/Scripts_Data/Simscape_Vehicle_Library_Demo_Script_web.m b/Scripts_Data/Simscape_Vehicle_Library_Demo_Script_web.m new file mode 100644 index 00000000..33d278cc --- /dev/null +++ b/Scripts_Data/Simscape_Vehicle_Library_Demo_Script_web.m @@ -0,0 +1 @@ +web('Simscape_Vehicle_Library_Demo_Script.html') \ No newline at end of file diff --git a/Scripts_Data/sm_car_startupMFSwift.m b/Scripts_Data/sm_car_startupMFSwift.m index 652fa1b9..3b75ba1e 100644 --- a/Scripts_Data/sm_car_startupMFSwift.m +++ b/Scripts_Data/sm_car_startupMFSwift.m @@ -66,6 +66,8 @@ library_path = [curr_proj.RootFolder filesep 'Libraries' filesep 'Vehicle' filesep 'Tire' filesep 'MFSwift' filesep 'MFSwift_2212']; elseif(mfswift_ver==2306) library_path = [curr_proj.RootFolder filesep 'Libraries' filesep 'Vehicle' filesep 'Tire' filesep 'MFSwift' filesep 'MFSwift_2306']; + elseif(mfswift_ver==2312) + library_path = [curr_proj.RootFolder filesep 'Libraries' filesep 'Vehicle' filesep 'Tire' filesep 'MFSwift' filesep 'MFSwift_2312']; end addpath(library_path); % Add opencrg tools to path @@ -92,6 +94,8 @@ library_path = [curr_proj.RootFolder filesep 'Libraries' filesep 'Vehicle' filesep 'Tire' filesep 'MFSwift' filesep 'MFSwift_2212']; elseif(mfswift_ver==2306) library_path = [curr_proj.RootFolder filesep 'Libraries' filesep 'Vehicle' filesep 'Tire' filesep 'MFSwift' filesep 'MFSwift_2306']; + elseif(mfswift_ver==2312) + library_path = [curr_proj.RootFolder filesep 'Libraries' filesep 'Vehicle' filesep 'Tire' filesep 'MFSwift' filesep 'MFSwift_2312']; end if(isempty(library_path)) warning('off','backtrace') diff --git a/Workflows/Exercises/Overview/Simscape_Vehicle_Templates_Exercises_web.m b/Workflows/Exercises/Overview/Simscape_Vehicle_Templates_Exercises_web.m new file mode 100644 index 00000000..bf7e2f3b --- /dev/null +++ b/Workflows/Exercises/Overview/Simscape_Vehicle_Templates_Exercises_web.m @@ -0,0 +1 @@ +web('Simscape_Vehicle_Templates_Exercises.html') \ No newline at end of file