MGC Planner

This page is no longer updated - This was left as an example of work on the 2009 Mini Grand Challenge team

The consensus has been to implement path planning using the D* algorithm. Further, the variant used will be D* Lite. This variant is conceptually simpler while still improving efficiency. The algorithm calculates an optimal path between a current position and a goal while accounting for changing map data.

Player Driver
Player driver needs to:
 * 1) Get current robot position
 * 2) Pass to Dstar class new start position
 * 3) Get new map section based on current position
 * 4) Line up new map with old map
 * 5) See what has changed between new and old map (new data counts as changed)
 * 6) Pass this new information on to Dstar class

Player driver also needs to handle these messages:
 * PLAYER_PLANNER_CMD_GOAL
 * Pass new goal to Dstar class (perhaps the best way to do this is to drop the Dstar class, grab new map data, and start from scratch)
 * PLAYER_PLANNER_REQ_GET_WAYPOINTS
 * Get current path from Dstar class, wrap waypoints in player_position_2d structs and package them all in a player_planner_waypoints_req struct
 * PLAYER_PLANNER_REQ_ENABLE
 * Enables/disables planner. On disable, have PLAYER_PLANNER_REQ_GET_WAYPOINTS return 1 waypoint containing the robots current position

Player driver has to publish:
 * PLAYER_PLANNER_DATA_STATUS
 * Publish various bits of data about the current state of the planner

The Good News
The good news is that implementations of D* Lite exist that fulfill the simple requirements for the "Dstar class" listed above. One such example is available on Google Code under a GPL license. This example is in C++ and can deal with arbitrary coordinate systems (as can most implementations, I believe). Thus, it would only require a little bit of modification to work for our needs. However, I also realize that this project is primarily an academic exercise. If I wanted to learn how to plug together components I'd be getting a technical degree in Java at my local community college. So an effort will be given to duplicate the functionality of the implementation on Google Code. However, as the competition is getting closer, implementing the driver functionality will take precedence.

Algorithm
Read the papers for a better description of the algorithm than I could give. It should be noted that D* Lite is conceptually closer to A* than D* as laid out in the papers by Anthony Stentz. Although it does share some concepts, taking a look at A* first would be helpful.


 * D* is based on finding a least cost path in a graph from a current position to a goal. For the Minigrand there is the problem of where to set the goal.
 * One option is to use a point directly behind the robot, forcing it to take the lowest cost path forward until it can loop around behind itself (which is impossible)
 * Another option is to use the GPS points as goals.

Questions

 * Because we are using a robot with car-like motion, at some point the D* algorithm may specify a path that isn't possible to execute. How should we handle this?
 * Have separate piece of code that checks whether movement commands are even possible (as is done here)?
 * Do the best to follow the instructions and hope that any discrepancy between where the robot is and where the robot thinks it is "just works" itself out?
 * Raise effective cost of arc traversals depending on angle from current path? This initially sounds promising but having the cost of an arc depend on the planned path which is calculating using the cost of arcs causes some circular logic that may not be easily resolved.
 * Operating D* over the entire global map would be inefficient, unnecessary, and not what we are attempting to do.
 * How do we choose which areas to give to the path planner?
 * Who decides? (the path planner does Adam.brockett 20:16, 25 March 2009 (UTC))
 * Grab a set amount of the map every time?
 * Intelligently grab varying amounts of the map if we know the path is confined to a set area?

Wavefront Algorithm
The wavefront algorithm was used for path planning in previous years.
 * Smoothing wavefront paths using PDE:
 * Player's version of the Wavefront Algorithm: