Skip to content

Map-related constructs examples

Example: one_way_road

OSC2 code: one_way_road
import "$FTX_BASIC/exe_platforms/sumo_ssp/config/sumo_config.osc"

extend test_config:
    set map = "$FTX_PACKAGES/maps/hooder.xodr"

extend top.main:
    do sut.car.drive(duration: 5s)

actor atv:
    b: bool

scenario atv.drive:
    i: int


    r1: one_way_road
    r2: one_way_road
    keep(r1 != r2)

Example: cut-out to shoulder

OSC2 code: cut-out to shoulder
import "$FTX_BASIC/exe_platforms/model_ssp/config/model_carla_0_9_13_config.osc"

extend test_config:
    set implicits_kind = none
    set test_drain_time = 0s
    set map = "$FTX_PACKAGES/maps/Town04.xodr"

extend top.main:
    vehicle_cut_out: vehicle

    shoulder: shoulder
    road: odr_road with:
        keep(it.odr_id == 45)
        keep(it.sub_id == 1)

    # The vehicle_cut_out starts ahead of SUT in the same lane
    # and then cuts out to the shoulder.
    do serial():
        p: parallel(duration:[1..4]second, overlap:equal):
            sut.car.drive() with:
                lane(1, at: start)
                keep_lane(run_mode: best_effort)
                along(road)
            vehicle_cut_out.drive() with:
                position(time: [2..3]s, ahead_of: sut.car, at: start)
                speed(speed: [5..15]kph, faster_than: sut.car, at: start)
                lane(same_as: sut.car, at: start)
                along(road, at: start)
                along(shoulder, at: end)

Example: cut-in from shoulder

OSC2 code: cut-in from shoulder
import "$FTX_BASIC/exe_platforms/model_ssp/config/model_carla_0_9_13_config.osc"

extend test_config:
    set implicits_kind = none
    set test_drain_time = 0s
    set map = "$FTX_PACKAGES/maps/Town04.xodr"

extend top.main:
    vehicle_cut_in: vehicle

    shoulder: shoulder
    road_near_shoulder: road_by_shoulder with:
        keep(it.shoulder_side == curb)
        keep(it.shoulder_id == shoulder.id)

    # The vehicle_cut_in starts ahead of SUT on shoulder, staying in place
    # and then moves into SUT's lane
    do serial():
        p: parallel(duration:[3..6]second, overlap:equal):
            sut.car.drive() with:
                lane(1, at: start, from: curb)
                keep_lane(run_mode: best_effort)
                along(road_near_shoulder)
                speed([20..40]kph)
            vehicle_cut_in.drive() with:
                position(distance: [50..100]m, ahead_of: sut.car, at: start)
                speed(0kph, at: start)
                along(shoulder, at: start)
                lane(same_as: sut.car, at: end)
                speed(0kph, faster_than: sut.car, at: end, track: projected)

Example: road_by_sidewalk

OSC2 code: road_by_sidewalk
import "$FTX_BASIC/exe_platforms/model_ssp/config/model_carla_0_9_13_config.osc"

extend test_config:
    set implicits_kind = none
    set test_drain_time = 0s
    set map = "$FTX_PACKAGES/maps/Town04.xodr"

extend top.main:
    other_vehicle: vehicle

    sidewalk: sidewalk
    road_near_sidewalk: road_by_sidewalk with:
        keep(it.sidewalk_side == curb)
        keep(it.sidewalk_id == sidewalk.id)

    # The SUT vehicle drives on a road with sidewalk, the 
    # other vehicle starts it's drive on a sidewalk itself
    do serial():
        p: parallel(duration:[3..6]second, overlap:equal):
            sut.car.drive() with:
                along(road_near_sidewalk)
            other_vehicle.drive() with:
                along(sidewalk, at: start)

Example: road_with_opposite

OSC2 code: road_with_opposite
import "$FTX_BASIC/exe_platforms/sumo_ssp/config/sumo_config.osc"

extend test_config:
    set map = "$FTX_PACKAGES/maps/hooder.xodr"

