scenic.core.requirements

Support for hard and soft requirements.

Summary of Module Members

Functions

getNameBindings

Find all names the given lambda depends on, along with their current bindings.

Classes

BlanketCollisionRequirement

Requirement that the surfaces of a given set of objects do not intersect.

BoundRequirement

CompiledRequirement

ContainmentRequirement

DynamicMonitorRequirement

DynamicRequirement

IntersectionRequirement

Requirement that a pair of objects do not intersect.

MonitorRequirement

MonitorRequirement is a BoundRequirement with temporal proposition monitor

NonVisibilityRequirement

PendingRequirement

RequirementType

An enumeration.

SamplingRequirement

A requirement to be checked to validate a sample.

VisibilityRequirement

Member Details

class RequirementType(value)[source]

Bases: Enum

An enumeration.

getNameBindings(req, restrictTo=None)[source]

Find all names the given lambda depends on, along with their current bindings.

class MonitorRequirement(compiledReq, sample, proposition)[source]

Bases: BoundRequirement

MonitorRequirement is a BoundRequirement with temporal proposition monitor

class SamplingRequirement(optional)[source]

Bases: ABC

A requirement to be checked to validate a sample.

Parameters:

optional – Whether or not this requirement must be checked to validate the sample. Optional samples can be checked, and if False imply that the sample is invalid, but do not need to be checked if all non-optional requirements are satisfied.

abstract falsifiedByInner(sample)[source]

Returns False if the requirement is falsifed, True otherwise

abstract property violationMsg

Message to be printed if the requirement is violated

class IntersectionRequirement(objA, objB, optional=False)[source]

Bases: SamplingRequirement

Requirement that a pair of objects do not intersect.

class BlanketCollisionRequirement(objects, optional=True)[source]

Bases: SamplingRequirement

Requirement that the surfaces of a given set of objects do not intersect.

We can check for such intersections more quickly than full objects using FCL, but since FCL checks for surface intersections rather than volume intersections (in general), this requirement being satisfied does not imply that the objects do not intersect (one might still be contained in another). Therefore, this requirement is intended to quickly check for intersections in the common case rather than completely determine whether any objects collide.