Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
M
multiTraj
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangdawei
multiTraj
Commits
843fe0a5
Commit
843fe0a5
authored
Aug 16, 2023
by
wangdawei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
filter period time < 2sec
parent
a96a2b23
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
2 deletions
+19
-2
CMakeLists.txt.user
CMakeLists.txt.user
+1
-1
multi_traj_functions.cpp
apps/function/multi_traj_functions.cpp
+13
-0
multi_traj.cpp
apps/multi_traj.cpp
+5
-1
No files found.
CMakeLists.txt.user
View file @
843fe0a5
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.11.1, 2023-0
6-26T19:12:39
. -->
<!-- Written by QtCreator 4.11.1, 2023-0
8-01T17:10:35
. -->
<qtcreator>
<data>
<variable>
EnvironmentId
</variable>
...
...
apps/function/multi_traj_functions.cpp
View file @
843fe0a5
...
...
@@ -532,9 +532,18 @@ vector<CloseTrajInfo> crossFilter(
}
}
filterByPosition
(
ret
,
pointClouds
,
trajectories
);
vector
<
CloseTrajInfo
>
retOver2Sec
;
for
(
size_t
retIndex
=
0
;
retIndex
<
ret
.
size
();
retIndex
++
){
const
auto
&
oneRet
=
ret
.
at
(
retIndex
);
CloseTrajInfo
oneRetOver2Sec
;
oneRetOver2Sec
.
index
=
oneRet
.
index
;
oneRetOver2Sec
.
trajPath
=
oneRet
.
trajPath
;
for
(
size_t
periodIndex
=
0
;
periodIndex
<
oneRet
.
periods
.
size
();
periodIndex
++
){
auto
period
=
oneRet
.
periods
.
at
(
periodIndex
);
if
(
period
.
second
-
period
.
first
<
2
){
continue
;
}
oneRetOver2Sec
.
periods
.
push_back
(
period
);
size_t
indexOffset
;
PointCloudExport
periodCloud
=
getCloudFromPeriod
(
pointClouds
.
at
(
oneRet
.
index
),
oneRet
.
periods
.
at
(
periodIndex
),
indexOffset
);
...
...
@@ -544,7 +553,11 @@ vector<CloseTrajInfo> crossFilter(
".pcd"
,
periodCloud
);
}
}
if
(
oneRetOver2Sec
.
periods
.
size
()){
retOver2Sec
.
push_back
(
oneRetOver2Sec
);
}
}
retOver2Sec
.
swap
(
ret
);
return
ret
;
}
...
...
apps/multi_traj.cpp
View file @
843fe0a5
...
...
@@ -68,7 +68,11 @@ int main(int argc, char *argv[])
});
ofs
<<
meshId
;
for
(
auto
period
:
task
.
periods
){
ofs
<<
setprecision
(
15
)
<<
" "
<<
period
.
first
<<
" "
<<
period
.
second
-
period
.
first
;
auto
timeDelta
=
period
.
second
-
period
.
first
;
if
(
timeDelta
<
2
){
continue
;
}
ofs
<<
setprecision
(
15
)
<<
" "
<<
period
.
first
<<
" "
<<
timeDelta
;
}
ofs
<<
std
::
endl
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment