Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 0 additions & 32 deletions examples/sensors/carla/data_generation/data_generation.scenic

This file was deleted.

6 changes: 6 additions & 0 deletions examples/sensors/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import pytest


@pytest.fixture
def options():
return dict(mode2D=True)
17 changes: 17 additions & 0 deletions src/scenic/domains/driving/model.scenic
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ from scenic.domains.driving.roads import (ManeuverType, Network, Road, Lane, Lan
from scenic.domains.driving.actions import *
from scenic.domains.driving.behaviors import *

from scenic.core.sensors import Sensor
from scenic.core.distributions import RejectionException
from scenic.simulators.utils.colors import Color

Expand Down Expand Up @@ -325,6 +326,22 @@ class Pedestrian(DrivingObject):
length: 0.75
color: [0, 0.5, 1]

## Stub sensor implementations

class SSSensor(Sensor):
def __init__(self, *args, **kwargs):
pass

def getObservation(self):
raise RuntimeError("This simulator does not support SSSensor")

class RGBSensor(Sensor):
def __init__(self, *args, **kwargs):
pass

def getObservation(self):
raise RuntimeError("This simulator does not support RGBSensor")

## Utility functions

def withinDistanceToAnyCars(car, thresholdDistance):
Expand Down
9 changes: 8 additions & 1 deletion tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,14 @@ def ignorable(attr):
cache,
debug,
ignoreCacheAttrs=True,
extraIgnores=("__module__",),
extraIgnores=(
"__module__",
"_abc_impl",
"_abc_registry",
"_abc_cache",
"_abc_negative_cache",
"_abc_negative_cache_version",
),
):
fail()
return False
Expand Down
Loading