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:
ROS_ERROR_STREAM("Calibration data not yet set.");
return false;
}
fs::path out_path = fs::complete(output_filename_);
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_INFO_STREAM("Writing calibration data to " << out_path);
if (fs::exists(output_filename_))
{
ROS_WARN_STREAM("Output file " << output_filename_ << " already exists. Overwriting.");
}
std::cout << "output_filename: " << output_filename_ << std::endl;
// fs::path out_path = fs::complete(output_filename_);
// 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_INFO_STREAM("Writing calibration data to " << out_path);
// if (fs::exists(output_filename_))
// {
// ROS_WARN_STREAM("Output file " << output_filename_ << " already exists. Overwriting.");
// }
std::ofstream file(output_filename_);
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