Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
LearningEnvironment
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Armin Co
LearningEnvironment
Commits
e2dc57dd
Commit
e2dc57dd
authored
4 years ago
by
Armin Co
Browse files
Options
Downloads
Patches
Plain Diff
Added new environment options
parent
8e575e06
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
carla_environment.py
+10
-2
10 additions, 2 deletions
carla_environment.py
environment_wrapper.py
+1
-0
1 addition, 0 deletions
environment_wrapper.py
with
11 additions
and
2 deletions
carla_environment.py
+
10
−
2
View file @
e2dc57dd
...
...
@@ -247,15 +247,23 @@ class World:
carla
.
Rotation
(
pitch
=
0.000000
,
yaw
=-
175.922913
,
roll
=-
6.221135
))
pos_diff
=
math
.
sqrt
((
target
.
location
.
x
-
x
)
**
2
+
(
target
.
location
.
y
-
y
)
**
2
)
rot_diff
=
((
target
.
rotation
.
yaw
/
180
)
-
yaw
)
v
=
math
.
sqrt
((
vx
)
**
2
+
(
vy
)
**
2
)
r
=
-
0.1
r
+=
-
0.01
*
pos_diff
done
=
False
LEARN_FINAL_ORIENTATION
=
False
if
LEARN_FINAL_ORIENTATION
:
target_yaw
=
(
-
175.922913
)
/
180
yaw_dif
=
math
.
sqrt
((
target_yaw
**
2
)
-
(
yaw
**
2
))
r
+=
-
0.01
*
yaw_dif
INSENTIVE_MOVING
=
False
if
v
<
0.01
and
INSENTIVE_MOVING
:
r
-=
0.02
done
=
False
if
pos_diff
<
1.5
:
done
=
True
r
+=
100
...
...
This diff is collapsed.
Click to expand it.
environment_wrapper.py
+
1
−
0
View file @
e2dc57dd
...
...
@@ -22,6 +22,7 @@ class Config:
learn_rate
=
0.001
learn_iterations
=
1
run_episodes
=
20
offline_batchsize
=
2048
offline_epochs
=
1000
offline_validate_every_x_iteration
=
10
load_ann
=
False
...
...
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