35 #ifndef GLOBAL_PLANNER_TESTS_GLOBAL_PLANNER_TESTS_H 36 #define GLOBAL_PLANNER_TESTS_GLOBAL_PLANNER_TESTS_H 46 using PoseList = std::vector<nav_2d_msgs::Pose2DStamped>;
58 bool include_edges =
true);
92 bool verbose =
false,
bool quit_early =
true);
118 const std::string& test_name,
119 bool check_exception_type =
true,
bool verbose =
false,
bool quit_early =
true,
120 bool invalid_starts =
true);
146 const std::string& test_name,
147 bool check_exception_type =
true,
bool verbose =
false,
bool quit_early =
true,
148 bool invalid_starts =
true);
173 int max_failure_cases = 10,
bool check_exception_type =
true,
174 bool verbose =
false,
bool quit_early =
true);
187 bool check_exception_type =
true,
bool verbose =
false,
bool quit_early =
true);
190 #endif // GLOBAL_PLANNER_TESTS_GLOBAL_PLANNER_TESTS_H PoseList createPosesOutsideCostmap(const nav_core2::Costmap &costmap)
Create a list of poses that are outside the costmap's bounds.
std::vector< nav_2d_msgs::Pose2DStamped > PoseList
bool checkValidPathCoverage(nav_core2::GlobalPlanner &planner, const PoseList &free_cells, bool verbose=false, bool quit_early=true)
Check if a path exists between every pair of free_cells.
PoseList subsetPoseList(const PoseList &cells, unsigned int num_cells)
Create a new list of poses from cells that is num_cells long.
bool checkOccupiedPathCoverage(nav_core2::GlobalPlanner &planner, const PoseList &start_cells, const PoseList &goal_cells, const std::string &test_name, bool check_exception_type=true, bool verbose=false, bool quit_early=true, bool invalid_starts=true)
Check if the appropriate exception is thrown when attempting to plan to or from an occupied cell...
bool hasCompleteCoverage(nav_core2::GlobalPlanner &planner, const nav_core2::Costmap &costmap, int max_failure_cases=10, bool check_exception_type=true, bool verbose=false, bool quit_early=true)
Run a bunch of tests, assuming there is a valid path from any free cell to any other free cell...
bool checkOutOfBoundsPathCoverage(nav_core2::GlobalPlanner &planner, const PoseList &start_cells, const PoseList &goal_cells, const std::string &test_name, bool check_exception_type=true, bool verbose=false, bool quit_early=true, bool invalid_starts=true)
Check if the appropriate exception is thrown when attempting to plan to or from a pose off the costma...
bool planExists(nav_core2::GlobalPlanner &planner, nav_2d_msgs::Pose2DStamped start, nav_2d_msgs::Pose2DStamped goal)
Simple check to see if a plan exists. Returns a boolean instead of returning path or throwing an exce...
void groupCells(const nav_core2::Costmap &costmap, PoseList &free_cells, PoseList &occupied_cells, bool include_edges=true)
Populate two lists of poses from a costmap. one with all the free cells, the other with all the occup...
bool hasNoPaths(nav_core2::GlobalPlanner &planner, const nav_core2::Costmap &costmap, bool check_exception_type=true, bool verbose=false, bool quit_early=true)
Run a bunch of tests, assuming there are no valid paths from any free cell to any other free cell...