Buran Motion Planning Framework
optimize_generator.h
1 #pragma once
2 
3 #include <base/path_finder.h>
4 #include <string>
5 #include <vector>
6 #include <chrono>
7 #include <fstream>
8 #include <json/json.h>
9 #include <memory>
10 #include <climits>
11 #include <utility>
12 #include <log.h>
13 #include <base/path_finder.h>
14 #include <urdf_robot.h>
15 #include <solid_collider.h>
16 #include "one_direction_path_finder.h"
17 #include "one_direction_ordered_path_finder.h"
18 #include "state.h"
19 #include "all_directions_path_finder.h"
20 #include "optimize_path.h"
21 
28 public:
35  const std::vector<std::string> &expPathsFileNames, const std::vector<std::string> &algorithms
36  );
37 
42  std::string buildStat();
43 
48  Json::Value optimizeRoutes();
49 
55  void generate(const std::string &routePath, const std::string &reportPath);
56 
63  Json::Value test(
64  const std::shared_ptr<bmpf::PathOptimizer> &pathOptimizer, const std::vector<std::vector<double>> &path
65  );
66 
67 
68 private:
72  std::vector<std::string> _expPathsFileNames;
76  std::shared_ptr<bmpf::PathFinder> _pathFinder;
80  std::vector<std::shared_ptr<bmpf::PathOptimizer>> _pathOptimizers;
84  std::vector<double> _secondsList;
88  std::vector<double> _initialPathLengths;
92  std::vector<double> _optimizedPathLengths;
96  std::vector<std::string> _optimizeMethods;
100  std::unordered_map<
101  std::shared_ptr<bmpf::PathOptimizer>, std::vector<std::vector<std::vector<double>>>
102  > pfPathsLists;
103 };
OptimizeGenerator::OptimizeGenerator
OptimizeGenerator(const std::vector< std::string > &expPathsFileNames, const std::vector< std::string > &algorithms)
Definition: optimize_generator.cpp:11
OptimizeGenerator
Definition: optimize_generator.h:27
OptimizeGenerator::generate
void generate(const std::string &routePath, const std::string &reportPath)
Definition: optimize_generator.cpp:56
OptimizeGenerator::optimizeRoutes
Json::Value optimizeRoutes()
Definition: optimize_generator.cpp:75
OptimizeGenerator::test
Json::Value test(const std::shared_ptr< bmpf::PathOptimizer > &pathOptimizer, const std::vector< std::vector< double >> &path)
Definition: optimize_generator.cpp:103
OptimizeGenerator::buildStat
std::string buildStat()
Definition: optimize_generator.cpp:137