123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297 |
- <?xml version="1.0"?>
- <OpenSCENARIO>
- <FileHeader revMajor="1" revMinor="0" date="2020-03-24T12:00:00" description="CARLA:PedestrianCrossing" author=""/>
- <ParameterDeclarations/>
- <CatalogLocations/>
- <RoadNetwork>
- <LogicFile filepath="Town02"/>
- <SceneGraphFile filepath=""/>
- </RoadNetwork>
- <Entities>
- <ScenarioObject name="hero">
- <Vehicle name="vehicle.volkswagen.t2" vehicleCategory="car">
- <ParameterDeclarations/>
- <Performance maxSpeed="69.444" 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">
- <Pedestrian model="walker.pedestrian.0001" mass="90.0" name="walker.pedestrian.0001" pedestrianCategory="pedestrian">
- <ParameterDeclarations/>
- <BoundingBox>
- <Center x="1.5" y="0.0" z="0.9"/>
- <Dimensions width="2.1" length="4.5" height="1.8"/>
- </BoundingBox>
- <Properties>
- <Property name="type" value="simulation"/>
- </Properties>
- </Pedestrian>
- </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.35" azimuth="0" elevation="1.31"/>
- <Fog visualRange="100000.0"/>
- <Precipitation precipitationType="rain" intensity="0.2"/>
- </Weather>
- <RoadCondition frictionScaleFactor="1.0"/>
- </Environment>
- </EnvironmentAction>
- </GlobalAction>
- <Private entityRef="hero">
- <PrivateAction>
- <TeleportAction>
- <Position>
- <WorldPosition x="28.7" y="302.5" z="0.4" h="3.14159265359"/>
- </Position>
- </TeleportAction>
- </PrivateAction>
- <PrivateAction>
- <ControllerAction>
- <AssignControllerAction>
- <Controller name="HeroAgent">
- <Properties>
- <Property name="module" value="external_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>
- </Private>
- <Private entityRef="adversary">
- <PrivateAction>
- <TeleportAction>
- <Position>
- <RelativeRoadPosition entityRef="hero" ds="2" dt="0.0"/>
- <!-- <WorldPosition x="110" y="52" z="0.3" h="1.57079632679"/> -->
- </Position>
- </TeleportAction>
- </PrivateAction>
- </Private>
- </Actions>
- </Init>
- <Story name="MyStory">
- <Act name="Behavior">
- <ManeuverGroup maximumExecutionCount="1" name="ManeuverSequence">
- <Actors selectTriggeringEntities="false">
- <EntityRef entityRef="adversary"/>
- </Actors>
- <Maneuver name="PedestrianCrossingManeuver">
- <Event name="PedestrianStartsWalking" priority="overwrite">
- <Action name="PedestrianStartsWalking">
- <PrivateAction>
- <LongitudinalAction>
- <SpeedAction>
- <SpeedActionDynamics dynamicsShape="step" value="1.5" dynamicsDimension="distance"/>
- <SpeedActionTarget>
- <AbsoluteTargetSpeed value="10.0"/>
- </SpeedActionTarget>
- </SpeedAction>
- </LongitudinalAction>
- </PrivateAction>
- </Action>
- <StartTrigger>
- <ConditionGroup>
- <Condition name="StartCondition" delay="0" conditionEdge="rising">
- <ByEntityCondition>
- <TriggeringEntities triggeringEntitiesRule="any">
- <EntityRef entityRef="hero"/>
- </TriggeringEntities>
- <EntityCondition>
- <ReachPositionCondition tolerance="2.0">
- <Position>
- <WorldPosition x="140" y="55" z="0" h="180"/>
- </Position>
- </ReachPositionCondition>
- </EntityCondition>
- </ByEntityCondition>
- </Condition>
- </ConditionGroup>
- </StartTrigger>
- </Event>
- <Event name="PedestrianStopsAndWaits" priority="overwrite">
- <Action name="PedestrianStopsAndWaits">
- <PrivateAction>
- <LongitudinalAction>
- <SpeedAction>
- <SpeedActionDynamics dynamicsShape="step" value="10" dynamicsDimension="time"/>
- <SpeedActionTarget>
- <AbsoluteTargetSpeed value="0.0"/>
- </SpeedActionTarget>
- </SpeedAction>
- </LongitudinalAction>
- </PrivateAction>
- </Action>
- <StartTrigger>
- <ConditionGroup>
- <Condition name="AfterPedestrianWalks" delay="0" conditionEdge="rising">
- <ByValueCondition>
- <StoryboardElementStateCondition storyboardElementType="action" storyboardElementRef="PedestrianStartsWalking" state="completeState"/>
- </ByValueCondition>
- </Condition>
- </ConditionGroup>
- </StartTrigger>
- </Event>
- <Event name="PedestrianWalksAway" priority="overwrite">
- <Action name="PedestrianStartsWalkingAway">
- <PrivateAction>
- <LongitudinalAction>
- <SpeedAction>
- <SpeedActionDynamics dynamicsShape="step" value="6.5" dynamicsDimension="distance"/>
- <SpeedActionTarget>
- <AbsoluteTargetSpeed value="2.0"/>
- </SpeedActionTarget>
- </SpeedAction>
- </LongitudinalAction>
- </PrivateAction>
- </Action>
- <StartTrigger>
- <ConditionGroup>
- <Condition name="StartCondition" delay="0" conditionEdge="rising">
- <ByEntityCondition>
- <TriggeringEntities triggeringEntitiesRule="any">
- <EntityRef entityRef="hero"/>
- </TriggeringEntities>
- <EntityCondition>
- <StandStillCondition duration="0.1"/>
- </EntityCondition>
- </ByEntityCondition>
- </Condition>
- <Condition name="AfterPedestrianStopsAndWaits" delay="0" conditionEdge="rising">
- <ByValueCondition>
- <StoryboardElementStateCondition storyboardElementType="action" storyboardElementRef="PedestrianStopsAndWaits" state="completeState"/>
- </ByValueCondition>
- </Condition>
- </ConditionGroup>
- </StartTrigger>
- </Event>
- <Event name="PedestrianWaits" priority="overwrite">
- <Action name="PedestrianWaits">
- <PrivateAction>
- <LongitudinalAction>
- <SpeedAction>
- <SpeedActionDynamics dynamicsShape="step" value="10" dynamicsDimension="time"/>
- <SpeedActionTarget>
- <AbsoluteTargetSpeed value="0.0"/>
- </SpeedActionTarget>
- </SpeedAction>
- </LongitudinalAction>
- </PrivateAction>
- </Action>
- <StartTrigger>
- <ConditionGroup>
- <Condition name="StartCondition" delay="0" conditionEdge="rising">
- <ByEntityCondition>
- <TriggeringEntities triggeringEntitiesRule="any">
- <EntityRef entityRef="adversary"/>
- </TriggeringEntities>
- <EntityCondition>
- <StandStillCondition duration="0.1"/>
- </EntityCondition>
- </ByEntityCondition>
- </Condition>
- <Condition name="AfterPedestrianStartsWalking" delay="0" conditionEdge="rising">
- <ByValueCondition>
- <StoryboardElementStateCondition storyboardElementType="action" storyboardElementRef="PedestrianStartsWalkingAway" 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="10.0"/>
- </EntityCondition>
- </ByEntityCondition>
- </Condition>
- </ConditionGroup>
- </StartTrigger>
- <StopTrigger>
- <ConditionGroup>
- <Condition name="EndCondition" delay="0" conditionEdge="rising">
- <ByEntityCondition>
- <TriggeringEntities triggeringEntitiesRule="any">
- <EntityRef entityRef="hero"/>
- </TriggeringEntities>
- <EntityCondition>
- <TraveledDistanceCondition value="200.0"/>
- </EntityCondition>
- </ByEntityCondition>
- </Condition>
- </ConditionGroup>
- </StopTrigger>
- </Act>
- </Story>
- <StopTrigger>
- <ConditionGroup>
- <Condition name="criteria_RunningStopTest" delay="0" conditionEdge="rising">
- <ByValueCondition>
- <ParameterCondition parameterRef="" value="" rule="lessThan"/>
- </ByValueCondition>
- </Condition>
- <Condition name="criteria_RunningRedLightTest" delay="0" conditionEdge="rising">
- <ByValueCondition>
- <ParameterCondition parameterRef="" value="" rule="lessThan"/>
- </ByValueCondition>
- </Condition>
- <Condition name="criteria_WrongLaneTest" delay="0" conditionEdge="rising">
- <ByValueCondition>
- <ParameterCondition parameterRef="" value="" rule="lessThan"/>
- </ByValueCondition>
- </Condition>
- <Condition name="criteria_OnSidewalkTest" delay="0" conditionEdge="rising">
- <ByValueCondition>
- <ParameterCondition parameterRef="" value="" rule="lessThan"/>
- </ByValueCondition>
- </Condition>
- <Condition name="criteria_KeepLaneTest" delay="0" conditionEdge="rising">
- <ByValueCondition>
- <ParameterCondition parameterRef="" value="" rule="lessThan"/>
- </ByValueCondition>
- </Condition>
- <Condition name="criteria_CollisionTest" delay="0" conditionEdge="rising">
- <ByValueCondition>
- <ParameterCondition parameterRef="" value="" rule="lessThan"/>
- </ByValueCondition>
- </Condition>
- <Condition name="criteria_DrivenDistanceTest" delay="0" conditionEdge="rising">
- <ByValueCondition>
- <ParameterCondition parameterRef="distance_success" value="100" rule="lessThan"/>
- </ByValueCondition>
- </Condition>
- </ConditionGroup>
- </StopTrigger>
- </Storyboard>
- </OpenSCENARIO>
|