Skip to content

Commit f2ac5d9

Browse files
committed
address comments
1 parent 14ea884 commit f2ac5d9

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

PathPlanning/TimeBasedPathPlanning/SpaceTimeAStar.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def __repr__(self):
8282
return repr_string
8383

8484

85-
class TimeBasedAStar:
85+
class SpaceTimeAStar:
8686
grid: Grid
8787
start: Position
8888
goal: Position
@@ -113,11 +113,11 @@ def plan(self, verbose: bool = False) -> NodePath:
113113
print(f"Found path to goal after {len(expanded_set)} expansions")
114114
path = []
115115
path_walker: Node = expanded_node
116-
while path_walker.parent_index != -1:
116+
while True:
117117
path.append(path_walker)
118+
if path_walker.parent_index == -1:
119+
break
118120
path_walker = expanded_set[path_walker.parent_index]
119-
# TODO: fix hack around bad while condiiotn
120-
path.append(path_walker)
121121

122122
# reverse path so it goes start -> goal
123123
path.reverse()
@@ -176,7 +176,7 @@ def main():
176176
obstacle_arrangement=ObstacleArrangement.ARRANGEMENT1,
177177
)
178178

179-
planner = TimeBasedAStar(grid, start, goal)
179+
planner = SpaceTimeAStar(grid, start, goal)
180180
path = planner.plan(verbose)
181181

182182
if verbose:

docs/conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@
9494
# documentation.
9595
#
9696
html_logo = '../icon.png'
97-
# html_theme_options = {
98-
# 'display_version': False,
99-
# }
97+
html_theme_options = {
98+
'display_version': False,
99+
}
100100

101101
# replace "view page source" with "edit on github" in Read The Docs theme
102102
# * https://github.com/readthedocs/sphinx_rtd_theme/issues/529

docs/modules/5_path_planning/path_planning_main.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Path planning is the ability of a robot to search feasible and efficient path to
1212
dynamic_window_approach/dynamic_window_approach
1313
bugplanner/bugplanner
1414
grid_base_search/grid_base_search
15+
time_based_grid_search/time_based_grid_search
1516
model_predictive_trajectory_generator/model_predictive_trajectory_generator
1617
state_lattice_planner/state_lattice_planner
1718
prm_planner/prm_planner
@@ -31,5 +32,4 @@ Path planning is the ability of a robot to search feasible and efficient path to
3132
hybridastar/hybridastar
3233
frenet_frame_path/frenet_frame_path
3334
coverage_path/coverage_path
34-
elastic_bands/elastic_bands
35-
time_based_grid_search/time_based_grid_search
35+
elastic_bands/elastic_bands

tests/test_space_time_astar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def test_1():
1818
)
1919

2020
m.show_animation = False
21-
planner = m.TimeBasedAStar(grid, start, goal)
21+
planner = m.SpaceTimeAStar(grid, start, goal)
2222

2323
path = planner.plan(False)
2424

0 commit comments

Comments
 (0)