The method comprises two steps:
- Growth of the obstacles by the robot radius. This assure that just one single free cell is enough for the robot to move without collision.
- The value iteration algorithm, starting at the source position, increase iteratively the area covered by shortest paths until the target cell is reached.
Note that this is a very simple method, not suitable for robots with shapes very different from circular and/or moving in cluttered environmnets. For those cases, see the obstacle avoidance methods.
The basic usage requires declaring the gridmap, the mrpt::nav::PlannerSimple2D object, setting the robot radius, and invoking mrpt::nav::PlannerSimple2D::computePath(). The following code fragment is taken from the example MRPT/samples/pathPlanning.
// Load,create,... the grid map:
// Find path:
pathPlanning.robotRadius = 0.30f;
CPoint2D origin( 20, -110 );
CPoint2D target( 90, 40 );
pathPlanning.computePath( &gridmap, &origin, &target, thePath, notFound, 100.0f /* Max. distance */ );
// Process the output path in "thePath"
Click on the thumb to see full-resolution image. This is the output from the example
-  Value iteration algorithm (Wikipedia) – http://en.wikipedia.org/wiki/Markov_decision_process#Value_iteration.