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.
Oh, I misunderstanding the usage of inverted_ param. I found we can override the canPass function in GenericTrafficRules.h to custom the bidirectional lanelet.
In GenericTrafficRules.cpp, I find a function
isOneWay
that checks if lanelet is bidirectional, and this function finally check variableConstLanelet.inverted_
. But when load an OSM file map which has tagone_way: no
, I find the Lanelet in map still in one direction andlanelet.inerted()
function returnfalse
. Then, I read OsmHandlerLoad.cpp and notice in function loadLanelets create lanelets without addinginverted
parameter.