fzi-forschungszentrum-informatik / Lanelet2

Map handling framework for automated driving
BSD 3-Clause "New" or "Revised" License
800 stars 328 forks source link

When load an OSM file, is tag: one_way work? #326

Closed Terrensou closed 11 months ago

Terrensou commented 11 months ago

In GenericTrafficRules.cpp, I find a function isOneWay that checks if lanelet is bidirectional, and this function finally check variable ConstLanelet.inverted_ . But when load an OSM file map which has tag one_way: no, I find the Lanelet in map still in one direction and lanelet.inerted() function return false. Then, I read OsmHandlerLoad.cpp and notice in function loadLanelets create lanelets without adding inverted parameter.

Terrensou commented 11 months ago

Oh, I misunderstanding the usage of inverted_ param. I found we can override the canPass function in GenericTrafficRules.h to custom the bidirectional lanelet.

Sorry to bother.