-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLaneChangeCutIn_S7.xosc
272 lines (272 loc) · 11.5 KB
/
LaneChangeCutIn_S7.xosc
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
<?xml version="1.0"?>
<OpenSCENARIO>
<FileHeader revMajor="1" revMinor="0" date="2020-03-24T12:00:00" description="CARLA:LaneChangeCutIn" author=""/>
<ParameterDeclarations/>
<CatalogLocations/>
<RoadNetwork>
<LogicFile filepath="Town04"/>
<SceneGraphFile filepath=""/>
</RoadNetwork>
<Entities>
<ScenarioObject name="hero">
<Vehicle name="vehicle.tesla.model3" vehicleCategory="car">
<ParameterDeclarations/>
<Performance maxSpeed="150" maxAcceleration="200" maxDeceleration="10.0"/>
<BoundingBox>
<Center x="1.5" y="0.0" z="0.9"/>
<Dimensions width="2.1" length="4.5" height="1.8"/>
</BoundingBox>
<Axles>
<FrontAxle maxSteering="0.5" wheelDiameter="0.6" trackWidth="1.8" positionX="3.1" positionZ="0.3"/>
<RearAxle maxSteering="0.0" wheelDiameter="0.6" trackWidth="1.8" positionX="0.0" positionZ="0.3"/>
</Axles>
<Properties>
<Property name="type" value="ego_vehicle"/>
</Properties>
</Vehicle>
</ScenarioObject>
<ScenarioObject name="adversary">
<Vehicle name="vehicle.lincoln.mkz_2017" vehicleCategory="car">
<ParameterDeclarations/>
<Performance maxSpeed="150" maxAcceleration="200" maxDeceleration="10.0"/>
<BoundingBox>
<Center x="1.5" y="0.0" z="0.9"/>
<Dimensions width="2.1" length="4.5" height="1.8"/>
</BoundingBox>
<Axles>
<FrontAxle maxSteering="0.5" wheelDiameter="0.6" trackWidth="1.8" positionX="3.1" positionZ="0.3"/>
<RearAxle maxSteering="0.0" wheelDiameter="0.6" trackWidth="1.8" positionX="0.0" positionZ="0.3"/>
</Axles>
<Properties>
<Property name="type" value="simulation"/>
</Properties>
</Vehicle>
</ScenarioObject>
</Entities>
<Storyboard>
<Init>
<Actions>
<GlobalAction>
<EnvironmentAction>
<Environment name="Environment1">
<TimeOfDay animation="false" dateTime="2019-06-25T12:00:00"/>
<Weather cloudState="free">
<Sun intensity="0.85" azimuth="0" elevation="1.31"/>
<Fog visualRange="100000.0"/>
<Precipitation precipitationType="dry" intensity="0.0"/>
</Weather>
<RoadCondition frictionScaleFactor="4.0"/>
</Environment>
</EnvironmentAction>
</GlobalAction>
<Private entityRef="hero">
<PrivateAction> <!--초기 스폰 위치-->
<TeleportAction>
<Position>
<WorldPosition x="-9.4" y="-152.8" z="0.5" h="1.57079632679"/>
</Position>
</TeleportAction>
</PrivateAction>
<PrivateAction>
<ControllerAction>
<AssignControllerAction>
<Controller name="HeroAgent">
<Properties>
<Property name="module" value="npc_vehicle_control"/>
</Properties>
</Controller>
</AssignControllerAction>
<OverrideControllerValueAction>
<Throttle value="0" active="false"/>
<Brake value="0" active="false"/>
<Clutch value="0" active="false"/>
<ParkingBrake value="0" active="false"/>
<SteeringWheel value="0" active="false"/>
<Gear number="0" active="false"/>
</OverrideControllerValueAction>
</ControllerAction>
</PrivateAction>
<PrivateAction>
<LongitudinalAction>
<SpeedAction>
<SpeedActionDynamics dynamicsShape="linear" value="2" dynamicsDimension="time"/>
<SpeedActionTarget>
<AbsoluteTargetSpeed value="16.6667"/> <!-- 60km/h -->
</SpeedActionTarget>
</SpeedAction>
</LongitudinalAction>
</PrivateAction>
</Private>
<Private entityRef="adversary">
<PrivateAction>
<TeleportAction>
<Position>
<WorldPosition x="-13.2" y="-100.0" z="0.5" h="1.57079632679"/>
</Position>
</TeleportAction>
</PrivateAction>
<PrivateAction>
<LongitudinalAction>
<SpeedAction>
<SpeedActionDynamics dynamicsShape="linear" value="2" dynamicsDimension="time"/>
<SpeedActionTarget>
<AbsoluteTargetSpeed value="13.8889"/> <!-- 50km/h -->
</SpeedActionTarget>
</SpeedAction>
</LongitudinalAction>
</PrivateAction>
</Private>
</Actions>
</Init>
<Story name="MyStory">
<Act name="Behavior">
<ManeuverGroup maximumExecutionCount="1" name="ManeuverSequence">
<Actors selectTriggeringEntities="false">
<EntityRef entityRef="adversary"/>
</Actors>
<Maneuver name="LaneChangeSimpleManeuver">
<Event name="AdversaryCutIn" priority="overwrite">
<Action name="AdversaryCutIn">
<PrivateAction>
<LateralAction>
<LaneChangeAction>
<LaneChangeActionDynamics dynamicsShape="linear" value="5" dynamicsDimension="distance"/>
<LaneChangeTarget>
<RelativeTargetLane entityRef="Ego" value="1"/> <!--양수면 왼, 음수면 오-->
</LaneChangeTarget>
</LaneChangeAction>
</LateralAction>
</PrivateAction>
</Action>
<StartTrigger>
<ConditionGroup>
<Condition name="StartCondition" delay="0" conditionEdge="rising">
<ByEntityCondition>
<TriggeringEntities triggeringEntitiesRule="any">
<EntityRef entityRef="hero"/>
</TriggeringEntities>
<EntityCondition>
<RelativeDistanceCondition entityRef="adversary" relativeDistanceType="cartesianDistance" value="33.3" freespace="false" rule="lessThan"/>
</EntityCondition>
</ByEntityCondition>
</Condition>
</ConditionGroup>
</StartTrigger>
</Event>
<Event name="AdversaryDecelerates" priority="overwrite">
<Action name="AdversaryDecelerates">
<PrivateAction>
<LongitudinalAction>
<SpeedAction>
<SpeedActionDynamics dynamicsShape="linear" value="10" dynamicsDimension="time"/>
<SpeedActionTarget>
<AbsoluteTargetSpeed value="7"/> <!--50km/h-->
</SpeedActionTarget>
</SpeedAction>
</LongitudinalAction>
</PrivateAction>
</Action>
<StartTrigger>
<ConditionGroup>
<Condition name="EndCondition" delay="0" conditionEdge="rising">
<ByValueCondition>
<StoryboardElementStateCondition storyboardElementType="action" storyboardElementRef="AdversaryCutIn" state="completeState"/>
</ByValueCondition>
</Condition>
</ConditionGroup>
</StartTrigger>
</Event>
<Event name="AdversaryConstant" priority="overwrite">
<Action name="AdversaryConstant">
<PrivateAction>
<LongitudinalAction>
<SpeedAction>
<SpeedActionDynamics dynamicsShape="linear" value="10" dynamicsDimension="time"/>
<SpeedActionTarget>
<AbsoluteTargetSpeed value="7"/> <!--50km/h-->
</SpeedActionTarget>
</SpeedAction>
</LongitudinalAction>
</PrivateAction>
</Action>
<StartTrigger>
<ConditionGroup>
<Condition name="EndCondition" delay="0" conditionEdge="rising">
<ByEntityCondition>
<TriggeringEntities triggeringEntitiesRule="any">
<EntityRef entityRef="adversary"/>
</TriggeringEntities>
<EntityCondition>
<TraveledDistanceCondition value="2000000.0"/>
</EntityCondition>
</ByEntityCondition>
</Condition>
</ConditionGroup>
</StartTrigger>
</Event>
</Maneuver>
</ManeuverGroup>
<ManeuverGroup maximumExecutionCount="1" name="ManeuverSequence_2">
<Actors selectTriggeringEntities="false">
<EntityRef entityRef="hero"/>
</Actors>
<Maneuver name="HeroLaneChnage">
<Event name="HeroCutOut" priority="overwrite">
<Action name="HeroCutOut">
<PrivateAction>
<LateralAction>
<LaneChangeAction>
<LaneChangeActionDynamics dynamicsShape="linear" value="5" dynamicsDimension="distance"/>
<LaneChangeTarget>
<RelativeTargetLane entityRef="hero" value="-1"/> <!--양수면 왼, 음수면 오-->
</LaneChangeTarget>
</LaneChangeAction>
</LateralAction>
</PrivateAction>
</Action>
<StartTrigger>
<ConditionGroup>
<Condition name="CutOutCondition_1" delay="0" conditionEdge="rising">
<ByEntityCondition>
<TriggeringEntities triggeringEntitiesRule="any">
<EntityRef entityRef="adversary"/>
</TriggeringEntities>
<EntityCondition>
<RelativeDistanceCondition entityRef="hero" relativeDistanceType="cartesianDistance" value="15.0" freespace="false" rule="lessThan"/>
</EntityCondition>
</ByEntityCondition>
</Condition>
<Condition name="CutOutCondition_2" delay="0" conditionEdge="rising">
<ByValueCondition>
<StoryboardElementStateCondition storyboardElementType="action" storyboardElementRef="AdversaryCutIn" state="completeState"/>
</ByValueCondition>
</Condition>
</ConditionGroup>
</StartTrigger>
</Event>
</Maneuver>
</ManeuverGroup>
<StartTrigger>
<ConditionGroup>
<!--<Condition name="OverallStartCondition" delay="0" conditionEdge="rising">
<ByEntityCondition>
<TriggeringEntities triggeringEntitiesRule="any">
<EntityRef entityRef="hero"/>
</TriggeringEntities>
<EntityCondition>
<TraveledDistanceCondition value="1.0"/>
</EntityCondition>
</ByEntityCondition>
</Condition>-->
<Condition name="StartTime" delay="0" conditionEdge="rising">
<ByValueCondition>
<SimulationTimeCondition value="0" rule="equalTo"/>
</ByValueCondition>
</Condition>
</ConditionGroup>
</StartTrigger>
</Act>
</Story>
<StopTrigger/>
</Storyboard>
</OpenSCENARIO>