make all u-turns continue
This commit is contained in:
committed by
Daniel J. H
parent
ceaf065d0e
commit
a92674022a
@@ -85,7 +85,7 @@ TurnInstruction IntersectionHandler::getInstructionForObvious(const std::size_t
|
||||
|
||||
if (angularDeviation(road.angle, 0) < 0.01)
|
||||
{
|
||||
return {TurnType::Turn, DirectionModifier::UTurn};
|
||||
return {TurnType::Continue, DirectionModifier::UTurn};
|
||||
}
|
||||
if (type == TurnType::Turn)
|
||||
{
|
||||
|
||||
@@ -188,9 +188,10 @@ Intersection TurnAnalysis::setTurnTypes(const NodeID node_prior_to_intersection,
|
||||
const EdgeID onto_edge = road.eid;
|
||||
const NodeID to_nid = node_based_graph.GetTarget(onto_edge);
|
||||
|
||||
road.instruction = {TurnType::Turn,
|
||||
(node_prior_to_intersection == to_nid) ? DirectionModifier::UTurn
|
||||
: getTurnDirection(road.angle)};
|
||||
if (node_prior_to_intersection == to_nid)
|
||||
road.instruction = {TurnType::Continue, DirectionModifier::UTurn};
|
||||
else
|
||||
road.instruction = {TurnType::Turn, getTurnDirection(road.angle)};
|
||||
}
|
||||
return intersection;
|
||||
}
|
||||
|
||||
@@ -239,7 +239,7 @@ Intersection triviallyMatchLanesToTurns(Intersection intersection,
|
||||
road_index = 2;
|
||||
}
|
||||
intersection[u_turn].entry_allowed = true;
|
||||
intersection[u_turn].instruction.type = TurnType::Turn;
|
||||
intersection[u_turn].instruction.type = TurnType::Continue;
|
||||
intersection[u_turn].instruction.direction_modifier = DirectionModifier::UTurn;
|
||||
|
||||
matchRoad(intersection[u_turn], lane_data.back());
|
||||
@@ -283,7 +283,7 @@ Intersection triviallyMatchLanesToTurns(Intersection intersection,
|
||||
u_turn = intersection.size() - 1;
|
||||
}
|
||||
intersection[u_turn].entry_allowed = true;
|
||||
intersection[u_turn].instruction.type = TurnType::Turn;
|
||||
intersection[u_turn].instruction.type = TurnType::Continue;
|
||||
intersection[u_turn].instruction.direction_modifier = DirectionModifier::UTurn;
|
||||
|
||||
matchRoad(intersection[u_turn], lane_data.back());
|
||||
|
||||
Reference in New Issue
Block a user