scenic.core.propositions

Objects representing propositions that can be used to specify conditions

Summary of Module Members

Classes

Always

And

Atomic

Eventually

Implies

Next

Not

Or

PropositionMonitor

PropositionNode

Base class for temporal and non-temporal propositions

UnaryProposition

Base class for temporal unary operators

Until

Member Details

class PropositionNode(ltl_node)[source]

Base class for temporal and non-temporal propositions

is_temporal

tells if the proposition is temporal

check_constrains_sampling()[source]

Checks if the proposition can be used for pruning.

A requirement can be used for pruning if it is evaluated on the scene generation phase before simulation, and violation in that phase immediately results in discarding the scene and regenerating a new one. For simplicity, we currently check two special cases: 1. requirements with no temporal requirement 2. requirements with only one always operator on top-level

Returns:

bool – True if the requirement is one of the forms above. False otherwise.

property children: List[PropositionNode]

Returns all children of proposition tree.

Returns:

list – proposition nodes that are directly under this node

flatten()[source]

Flattens the tree and return the list of nodes.

Returns:

list – list of all children nodes

Return type:

List[PropositionNode]

class UnaryProposition(ltl_node)[source]

Bases: PropositionNode

Base class for temporal unary operators