ID #1013

Is the path planner a stand-alone module? What does it depends on ?

  • The path planner is a path generation module, it computes a path from point A to B using a map as parameter. It does NOT have a way to execute or follow the path. You have to build it. The benefit is that you can use our path planner for what-if questions or to compute travel time or anything else.
  • The inputs for the path planner are:
    • OccupancyGrid (generally generated by our mapper module)
    • Starting position
    • Goal position
  • Here is a extract from our sample code:

     

    // set the map
    pPathPlanner->SetOccupancyGrid(pGrid);

    // set the start pose
    pPathPlanner->SetStart(Pose3(Vector3(0,0,0),0));

    // set the goal
    pPathPlanner->SetEnd(goal);

    // compute the global path
    pPathPlanner->ComputeGlobalPath();

    // here is a way to get the Path
    std::vector<kt::Pose3> path = pPathPlanner->GetGlobalPath();
    std::vector<kt::Pose3>::iterator itP;
    for (itP = path.begin() ; itP != path.end() ; itP++) {
    std::cout << "\t next: (" <<
    (*itP).GetPosition().Z() << " , "
    <<
    (*itP).GetPosition().X() << ")\n";
    }

Tags: -

Related entries:

You can comment this FAQ