6 #include <fast_methods/ndgridmap/fmcell.h>
7 #include <fast_methods/ndgridmap/ndgridmap.hpp>
8 #include <fast_methods/console/console.h>
10 #include <fast_methods/fm2/fm2.hpp>
11 #include <fast_methods/fm2/fm2star.hpp>
12 #include <fast_methods/datastructures/fmfibheap.hpp>
13 #include <fast_methods/datastructures/fmpriorityqueue.hpp>
15 #include <fast_methods/io/maploader.hpp>
16 #include <fast_methods/io/gridplotter.hpp>
17 #include <fast_methods/io/gridwriter.hpp>
20 using namespace std::chrono;
22 int main(
int argc,
const char ** argv)
29 console::info(
"No enough arguments given. Use as ./test_fm2 -map path_to_file.txt");
34 constexpr
unsigned int ndims2 = 2;
36 typedef typename std::vector< std::array<double, ndims2> > Path2D;
42 std::vector<Solver<FMGrid2D>*> solvers;
60 s->setEnvironment(&grid_fm2);
61 s->setInitialAndGoalPoints({30, 20}, {375, 280});
63 cout <<
"\tElapsed "<< s->getName() <<
" time: " << s->getTime() <<
" ms" <<
'\n';
66 vector<double> path_vels;
72 for (
auto & s : solvers)
Wrap for the Boost Priority Queue class to be used in the FM algorithms. Ready to be used with FMCell...
static int parseArguments(int argc, const char **argv, const char *str, std::string &val)
Implements the Fast Marching Square Star (FM2*) planning algorithm.
Templated class which represents a n-dimensional grid map. Its cells are assumed to be cubic...
static void info(const std::string &val)
static void plotArrivalTimesPath(nDGridMap< T, ndims > &grid, const Path2D &path, std::string name="")
Plots the values map of a given grid. It is based on the nDGridMap::getValue(). This function has to ...
Abstract class that serves as interface for the actual solvers implemented. It requires (at least) th...
static void loadMapFromImg(const char *filename, nDGridMap< T, ndims > &grid)
Loads the initial binary map for a given grid. It is based on the nDGridMap::setOccupancy() which has...
Implements the Fast Marching Square (FM2) planning algorithm.