extend top.main:
    do sut.car.drive(duration: 5s)

actor atv:
    b: bool

scenario atv.drive:
    car1: vehicle
    car2: vehicle


    r: road_with_opposite

    do parallel(overlap:equal):
        car1.drive() with:
            along(r.main, at: start)

        car2.drive() with:
            along(r.opposite, at: start)

Example: slope_section example 1

OSC2 code: slope_section example 1
import "$FTX_BASIC/exe_platforms/sumo_ssp/config/sumo_config.osc"

extend test_config:
    set map = "$FTX_PACKAGES/maps/M61_FTX_highway_10km_4lane.xodr"

extend top.main:
    slope: slope_section with:
        keep (it.min_slope in [-0.13..0.18]rad)
        keep (it.max_slope in [-0.26...27]rad)

    do sut.car.drive(duration: [1..3]s) with:
        along(slope)

Example: slope_section example 2

OSC2 code: slope_section example 2
import "$FTX_BASIC/exe_platforms/sumo_ssp/config/sumo_config.osc"

extend test_config:
    set map = "$FTX_PACKAGES/maps/M268_slope_with_pitch_10deg.xodr"

extend map_config:
    set maximal_longitudinal_slope_change = 7deg
    set minimal_slope_angle = 3deg

extend top.main:
    uphill: slope_section with:
        keep (it.direction == uphill_slope)

    do sut.car.drive(duration: [1..3]s) with:
        along(uphill)

Example: crosswalk

OSC2 code: crosswalk
import "$FTX/env/basic/exe_platforms/model_ssp/config/model_dummy_config.osc"
import "$FTX/env/basic/msp/open_drive.osc"

extend test_config:
    set map = "$FTX_PACKAGES/maps/M38_FTX_urban_junctions_with_sgns.xodr" 
    set implicits_kind = none
    set test_drain_time = 0s

extend map_support_package:
    def compute_checksum(map_info: string)-> string is only:
        return ""

    def load_map(map_info: string, traffic_side_request: traffic_side_request)-> bool is also:
        var polygon: list of msp_coordinates
        polygon.add(new msp_coordinates)
        polygon[0].x = -185.4m
        polygon[0].y = -42.8m
        polygon.add(new msp_coordinates)
        polygon[1].x = -182.5m
        polygon[1].y = -42.8m
        polygon.add(new msp_coordinates)
        polygon[2].x = -182m
        polygon[2].y = -60.5m        
        polygon.add(new msp_coordinates)
        polygon[3].x = -185m
        polygon[3].y = -60.6m        
        map.add_crosswalk("test_crswk_1", polygon, solid, green)
        # "test_crswk_1" is expected to generate 6 road_on_crosswalk elements, 3 junction_entry and 3 junction_exit
        # each is expected to have a single road_to_crosswalk element connected to it

        return true


extend top.main:
    p: person
    start_pos: msp_position
    end_pos: msp_position
    road_on_crosswalk: road_on_crosswalk
    road_to_crosswalk: road_to_crosswalk with:
        keep(it.road_on_crosswalk == self.road_on_crosswalk)

    get_roadside_position_by_crosswalk(start_pos, road_on_crosswalk, left, lon_offset: 1m, lat_offset: 1m)
    get_roadside_position_by_crosswalk(end_pos, road_on_crosswalk, right, lon_offset: 2m, lat_offset: -1m)

    do parallel(overlap: start):
        m: p.move(end_pos, start_position: start_pos, duration: 10s)
        a: sut.car.drive(duration: 10s) with:
            a1: along(road_to_crosswalk, at: start)
            a2: along(road_on_crosswalk, at: end)
            override(a2, run_mode: best_effort)

Example: force merge

OSC2 code: force merge
import "$FTX/env/basic/exe_platforms/model_ssp/config/model_dummy_config.osc"
import "$FTX/env/basic/msp/open_drive.osc"


extend test_config:
    set map = "$FTX/qa/odr_maps/M405_multiple_highway_acceleration_lane.xodr"



