Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
G
get_freespace
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
liuji
get_freespace
Commits
03dba8af
Commit
03dba8af
authored
May 18, 2023
by
liuji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
detect range change
parent
72c0f559
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
13 deletions
+5
-13
ground_segmentation_node_mult_test.cc
..._local_gpu_test/src/ground_segmentation_node_mult_test.cc
+4
-4
FreeSpace.cpp
test_project/livox_free_space/src/FreeSpace.cpp
+1
-1
FreeSpace_node.cpp
test_project/livox_free_space/src/FreeSpace_node.cpp
+0
-8
No files found.
test_project/linefit_ground_segmentation_local_gpu_test/src/ground_segmentation_node_mult_test.cc
View file @
03dba8af
...
...
@@ -270,9 +270,9 @@ public:
for
(
int
i
=
0
;
i
<
objects
->
points
.
size
();
i
++
)
{
if
(
objects
->
points
[
i
].
x
<
1000
)
if
(
objects
->
points
[
i
].
x
<
50
&&
objects
->
points
[
i
].
y
>
-
15
&&
objects
->
points
[
i
].
y
<
15
)
//前向50m内 左右15m
{
if
(
objects
->
points
[
i
].
z
>
-
1.3
)
//-1.5m以上
的点做聚类处理
if
(
objects
->
points
[
i
].
z
>
-
1.3
&&
objects
->
points
[
i
].
z
<
3.5
)
//-1.3m-3.5m
的点做聚类处理
close
->
points
.
push_back
(
objects
->
points
[
i
]);
}
else
...
...
@@ -325,7 +325,7 @@ public:
printf
(
"=>close_objects_filtered voxel(dbscan before) after points size : %d
\n
"
,
numPoints
);
PointType
*
points
=
close_objects_filtered
->
points
.
data
();
DBSCAN
::
Param
param
{.
pointDimension
=
3
,
.
eps
=
0.
3
,
.
minPoints
=
20
};
DBSCAN
::
Param
param
{.
pointDimension
=
3
,
.
eps
=
0.
5
,
.
minPoints
=
20
};
//0.2 30 没box算是个临界点
DBSCAN
dbscanHandler
(
param
);
std
::
vector
<
std
::
vector
<
int
>>
clusterIndices
;
...
...
@@ -404,7 +404,7 @@ public:
tmp
.
x
=
it
->
x
;
tmp
.
y
=
it
->
y
;
tmp
.
z
=
it
->
z
;
if
(
tmp
.
z
<
-
1.3
||
tmp
.
z
>
1.2
)
//确定bbox内点云的范围
if
(
tmp
.
z
<
-
1.3
||
tmp
.
z
>
3
)
//确定bbox内点云的范围
continue
;
cloud_clustered
->
points
.
push_back
(
tmp
);
tmp_filter_z
->
points
.
push_back
(
tmp
);
...
...
test_project/livox_free_space/src/FreeSpace.cpp
View file @
03dba8af
...
...
@@ -404,7 +404,7 @@ int LivoxFreeSpace::GroundSegment(int* pLabel,float *fPoints,int pointNum,float
pcl
::
computeMeanAndCovarianceMatrix
(
*
cloud
,
cov
,
pc_mean
);
Eigen
::
JacobiSVD
<
Eigen
::
MatrixXf
>
svd
(
cov
,
Eigen
::
DecompositionOptions
::
ComputeFullU
);
normal_
=
(
svd
.
matrixU
().
col
(
2
));
//第三个奇异向量(
即
法向量)作为normal_
normal_
=
(
svd
.
matrixU
().
col
(
2
));
//第三个奇异向量(
更换坐标系的z轴即xy平面的
法向量)作为normal_
Eigen
::
Vector3f
seeds_mean
=
pc_mean
.
head
<
3
>
();
// normal.T * [x,y,z] = -d
//(0,0) 是 Eigen 矩阵表达式的索引,表示取其第 0 行第 0 列上的元素
...
...
test_project/livox_free_space/src/FreeSpace_node.cpp
View file @
03dba8af
// #include "sensor_msgs/PointCloud2.h"
// #include "geometry_msgs/Point.h"
// #include "geometry_msgs/Point32.h"
// #include "geometry_msgs/Polygon.h"
// #include "geometry_msgs/PolygonStamped.h"
// #include "nav_msgs/GridCells.h"
#include "pcl/conversions.h"
//#include "pcl_conversions/pcl_conversions.h"
#include "pcl/point_cloud.h"
#include "pcl/point_types.h"
#include <pcl/filters/voxel_grid.h>
...
...
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