-
Notifications
You must be signed in to change notification settings - Fork 411
Open
Labels
Milestone
Description
As far as reading ScenarioRunner's scripts, in OpenSCENARIO, there doesn't seem to be any support for the ‘priority’ attribute of event. Is there any plan to do so in the future?
Problem
In OpenSCENARIO, I tried to create a scenario in which a vehicle decelerates and stops while changing lanes. To do so, it is necessary to run LaneChangeAction and SpeedAction in parallel.
- As shown below, if listing those actions in parallel in a same event, the car slows down and comes to a stop before changing lanes. This may be because throttle is set to 0.0 from the start of lane change. Therefore, I think I need to delay the start of SpeedAction.
<Event name="A" priority="overwrite">
<Action name="A1">
<PrivateAction>
<LateralAction>
<LaneChangeAction>
<LaneChangeActionDynamics dynamicsShape="linear" value="10.0" dynamicsDimension="distance"/>
<LaneChangeTarget>
<RelativeTargetLane entityRef="P" value="-1"/>
</LaneChangeTarget>
</LaneChangeAction>
</LateralAction>
</PrivateAction>
</Action>
<Action name="A2">
<PrivateAction>
<LongitudinalAction>
<SpeedAction>
<SpeedActionDynamics dynamicsShape="step" value="115.0" dynamicsDimension="distance"/>
<SpeedActionTarget>
<AbsoluteTargetSpeed value="0.0"/>
</SpeedActionTarget>
</SpeedAction>
</LongitudinalAction>
</PrivateAction>
</Action>
<StartTrigger>
<!-- ... -->
</StartTrigger>
</Event>- As shown below, if parallelizing Actions as separate events, I have to specify priority="parallel" for the deceleration event.
<Event name="A" priority="overwrite">
<Action name="A1">
<PrivateAction>
<LateralAction>
<LaneChangeAction>
<LaneChangeActionDynamics dynamicsShape="linear" value="10.0" dynamicsDimension="distance"/>
<LaneChangeTarget>
<RelativeTargetLane entityRef="P" value="-1"/>
</LaneChangeTarget>
</LaneChangeAction>
</LateralAction>
</PrivateAction>
</Action>
<StartTrigger>
<!-- ... -->
</StartTrigger>
</Event>
<Event name="B" priority="parallel">
<Action name="B1">
<PrivateAction>
<LongitudinalAction>
<SpeedAction>
<SpeedActionDynamics dynamicsShape="step" value="100.0" dynamicsDimension="distance"/>
<SpeedActionTarget>
<AbsoluteTargetSpeed value="0.0"/>
</SpeedActionTarget>
</SpeedAction>
</LongitudinalAction>
</PrivateAction>
</Action>
<StartTrigger>
<!-- During the lane change action -->
</StartTrigger>
</Event>