openOrCreateFile打开文件,如果文件不存在则创建路径与文件,记录日志与系统时间
//#include <ros/package.h>
#include <fstream>
#include <cmath>
#include <sys/stat.h>
#include <chrono>
std::ofstream file_stream_odom_ekf_;
std::string rosBag_directory_="/home/sukai/slam/rosBag/";
std::string file_name_odom_ekf_="file_name_odom_ekf";
std::string file_path_odom_ekf_=/home/sukai/slam/log/initialpose_data_log.txt;
std::string getCurrentTime() {
// 获取当前系统时间
//std::chrono::system_clock::time_point start_time ;
auto current_time = std::chrono::system_clock::now();
auto current_time_c = std::chrono::system_clock::to_time_t(current_time);
auto ms = std::chrono::duration_cast<std::chrono::milliseconds>(current_time.time_since_epoch()) % 1000;
std::cout << "1.start getCurrentTime " << std::pu