extend map_config:
    # setting the maximum length of acceleration lanes to 1500m
    set highway_acceleration_lane_max_length = 1500m

scenario sut.merge_to_highway:
    acceleration_lane_merge_road: road_to_force_merge with:
        keep(it.merge_type == acceleration_lane)
    merge_to_lane: lane_to_force_merge_conflict with:
        keep(it.id == acceleration_lane_merge_road.merge_to_id)

    vehicle1: vehicle
    do serial():
        parallel(overlap: equal):
            sut.car.drive() with:
                along(acceleration_lane_merge_road, at:start, start_offset:acceleration_lane_merge_road.start_of_merge_offset)
            vehicle1.drive() with:
                along(merge_to_lane)
        parallel(overlap: equal):
            sut.car.drive() with:
                along(merge_to_lane, at:end)
            vehicle1.drive() with:
                along(merge_to_lane)

extend top.main:
    do sut.merge_to_highway()

Example: create_odr_point()

OSC2 code: create_odr_point()
import "$FTX_BASIC/exe_platforms/sumo_ssp/config/sumo_config.osc"

extend test_config:
    set map = "$FTX_PACKAGES/maps/M61_FTX_highway_10km_4lane.xodr"

extend top.main:
    p1 := map.create_odr_point("0", -3, 900m)  # Start on road 0:-3 with offset of 900m

    do sut.car.drive(duration: [1..3]s) with:
        along(p1, at: start)

Example: create_route()

OSC2 code: create_route()
import "$FTX_BASIC/exe_platforms/sumo_ssp/config/sumo_config.osc"

extend test_config:
    set map = "$FTX_PACKAGES/maps/highway.xodr"

extend top.main:
    p1 := map.create_odr_point("3", 1, 22m)
    p2 := map.create_odr_point("23", 3, 11m)
    # r1 is a route created by connecting p1, p2 and a new custom point
    r1 := map.create_route([p1, p2, map.create_odr_point("5", -5, 126m)])

    do sut.car.drive(duration: [1..3]s) with:
        along(r1)

Example: no along() modifier

OSC2 code: no along() modifier
import "$FTX_BASIC/exe_platforms/sumo_ssp/config/sumo_config.osc"

extend test_config:
    set map = "$FTX_PACKAGES/maps/hooder.xodr"

extend top.main:
    do sut.car.drive(duration: 5s)


scenario sut.drive_on_any_path:
   car1: vehicle

   do car1.drive() #no along modifier attached to the drive

Example: constrain drive() to highway

OSC2 code: constrain drive() to highway
import "$FTX_BASIC/exe_platforms/sumo_ssp/config/sumo_config.osc"

extend test_config:
    set map = "$FTX_PACKAGES/maps/hooder.xodr"

extend top.main:
    do sut.car.drive(duration: 5s)


scenario sut.drive_on_highway:
    car1: vehicle
    hj: highway

    do car1.drive() with:
        along(hj, at: start)

Example: multiple along() modifiers

OSC2 code: multiple along() modifiers
import "$FTX_BASIC/exe_platforms/sumo_ssp/config/sumo_config.osc"

extend test_config:
    set map = "$FTX_PACKAGES/maps/hooder.xodr"

extend top.main:
    do sut.car.drive(duration: 5s)


scenario sut.drive_to_junction:
    car1: vehicle
    he: highway_entry
    h: highway with: keep(it.lanes > 2)

    do car1.drive() with:
        along(he)
        along(h)

Example: road with required length (example 1)

OSC2 code: road with required length (example 1)
import "$FTX/env/basic/exe_platforms/model_ssp/config/model_sumo_config"

extend test_config:
    set map = "$FTX_PACKAGES/maps/hooder.xodr"

extend top.main:
    do sut.drive_on_road()


scenario sut.drive_on_road:
    r: one_way_road

    do sut.car.drive() with:
        along(r, start_offset: [10..20]m, at: start)

Example: get_crossing_position()

OSC2 code: get_crossing_position
import "$FTX/env/basic/exe_platforms/model_ssp/config/model_dummy_config.osc"
import "$FTX/env/basic/msp/open_drive.osc"

