Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
T
torcs_dl
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
autonomousdriving
torcs_dl
Commits
f05e7021
Commit
f05e7021
authored
Aug 31, 2018
by
Svetlana Pavlitskaya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Localization controller model
parent
b046691a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
0 deletions
+66
-0
EMADL2TORCS/src/main/dp/subcomponents/Lane.enum
EMADL2TORCS/src/main/dp/subcomponents/Lane.enum
+6
-0
EMADL2TORCS/src/main/dp/subcomponents/LocalizationController.emadl
...CS/src/main/dp/subcomponents/LocalizationController.emadl
+60
-0
No files found.
EMADL2TORCS/src/main/dp/subcomponents/Lane.enum
0 → 100644
View file @
f05e7021
package
dp
.
subcomponents
;
enum
Lane
{
CENTER_LANE
|
RIGHT_LANE
|
LEFT_LANE
|
OUTSIDE_LANE
}
EMADL2TORCS/src/main/dp/subcomponents/LocalizationController.emadl
0 → 100644
View file @
f05e7021
package
dp
.
subcomponents
;
component
LocalizationController
{
ports
in
Affordance
affordanceIn
,
out
B
onLane
,
out
B
onMarking
,
out
Z
laneNumber
,
out
Lane
lane
;
implementation
Math
{
onLane
=
false
;
onMarking
=
false
;
//
Car
is
on
lane
if
(-
affordanceIn
.
toMarkingML
+
affordanceIn
.
toMarkingMR
<
5.5
)
onLane
=
true
;
onMarking
=
false
;
if
(
affordanceIn
.
toMarkingLL
<=
-
7.5
&&
affordanceIn
.
toMarkingRR
>=
7.5
)
laneNumber
=
1
;
lane
=
CENTER_LANE
;
elseif
(
affordanceIn
.
toMarkingLL
>
-
7.5
&&
affordanceIn
.
toMarkingRR
<
7.5
)
laneNumber
=
3
;
lane
=
CENTER_LANE
;
elseif
(
affordanceIn
.
toMarkingLL
>
-
7.5
||
affordanceIn
.
toMarkingRR
<
7.5
)
laneNumber
=
2
;
if
(
affordanceIn
.
toMarkingRR
>=
7.5
)
lane
=
RIGHT_LANE
;
end
if
(
affordanceIn
.
toMarkingLL
<=
-
7.5
)
lane
=
LEFT_LANE
;
end
else
laneNumber
=
0
;
onLane
=
false
;
lane
=
OUTSIDE_LANE
;
end
else
//
Car
is
on
marking
onLane
=
false
;
onMarking
=
true
;
//
Car
on
central
marking
if
(
affordanceIn
.
toMarkingR
<
6
&&
affordanceIn
.
toMarkingL
>
-
6
)
laneNumber
=
2
;
lane
=
CENTER_LANE
;
//
When
on
Outer
lanes
consider
the
road
only
1
lane
.
else
laneNumber
=
1
;
if
(
affordanceIn
.
toMarkingL
<
-
6
)
lane
=
LEFT_LANE
;
elseif
(
affordanceIn
.
toMarkingR
>
6
)
lane
=
RIGHT_LANE
;
end
end
end
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment