diff --git a/nav2_waypoint_follower/plugins/photo_at_waypoint.cpp b/nav2_waypoint_follower/plugins/photo_at_waypoint.cpp index ff878f4d390..77ff7f20aa0 100644 --- a/nav2_waypoint_follower/plugins/photo_at_waypoint.cpp +++ b/nav2_waypoint_follower/plugins/photo_at_waypoint.cpp @@ -119,7 +119,7 @@ bool PhotoAtWaypoint::processAtWaypoint( std::lock_guard guard(global_mutex_); cv::Mat curr_frame_mat; deepCopyMsg2Mat(curr_frame_msg_, curr_frame_mat); - cv::imwrite(full_path_image_path.c_str(), curr_frame_mat); + cv::imwrite(full_path_image_path.string().c_str(), curr_frame_mat); RCLCPP_INFO( logger_, "Photo has been taken successfully at waypoint %i", curr_waypoint_index);