extend test_config:
    set map = "$FTX_PACKAGES/maps/highway.xodr" 


extend top.main:
    p: person
    start_cross: msp_position 
    end_cross: msp_position
    two_way_road: road_with_opposite
    lon_offset: length with:
        keep(lon_offset >= 10m and lon_offset <= two_way_road.length-10m)

    # Generate 'start_cross'
    top.position_along_road(position: start_cross, 
                            road: two_way_road, 
                            lon_offset: lon_offset, 
                            rightmost_lane: true, # rightmost driving lane
                            lat_offset: -200cm,    # negative sign == right direction
                            lat_reference: right) # lat_offset is from right side of rightmost_lane

    # Generate 'end_cross'
    top.get_crossing_position(in_position: start_cross, heading: 130deg, out_lon_offset: 1m, out_position: end_cross)

    do parallel(overlap: equal, duration: [10..15]s):
        m: p.move(end_cross, start_position: start_cross)
        a: sut.car.drive() with:
            a1: along(two_way_road, start_offset: lon_offset-10m, at: end)

Example: path_along_drive()

OSC2 code: path_along_drive()
import "$FTX_BASIC/exe_platforms/sumo_ssp/config/sumo_config.osc"
import "$FTX_BASIC/road_patterns/ftlx_basic_patterns.osc"

extend test_config:
    set map = "$FTX_PACKAGES/maps/hooder.xodr"

extend top.main:
    do sut.car.drive(duration: 5s)


scenario vehicle.car_crossing_path:
    ref_drive: any_scenario
    other_car: vehicle

    road_pattern: road_pattern_id with: keep(it in [oncoming, traverse])
    crossing_path: crossing_path with(kind: road_pattern)

    top.path_along_drive(crossing_path, drive: ref_drive,
                     lon_offset: [50..100]m,
                     lat_offset: [-2.5..2.5]m,
                     rel_angle: [-30..30]deg,
                     force_on_road: true)

Example: position_along_drive()

OSC2 code: position_along_drive()
import "$FTX_BASIC/exe_platforms/sumo_ssp/config/sumo_config.osc"

extend test_config:
    set map = "$FTX_PACKAGES/maps/hooder.xodr"

extend top.main:
    do sut.car.drive(duration: 5s)

scenario sut.scenario1:
    car1: vehicle
    car2:vehicle
    start_pos: msp_position
    end_pos: msp_position
    ref_drive: any_scenario
    fraction: int with:
        keep(it in [0..100])
    lon_offset: length with:
        keep(default it == 0m)
    start_lat_offset: length
    end_lat_offset: length


    top.position_along_drive(start_pos, ref_drive, path_fraction: fraction, 
        lat_offset: start_lat_offset, lon_offset: lon_offset)
    top.position_along_drive(end_pos, ref_drive, path_fraction: fraction,
        lat_offset: end_lat_offset, lon_offset: lon_offset)

Example: position_along_road()

OSC2 code: position_along_road()
import "$FTX_BASIC/exe_platforms/sumo_ssp/config/sumo_config.osc"

extend test_config:
    set map = "$FTX_PACKAGES/maps/hooder.xodr"

extend top.main:
    do sut.car.drive(duration: 5s)

scenario sut.scenario1:
    car1: vehicle
    car2:vehicle
    position: msp_position
    road: one_way_road
    lon_offset: length with:
        keep(default it == 10m)


    top.position_along_road(position, road, lon_offset: [10..20]m)

Example: constrain relation between roads entering and exiting a junction

OSC2 code: constrain relation between roads entering and exiting a junction
import "$FTX_BASIC/exe_platforms/sumo_ssp/config/sumo_config.osc"

extend test_config:
    set implicits_kind = none
    set test_drain_time = 0s
    set map = "$FTX_PACKAGES/maps/Town04.xodr"


