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
cb10f4fc
Commit
cb10f4fc
authored
2 years ago
by
limingbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test filterByPosition
parent
fee1ccf8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
multi_traj_functions.cpp
apps/function/multi_traj_functions.cpp
+6
-2
No files found.
apps/function/multi_traj_functions.cpp
View file @
cb10f4fc
...
...
@@ -2,6 +2,7 @@
#include <pcl/octree/octree.h>
using
namespace
boost
::
filesystem
;
const
float
Squared30
=
30
*
30
;
vector
<
string
>
getActiveTraces
(
const
string
&
activeTracePath
)
...
...
@@ -213,13 +214,16 @@ void filterByPosition(
auto
tarPeriod
=
tarOneRet
.
periods
.
at
(
tarPeriodIndex
);
PointCloudExport
tarPeriodCloud
=
getCloudFromPeriod
(
pointClouds
.
at
(
tarOneRet
.
index
),
tarPeriod
);
uint32_t
hitCnt
=
0
;
for
(
const
PointExport
&
query
:
tarPeriodCloud
.
points
){
int
result_index
;
float
sqr_distance
;
octree
.
approxNearestSearch
(
query
,
result_index
,
sqr_distance
);
if
(
sqrt
(
sqr_distance
)
<
30
){
if
(
sqr_distance
<
Squared30
){
hitCnt
++
;
}
if
(
hitCnt
/
tarPeriodCloud
->
size
()
<
0.8
){
aroundIndexVec
.
push_back
(
make_pair
(
tarRetIndex
,
tarPeriodIndex
));
break
;
}
}
}
...
...
This diff is collapsed.
Click to expand it.
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