Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
autonomous_driving_tools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mobile_robotics
autonomous_driving
autonomous_driving_tools
Commits
2ab3c4b0
Commit
2ab3c4b0
authored
4 years ago
by
Sergi Hernandez
Browse files
Options
Downloads
Patches
Plain Diff
Added the link to the previous segment.
parent
3464ed41
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/opendrive_road.cpp
+0
-2
0 additions, 2 deletions
src/opendrive_road.cpp
src/opendrive_road_segment.cpp
+8
-0
8 additions, 0 deletions
src/opendrive_road_segment.cpp
with
8 additions
and
2 deletions
src/opendrive_road.cpp
+
0
−
2
View file @
2ab3c4b0
...
...
@@ -137,7 +137,6 @@ void COpendriveRoad::load(const std::string &filename)
// link segments
this
->
link_segments
(
*
open_drive
);
// process junctions
/*
for
(
OpenDRIVE
::
junction_iterator
junction_it
(
open_drive
->
junction
().
begin
());
junction_it
!=
open_drive
->
junction
().
end
();
++
junction_it
)
{
for
(
junction
::
connection_iterator
connection_it
(
junction_it
->
connection
().
begin
());
connection_it
!=
junction_it
->
connection
().
end
();
++
connection_it
)
...
...
@@ -182,7 +181,6 @@ void COpendriveRoad::load(const std::string &filename)
}
}
}
*/
}
catch
(
const
xml_schema
::
exception
&
e
){
std
::
ostringstream
os
;
os
<<
e
;
...
...
This diff is collapsed.
Click to expand it.
src/opendrive_road_segment.cpp
+
8
−
0
View file @
2ab3c4b0
...
...
@@ -274,7 +274,11 @@ void COpendriveRoadSegment::link_segment(COpendriveRoadSegment &segment)
for
(
unsigned
int
i
=
0
;
i
<
this
->
next
.
size
();
i
++
)
if
(
this
->
next
[
i
]
->
get_id
()
==
segment
.
get_id
())
// the segment is already included
return
;
for
(
unsigned
int
i
=
0
;
i
<
segment
.
prev
.
size
();
i
++
)
if
(
segment
.
prev
[
i
]
->
get_id
()
==
this
->
id
)
return
;
this
->
next
.
push_back
(
&
segment
);
segment
.
prev
.
push_back
(
this
);
// link lanes
for
(
int
i
=-
this
->
num_right_lanes
;
i
<
0
;
i
++
)
{
...
...
@@ -313,7 +317,11 @@ void COpendriveRoadSegment::link_segment(COpendriveRoadSegment &segment,int from
for
(
unsigned
int
i
=
0
;
i
<
this
->
next
.
size
();
i
++
)
if
(
this
->
next
[
i
]
->
get_id
()
==
segment
.
get_id
())
// the segment is already included
return
;
for
(
unsigned
int
i
=
0
;
i
<
segment
.
prev
.
size
();
i
++
)
if
(
segment
.
prev
[
i
]
->
get_id
()
==
this
->
id
)
return
;
this
->
next
.
push_back
(
&
segment
);
segment
.
prev
.
push_back
(
this
);
// link lanes
if
(
this
->
lanes
.
find
(
from
)
!=
this
->
lanes
.
end
()
&&
segment
.
lanes
.
find
(
to
)
!=
segment
.
lanes
.
end
())
this
->
lanes
[
from
]
->
link_lane
(
segment
.
lanes
[
to
],
OD_MARK_NONE
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment