Skip to content

Extracting semantic tags, road and lane types & speed limits#484

Open
aprabou wants to merge 8 commits into
BerkeleyLearnVerify:mainfrom
aprabou:main
Open

Extracting semantic tags, road and lane types & speed limits#484
aprabou wants to merge 8 commits into
BerkeleyLearnVerify:mainfrom
aprabou:main

Conversation

@aprabou

@aprabou aprabou commented Jul 3, 2026

Copy link
Copy Markdown

Description

This extension allows for the extraction of semantic tags and speed limits/types from roads and lanes.
The changes are made to the following files:

roads.py:

  • added distributionFunction speedLimitAt to get the speed limit at coordinate-s along a given range
  • speedLimit element depreciated

xodr_parser.py:

  • Speed parsing/among helpers:

    • speed_to_mps
    • speed_limit_ranges_from_type_records
    • speed_limit_ranges_from_lane_records
    • effective_speed_limit_ranges
    • speed_limit_for_s_interval
    • assign_speed_limit_from_ranges.
  • When an interval straddles multiple limits, the minimum is used and an OpenDriveWarning is emitted.

  • Tag helpers:

    • merge_scenic_tags
    • lane_scenic_tags
    • _junction_tags
    • assign_semantic_tags
  • Propagation helpers:

    • propagate_speed_limit
    • apply_lane_speed_limits
    • propagate_tags
  • Road, Lane, and Junction now capture:

    • type_records
    • lane speed_records
    • junction type_
    • extra_tags
  • Road.toScenicRoad wires per-section and per-lane speed limits and tags into the Scenic objects.

  • Expanded drivable_lane_types / sidewalk_lane_types / shoulder_lane_types defaults (e.g. slipLane, biking, walking, restricted, curb, none; parking classified as a shoulder).

test_opendrive.py:

  • New unit tests covering speed-unit conversion, road/lane speed-range parsing, per-section and per-lane effective limits, multi-limit warnings, and tag propagation

Checklist

  • I have tested the changes locally via pytest and/or other means
  • I have added or updated relevant documentation
  • I have autoformatted the code with black and isort
  • I have added test cases (if applicable)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant