Skip to content

Commit

Permalink
Restore output format of planner server message (ros-navigation#4341)
Browse files Browse the repository at this point in the history
  • Loading branch information
aosmw committed Jun 26, 2024
1 parent a7146fd commit 756982f
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions nav2_planner/src/planner_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -740,18 +740,15 @@ void PlannerServer::exceptionWarning(
const std::exception & ex,
std::string & error_msg)
{
error_msg = planner_id +
"plugin failed to plan from (" +
std::to_string(start.pose.position.x) +
", " +
std::to_string(start.pose.position.y) +
") to (" +
std::to_string(goal.pose.position.x) +
", " +
std::to_string(goal.pose.position.y) +
": \"" +
ex.what() +
"\"";
std::stringstream ss;
ss << std::fixed << std::setprecision(2)
<< planner_id << "plugin failed to plan from ("
<< start.pose.position.x << ", " << start.pose.position.y
<< ") to ("
<< goal.pose.position.x << ", " << goal.pose.position.y << ")"
<< ": \"" << ex.what() << "\"";

error_msg = ss.str();
RCLCPP_WARN(get_logger(), error_msg.c_str());
}

Expand Down

0 comments on commit 756982f

Please sign in to comment.