Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Carla crash when running a scenario includes pedestrian #1080

Open
RashawnXue opened this issue May 15, 2024 · 1 comment
Open

Carla crash when running a scenario includes pedestrian #1080

RashawnXue opened this issue May 15, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@RashawnXue
Copy link

Describe the bug

I' m using scenario_runner to run different scenarios, and most of them can run smoothly. But when I try to run a scenario including Pedestrian, Carla just generates the scenario, runs it, and then crashes.

To Reproduce
Steps to reproduce the behavior:

  1. Running scenario with command
python3 scenario_runner.py --openscenario pedestrian_scenario.xosc 
  1. Scenario is generated and running normally
  2. Carla carshes and report:
Signal 11 caught.
Malloc Size=65538 LargeMemoryPoolOffset=65554 
CommonUnixCrashHandler: Signal=11
Malloc Size=131160 LargeMemoryPoolOffset=196744 
Malloc Size=131160 LargeMemoryPoolOffset=327928 
Engine crash handling finished; re-raising signal 11 for the default handler. Good bye.
Segmentation fault (core dumped)

Expected behavior
Carla should run the scenario normally like others.

Desktop (please complete the following information):

  • OS: Ubuntu 20.04
  • CARLA 0.9.13
  • Python 3.8.10
  • Version 0.9.13

Additional context
The scenario file I use is below:

