From f7f6c33b83075b718fa95a2acebfd930984f6e90 Mon Sep 17 00:00:00 2001 From: Sergi Hernandez Juan <shernand@iri.upc.edu> Date: Thu, 31 Dec 2020 17:56:36 +0100 Subject: [PATCH] Solved a bug: In the add_nodes() function: the width attribute is used instead og the get_width() function to get the actual width (not scaled by the scale_factor). --- src/opendrive_road_segment.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/opendrive_road_segment.cpp b/src/opendrive_road_segment.cpp index a1370fe..4a4bd78 100644 --- a/src/opendrive_road_segment.cpp +++ b/src/opendrive_road_segment.cpp @@ -207,7 +207,7 @@ void COpendriveRoadSegment::add_nodes(OpenDRIVE::road_type &road_info) new_node->set_parent_segment(this); } this->lanes[i]->add_node(new_node); - lane_offset-=this->lanes[i]->get_width(); + lane_offset-=this->lanes[i]->width; } } } @@ -238,7 +238,7 @@ void COpendriveRoadSegment::add_nodes(OpenDRIVE::road_type &road_info) new_node->set_parent_segment(this); } this->lanes[i]->add_node(new_node); - lane_offset+=this->lanes[i]->get_width(); + lane_offset+=this->lanes[i]->width; } } } @@ -301,12 +301,14 @@ void COpendriveRoadSegment::link_neightbour_lanes(lanes::laneSection_type &lane_ else this->lanes[i]->right_mark=OD_MARK_NONE; } +/* if(this->lanes.find(1)!=this->lanes.end() && this->lanes.find(-1)!=this->lanes.end()) { this->lanes[-1]->left_mark=center_mark; this->lanes[1]->right_mark=center_mark; this->lanes[-1]->link_neightbour_lane(this->lanes[1]); } +*/ } void COpendriveRoadSegment::link_segment(COpendriveRoadSegment &segment) -- GitLab