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
1439b992
There was an error fetching the commit references. Please try again later.
Commit
1439b992
authored
7 years ago
by
Steven Lange
Browse files
Options
Downloads
Patches
Plain Diff
Added inertia to the car-model
parent
3bcd2215
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/CACC/CACC-Module-Test.py
+2
-8
2 additions, 8 deletions
modules/CACC/CACC-Module-Test.py
with
2 additions
and
8 deletions
modules/CACC/CACC-Module-Test.py
+
2
−
8
View file @
1439b992
...
@@ -52,7 +52,6 @@ class Car(object):
...
@@ -52,7 +52,6 @@ class Car(object):
v_n
=
None
v_n
=
None
if
not
self
.
plattonPrev
==
None
:
if
not
self
.
plattonPrev
==
None
:
# Q1: Wie bekommen wir die Geschwindigkeit des vorrausfahrenden Fahrzeugs in der Realität?
v_v
=
self
.
plattonPrev
.
getSpeed
()
#* random.uniform(0.9, 1.1) # bis zu 0.1 relative Abweichung auf die Geschwindigkeitsmessung
v_v
=
self
.
plattonPrev
.
getSpeed
()
#* random.uniform(0.9, 1.1) # bis zu 0.1 relative Abweichung auf die Geschwindigkeitsmessung
if
self
.
checkInbound
(
d_c
,
IPD
,
0.01
*
IPD
):
if
self
.
checkInbound
(
d_c
,
IPD
,
0.01
*
IPD
):
if
self
.
checkInbound
(
v_c
,
v_v
,
0.01
*
v_v
):
if
self
.
checkInbound
(
v_c
,
v_v
,
0.01
*
v_v
):
...
@@ -71,13 +70,8 @@ class Car(object):
...
@@ -71,13 +70,8 @@ class Car(object):
else
:
else
:
v_n
=
min
((
v_v
*
(
d_c
/
IPD
)
**
2
),
v_c
*
1.1
)
#Der Exponent gibt an, wie schnell die Aenderung umgesetzt werden soll
v_n
=
min
((
v_v
*
(
d_c
/
IPD
)
**
2
),
v_c
*
1.1
)
#Der Exponent gibt an, wie schnell die Aenderung umgesetzt werden soll
# Q2: Was ist hier die Bedeutung der Geschwindigkeit?
inertia
=
0.8
# Wenn das Fahrzeug cSpeed auf 10000 setzt, fährt es dann im nächsten Simulationsschritt auch 10000?
self
.
cSpeed
=
inertia
*
v_c
+
(
1
-
inertia
)
*
v_n
# Das wäre ein bisschen unrealistisch.
# Ich glaube hier wurde auf die Bedeutung der Beschleunigung verzichtet.
# Vielleicht sollten wir hier cSpeed mit der Motorleistung ersetzen und diese zwischen 0.0 und 1.0 setzen können.
# Die Simulation bestimmt dann selber, wie sich das im nächsten Schritt auf die Geschwindigkeit des Fahrzeugs ausübt.
self
.
cSpeed
=
v_n
self
.
cIPD
=
self
.
IPD
*
0.01
#too low
self
.
cIPD
=
self
.
IPD
*
0.01
#too low
if
self
.
cIPD
>
self
.
cDist
:
if
self
.
cIPD
>
self
.
cDist
:
...
...
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