<?xml version="1.0" encoding="utf-8"?>
<OpenScenario>
  <FileHeader revMajor="1" revMinor="0" date="2024-04-19T21:25:05" description="CARLA:test" author=""/>
  <CatalogLocations/>
  <RoadNetwork>
    <LogicFile filepath="Town05"/>
  </RoadNetwork>
  <Entities>
    <ScenarioObject name="hero">
      <Vehicle name="vehicle.lincoln.mkz_2017" vehicleCategory="car">
        <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"/>
          <Property name="color" value="0,0,255"/>
        </Properties>
      </Vehicle>
    </ScenarioObject>
    <ScenarioObject name="adversary">
      <Vehicle name="vehicle.tesla.model3" vehicleCategory="car">
        <Performance maxSpeed="134.338468" maxAcceleration="320.146407" maxDeceleration="15.416075"/>
        <BoundingBox>
          <Center x="6.799624" y="-2.825733" z="0.9"/>
          <Dimensions width="3.329473" length="7.934908" height="2.233139"/>
        </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"/>
          <Property name="color" value="255,0,0"/>
        </Properties>
      </Vehicle>
    </ScenarioObject>
    <ScenarioObject name="Box">
      <MiscObject name="static.prop.streetbarrier" miscObjectCategory="obstacle" mass="0.0">
        <BoundingBox>
          <Center x="-9.670538" y="-4.573179" z="0.75"/>
          <Dimensions width="1.442451" length="1.224422" height="0.676124"/>
        </BoundingBox>
        <Properties>
          <Property name="scaleMode" value="ModelToBB"/>
          <Property name="model_id" value="15"/>
        </Properties>
      </MiscObject>
    </ScenarioObject>
    <ScenarioObject name="pedestrian1">
      <Pedestrian name="walker.pedestrian.0003" pedestrianCategory="animal" mass="77.678247">
        <BoundingBox>
          <Center x="0.597199" y="3.861271" z="0.9"/>
          <Dimensions width="2.688169" length="1.101846" height="1.190305"/>
        </BoundingBox>
        <Properties>
          <Property name="type" value="simulation"/>
        </Properties>
      </Pedestrian>
    </ScenarioObject>
  </Entities>
  <Storyboard>
    <Init>
      <Actions>
        <GlobalAction>
          <EnvironmentAction>
            <Environment name="weather">
              <RoadCondition frictionScaleFactor="1.0"/>
              <Weather>
                <Precipitation precipitationType="rain" intensity="0.7449851821220737"/>
                <Fog visualRange="127626.804184"/>
                <Sun intensity="0.447033" elevation="3.141593" azimuth="0.9611"/>
              </Weather>
              <TimeOfDay dateTime="2020-01-01T12:00:00" animation="true"/>
            </Environment>
          </EnvironmentAction>
        </GlobalAction>
        <Private entityRef="hero">
          <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>
          <PrivateAction>
            <LateralAction>
              <LaneOffsetAction continuous="true">
                <LaneOffsetTarget>
                  <AbsoluteTargetLaneOffset value="0.0"/>
                </LaneOffsetTarget>
                <LaneOffsetActionDynamics maxLateralAcc="10.0" dynamicsShape="linear"/>
              </LaneOffsetAction>
            </LateralAction>
          </PrivateAction>
          <PrivateAction>
            <TeleportAction>
              <Position>
                <LanePosition roadId="5" laneId="-1" offset="0" s="30"/>
              </Position>
            </TeleportAction>
          </PrivateAction>
        </Private>
        <Private entityRef="adversary">
          <PrivateAction>
            <LateralAction>
              <LaneOffsetAction continuous="true">
                <LaneOffsetTarget>
                  <RelativeTargetLaneOffset value="0.0" entityRef="adversary"/>
                </LaneOffsetTarget>
                <LaneOffsetActionDynamics maxLateralAcc="1.0" dynamicsShape="linear"/>
              </LaneOffsetAction>
            </LateralAction>
          </PrivateAction>
          <PrivateAction>
            <LongitudinalAction>
              <SpeedAction>
                <SpeedActionTarget>
                  <AbsoluteTargetSpeed value="10.0"/>
                </SpeedActionTarget>
                <SpeedActionDynamics value="1.5" dynamicsShape="step" dynamicsDimension="distance"/>
              </SpeedAction>
            </LongitudinalAction>
          </PrivateAction>
          <PrivateAction>
            <RoutingAction>
              <AssignRouteAction>
                <Route name="d-0" closed="false">
                  <Waypoint routeStrategy="shortest">
                    <Position>
                      <WorldPosition x="-128.5" y="-1.5" z="0.0" h="3.1415926"/>
                    </Position>
                  </Waypoint>
                  <Waypoint routeStrategy="shortest">
                    <Position>
                      <LanePosition roadId="1" laneId="1" offset="-2.781724146796636" s="45"/>
                    </Position>
                  </Waypoint>
                  <Waypoint routeStrategy="shortest">
                    <Position>
                      <LanePosition roadId="1" laneId="1" offset="1.4398457183267812" s="0"/>
                    </Position>
                  </Waypoint>
                  <Waypoint routeStrategy="shortest">
                    <Position>
                      <LanePosition roadId="5" laneId="-2" offset="2.6321894006830053" s="45"/>
                    </Position>
                  </Waypoint>
                </Route>
              </AssignRouteAction>
            </RoutingAction>
          </PrivateAction>
          <PrivateAction>
            <RoutingAction>
              <AssignRouteAction>
                <Route name="d-0" closed="false">
                  <Waypoint routeStrategy="shortest">
                    <Position>
                      <WorldPosition x="-128.5" y="-1.5" z="0.0" h="3.1415926"/>
                    </Position>
                  </Waypoint>
                  <Waypoint routeStrategy="shortest">
                    <Position>
                      <LanePosition roadId="1" laneId="1" offset="-0.9574761017182709" s="45"/>
                    </Position>
                  </Waypoint>
                  <Waypoint routeStrategy="shortest">
                    <Position>
                      <LanePosition roadId="1" laneId="1" offset="4.998056755719968" s="0"/>
                    </Position>
                  </Waypoint>
                  <Waypoint routeStrategy="shortest">
                    <Position>
                      <LanePosition roadId="5" laneId="-2" offset="-1.976123362814878" s="45"/>
                    </Position>
                  </Waypoint>
                </Route>
              </AssignRouteAction>
            </RoutingAction>
          </PrivateAction>
        </Private>
        <Private entityRef="pedestrian1">
          <PrivateAction>
            <TeleportAction>
              <Position>
                <WorldPosition x="-110" y="-10" z="0"/>
              </Position>
            </TeleportAction>
          </PrivateAction>
        </Private>
      </Actions>
    </Init>
    <Story name="MyStory">
      <Act name="Behaviour">
        <ManeuverGroup name="MyManeuverGroup" maximumExecutionCount="1">
          <Actors selectTriggeringEntities="false">
            <EntityRef entityRef="adversary"/>
          </Actors>
          <Maneuver name="MyManeuver">
            <Event name="speed_change_event-1" priority="overwrite">
              <Action name="MyEventAction">
                <PrivateAction>
                  <LongitudinalAction>
                    <SpeedAction>
                      <SpeedActionDynamics dynamicsShape="step" value="1.5" dynamicsDimension="distance"/>
                      <SpeedActionTarget>
                        <AbsoluteTargetSpeed value="25"/>
                      </SpeedActionTarget>
                    </SpeedAction>
                  </LongitudinalAction>
                </PrivateAction>
              </Action>
              <StartTrigger>
                <ConditionGroup>
                  <Condition name="EventTrigger1" delay="0" conditionEdge="none">
                    <ByValueCondition>
                      <SimulationTimeCondition value="0" rule="greaterOrEqual"/>
                    </ByValueCondition>
                  </Condition>
                </ConditionGroup>
              </StartTrigger>
            </Event>
            <Event name="MyEvent1" priority="overwrite">
              <Action name="MyEventAction">
                <PrivateAction>
                  <LongitudinalAction>
                    <SpeedAction>
                      <SpeedActionDynamics dynamicsShape="step" value="2.0" dynamicsDimension="distance"/>
                      <SpeedActionTarget>
                        <AbsoluteTargetSpeed value="0"/>
                      </SpeedActionTarget>
                    </SpeedAction>
                  </LongitudinalAction>
                </PrivateAction>
              </Action>
              <StartTrigger>
                <ConditionGroup>
                  <Condition name="EventTrigger1" delay="0" conditionEdge="none">
                    <ByValueCondition>
                      <SimulationTimeCondition value="30" rule="greaterOrEqual"/>
                    </ByValueCondition>
                  </Condition>
                </ConditionGroup>
              </StartTrigger>
            </Event>
            <Event priority="override" name="TrafficSignalEvent" maximumExecutionCount="1081">
              <Action name="signal_action">
                <GlobalAction>
                  <InfrastructureAction>
                    <TrafficSignalAction>
                      <TrafficSignalStateAction name="pos=46.349998,-178.500000" state="yellow"/>
                    </TrafficSignalAction>
                  </InfrastructureAction>
                </GlobalAction>
              </Action>
            </Event>
          </Maneuver>
        </ManeuverGroup>
        <StartTrigger/>
        <StopTrigger>
          <ConditionGroup>
            <Condition name="EndCondition" delay="0" conditionEdge="none">
              <ByValueCondition>
                <SimulationTimeCondition value="60" rule="greaterOrEqual"/>
              </ByValueCondition>
            </Condition>
          </ConditionGroup>
        </StopTrigger>
      </Act>
      <Act name="PedestrianAct">
        <ManeuverGroup name="PedestrianManeuver" maximumExecutionCount="1">
          <Actors selectTriggeringEntities="false">
            <EntityRef entityRef="pedestrian1"/>
          </Actors>
          <Maneuver name="Pedestrian1RouteManeuver">
            <Event name="Pedestrian1WalksEvent" priority="overwrite">
              <Action name="Pedestrian1Walks">
                <PrivateAction>
                  <LongitudinalAction>
                    <SpeedAction>
                      <SpeedActionDynamics dynamicsShape="sinusoidal" value="6.434985208621671" dynamicsDimension="time"/>
                      <SpeedActionTarget>
                        <AbsoluteTargetSpeed value="1.9297630547828803"/>
                      </SpeedActionTarget>
                    </SpeedAction>
                  </LongitudinalAction>
                </PrivateAction>
              </Action>
              <StartTrigger>
                <ConditionGroup>
                  <Condition name="Pedestrian1WalksCondition" delay="0" conditionEdge="rising">
                    <ByValueCondition>
                      <SimulationTimeCondition value="2.0" rule="greaterOrEqual"/>
                    </ByValueCondition>
                  </Condition>
                </ConditionGroup>
              </StartTrigger>
            </Event>
          </Maneuver>
        </ManeuverGroup>
        <StartTrigger/>
        <StopTrigger>
          <ConditionGroup>
            <Condition name="Pedestrian1StopCondition" delay="0" conditionEdge="none">
              <ByValueCondition>
                <SimulationTimeCondition value="60.0" rule="greaterOrEqual"/>
              </ByValueCondition>
            </Condition>
          </ConditionGroup>
        </StopTrigger>
      </Act>
    </Story>
    <StopTrigger/>
  </Storyboard>
</OpenScenario>

Hopefully I can get some help. Thanks!!

@RashawnXue RashawnXue added the bug Something isn't working label May 15, 2024
@lichengguang
Copy link

lichengguang commented Dec 20, 2024

I have the bug when i run :python3 config.py --xodr-path Town13.xodr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants