scenic.simulators.carla.actions

Actions for dynamic agents in CARLA scenarios.

Summary of Module Members

Classes

PedestrianAction

SetAngularVelocityAction

SetAutopilotAction

Enable or disable CARLA autopilot with optional Traffic Manager settings.

SetGearAction

SetJumpAction

SetManualFirstGearShiftAction

SetManualGearShiftAction

SetTrafficLightAction

Set the traffic light to desired color.

SetTransformAction

SetVehicleLightStateAction

Set the vehicle lights' states.

SetWalkAction

TrackWaypointsAction

Track (x, y) waypoints in Scenic coordinates at a target speed.

VehicleAction

Member Details

class SetTrafficLightAction(color, distance=100, group=False)[source]

Bases: VehicleAction

Set the traffic light to desired color. It will only take effect if the car is within a given distance of the traffic light.

Parameters:
  • color – the string red/yellow/green/off/unknown

  • distance – the maximum distance to search for traffic lights from the current position

class SetAutopilotAction(enabled, **kwargs)[source]

Bases: VehicleAction

Enable or disable CARLA autopilot with optional Traffic Manager settings.

Parameters:
  • enabled – Enable or disable autopilot (bool)

  • kwargs

    Additional autopilot options such as:

    • speed: Target speed of the car in m/s (default: None). Mutually exclusive with vehicle_percentage_speed_difference.

    • vehicle_percentage_speed_difference: Percentage difference between intended speed and the current speed limit. Can be negative to exceed the speed limit.

    • path: Route for the vehicle to follow (default: None)

    • ignore_signs_percentage: Percentage of ignored traffic signs (default: 0)

    • ignore_lights_percentage: Percentage of ignored traffic lights (default: 0)

    • ignore_walkers_percentage: Percentage of ignored pedestrians (default: 0)

    • auto_lane_change: Whether to allow automatic lane changes (default: False)

class SetVehicleLightStateAction(vehicleLightState)[source]

Bases: VehicleAction

Set the vehicle lights’ states.

Parameters:

vehicleLightState – Which lights are on.

class TrackWaypointsAction(waypoints, cruising_speed=10.0)[source]

Bases: VehicleAction

Track (x, y) waypoints in Scenic coordinates at a target speed.