Commit 1e35434a authored by limingbo's avatar limingbo

update

parent a5717144
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject> <!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.5.2, 2022-02-25T19:14:42. --> <!-- Written by QtCreator 4.5.2, 2022-02-28T16:38:20. -->
<qtcreator> <qtcreator>
<data> <data>
<variable>EnvironmentId</variable> <variable>EnvironmentId</variable>
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{a481ffb4-75ee-455c-9443-95f457b0df68}</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{a481ffb4-75ee-455c-9443-95f457b0df68}</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value> <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
...@@ -209,9 +209,9 @@ ...@@ -209,9 +209,9 @@
<value type="int">14</value> <value type="int">14</value>
</valuelist> </valuelist>
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguation.Title">multi_traj</value> <value type="QString" key="CMakeProjectManager.CMakeRunConfiguation.Title">multi_traj</value>
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguration.Arguments"></value> <value type="QString" key="CMakeProjectManager.CMakeRunConfiguration.Arguments">--base_dir=/home/juefx/temp/2069</value>
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory"></value> <value type="QString" key="CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory"></value>
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory.default">/home/juefx/workspace/multitraj/build-multitraj-Desktop-Release/apps</value> <value type="QString" key="CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory.default">/home/juefx/workspace/multitraj/build-multitraj-Desktop-Debug/apps</value>
<value type="int" key="PE.EnvironmentAspect.Base">2</value> <value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">multi_traj</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">multi_traj</value>
......
...@@ -22,7 +22,7 @@ vector<string> getActiveTraces( ...@@ -22,7 +22,7 @@ vector<string> getActiveTraces(
void getCrossTasks( void getCrossTasks(
const vector<string> &allTask, const vector<string> &allTask,
vector<pair<string, vector<pair<double, double>>>> &crossTasks) vector<pair<string, vector<pair<uint64_t, uint64_t>>>> &crossTasks)
{ {
if(allTask.size() < 2){ if(allTask.size() < 2){
return; return;
...@@ -52,7 +52,7 @@ void getCrossTasks( ...@@ -52,7 +52,7 @@ void getCrossTasks(
if(allTaskInfo.front().meshOutPath != ""){ if(allTaskInfo.front().meshOutPath != ""){
closeTaskInfo = meshOutFilter(allTaskInfo); closeTaskInfo = meshOutFilter(allTaskInfo);
} }
closeTaskInfo.insert(closeTaskInfo.begin(), allTaskInfo.front()); // closeTaskInfo.insert(closeTaskInfo.begin(), allTaskInfo.front());
if(closeTaskInfo.size() < 2){ if(closeTaskInfo.size() < 2){
LOG(INFO) << "closeTaskInfo.size() < 2"; LOG(INFO) << "closeTaskInfo.size() < 2";
closeTaskInfo = allTaskInfo; closeTaskInfo = allTaskInfo;
...@@ -152,9 +152,9 @@ bool checkMeshOut( ...@@ -152,9 +152,9 @@ bool checkMeshOut(
return false; return false;
} }
vector<pair<string, vector<pair<double, double>>>> crossFilter( vector<pair<string, vector<pair<uint64_t, uint64_t>>>> crossFilter(
const vector<TaskInfo> &filteredTaskInfo){ const vector<TaskInfo> &filteredTaskInfo){
vector<pair<string, vector<pair<double, double>>>> ret; vector<pair<string, vector<pair<uint64_t, uint64_t>>>> ret;
if(filteredTaskInfo.size() < 2){ if(filteredTaskInfo.size() < 2){
return ret; return ret;
} }
...@@ -176,9 +176,9 @@ vector<pair<string, vector<pair<double, double>>>> crossFilter( ...@@ -176,9 +176,9 @@ vector<pair<string, vector<pair<double, double>>>> crossFilter(
for(size_t pcIndex = 1; pcIndex < pointClouds.size(); pcIndex++){ for(size_t pcIndex = 1; pcIndex < pointClouds.size(); pcIndex++){
bool found = false; bool found = false;
bool inPeriod = false; bool inPeriod = false;
double start =0, end = 0; uint64_t start =0, end = 0;
pair<string, vector<pair<double, double>>> oneRet; pair<string, vector<pair<uint64_t, uint64_t>>> oneRet;
vector<pair<double, double>> timePeriods; vector<pair<uint64_t, uint64_t>> timePeriods;
float currTime; float currTime;
for(const PointExport& query : pointClouds[pcIndex]->points){ for(const PointExport& query : pointClouds[pcIndex]->points){
int result_index; int result_index;
......
...@@ -18,9 +18,8 @@ vector<string> getCloseTasks( ...@@ -18,9 +18,8 @@ vector<string> getCloseTasks(
const string &parentPath, const string &parentPath,
boost::shared_ptr<Trajectory> currTraj); boost::shared_ptr<Trajectory> currTraj);
void getCrossTasks( void getCrossTasks(const vector<string> &allTask,
const vector<string> &allTask, vector<pair<string, vector<pair<uint64_t, uint64_t> > > > &crossTasks);
vector<pair<string, vector<pair<double, double> > > > &crossTasks);
bool getTaskInfo( bool getTaskInfo(
const string &taskPath, const string &taskPath,
...@@ -37,7 +36,7 @@ bool checkMeshOut( ...@@ -37,7 +36,7 @@ bool checkMeshOut(
const MeshOut& query, const MeshOut& query,
const MeshOut& target); const MeshOut& target);
vector<pair<string, vector<pair<double, double> > > > crossFilter( vector<pair<string, vector<pair<uint64_t, uint64_t> > > > crossFilter(
const vector<TaskInfo> &filteredTaskInfo); const vector<TaskInfo> &filteredTaskInfo);
bool initTrajectory(const string &trajPath, bool initTrajectory(const string &trajPath,
......
...@@ -35,7 +35,7 @@ int main(int argc, char *argv[]) ...@@ -35,7 +35,7 @@ int main(int argc, char *argv[])
} }
activeTraces.insert(activeTraces.begin(), FLAGS_base_dir); activeTraces.insert(activeTraces.begin(), FLAGS_base_dir);
vector<pair<string, vector<pair<double, double>>>> crossTasks; vector<pair<string, vector<pair<uint64_t, uint64_t>>>> crossTasks;
getCrossTasks(activeTraces, crossTasks); getCrossTasks(activeTraces, crossTasks);
if(crossTasks.size() == 0){ if(crossTasks.size() == 0){
LOG(WARNING) << "crossTasks.size() == 0"; LOG(WARNING) << "crossTasks.size() == 0";
...@@ -60,7 +60,9 @@ int main(int argc, char *argv[]) ...@@ -60,7 +60,9 @@ int main(int argc, char *argv[])
if(crossTasks.size() != 0){ if(crossTasks.size() != 0){
// ofs << crossTasks.back() << std::endl; // ofs << crossTasks.back() << std::endl;
for(auto task : crossTasks){ for(auto task : crossTasks){
ofs << task.first; uint32_t meshId =
stoi(boost::filesystem::path(task.first).filename().string());
ofs << meshId;
for(auto period : task.second){ for(auto period : task.second){
ofs << setprecision(15) << " " << period.first << " " << period.second; ofs << setprecision(15) << " " << period.first << " " << period.second;
......
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