Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
6067afd6
A
apollo
项目概览
Pinoxchio
/
apollo
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
apollo
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6067afd6
编写于
10月 15, 2018
作者:
Z
zhanglingchuan
提交者:
GoLancer
10月 16, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
perception: delete some PointsCloudProcess comments
上级
bbe48b83
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
38 addition
and
12 deletion
+38
-12
modules/perception/lidar/app/lidar_obstacle_segmentation.cc
modules/perception/lidar/app/lidar_obstacle_segmentation.cc
+4
-0
modules/perception/lidar/app/lidar_obstacle_segmentation.h
modules/perception/lidar/app/lidar_obstacle_segmentation.h
+1
-0
modules/perception/lidar/lib/pointcloud_preprocessor/BUILD
modules/perception/lidar/lib/pointcloud_preprocessor/BUILD
+2
-0
modules/perception/lidar/lib/pointcloud_preprocessor/pointcloud_preprocessor.cc
...ar/lib/pointcloud_preprocessor/pointcloud_preprocessor.cc
+25
-10
modules/perception/lidar/lib/pointcloud_preprocessor/pointcloud_preprocessor.h
...dar/lib/pointcloud_preprocessor/pointcloud_preprocessor.h
+3
-1
modules/perception/lidar/lib/pointcloud_preprocessor/pointcloud_preprocessor_test.cc
...b/pointcloud_preprocessor/pointcloud_preprocessor_test.cc
+1
-0
modules/perception/onboard/component/segmentation_component.cc
...es/perception/onboard/component/segmentation_component.cc
+1
-0
modules/perception/production/data/perception/lidar/models/pointcloud_preprocessor/velodyne16/pointcloud_preprocessor.conf
...loud_preprocessor/velodyne16/pointcloud_preprocessor.conf
+1
-1
未找到文件。
modules/perception/lidar/app/lidar_obstacle_segmentation.cc
浏览文件 @
6067afd6
...
...
@@ -91,6 +91,8 @@ bool LidarObstacleSegmentation::Init(
LidarProcessResult
LidarObstacleSegmentation
::
Process
(
const
LidarObstacleSegmentationOptions
&
options
,
LidarFrame
*
frame
)
{
PointCloudPreprocessorOptions
preprocessor_options
;
preprocessor_options
.
sensor2novatel_extrinsics
=
options
.
sensor2novatel_extrinsics
;
if
(
cloud_preprocessor_
.
Preprocess
(
preprocessor_options
,
frame
))
{
return
ProcessCommon
(
options
,
frame
);
}
else
{
...
...
@@ -109,6 +111,8 @@ LidarProcessResult LidarObstacleSegmentation::Process(
PERCEPTION_PERF_BLOCK_START
();
PointCloudPreprocessorOptions
preprocessor_options
;
preprocessor_options
.
sensor2novatel_extrinsics
=
options
.
sensor2novatel_extrinsics
;
if
(
cloud_preprocessor_
.
Preprocess
(
preprocessor_options
,
message
,
frame
))
{
PERCEPTION_PERF_BLOCK_END_WITH_INDICATOR
(
sensor_name
,
"preprocess"
);
return
ProcessCommon
(
options
,
frame
);
...
...
modules/perception/lidar/app/lidar_obstacle_segmentation.h
浏览文件 @
6067afd6
...
...
@@ -39,6 +39,7 @@ struct LidarObstacleSegmentationInitOptions {
struct
LidarObstacleSegmentationOptions
{
std
::
string
sensor_name
;
Eigen
::
Affine3d
sensor2novatel_extrinsics
;
};
class
LidarObstacleSegmentation
{
...
...
modules/perception/lidar/lib/pointcloud_preprocessor/BUILD
浏览文件 @
6067afd6
...
...
@@ -21,6 +21,8 @@ cc_library(
"//modules/perception/lidar/common"
,
"//modules/perception/lidar/lib/pointcloud_preprocessor/proto:pointcloud_preprocessor_config_proto"
,
"//modules/perception/proto:perception_config_schema_proto"
,
"//modules/common/configs:vehicle_config_helper"
,
"//modules/common/configs/proto:vehicle_config_proto"
,
"@eigen"
,
],
)
...
...
modules/perception/lidar/lib/pointcloud_preprocessor/pointcloud_preprocessor.cc
浏览文件 @
6067afd6
...
...
@@ -17,6 +17,7 @@
#include <memory>
#include "modules/common/configs/vehicle_config_helper.h"
#include "modules/common/util/file.h"
#include "modules/perception/base/object_pool_types.h"
#include "modules/perception/lidar/lib/pointcloud_preprocessor/proto/pointcloud_preprocessor_config.pb.h"
...
...
@@ -51,10 +52,16 @@ bool PointCloudPreprocessor::Init(
CHECK
(
apollo
::
common
::
util
::
GetProtoFromFile
(
config_file
,
&
config
));
filter_naninf_points_
=
config
.
filter_naninf_points
();
filter_nearby_box_points_
=
config
.
filter_nearby_box_points
();
box_forward_x_
=
config
.
box_forward_x
();
box_backward_x_
=
config
.
box_backward_x
();
box_forward_y_
=
config
.
box_forward_y
();
box_backward_y_
=
config
.
box_backward_y
();
// box_forward_x_ = config.box_forward_x();
// box_backward_x_ = config.box_backward_x();
// box_forward_y_ = config.box_forward_y();
// box_backward_y_ = config.box_backward_y();
const
auto
&
vehicle_param
=
common
::
VehicleConfigHelper
::
GetConfig
().
vehicle_param
();
box_forward_x_
=
vehicle_param
.
right_edge_to_center
();
box_backward_x_
=
-
vehicle_param
.
left_edge_to_center
();
box_forward_y_
=
vehicle_param
.
front_edge_to_center
();
box_backward_y_
=
-
vehicle_param
.
back_edge_to_center
();
filter_high_z_points_
=
config
.
filter_high_z_points
();
z_threshold_
=
config
.
z_threshold
();
return
true
;
...
...
@@ -89,9 +96,13 @@ bool PointCloudPreprocessor::Preprocess(
continue
;
}
}
if
(
filter_nearby_box_points_
&&
pt
.
x
()
<
box_forward_x_
&&
pt
.
x
()
>
box_backward_x_
&&
pt
.
y
()
<
box_forward_y_
&&
pt
.
y
()
>
box_backward_y_
)
{
Eigen
::
Vector3d
vec3d_lidar
(
pt
.
x
(),
pt
.
y
(),
pt
.
z
());
Eigen
::
Vector3d
vec3d_novatel
=
options
.
sensor2novatel_extrinsics
*
vec3d_lidar
;
if
(
filter_nearby_box_points_
&&
vec3d_novatel
[
0
]
<
box_forward_x_
&&
vec3d_novatel
[
0
]
>
box_backward_x_
&&
vec3d_novatel
[
1
]
<
box_forward_y_
&&
vec3d_novatel
[
1
]
>
box_backward_y_
)
{
continue
;
}
if
(
filter_high_z_points_
&&
pt
.
z
()
>
z_threshold_
)
{
...
...
@@ -134,9 +145,13 @@ bool PointCloudPreprocessor::Preprocess(
continue
;
}
}
if
(
filter_nearby_box_points_
&&
pt
.
x
<
box_forward_x_
&&
pt
.
x
>
box_backward_x_
&&
pt
.
y
<
box_forward_y_
&&
pt
.
y
>
box_backward_y_
)
{
Eigen
::
Vector3d
vec3d_lidar
(
pt
.
x
,
pt
.
y
,
pt
.
z
);
Eigen
::
Vector3d
vec3d_novatel
=
options
.
sensor2novatel_extrinsics
*
vec3d_lidar
;
if
(
filter_nearby_box_points_
&&
vec3d_novatel
[
0
]
<
box_forward_x_
&&
vec3d_novatel
[
0
]
>
box_backward_x_
&&
vec3d_novatel
[
1
]
<
box_forward_y_
&&
vec3d_novatel
[
1
]
>
box_backward_y_
)
{
frame
->
cloud
->
SwapPoint
(
i
,
size
--
);
continue
;
}
...
...
modules/perception/lidar/lib/pointcloud_preprocessor/pointcloud_preprocessor.h
浏览文件 @
6067afd6
...
...
@@ -29,7 +29,9 @@ struct PointCloudPreprocessorInitOptions {
std
::
string
sensor_name
=
"velodyne64"
;
};
struct
PointCloudPreprocessorOptions
{};
struct
PointCloudPreprocessorOptions
{
Eigen
::
Affine3d
sensor2novatel_extrinsics
;
};
class
PointCloudPreprocessor
{
public:
...
...
modules/perception/lidar/lib/pointcloud_preprocessor/pointcloud_preprocessor_test.cc
浏览文件 @
6067afd6
...
...
@@ -95,6 +95,7 @@ TEST_F(PointCloudPreprocessorTest, basic_test) {
EXPECT_FALSE
(
preprocessor
.
Preprocess
(
option
,
&
frame
));
frame
.
cloud
=
base
::
PointFCloudPool
::
Instance
().
Get
();
frame
.
lidar2world_pose
=
Eigen
::
Affine3d
::
Identity
();
option
.
sensor2novatel_extrinsics
=
Eigen
::
Affine3d
::
Identity
();
MockPointcloud
(
frame
.
cloud
.
get
());
EXPECT_EQ
(
frame
.
cloud
->
size
(),
10
);
EXPECT_TRUE
(
preprocessor
.
Preprocess
(
option
,
&
frame
));
...
...
modules/perception/onboard/component/segmentation_component.cc
浏览文件 @
6067afd6
...
...
@@ -137,6 +137,7 @@ bool SegmentationComponent::InternalProc(
lidar
::
LidarObstacleSegmentationOptions
segment_opts
;
segment_opts
.
sensor_name
=
sensor_name_
;
lidar2world_trans_
.
GetExtrinsics
(
&
segment_opts
.
sensor2novatel_extrinsics
);
lidar
::
LidarProcessResult
ret
=
segmentor_
->
Process
(
segment_opts
,
in_message
,
frame
.
get
());
if
(
ret
.
error_code
!=
lidar
::
LidarErrorCode
::
Succeed
)
{
...
...
modules/perception/production/data/perception/lidar/models/pointcloud_preprocessor/velodyne16/pointcloud_preprocessor.conf
浏览文件 @
6067afd6
filter_naninf_points
:
false
filter_nearby_box_points
:
fals
e
filter_nearby_box_points
:
tru
e
box_forward_x
:
2
.
0
box_backward_x
: -
2
.
0
box_forward_y
:
2
.
0
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录