Skip to main content

No project description provided

Project description

CommonRoad STL Monitor

PyPI pyversions PyPI version fury.io PyPI download month PyPI license

CommonRoad STL Monitor is a toolbox to evaluate the robustness of model-free and model-predictive robustness on CommonRoad scenarios using signal temporal logic.

Getting Started

Installation

The toolbox is installable as a regular PyPI package:

pip install commonroad-stl-monitor

Additionally, you can install extras like visualization to enable advanced AST visualizations. The visualization requires a working graphiz installation, which you should be able to source from your distros package registry.

pip install commonroad-stl-monitor[visualization]

Example Usage

from commonroad.common.file_reader import CommonRoadFileReader

from crmonitor.common import World
from crmonitor.evaluation import OfflineRuleEvaluator

scenario_path = "../scenarios/test_interstate/DEU_test_safe_distance.xml"

# Open the scenario
scenario, _ = CommonRoadFileReader(scenario_path)

# Create a world state, which is a holder class for intermediate results produced by the monitoring.
# Use the convenience class method to create with default configuration from a scenario.
world = World.create_from_scenario(scenario)

# Create a rule evaluator for the traffic rule 'R_G1'
rule_evaluator = OfflineRuleEvaluator.create_for_rule("R_G1", dt=world.dt)


ego_vehicle = next(iter(world.vehicles))
# Evaluate the robustness across the whole time frame the ego vehicle is defined.
robustness = rule_evaluator.evaluate(world, ego_vehicle.vehicle_id)

Documentation

The full documentation can be found at cps.pages.gitlab.lrz.de/commonroad/commonroad-stl-monitor.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

commonroad_stl_monitor-2025.1.tar.gz (14.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

commonroad_stl_monitor-2025.1-py3-none-any.whl (14.8 MB view details)

Uploaded Python 3

File details

Details for the file commonroad_stl_monitor-2025.1.tar.gz.

File metadata

  • Download URL: commonroad_stl_monitor-2025.1.tar.gz
  • Upload date:
  • Size: 14.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.10.18 Linux/5.15.0-87-generic

File hashes

Hashes for commonroad_stl_monitor-2025.1.tar.gz
Algorithm Hash digest
SHA256 34e0bf421ebfa75f0f1fd70ffede4d2d82e074f96e05ec6b72f1810fa389f66e
MD5 8d945f1f556c07c49ca8da863633fb1e
BLAKE2b-256 f2763d1c9547db0b7d1937c49b8b26c2445eda2590cee2ee107b632f543720f0

See more details on using hashes here.

File details

Details for the file commonroad_stl_monitor-2025.1-py3-none-any.whl.

File metadata

File hashes

Hashes for commonroad_stl_monitor-2025.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a7c9689520f427089c49d0fa3a015e3419bd33558d2226682fa78aeaba64ed01
MD5 134b0aa1f790f1c79933c55b4dac903e
BLAKE2b-256 28e58523474a59e9af27b47bff138ade6040ca43bddcf9487351bffe94e63e7c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page