Better handle of lane_mapping and forbidden_turns#495
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #495 +/- ##
==========================================
- Coverage 84.70% 83.94% -0.77%
==========================================
Files 54 54
Lines 8304 8400 +96
Branches 975 1001 +26
==========================================
+ Hits 7034 7051 +17
- Misses 1255 1334 +79
Partials 15 15
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR adds lane-level turn information to cartography outputs (lane_mapping) and uses it to infer per-edge forbidden_turns, then wires these new attributes through the C++ road-network loaders and lane-choice logic.
Changes:
- Add
turn:lanesingestion and derivelane_mappingplus optionalforbidden_turnsinference in Python cartography processing. - Extend C++
RoadNetworkCSV/JSON loading to readlane_mappingandforbidden_turns, and update lane selection behavior inFirstOrderDynamics. - Add Python tests for
lane_mapping/forbidden_turnson a real OSM extract; bump DSF version to 6.5.0.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| test/Test_cartography.py | Adds integration-style tests asserting lane_mapping and inferred forbidden_turns exist and are well-formed. |
| src/dsf/utility/Typedef.hpp | Reorders Direction enum values to support updated lane/turn semantics. |
| src/dsf/mobility/RoadNetwork.cpp | Loads lane_mapping and forbidden_turns from CSV/JSON edge properties. |
| src/dsf/mobility/FirstOrderDynamics.cpp | Uses laneMapping() to constrain lane selection; adjusts agent bookkeeping when removing “ghost” agents. |
| src/dsf/dsf.hpp | Bumps minor version to 6.5. |
| src/dsf/cartography/cartography.py | Adds turn:lanes capture, produces lane_mapping, and infers forbidden_turns based on headings. |
| CITATION.cff | Updates package version to 6.5.0 and release date. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.