Commit 48320154 authored by Jayant Khatkar's avatar Jayant Khatkar
Browse files

fixed calibration file generation - error was in the error check

parent d4e1e6a2
Pipeline #448 failed with stage
in 1 minute and 53 seconds
...@@ -104,20 +104,21 @@ public: ...@@ -104,20 +104,21 @@ public:
ROS_ERROR_STREAM("Calibration data not yet set."); ROS_ERROR_STREAM("Calibration data not yet set.");
return false; return false;
} }
std::cout << "output_filename: " << output_filename_ << std::endl;
fs::path out_path = fs::complete(output_filename_);
// fs::path out_path = fs::complete(output_filename_);
fs::path dst_path = out_path.parent_path();
if (!fs::exists(dst_path)) // fs::path dst_path = out_path.parent_path();
{ // if (!fs::exists(dst_path))
ROS_ERROR_STREAM("Parent folder " << dst_path << " does not exist."); // {
return false; // ROS_ERROR_STREAM("Parent folder " << dst_path << " does not exist.");
} // return false;
ROS_INFO_STREAM("Writing calibration data to " << out_path); // }
if (fs::exists(output_filename_)) // ROS_INFO_STREAM("Writing calibration data to " << out_path);
{ // if (fs::exists(output_filename_))
ROS_WARN_STREAM("Output file " << output_filename_ << " already exists. Overwriting."); // {
} // ROS_WARN_STREAM("Output file " << output_filename_ << " already exists. Overwriting.");
// }
std::ofstream file(output_filename_); std::ofstream file(output_filename_);
if (file.is_open()) if (file.is_open())
{ {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment