Skip to content

Fix XODR road boundary parsing#66

Merged
BorisIvanovic merged 3 commits into
NVlabs:alpasimfrom
maximilianigl:migl/fix-road-boundaries
May 5, 2026
Merged

Fix XODR road boundary parsing#66
BorisIvanovic merged 3 commits into
NVlabs:alpasimfrom
maximilianigl:migl/fix-road-boundaries

Conversation

@maximilianigl

Copy link
Copy Markdown

Updates the parsing of XODR to address (some of) the issues mentioned here: NVlabs/alpasim#61

The fundamental problem is that our XODR files don't have road boundaries. instead, we try to infer which lane-boundary is also a road boundary.

Before: Take the rightmost lane boundary in driving direction. It's not entirely clear to me why that didn't work reliably, but it didn't.

Now: Take the outermost lane-boundary on either side.

Guillermo did some analysis on the faulty scenes and it seems to fix most reported issues. The remaining ones might also be data problems: https://docs.google.com/document/d/1Lys_rCapKg0z1TLyBJ3WkAUNwy9-wKdZaXNOH1anl3Q/edit?tab=t.62pzl5e0asj

BorisIvanovic and others added 3 commits November 1, 2025 23:09
_extract_road_edges read lg.left_edge from the outermost left lane to
get the left road boundary.  In v1.4.3 the edge convention changed
(left_edge = inner for all lanes), but _extract_road_edges was not
updated, so the left boundary ended up at the centerline.

Replace the indirect lookup with direct capture: after the edge-chaining
loop finishes each side, current_edge is already the outermost road
edge.  Record it there and delete _extract_road_edges entirely.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

@BorisIvanovic BorisIvanovic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me! Just one question

Comment thread src/trajdata/dataset_specific/xodr/lane_processing.py
@BorisIvanovic BorisIvanovic merged commit 3caf3a8 into NVlabs:alpasim May 5, 2026
2 checks passed
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.

2 participants