Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
Hochautomatisiertes-Fahren
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
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 GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Philipp Badenhoop
Hochautomatisiertes-Fahren
Commits
c99c923e
Commit
c99c923e
authored
6 years ago
by
Franz Bethke
Committed by
lenoelda
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix dist dependence in PLC
parent
0bdda372
Branches
Branches containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/catkin_ws/src/car/include/mainNode/PlatoonController.h
+2
-0
2 additions, 0 deletions
...es/catkin_ws/src/car/include/mainNode/PlatoonController.h
modules/catkin_ws/src/car/src/mainNode/PlatoonController.cpp
+9
-4
9 additions, 4 deletions
modules/catkin_ws/src/car/src/mainNode/PlatoonController.cpp
with
11 additions
and
4 deletions
modules/catkin_ws/src/car/include/mainNode/PlatoonController.h
+
2
−
0
View file @
c99c923e
...
...
@@ -43,6 +43,8 @@ public:
{
return
platoonConfig
.
getNonAtomicCopy
();
}
private
:
float
maxPlatoonRange
=
250.0
;
// cm
MessageOStream
messageOStream
;
Callback
cruiseControllerNotify
;
platoonProtocol
::
VehicleFacade
&
c2c
;
...
...
This diff is collapsed.
Click to expand it.
modules/catkin_ws/src/car/src/mainNode/PlatoonController.cpp
+
9
−
4
View file @
c99c923e
...
...
@@ -67,6 +67,7 @@ void PlatoonController::setupC2C()
void
PlatoonController
::
run
()
{
// messageOStream.write("MSG", "RUUUUUUUUUUUUUUN!");
switch
(
currState
.
load
())
{
case
PlatoonState
::
ACC
:
...
...
@@ -89,8 +90,9 @@ void PlatoonController::run()
void
PlatoonController
::
run_ACC
()
{
messageOStream
.
write
(
"run - ACC"
,
""
);
bool
wantsPlatoon
=
pc
->
isPlatoonEnabled
().
get
();
messageOStream
.
write
(
"wantsPlatoon"
,
wantsPlatoon
);
messageOStream
.
write
(
"c2cAlive"
,
c2cAlive
);
if
(
!
wantsPlatoon
)
{
...
...
@@ -111,6 +113,7 @@ void PlatoonController::run_ACC()
return
;
}
messageOStream
.
write
(
"c2c.isPlatoonRunning"
,
c2c
.
isPlatoonRunning
());
// c2cAlive + wantsPlatoon
if
(
c2c
.
isPlatoonRunning
())
{
...
...
@@ -126,7 +129,9 @@ void PlatoonController::run_ACC()
// !inPlatoon + c2cAlive + wantsPlatoon
bool
isLeader
=
c2c
.
getRole
()
==
platoonProtocol
::
Vehicle
::
Role
::
LEADER
;
bool
hasFiniteDistance
=
egoMotion
.
getDistance
()
<
std
::
numeric_limits
<
float
>::
infinity
();
bool
inPlatoonRange
=
egoMotion
.
getDistance
()
<
maxPlatoonRange
;
messageOStream
.
write
(
"isLeader"
,
isLeader
);
messageOStream
.
write
(
"inPlatoonRange"
,
inPlatoonRange
);
if
(
isLeader
==
inPlatoonRange
)
{
// role does not fit
c2c
.
leavePlatoon
();
...
...
@@ -144,7 +149,7 @@ void PlatoonController::run_ACC()
void
PlatoonController
::
run_CACC_FV
()
{
messageOStream
.
write
(
"run
- FV
"
,
""
);
messageOStream
.
write
(
"run"
,
"
FV
"
);
bool
inPlatoon
=
c2c
.
isPlatoonRunning
();
bool
wantsPlatoon
=
pc
->
isPlatoonEnabled
().
get
();
...
...
@@ -173,7 +178,7 @@ void PlatoonController::run_CACC_FV()
void
PlatoonController
::
run_CACC_LV
()
{
messageOStream
.
write
(
"run
- LV
"
,
""
);
messageOStream
.
write
(
"run"
,
"
LV
"
);
bool
inPlatoon
=
c2c
.
isPlatoonRunning
();
bool
wantsPlatoon
=
pc
->
isPlatoonEnabled
().
get
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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