Skip to content

crosswalk-parsing fixed PR - #478

Open
aaravshar wants to merge 4 commits into
BerkeleyLearnVerify:mainfrom
aaravshar:add-crosswalk-parsing
Open

crosswalk-parsing fixed PR#478
aaravshar wants to merge 4 commits into
BerkeleyLearnVerify:mainfrom
aaravshar:add-crosswalk-parsing

Conversation

@aaravshar

Copy link
Copy Markdown

crosswalk parsing changes to xodr_parser and 1 scenario for pedestrian-vehicle interactions

@dfremont
dfremont self-requested a review June 17, 2026 16:31
…rianCrossing for conflicting maneuvers, updated crosswalk scenario to reflect this
Comment thread src/scenic/formats/opendrive/xodr_parser.py Outdated
Comment thread src/scenic/formats/opendrive/xodr_parser.py Outdated
Comment thread src/scenic/formats/opendrive/xodr_parser.py Outdated
Comment thread src/scenic/formats/opendrive/xodr_parser.py Outdated
Comment thread src/scenic/formats/opendrive/xodr_parser.py Outdated
Comment thread examples/driving/crosswalkStraightThrough.scenic Outdated
Comment thread examples/driving/crosswalkStraightThrough.scenic Outdated
Comment thread src/scenic/formats/opendrive/xodr_parser.py Outdated
Comment thread src/scenic/formats/opendrive/xodr_parser.py Outdated
rightEdge=rightEdge,
road=None,
crossings=(), # TODO add crosswalks
crossings=(pedestrian_crossings),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a tuple.

Also, I think it's theoretically possible that you could have a crosswalk that connects to one of the two sidewalks but not the other, or a crosswalk connecting to no sidewalks. So it would be safer here to check that at least one of the endpoints of the crosswalk is close to the sidewalk (within the tolerance) before adding it.

Comment thread src/scenic/formats/opendrive/xodr_parser.py
Comment thread src/scenic/formats/opendrive/xodr_parser.py Outdated
Comment thread src/scenic/formats/opendrive/xodr_parser.py Outdated
Comment thread src/scenic/formats/opendrive/xodr_parser.py Outdated
Comment thread src/scenic/formats/opendrive/xodr_parser.py Outdated
Comment thread src/scenic/formats/opendrive/xodr_parser.py Outdated
Comment thread src/scenic/formats/opendrive/xodr_parser.py
Comment thread src/scenic/formats/opendrive/xodr_parser.py Outdated
Comment thread src/scenic/formats/opendrive/xodr_parser.py Outdated
Comment thread src/scenic/formats/opendrive/xodr_parser.py Outdated

@dfremont dfremont left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall, thanks Aarav! I've pointed out a bunch of mostly-minor things above. The only other issue I can see is that there are no tests, but if necessary we could leave adding those to the next PR.

Comment thread src/scenic/formats/opendrive/xodr_parser.py
@codecov

codecov Bot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.48214% with 37 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.69%. Comparing base (454c8e1) to head (582e5af).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/scenic/formats/opendrive/xodr_parser.py 85.98% 30 Missing ⚠️
src/scenic/domains/driving/roads.py 30.00% 7 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #478      +/-   ##
==========================================
- Coverage   89.87%   89.69%   -0.19%     
==========================================
  Files          48       48              
  Lines       13346    13568     +222     
==========================================
+ Hits        11995    12170     +175     
- Misses       1351     1398      +47     
Files with missing lines Coverage Δ
src/scenic/domains/driving/roads.py 93.63% <30.00%> (-0.92%) ⬇️
src/scenic/formats/opendrive/xodr_parser.py 91.92% <85.98%> (-0.79%) ⬇️

... and 5 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

4 participants