ChangingWeather.xosc 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <OpenSCENARIO>
  3. <FileHeader revMajor="1" revMinor="0" date="2020-03-20T12:00:00" description="CARLA:ChangingWeatherExample" author=""/>
  4. <ParameterDeclarations/>
  5. <CatalogLocations/>
  6. <RoadNetwork>
  7. <LogicFile filepath="Town01"/>
  8. <SceneGraphFile filepath=""/>
  9. </RoadNetwork>
  10. <Entities>
  11. <ScenarioObject name="hero">
  12. <Vehicle name="vehicle.lincoln.mkz_2017" vehicleCategory="car">
  13. <ParameterDeclarations/>
  14. <Performance maxSpeed="69.444" maxAcceleration="200" maxDeceleration="10.0"/>
  15. <BoundingBox>
  16. <Center x="1.5" y="0.0" z="0.9"/>
  17. <Dimensions width="2.1" length="4.5" height="1.8"/>
  18. </BoundingBox>
  19. <Axles>
  20. <FrontAxle maxSteering="0.5" wheelDiameter="0.6" trackWidth="1.8" positionX="3.1" positionZ="0.3"/>
  21. <RearAxle maxSteering="0.0" wheelDiameter="0.6" trackWidth="1.8" positionX="0.0" positionZ="0.3"/>
  22. </Axles>
  23. <Properties>
  24. <Property name="type" value="ego_vehicle"/>
  25. <Property name="color" value="0,0,255"/>
  26. </Properties>
  27. </Vehicle>
  28. </ScenarioObject>
  29. </Entities>
  30. <Storyboard>
  31. <Init>
  32. <Actions>
  33. <GlobalAction>
  34. <EnvironmentAction>
  35. <Environment name="Environment1">
  36. <TimeOfDay animation="true" dateTime="2020-01-01T12:00:00"/>
  37. <Weather cloudState="free">
  38. <Sun intensity="0.85" azimuth="0" elevation="1.31"/>
  39. <Fog visualRange="100000.0"/>
  40. <Precipitation precipitationType="dry" intensity="0.0"/>
  41. </Weather>
  42. <RoadCondition frictionScaleFactor="1.0"/>
  43. </Environment>
  44. </EnvironmentAction>
  45. </GlobalAction>
  46. <Private entityRef="hero">
  47. <PrivateAction>
  48. <TeleportAction>
  49. <Position>
  50. <LanePosition roadId="4" laneId="-1" offset="1.0" s="48.58"/>
  51. </Position>
  52. </TeleportAction>
  53. </PrivateAction>
  54. <PrivateAction>
  55. <ControllerAction>
  56. <AssignControllerAction>
  57. <Controller name="HeroAgent">
  58. <Properties>
  59. <Property name="module" value="external_control"/>
  60. </Properties>
  61. </Controller>
  62. </AssignControllerAction>
  63. <OverrideControllerValueAction>
  64. <Throttle value="0" active="false"/>
  65. <Brake value="0" active="false"/>
  66. <Clutch value="0" active="false"/>
  67. <ParkingBrake value="0" active="false"/>
  68. <SteeringWheel value="0" active="false"/>
  69. <Gear number="0" active="false"/>
  70. </OverrideControllerValueAction>
  71. </ControllerAction>
  72. </PrivateAction>
  73. </Private>
  74. </Actions>
  75. </Init>
  76. <Story name="MyStory">
  77. <Act name="Behavior">
  78. <ManeuverGroup name="ManeuverSequence" maximumExecutionCount="1">
  79. <Actors selectTriggeringEntities="false"/>
  80. <Maneuver name="WeatherChange">
  81. <Event name="WeatherChangeEvent" priority="overwrite">
  82. <Action name="WeatherChangeAction">
  83. <GlobalAction>
  84. <EnvironmentAction>
  85. <Environment name="Environment1">
  86. <TimeOfDay animation="true" dateTime="2020-01-01T22:00:00"/>
  87. <Weather cloudState="free">
  88. <Sun intensity="0.05" azimuth="0" elevation="1.31"/>
  89. <Fog visualRange="100000.0"/>
  90. <Precipitation precipitationType="rain" intensity="0.9"/>
  91. </Weather>
  92. <RoadCondition frictionScaleFactor="1.0"/>
  93. </Environment>
  94. </EnvironmentAction>
  95. </GlobalAction>
  96. </Action>
  97. <StartTrigger>
  98. <ConditionGroup>
  99. <Condition name="WeatherChangeStartTime" delay="0" conditionEdge="rising">
  100. <ByValueCondition>
  101. <SimulationTimeCondition value="20" rule="greaterThan"/>
  102. </ByValueCondition>
  103. </Condition>
  104. </ConditionGroup>
  105. </StartTrigger>
  106. </Event>
  107. </Maneuver>
  108. <Maneuver name="DummyManeuver">
  109. <Event name="DummyManeuver" priority="overwrite">
  110. <Action name="DummyManeuver"/>
  111. <StartTrigger>
  112. <ConditionGroup>
  113. <Condition name="DummyManeuverStartTime" delay="0" conditionEdge="rising">
  114. <ByValueCondition>
  115. <SimulationTimeCondition value="10000000" rule="greaterThan"/>
  116. </ByValueCondition>
  117. </Condition>
  118. </ConditionGroup>
  119. </StartTrigger>
  120. </Event>
  121. </Maneuver>
  122. </ManeuverGroup>
  123. <StartTrigger>
  124. <ConditionGroup>
  125. <Condition name="StartTime" delay="0" conditionEdge="rising">
  126. <ByValueCondition>
  127. <SimulationTimeCondition value="5" rule="greaterThan"/>
  128. </ByValueCondition>
  129. </Condition>
  130. </ConditionGroup>
  131. </StartTrigger>
  132. <StopTrigger/>
  133. </Act>
  134. </Story>
  135. <StopTrigger/>
  136. </Storyboard>
  137. </OpenSCENARIO>