extend top.main:
    vehicle_left: vehicle
    vehicle_right: vehicle
    vehicle_opposite: vehicle

    path_over_junction: roads_follow_in_junction

    enter_from_left_road: one_way_road
    exit_to_right_road: one_way_road

    enter_from_opposite_road: one_way_road
    exit_to_opposite_road: one_way_road

    enter_from_right_road: one_way_road
    exit_to_left_road: one_way_road

    # 'enter_from_left_road' enters the junction from left of 'path_over_junction.in_road' and
    # 'enter_from_left_road' is the first junction entry counting clockwise from 'path_over_junction.in_road'
    top.roads_enter_junction_relation(path_over_junction.in_road,
        enter_from_left_road,
        relative_direction: mid_left,
        clockwise_count: 1)
    # 'enter_from_opposite_road' enters the junction from opposite direction of 'path_over_junction.in_road' and
    # 'enter_from_opposite_road' is the second junction entry counting clockwise from 'path_over_junction.in_road'
    top.roads_enter_junction_relation(path_over_junction.in_road,
        enter_from_opposite_road,
        relative_direction: opposite,
        clockwise_count: 2)
    # 'enter_from_right_road' enters the junction from right of 'path_over_junction.in_road' and
    # 'enter_from_right_road' is the third junction entry counting clockwise from 'path_over_junction.in_road'
    top.roads_enter_junction_relation(path_over_junction.in_road,
        enter_from_right_road,
        relative_direction: mid_right,
        clockwise_count: 3)
    # 'exit_to_right_road' exits the junction to right of 'path_over_junction.out_road' and
    # 'exit_to_right_road' is the first junction exit counting clockwise from 'path_over_junction.out_road'
    top.roads_exit_junction_relation(path_over_junction.out_road,
        exit_to_right_road,
        relative_direction: mid_right,
        clockwise_count: 1)
    # 'exit_to_opposite_road' exits the junction to opposite direction of 'path_over_junction.out_road' and
    # 'exit_to_opposite_road' is the second junction exit counting clockwise from 'path_over_junction.out_road'
    top.roads_exit_junction_relation(path_over_junction.out_road,
        exit_to_opposite_road,
        relative_direction: opposite,
        clockwise_count: 2)
    # 'exit_to_left_road' exits the junction to left of 'path_over_junction.out_road' and
    # 'exit_to_left_road' is the third junction exit counting clockwise from 'path_over_junction.out_road'
    top.roads_exit_junction_relation(path_over_junction.out_road,
        exit_to_left_road,
        relative_direction: mid_left,
        clockwise_count: 3)

    do serial():
        parallel(duration: [4..20]s, overlap: equal):
            sut.car.drive() with:
                along(path_over_junction.in_road, end_offset: [10..30]m, at: start)
                along(path_over_junction.out_road, start_offset: [10..30]m, at: end)
            vehicle_left.drive() with:
                along(enter_from_right_road, end_offset: [10..20]m, at: start)
                along(exit_to_left_road, start_offset: [10..30]m, at: end)
            vehicle_right.drive() with:
                along(enter_from_left_road, end_offset: [10..20]m, at: start)
                along(exit_to_right_road, start_offset: [10..30]m, at: end)
            vehicle_opposite.drive() with:
                along(enter_from_opposite_road, end_offset: [10..20]m, at: start)
                along(exit_to_opposite_road, start_offset: [10..30]m, at: end)

Example: track_road_element() with trigger @start

OSC2 code: track_road_element() with trigger @start
import "$FTX_PACKAGES/common/osc/utils/av_utility_scenarios.osc"
import "$FTX/env/basic/exe_platforms/model_ssp/config/model_sumo_config"

extend test_config:
    set map = "$FTX_PACKAGES/maps/Town04.xodr"

scenario sut.track_junction_start:
    elem_1: internal_road
    elem_2: internal_road

    junction_dir: sut.car.track_road_element(internal_road, trigger:start)
    cover(junction_direction, expression:junction_dir_data.direction, event: junction_dir_event)

    do s1: serial():
        d2: sut.car.drive() with:
            speed(speed: 40kph, run_mode: best_effort)
            along(elem_1)
        d3: sut.car.drive() with:
            keep_speed()
            along(elem_2)

