function [scenario, egoVehicle] = CurvedHighway()
% createDrivingScenario Returns the drivingScenario defined in the Designer

% Generated by MATLAB(R) 9.10 (R2021a) and Automated Driving Toolbox 3.3 (R2021a).
% Generated on: 17-Feb-2021 09:21:13

% Construct a drivingScenario object.
scenario = drivingScenario('StopTime', 18);

% Add all road segments
roadCenters = [56.13473 823.0072 0;
    64.82858 835.2291 0;
    74.02602 847.0774 0;
    83.59856 858.6252 0;
    93.42604 869.9573 0;
    103.3945 881.1657 0;
    113.3935 892.3469 0;
    123.3135 903.5982 0;
    133.109 914.958 0;
    142.7657 926.436 0;
    152.2333 938.0704 0;
    161.4594 949.897 0;
    170.3894 961.9486 0;
    178.9662 974.2539 0;
    187.1295 986.8371 0;
    194.8161 999.7168 0;
    201.9599 1012.905 0;
    208.4868 1026.409 0;
    214.3176 1040.228 0;
    219.4598 1054.317 0;
    223.9383 1068.632 0;
    227.7812 1083.13 0;
    231.0193 1097.775 0;
    233.6855 1112.535 0;
    235.8145 1127.383 0;
    237.4425 1142.293 0;
    238.6067 1157.248 0;
    239.3451 1172.229 0;
    239.6962 1187.224 0;
    239.699 1202.224 0;
    239.3926 1217.221 0;
    238.8163 1232.21 0;
    238.0094 1247.188 0;
    236.9962 1262.153 0;
    235.7453 1277.101 0;
    234.2127 1292.022 0;
    232.355 1306.906 0;
    230.1291 1321.74 0;
    227.4926 1336.506 0;
    224.4042 1351.184 0;
    220.8236 1365.749 0;
    216.7121 1380.174 0;
    212.0332 1394.424 0;
    206.7524 1408.463 0;
    200.8386 1422.246 0;
    194.264 1435.727 0;
    187.0053 1448.852 0;
    179.0441 1461.562 0;
    170.377 1473.802 0;
    161.0515 1485.549 0;
    151.1278 1496.795 0;
    140.6637 1507.54 0;
    129.7137 1517.79 0;
    118.3291 1527.555 0;
    106.5581 1536.851 0;
    94.44532 1545.697 0;
    82.03201 1554.117 0;
    69.35616 1562.136 0;
    56.45259 1569.783 0;
    43.35309 1577.09 0;
    30.08552 1584.088 0;
    16.65799 1590.773 0;
    3.065769 1597.116 0;
    -10.69412 1603.087 0;
    -24.62235 1608.654 0;
    -38.71708 1613.784 0;
    -52.97377 1618.445 0;
    -67.38492 1622.604 0;
    -81.93995 1626.226 0;
    -96.6249 1629.28 0;
    -111.4223 1631.73 0;
    -126.311 1633.544 0;
    -141.2659 1634.689 0;
    -156.2578 1635.135 0;
    -171.2536 1634.85 0;
    -186.2155 1633.806 0;
    -201.1029 1631.985 0;
    -215.8802 1629.418 0;
    -230.5201 1626.157 0;
    -245.0015 1622.251 0;
    -259.3093 1617.751 0;
    -273.4343 1612.705 0;
    -287.372 1607.163 0;
    -301.1227 1601.171 0;
    -314.6911 1594.777 0;
    -328.0853 1588.025 0;
    -341.3169 1580.96 0;
    -354.4003 1573.624 0;
    -367.3525 1566.059 0;
    -380.1923 1558.304 0;
    -392.9405 1550.4 0];
marking = [laneMarking('Unmarked')
    laneMarking('Solid', 'Width', 0.13)
    laneMarking('Dashed', 'Width', 0.13, 'Length', 1.5, 'Space', 3)
    laneMarking('DoubleSolid', 'Color', [0.98 0.86 0.36])
    laneMarking('Dashed', 'Width', 0.13, 'Length', 1.5, 'Space', 3)
    laneMarking('Solid', 'Width', 0.13)
    laneMarking('Unmarked')];
laneSpecification = lanespec(6, 'Width', [1.15 3.85 4.05 4.05 3.85 1.15], 'Marking', marking);
road(scenario, roadCenters, 'Lanes', laneSpecification, 'Name', 'Road');

% Add the ego vehicle
egoVehicle = vehicle(scenario, ...
    'ClassID', 1, ...
    'Length', 4.848, ...
    'Width', 1.842, ...
    'Height', 1.517, ...
    'Position', [-379.125200173941 1556.58303021224 0], ...
    'RearOverhang', 1.119, ...
    'FrontOverhang', 0.911, ...
    'Wheelbase', 2.818, ...
    'Mesh', driving.scenario.carMesh, ...
    'Name', 'Car');
