Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
simulator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Chenhao Ma
simulator
Commits
99a6835f
Commit
99a6835f
authored
5 years ago
by
Qiang Lu
Committed by
Martins Mozeiko
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Correctly skip stop lines in AutowareMapTool
parent
d6a79082
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Assets/Scripts/Editor/AutowareMapTool.cs
+3
-8
3 additions, 8 deletions
Assets/Scripts/Editor/AutowareMapTool.cs
with
3 additions
and
8 deletions
Assets/Scripts/Editor/AutowareMapTool.cs
+
3
−
8
View file @
99a6835f
...
...
@@ -180,6 +180,8 @@ namespace Simulator.Editor
// Link before and after segment for each line segment
foreach
(
var
lineSegment
in
allLineSegments
)
{
if
(
lineSegment
.
lineType
!=
MapData
.
LineType
.
STOP
)
continue
;
// Skip stop lines
// Each segment must have at least 2 waypoints for calculation, otherwise exit
while
(
lineSegment
.
mapLocalPositions
.
Count
<
2
)
{
...
...
@@ -197,6 +199,7 @@ namespace Simulator.Editor
{
continue
;
}
if
(
lineSegmentCmp
.
lineType
!=
MapData
.
LineType
.
STOP
)
continue
;
// Skip stop lines
var
firstPt_cmp
=
lineSegmentCmp
.
transform
.
TransformPoint
(
lineSegmentCmp
.
mapLocalPositions
[
0
]);
var
lastPt_cmp
=
lineSegmentCmp
.
transform
.
TransformPoint
(
lineSegmentCmp
.
mapLocalPositions
[
lineSegmentCmp
.
mapLocalPositions
.
Count
-
1
]);
...
...
@@ -205,20 +208,12 @@ namespace Simulator.Editor
{
lineSegmentCmp
.
mapLocalPositions
[
lineSegmentCmp
.
mapLocalPositions
.
Count
-
1
]
=
lineSegmentCmp
.
transform
.
InverseTransformPoint
(
firstPt
);
lineSegmentCmp
.
mapWorldPositions
[
lineSegmentCmp
.
mapWorldPositions
.
Count
-
1
]
=
firstPt
;
if
(
lineSegment
.
lineType
!=
MapData
.
LineType
.
STOP
)
{
lineSegment
.
befores
.
Add
(
lineSegmentCmp
);
}
}
if
((
lastPt
-
firstPt_cmp
).
magnitude
<
MapAnnotationTool
.
PROXIMITY
/
MapAnnotationTool
.
EXPORT_SCALE_FACTOR
)
{
lineSegmentCmp
.
mapLocalPositions
[
0
]
=
lineSegmentCmp
.
transform
.
InverseTransformPoint
(
lastPt
);
lineSegmentCmp
.
mapWorldPositions
[
0
]
=
lastPt
;
if
(
lineSegment
.
lineType
!=
MapData
.
LineType
.
STOP
)
{
lineSegment
.
afters
.
Add
(
lineSegmentCmp
);
}
}
}
}
...
...
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