Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
planning_llh_bgc
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Larkin Heintzman
planning_llh_bgc
Commits
f9c96327
Commit
f9c96327
authored
Apr 30, 2024
by
Bryson Howell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added test LPM pattern for testing path curving. Updated git ignore to ignore .pyc
parent
c4c3d302
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
.gitignore
.gitignore
+1
-0
montecarlo.py
mrmh_model/montecarlo.py
+19
-0
No files found.
.gitignore
View file @
f9c96327
...
...
@@ -11,3 +11,4 @@ BW_LFandInac_Zelev.mat
e_x_y_data.pkl
.pytest_cache
z__test__*.pyc
*.pyc
mrmh_model/montecarlo.py
View file @
f9c96327
...
...
@@ -228,17 +228,36 @@ class MonteCarlo(params.Default):
self
.
p
[
dist_mat
<=
self
.
params
[
'ring_mobi'
][
3
]]
+=
0.20
# containment ring
# print(self.p)
self
.
p
=
ndimage
.
gaussian_filter
(
self
.
p
,
sigma
=
8
)
# to make betta heatmap
#Makes heatmap favoring a corner
elif
self
.
params
[
'lp_model'
]
==
'trust'
:
#test for trust
self
.
p
=
np
.
zeros
((
self
.
_x_shape
,
self
.
_y_shape
),
dtype
=
float
)
for
r
in
range
(
0
,
self
.
_x_shape
):
for
c
in
range
(
0
,
self
.
_y_shape
):
self
.
p
[
r
,
c
]
=
np
.
float
(
r
+
c
)
/
np
.
float
(
self
.
_x_shape
+
self
.
_y_shape
)
#Makes heatmap with horizontal stripes, paths should bend to them
elif
self
.
params
[
'lp_model'
]
==
'stripes'
:
self
.
p
=
np
.
zeros
((
self
.
_x_shape
,
self
.
_y_shape
),
dtype
=
float
)
line_width
=
5
line_focus
=
np
.
int
(
self
.
_x_shape
/
(
self
.
params
[
'num_robots'
]))
for
r
in
range
(
0
,
self
.
_x_shape
):
for
c
in
range
(
0
,
self
.
_y_shape
):
#ik there's a better way to do this...
if
(
r
>
line_focus
-
line_width
and
r
<=
line_focus
+
line_width
):
self
.
p
[
r
,
c
]
=
1
-
np
.
abs
(
line_focus
-
r
)
/
line_width
elif
(
r
>
2
*
line_focus
-
line_width
and
r
<=
2
*
line_focus
+
line_width
):
self
.
p
[
r
,
c
]
=
1
-
np
.
abs
(
2
*
line_focus
-
r
)
/
line_width
elif
(
r
>
3
*
line_focus
-
line_width
and
r
<=
3
*
line_focus
+
line_width
):
self
.
p
[
r
,
c
]
=
1
-
np
.
abs
(
3
*
line_focus
-
r
)
/
line_width
#No heatmap loaded
else
:
self
.
p
=
np
.
zeros
((
self
.
_x_shape
,
self
.
_y_shape
),
dtype
=
float
)
#Show LP Heatmap
show
=
False
if
(
show
):
print
(
'Environment shape =
%
d x
%
d'
%
(
self
.
_x_shape
,
self
.
_y_shape
))
plt
.
imshow
(
self
.
p
)
plt
.
title
(
'Selected heatmap'
)
plt
.
show
()
...
...
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