-
Notifications
You must be signed in to change notification settings - Fork 174
Local planner, Global Planner, Explore, SpatialMemory working via LCM/Dask Multiprocess #467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
2a8cebd
c48f949
7d1ae92
b1e3434
c191235
b1fd6ee
613fb8d
7c2246b
415ad04
b85239a
48a03f7
c6efcd9
5e7ccc6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,19 +38,19 @@ def __init__(self): | |
| Module.__init__(self) | ||
| Visualizable.__init__(self) | ||
|
|
||
| # def set_goal( | ||
| # self, | ||
| # goal: VectorLike, | ||
| # goal_theta: Optional[float] = None, | ||
| # stop_event: Optional[threading.Event] = None, | ||
| # ): | ||
| # path = self.plan(goal) | ||
| # if not path: | ||
| # logger.warning("No path found to the goal.") | ||
| # return False | ||
| @rpc | ||
| def set_goal( | ||
| self, | ||
| goal: VectorLike, | ||
| goal_theta: Optional[float] = None, | ||
| stop_event: Optional[threading.Event] = None, | ||
| ): | ||
| path = self.plan(goal) | ||
| if not path: | ||
| logger.warning("No path found to the goal.") | ||
| return False | ||
|
|
||
| # print("pathing success", path) | ||
| # return self.set_local_nav(path, stop_event=stop_event, goal_theta=goal_theta) | ||
| print("pathing success", path) | ||
|
|
||
|
|
||
| class AstarPlanner(Planner): | ||
|
|
@@ -59,17 +59,20 @@ class AstarPlanner(Planner): | |
|
|
||
| get_costmap: Callable[[], Costmap] | ||
| get_robot_pos: Callable[[], Vector3] | ||
| set_local_nav: Callable[[Path, Optional[threading.Event], Optional[float]], bool] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we can't rely on threading events anymore |
||
|
|
||
| conservativism: int = 8 | ||
|
|
||
| def __init__( | ||
| self, | ||
| get_costmap: Callable[[], Costmap], | ||
| get_robot_pos: Callable[[], Vector3], | ||
| set_local_nav: Callable[[Path, Optional[threading.Event], Optional[float]], bool] = None, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove |
||
| ): | ||
| super().__init__() | ||
| self.get_costmap = get_costmap | ||
| self.get_robot_pos = get_robot_pos | ||
| self.set_local_nav = set_local_nav | ||
|
|
||
| @rpc | ||
| def start(self): | ||
|
|
@@ -80,9 +83,10 @@ def plan(self, goal: VectorLike) -> Path: | |
| goal = to_vector(goal).to_2d() | ||
| pos = self.get_robot_pos() | ||
| print("current pos", pos) | ||
| costmap = self.get_costmap().smudge() | ||
| costmap = self.get_costmap() | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. .smudge() wasn't an issue? can be put back |
||
|
|
||
| print("current costmap", costmap) | ||
|
|
||
| self.vis("target", goal) | ||
|
|
||
| print("ASTAR ", costmap, goal, pos) | ||
|
|
@@ -92,5 +96,7 @@ def plan(self, goal: VectorLike) -> Path: | |
| path = path.resample(0.1) | ||
| self.vis("a*", path) | ||
| self.path.publish(path) | ||
| if hasattr(self, "set_local_nav"): | ||
| self.set_local_nav(path) | ||
| return path | ||
| logger.warning("No path found to the goal.") | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +0,0 @@ | ||
| from dimos.robot.local_planner.local_planner import ( | ||
| BaseLocalPlanner, | ||
| navigate_to_goal_local, | ||
| navigate_path_local, | ||
| ) | ||
|
|
||
| from dimos.robot.local_planner.vfh_local_planner import VFHPurePursuitPlanner | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to re-handle the stop event here I removed to get it to work @alexlin2