Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
db-guided-mrmp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
rmoan2
db-guided-mrmp
Commits
e89d1b67
Commit
e89d1b67
authored
7 months ago
by
rachelmoan
Browse files
Options
Downloads
Patches
Plain Diff
Removing resolve_conflicts function from main policy. Just call a conflict resolver instead.
parent
5e827b31
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
guided_mrmp/conflict_resolvers/__init__.py
+2
-0
2 additions, 0 deletions
guided_mrmp/conflict_resolvers/__init__.py
guided_mrmp/planners/multirobot/db_guided_mrmp.py
+5
-20
5 additions, 20 deletions
guided_mrmp/planners/multirobot/db_guided_mrmp.py
with
7 additions
and
20 deletions
guided_mrmp/conflict_resolvers/__init__.py
+
2
−
0
View file @
e89d1b67
from
.traj_opt
import
TrajOptMultiRobot
from
.traj_opt_resolver
import
TrajOptResolver
from
.traj_opt_db_resolver
import
TrajOptDBResolver
from
.local_resolver
import
LocalResolver
from
.query
import
QueryDatabase
\ No newline at end of file
This diff is collapsed.
Click to expand it.
guided_mrmp/planners/multirobot/db_guided_mrmp.py
+
5
−
20
View file @
e89d1b67
...
...
@@ -8,11 +8,11 @@ from shapely.geometry import Polygon, Point
from
guided_mrmp.utils
import
Conflict
,
Robot
,
Env
,
Plotting
from
guided_mrmp.utils
import
Env
from
guided_mrmp.utils.helpers
import
*
from
guided_mrmp.conflict_resolvers
import
Local
Resolver
from
guided_mrmp.controllers.path_tracker
import
plot_roomba
from
guided_mrmp.conflict_resolvers
import
TrajOptDB
Resolver
from
guided_mrmp.utils
import
Roomba
...
...
@@ -62,21 +62,6 @@ class GuidedMRMP:
return
conflicts
def
resolve_conflict
(
self
,
c
,
conflicts
,
screen
):
r1
,
r2
=
c
# place a grid around the robots in conflict
# cr = ConflictResolver(r1.radius*3, 6, c, conflicts, self.robots)
# grid = cr.place_grid([r1.current_position, r2.current_position])
# self.add_vis_grid(screen, cr.grid_size, cr.top_left_grid, cr.cell_size)
# create a subproblem on that grid
# soln = cr.get_discrete_solution(grid)
# print(f"soln = {soln}")
# solve the subproblem using database soln as a seed to the solver
def
all_robots_at_goal
(
self
):
for
r
in
self
.
robots
:
if
(
np
.
sqrt
((
r
.
tracker
.
state
[
0
]
-
r
.
goal
[
0
])
**
2
+
(
r
.
tracker
.
state
[
1
]
-
r
.
goal
[
1
])
**
2
)
>
0.1
):
...
...
@@ -101,8 +86,8 @@ class GuidedMRMP:
conflicts
=
self
.
find_all_conflicts
(
dt
)
# resolve the conflicts using the database
lr
=
Local
Resolver
()
l
r
.
resolve_conflict
(
conflicts
,
screen
)
resolver
=
TrajOptDB
Resolver
()
resolve
r
.
resolve_conflict
(
conflicts
,
screen
)
# update the state of each robot
...
...
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