extend top.main:

    do sut.track_junction_start()

Example: track_road_element() with trigger @all

OSC2 code: track_road_element() with trigger @all
import "$FTX_PACKAGES/common/osc/utils/av_utility_scenarios.osc"
import "$FTX_BASIC/exe_platforms/sumo_ssp/config/sumo_config.osc"

extend test_config:
    set map = "$FTX_PACKAGES/maps/M36_FTX_suburban_4way_stops.xodr"

scenario top.track:
    car1: vehicle
    rws: road_with_sign

    rws_all: car1.track_road_element(road_with_sign, trigger: all)
    cover(sign_type, expression: rws_all_data.sign_type, event: rws_all_event)

    do s1: serial(duration: [9..30]s):
        d1: car1.drive() with:
            speed(speed: 40kph, run_mode: best_effort)
        d2: car1.drive() with:
            keep_speed()
            along(rws)

extend top.main:
    do t1: top.track()

Example: no specified road element

OSC2 code: no specified road element
import "$FTX_BASIC/exe_platforms/sumo_ssp/config/sumo_config.osc"

extend test_config:
    set map = "$FTX_PACKAGES/maps/hooder.xodr"

extend top.main:
    do sut.car.drive(duration: 5s)


scenario sut.cut_in:
    car1: vehicle # The "cut-in" car
    side: av_side # The side of which car1 cuts in, left or right

    do serial():
        change_lane: parallel(duration:[1.5..3]second, overlap:equal):
            sut.car.drive()
            car1.drive() with:
                l1: lane(side_of: sut.car, side: side, at: start)
                p1: position(time: [0.5..1]second, ahead_of: sut.car, at: start)
                l2: lane(same_as: sut.car, at: end)
                p2: position(time: [1.5..2]second, ahead_of: sut.car, at: end)

Example: highway with at least three lanes

OSC2 code: highway with at least three lanes
import "$FTX_BASIC/exe_platforms/sumo_ssp/config/sumo_config.osc"

extend test_config:
    set map = "$FTX_PACKAGES/maps/hooder.xodr"

extend top.main:
    do sut.car.drive(duration: 5s)


scenario sut.cut_in_on_highway:
    car1: vehicle # The "cut-in" car
    side: av_side # The side of which car1 cuts in, left or right
    h: highway with: keep(it.lanes >= 3)

    do serial():
        change_lane: parallel(duration:[1.5..3]second, overlap:equal):
            sut.car.drive()
            car1.drive() with:
                lane(side_of: sut.car, side: side, at: start)
                position(time: [0.5..1]second, ahead_of: sut.car, at: start)
                lane(same_as: sut.car, at: end)
                position(time: [1.5..2]second, ahead_of: sut.car, at: end)
                along(h)

Example: vehicle traverses junction

OSC2 code: vehicle traverses junction
import "$FTX_BASIC/exe_platforms/sumo_ssp/config/sumo_config.osc"

extend test_config:
    set map = "$FTX_PACKAGES/maps/hooder.xodr"

extend top.main:
    do sut.car.drive(duration: 5s)


scenario vehicle.traverse_junction:
    car: vehicle
    path: roads_follow_in_junction # Junction to traverse

    do serial(duration: [1..10]second):
        enter: car.drive() with:
            along(path.in_road)
        inside: car.drive() with:
            along(path.internal_road)
        exit: car.drive() with:
            along(path.out_road)

Example: get_road_curvature_at_trailer()

OSC2 code: get_road_curvature_at_trailer()
import "$FTX/env/basic/exe_platforms/model_ssp/config/model_dummy_config.osc"
import "$FTX/env/basic/msp/open_drive.osc"

extend trailer_model_id: [dummy_trailer]
extend trailer:
    keep(model_id == dummy_trailer => model == "dummy_trailer")

extend test_config:
    set map = "$FTX_PACKAGES/maps/highway.xodr"
    set test_drain_time = 0second


