Skip to content

Commit

Permalink
Throw nav2_core exceptions
Browse files Browse the repository at this point in the history
Signed-off-by: redvinaa <[email protected]>
  • Loading branch information
redvinaa committed Jan 3, 2025
1 parent 265004f commit 07c373c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nav2_mppi_controller/src/path_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,11 @@ geometry_msgs::msg::PoseStamped PathHandler::getTransformedGoal()
auto goal = global_plan_.poses.back();
goal.header.stamp = global_plan_.header.stamp;
if (goal.header.frame_id.empty()) {
throw std::runtime_error("Goal pose has an empty frame_id");
throw nav2_core::ControllerTFError("Goal pose has an empty frame_id");
}
geometry_msgs::msg::PoseStamped transformed_goal;
if (!transformPose(costmap_->getGlobalFrameID(), goal, transformed_goal)) {
throw std::runtime_error("Unable to transform goal pose into costmap frame");
throw nav2_core::ControllerTFError("Unable to transform goal pose into costmap frame");
}
return transformed_goal;
}
Expand Down

0 comments on commit 07c373c

Please sign in to comment.