-
Implement
get_neighboursinsrc/source/gridmap.cpp;- You may need to consider
no-corner-cuttingin step 2.
- You may need to consider
-
Implement
Dijkstra; -
Implement
A*;
Note: corner-cutting is not allowed in all these benchmark instances. Specifically:
For a diagonal move (dx, dy) from the position (x, y), corner-cutting occurs if either (x+dx, y) or (x, y+dy) is not traversable
Disallowing corner-cutting may lead to different optimal path.
-
Graph: 4-connected grid map, i.e., agent only moves in four directions
left, right, up, down, each move takes only 1 time step -
Constraints: the location of the agent
pat any time steptmust be obstacle-free, i.e.:pcannot be a static obstacle, which is described in the*.mapfiletcannot fall within any constrained interval atp, which is described in the*.jsonfile, for example:A node with id"node_constriants": { "780": [ [0, 1], [82, 88] ], ... }
780is occupied by dynamic obstacles during the time steps[0, 1]and[82, 88](inclusive).
-
Objective: find the minimum time cost path from
starttogoal
- Filling up blank in
STAStar.hppto implement a space-time A*, and test viatest/run_stastar.cpp.This will run multiple./build/run_stastar ../maps/random-32-32-10.map ../scens/random-100-10.json
start/goalinstances, and save each path to a file (e.g.,835-253-plan.txt) - Use the visualizer in
python/to draw the animation, i.e.,# navigate to `python/`, then run the following command ./viz.py ../maps/random-32-32-10.map ../scens/100-10-10.json ../src/835-172-plan.txt - Generalize your
STAstarsolver to 8-connected grid map, where the time cost of a diagonal move becomes$\sqrt{2}$ .