-
Notifications
You must be signed in to change notification settings - Fork 0
/
BorregasAve.m
85 lines (68 loc) · 2.71 KB
/
BorregasAve.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
function [scenario, egoVehicle] = BorregasAve()
% createDrivingScenario Returns the drivingScenario defined in the Designer
% Generated by MATLAB(R) 9.6 and Automated Driving Toolbox 2.0.
% Generated on: 08-Oct-2020 16:27:09
% Construct a drivingScenario object.
scenario = drivingScenario;
% Add all road segments
roadCenters = [41.41 61.52 0;
41.41 0 0];laneSpecification = lanespec(4, 'Width', 3.5);
road(scenario, roadCenters, 'Lanes', laneSpecification);
roadCenters = [54.81 0 0;
54.81 61.52 0];marking = [laneMarking('Solid', 'Color', [0.98 0.86 0.36])
laneMarking('Dashed')
laneMarking('Dashed')
laneMarking('Dashed')];
laneSpecification = lanespec(3, 'Width', 3.12, 'Marking', marking);
road(scenario, roadCenters, 'Lanes', laneSpecification);
roadCenters = [55 8.757 0;
-9.167 8.757 0];laneSpecification = lanespec(2, 'Width', 4);
road(scenario, roadCenters, 'Lanes', laneSpecification);
roadCenters = [-9.167 -1.753 0;
55 -1.753 0];laneSpecification = lanespec(2, 'Width', 4);
road(scenario, roadCenters, 'Lanes', laneSpecification);
roadCenters = [53.88 -44.83 0;
53.88 4.3 0];laneSpecification = lanespec(4, 'Width', 3.75);
road(scenario, roadCenters, 'Lanes', laneSpecification);
roadCenters = [39.3 4.3 0;
39.3 -44.83 0];laneSpecification = lanespec(3, 'Width', 3.2);
road(scenario, roadCenters, 'Lanes', laneSpecification);
roadCenters = [82.61 2.717 0;
40 2.717 0];laneSpecification = lanespec([1 2], 'Width', 4);
road(scenario, roadCenters, 'Lanes', laneSpecification);
roadCenters = [87.31 4.247 0;
332.3 4.247 0];laneSpecification = lanespec([1 1], 'Width', 4);
road(scenario, roadCenters, 'Lanes', laneSpecification);
roadCenters = [340.6 4.247 0;
384.5 4.247 0];laneSpecification = lanespec([1 1], 'Width', 4);
road(scenario, roadCenters, 'Lanes', laneSpecification);
roadCenters = [384.2 221.6 0;
384.2 -25.51 0];laneSpecification = lanespec([1 1], 'Width', 4);
road(scenario, roadCenters, 'Lanes', laneSpecification);
roadCenters = [384.5 6.247 0;
429.3 6.247 0];laneSpecification = lanespec([1 1], 'Width', 4);
road(scenario, roadCenters, 'Lanes', laneSpecification);
% Add the ego vehicle
egoVehicle = vehicle(scenario, ...
'ClassID', 1);
% Add the non-ego actors
car1 = vehicle(scenario, ...
'ClassID', 1, ...
'Position', [36.9 50.1 0]);
waypoints = [36.9 50.1 0;
40.9 15 0;
36.1 -9.1 0;
41.2 -40.5 0];
speed = 30;
trajectory(car1, waypoints, speed);
pedestrian = actor(scenario, ...
'ClassID', 4, ...
'Length', 0.24, ...
'Width', 0.45, ...
'Height', 1.7, ...
'Position', [21.11 13.47 0], ...
'RCSPattern', [-8 -8;-8 -8]);
waypoints = [21.11 13.47 0;
21.3 -6.75 0];
speed = 1.5;
trajectory(pedestrian, waypoints, speed);