Skip to content

Foretellix Generation examples

Example: stay_on_road contradiction rightmost lane

OSC2 code: stay_on_road contradiction rightmost lane
#Start_Header
#Contradiction
#End_Header
import "$FTX/qa/regression/config/no_simulation.osc"

extend gen_config:
    set contradiction_check = true
    set retries = 2


extend test_config:
    set map = "$FTX_QA/odr_maps/straight_long_road.xodr"
    set implicits_kind = none
    set test_drain_time = 0second

# All tests assume vehicle width 1.8m and lane width 3.5m
extend vehicle:
    keep(bbox.width == 1.8m)

extend top.main:
    var lane_width := 3.5m

extend top.main:
  v1: vehicle 
  lat_distance: length with:
    keep(it < -1.75m)
  do v1.drive() with:
        lane(rightmost: true)
        lateral(lat_distance, center)
        duration([0..5]sec)

Example: stay_on_road contradiction leftmost lane

OSC2 code: stay_on_road contradiction leftmost lane
#Start_Header
#Contradiction
#End_Header
import "$FTX/qa/regression/config/no_simulation.osc"

extend gen_config:
    set contradiction_check = true
    set retries = 2


extend test_config:
    set map = "$FTX_QA/odr_maps/straight_long_road.xodr"
    set implicits_kind = none
    set test_drain_time = 0second

# All tests assume vehicle width 1.8m and lane width 3.5m
extend vehicle:
    keep(bbox.width == 1.8m)

extend top.main:
    var lane_width := 3.5m

extend top.main:
  v1: vehicle 
  lat_distance: length with:
    keep(it > 1.75m)
  do v1.drive() with:
        lane(leftmost: true)
        lateral(lat_distance, center)
        duration([0..5]sec)