Skip to content

Commit

Permalink
fix(start/goal_planner): fix freespace planning error handling (#8246)
Browse files Browse the repository at this point in the history
Signed-off-by: kosuke55 <kosuke.tnp@gmail.com>
  • Loading branch information
kosuke55 authored Jul 30, 2024
1 parent 28e2cda commit 676ed58
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,12 @@ std::optional<PullOverPath> FreespacePullOver::plan(const Pose & goal_pose)
const Pose end_pose =
use_back_ ? goal_pose
: autoware::universe_utils::calcOffsetPose(goal_pose, -straight_distance, 0.0, 0.0);
if (!planner_->makePlan(current_pose, end_pose)) {

try {
if (!planner_->makePlan(current_pose, end_pose)) {
return {};
}
} catch (const std::exception & e) {
return {};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,12 @@ std::optional<PullOutPath> FreespacePullOut::plan(

planner_->setMap(*planner_data_->costmap);

const bool found_path = planner_->makePlan(start_pose, end_pose);
if (!found_path) {
planner_debug_data.conditions_evaluation.emplace_back("no path found");
try {
if (!planner_->makePlan(start_pose, end_pose)) {
planner_debug_data.conditions_evaluation.emplace_back("no path found");
return {};
}
} catch (const std::exception & e) {
return {};
}

Expand Down

0 comments on commit 676ed58

Please sign in to comment.