Skip to content

Commit

Permalink
Fix segfault in test_planner_random_node/test_planner_costmaps_node (#…
Browse files Browse the repository at this point in the history
…1640)

The problem appears while addressing zero-length path vector
after planner failed to create a plan.
  • Loading branch information
AlexeyMerzlyakov authored Apr 16, 2020
1 parent 6ab8521 commit 26d776b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions nav2_system_tests/src/planning/planner_tester.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ class NavFnPlannerTester : public nav2_planner::PlannerServer
}
try {
path = planners_["GridBased"]->createPlan(start, goal);
// The situation when createPlan() did not throw any exception
// does not guarantee that plan was created correctly.
// So it should be checked additionally that path is correct.
if (!path.poses.size()) {
return false;
}
} catch (...) {
return false;
}
Expand Down

0 comments on commit 26d776b

Please sign in to comment.