waypoints = [-379.125200173941 1556.58303021224 0;
    -366.305590542494 1564.32536330499 0;
    -353.378987459965 1571.87572272982 0;
    -340.326543305963 1579.19401018977 0;
    -327.131509721978 1586.2390870977 0;
    -313.779623316813 1592.96867078752 0;
    -300.259506433378 1599.33926833034 0;
    -286.563083033308 1605.30615420819 0;
    -272.686008825555 1610.82339835163 0;
    -258.62811369467 1615.84395125697 0;
    -244.393853270548 1620.3197930356 0;
    -229.99276512383 1624.20215327897 0;
    -215.439923573124 1627.44180851078 0;
    -200.756385460685 1629.98946370341 0;
    -185.969624781643 1631.79599410781 0;
    -171.112639417778 1632.82979388499 0;
    -156.219350663193 1633.11024239663 0;
    -141.325999082389 1632.66538677498 0;
    -126.465647150981 1631.52487050065 0;
    -111.667234895047 1629.71966895395 0;
    -96.9557069243864 1627.28173435532 0;
    -82.3521622521922 1624.24367797121 0;
    -67.8740221837175 1620.63848903658 0;
    -53.5352120165889 1616.49928944036 0;
    -39.3463527581139 1611.85912289247 0;
    -25.3149595220546 1606.75077703347 0;
    -11.4456437123054 1601.20663675355 0;
    2.25968347149253 1595.25856684718 0;
    15.801608265275 1588.93782203899 0;
    29.1830139858723 1582.27498236481 0;
    42.4084371849991 1575.29929633886 0;
    55.466120966873 1568.01501473756 0;
    68.323721453812 1560.39400474543 0;
    80.949389945062 1552.40566709219 0;
    93.3086272096877 1544.02154909831 0;
    105.363813872023 1535.21589347987 0;
    117.074087761217 1525.96606760816 0;
    128.395272904409 1516.25303308256 0;
    139.279868321929 1506.06185457839 0;
    149.677105387418 1495.38224558217 0;
    159.533083014516 1484.2091470792 0;
    168.79099028152 1472.54333350949 0;
    177.391424277062 1460.39203737291 0;
    185.289193631751 1447.77673326981 0;
    192.491981614384 1434.7468595944 0;
    199.018481213198 1421.35856102854 0;
    204.891430284573 1407.66425729255 0;
    210.137812613325 1393.71131912434 0;
    214.788202611698 1379.54212074336 0;
    218.876172786391 1365.19416339823 0;
    222.43776507581 1350.70025846732 0;
    225.51102563151 1336.08875969258 0;
    228.135601351518 1321.38383528756 0;
    230.352395442708 1306.60577183166 0;
    232.203278466985 1291.77130301111 0;
    233.730850683567 1276.89395736607 0;
    234.978251009229 1261.98442023415 0;
    235.989009721777 1247.0509058665 0;
    236.794215949171 1232.10059801931 0;
    237.369070402716 1217.14297894522 0;
    237.674384954727 1202.18277881769 0;
    237.671177620147 1187.22481829544 0;
    237.320618826339 1172.27633003686 0;
    236.584144723892 1157.34725738243 0;
    235.423605637252 1142.45054704508 0;
    233.801453276994 1127.60243295521 0;
    231.680970110887 1112.82270771082 0;
    229.02654398162 1098.13497733198 0;
    225.803990647982 1083.56689422292 0;
    221.980926395767 1069.15036241574 0;
    217.527192196551 1054.9217083232 0;
    212.415330068884 1040.92180938283 0;
    206.62111130049 1027.19617215558 0;
    200.13669373213 1013.78632839741 0;
    193.035587493228 1000.68129681174 0;
    185.390624317531 987.874904884703 0;
    177.26736752206 975.356037154254 0;
    168.728141811449 963.106518032109 0;
    159.832352981009 951.102630983641 0;
    150.636624323912 939.315955236042 0;
    141.195036052754 927.714150968102 0;
    131.559449891417 916.261695390783 0;
    121.779902303691 904.920574713393 0;
    111.874535012642 893.686148571285 0;
    101.885012457342 882.515552886901 0;
    91.9128990076777 871.302993820486 0;
    82.0687147484306 859.951950290756 0;
    72.4670131403615 848.369713377656 0;
    63.2289681261524 836.470840349271 0];
speed = 20.6;
trajectory(egoVehicle, waypoints, speed);

% Add the non-ego actors
vehicle(scenario, ...
    'ClassID', 1, ...
    'Length', 4.848, ...
    'Width', 1.842, ...
    'Height', 1.517, ...
    'RearOverhang', 1.119, ...
    'FrontOverhang', 0.911, ...
    'Wheelbase', 2.818, ...
    'Mesh', driving.scenario.carMesh, ...
    'Name', 'Car1');

vehicle(scenario, ...
    'ClassID', 1, ...
    'Length', 4.948, ...
    'Width', 2.009, ...
    'Height', 1.37, ...
    'RearOverhang', 0.945, ...
    'FrontOverhang', 0.983, ...
    'Wheelbase', 3.02, ...
    'Mesh', driving.scenario.carMesh, ...
    'Name', 'Car2');

vehicle(scenario, ...
    'ClassID', 1, ...
    'Length', 3.864, ...
    'Width', 1.653, ...
    'Height', 1.513, ...
    'RearOverhang', 0.589, ...
    'FrontOverhang', 0.828, ...
    'Wheelbase', 2.447, ...
    'Mesh', driving.scenario.carMesh, ...
    'Name', 'Car3');

vehicle(scenario, ...
    'ClassID', 1, ...
    'Length', 6.142, ...
    'Width', 2.073, ...
    'Height', 1.99, ...
    'RearOverhang', 1.321, ...
    'FrontOverhang', 1.124, ...
    'Wheelbase', 3.697, ...
    'Mesh', driving.scenario.carMesh, ...
    'Name', 'Car4');

vehicle(scenario, ...
    'ClassID', 1, ...
    'Length', 4.826, ...
    'Width', 1.935, ...
    'Height', 1.774, ...
    'RearOverhang', 0.939, ...
    'FrontOverhang', 0.991, ...
    'Wheelbase', 2.896, ...
    'Mesh', driving.scenario.carMesh, ...
    'Name', 'Car5');