extend vehicle:
   def get_road_curvature_at_trailer() -> float is:
      var lane_pos_candidates := map.global_to_lane_coordinates_on_route(trailer_1.state.global_position.coord, planned_path)
      if not lane_pos_candidates.is_empty():
         var trailer_lane_pos := lane_pos_candidates[0]
         var curv_interval := trailer_lane_pos.lane.curvature_intervals.longitudinal_values.last(it.start_lon_offset < trailer_lane_pos.lon_offset)
         return curv_interval.curvature
      else:
         # Failed to find lane position of trailer
         return 0


extend car_model_id: [dummy_truck_with_trailer]
extend sut_vehicle:
    remove_default(trailer_1.trailer_kind)
    keep(trailer_1.trailer_kind != none)
    keep(model_id == dummy_truck_with_trailer)
    keep(vehicle_category == semi_trailer_truck)
    keep(bbox.length in [6..10]m)
    keep(bbox.width in [2..3]m)
    keep(bbox.height in [3..4]m)
    keep(back_hitch_point_offset in [1..1.5]m)
    keep(trailer_1.dolly_trailer == false)
    keep(trailer_1.bbox.length in [14..16]m)
    keep(trailer_1.bbox.width in [2..3]m)
    keep(trailer_1.bbox.height in [3..4]m)
    keep(trailer_1.front_hitch_point_offset in [0.5..1]m)

extend top.main:
    do serial:
        ego_drive_1: sut.car.drive() with:
            duration([1..2]s)
        log_info("Current curvature at trailer center: $(sut.car.get_road_curvature_at_trailer())")
        ego_drive_2: sut.car.drive() with:
            duration([1..2]s)

Example: oscdom map constructs internal road with conflict

OSC2 code: oscdom_map_constructs_internal_road_with_conflict()
import "$FTX/env/basic/exe_platforms/model_ssp/config/model_dummy_config.osc"
import "$FTX/env/basic/msp/open_drive.osc"


extend test_config:
    set map = "$FTX_QA/odr_maps/TrafficSignals_Simple.xodr"


scenario sut.conflicting_road_scenario:
    npc: vehicle
    npc_road: internal_road
    sut_road: internal_road with: keep(it.can_be_protected == true)
    sut_conflict_roads: internal_road_with_conflict with:
        keep(it.internal_road_id == sut_road.id)
        keep(it.conflicting_road_id == npc_road.id)
    do serial():
        parallel(overlap: equal):
            sut.car.drive() with: along(sut_road)
            npc.drive() with: along(npc_road)
extend top.main:
    do sut.conflicting_road_scenario()

Example: oscdom map constructs bike_lane

OSC2 code: oscdom map constructs bike lane example
import "$FTX/env/basic/exe_platforms/model_ssp/config/model_sumo_config.osc"
extend test_config:
    set map = "$FTX_PACKAGES/maps/M493_FTX_Bike_Lanes.xodr"
    set test_drain_time = 0second
    set implicits_kind = none
extend top.main:
    bicyclist: bicycle
    bike_lane: bike_lane
    road: one_way_road
    keep(bike_lane.one_way_road_id == road.id)
    do serial():
        bicyclist.drive() with:
            along(bike_lane, at: start)
        bicyclist.drive() with:
            along(road, at: start)
        bicyclist.drive() with:
            along(bike_lane)                        
    with: duration([5..20]s)

Example: oscdom map constructs junction_bike_lane

OSC2 code: oscdom map constructs junction_bike_lane
import "$FTX/env/basic/exe_platforms/model_ssp/config/model_sumo_config.osc"
extend test_config:
    set map = "$FTX_PACKAGES/maps/M493_FTX_Bike_Lanes.xodr"
    set test_drain_time = 0second
    set implicits_kind = none
extend top.main:
    bicyclist: bicycle
    in_bike_lane: bike_lane
    junction_bike_lane: junction_bike_lane
    keep(junction_bike_lane.in_bike_lane_id == in_bike_lane.id)
    do serial():
        bicyclist.drive() with:
            along(in_bike_lane, at: start)
        bicyclist.drive() with:
            along(junction_bike_lane)                       
    with: duration([3..20]s)