File tree 1 file changed +9
-12
lines changed
1 file changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -740,18 +740,15 @@ void PlannerServer::exceptionWarning(
740
740
const std::exception & ex,
741
741
std::string & error_msg)
742
742
{
743
- error_msg = planner_id +
744
- " plugin failed to plan from (" +
745
- std::to_string (start.pose .position .x ) +
746
- " , " +
747
- std::to_string (start.pose .position .y ) +
748
- " ) to (" +
749
- std::to_string (goal.pose .position .x ) +
750
- " , " +
751
- std::to_string (goal.pose .position .y ) +
752
- " : \" " +
753
- ex.what () +
754
- " \" " ;
743
+ std::stringstream ss;
744
+ ss << std::fixed << std::setprecision (2 )
745
+ << planner_id << " plugin failed to plan from ("
746
+ << start.pose .position .x << " , " << start.pose .position .y
747
+ << " ) to ("
748
+ << goal.pose .position .x << " , " << goal.pose .position .y << " )"
749
+ << " : \" " << ex.what () << " \" " ;
750
+
751
+ error_msg = ss.str ();
755
752
RCLCPP_WARN (get_logger (), error_msg.c_str ());
756
753
}
757
754
You can’t perform that action at this time.
0 commit comments