Commit f1f8775a authored by limingbo's avatar limingbo

test

parent 653342f9
......@@ -3,6 +3,23 @@
using namespace boost::filesystem;
vector<string> getActiveTraces(
const string &activeTracePath)
{
vector<string> ret;
std::ifstream ifs(activeTracePath);
if(!ifs){
LOG(WARNING) << activeTracePath << " load fail!";
return ret;
}
string line;
while(getline(ifs, line)){
ret.push_back(line);
}
ifs.close();
return ret;
}
vector<string> getCloseTasks(
const string &parentPath,
boost::shared_ptr<Trajectory> currTraj)
......
......@@ -5,6 +5,9 @@
#include "trajectory/trajectory.h"
#include "utils/pcl_point_type.h"
vector<string> getActiveTraces(
const string& activeTracePath);
vector<string> getCloseTasks(
const string &parentPath,
boost::shared_ptr<Trajectory> currTraj);
......
......@@ -24,6 +24,13 @@ int main(int argc, char *argv[])
FLAGS_stderrthreshold = 0;
FLAGS_logbufsecs = 0;
string activeTracePath = FLAGS_base_dir + "/activeTrace.txt";
if(!exists(activeTracePath)){
LOG(INFO) << "activeTracePath dont exist!";
return 0;
}
vector<string> activeTraces = getActiveTraces(activeTracePath);
string ppk_dir_ = FLAGS_base_dir + "/raw_trace/sample.gps";
if(exists(ppk_dir_)){
ppk_traj_.reset(new Trajectory(ppk_dir_, PPK, 10));
......
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