Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #ifndef GLOBAL_PLANNER_TESTS_GLOBAL_PLANNER_TESTS_H
00036 #define GLOBAL_PLANNER_TESTS_GLOBAL_PLANNER_TESTS_H
00037
00038 #include <nav_core2/global_planner.h>
00039 #include <string>
00040 #include <vector>
00041 #include <utility>
00042
00043 namespace global_planner_tests
00044 {
00045
00046 using PoseList = std::vector<nav_2d_msgs::Pose2DStamped>;
00047
00057 void groupCells(const nav_core2::Costmap& costmap, PoseList& free_cells, PoseList& occupied_cells,
00058 bool include_edges = true);
00059
00065 PoseList createPosesOutsideCostmap(const nav_core2::Costmap& costmap);
00066
00073 PoseList subsetPoseList(const PoseList& cells, unsigned int num_cells);
00074
00081 bool planExists(nav_core2::GlobalPlanner& planner, nav_2d_msgs::Pose2DStamped start, nav_2d_msgs::Pose2DStamped goal);
00082
00091 bool checkValidPathCoverage(nav_core2::GlobalPlanner& planner, const PoseList& free_cells,
00092 bool verbose = false, bool quit_early = true);
00093
00116 bool checkOccupiedPathCoverage(nav_core2::GlobalPlanner& planner,
00117 const PoseList& start_cells, const PoseList& goal_cells,
00118 const std::string& test_name,
00119 bool check_exception_type = true, bool verbose = false, bool quit_early = true,
00120 bool invalid_starts = true);
00121
00144 bool checkOutOfBoundsPathCoverage(nav_core2::GlobalPlanner& planner,
00145 const PoseList& start_cells, const PoseList& goal_cells,
00146 const std::string& test_name,
00147 bool check_exception_type = true, bool verbose = false, bool quit_early = true,
00148 bool invalid_starts = true);
00149
00172 bool hasCompleteCoverage(nav_core2::GlobalPlanner& planner, const nav_core2::Costmap& costmap,
00173 int max_failure_cases = 10, bool check_exception_type = true,
00174 bool verbose = false, bool quit_early = true);
00175
00186 bool hasNoPaths(nav_core2::GlobalPlanner& planner, const nav_core2::Costmap& costmap,
00187 bool check_exception_type = true, bool verbose = false, bool quit_early = true);
00188 }
00189
00190 #endif // GLOBAL_PLANNER_TESTS_GLOBAL_PLANNER_TESTS_H