Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
e64051d6
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,发现更多精彩内容 >>
提交
e64051d6
编写于
9月 26, 2018
作者:
K
kechxu
提交者:
Liangliang Zhang
9月 26, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Perception: common.h change AttributePointCloud to its base class PointCloud
上级
b178563e
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
12 addition
and
13 deletion
+12
-13
modules/perception/common/geometry/basic_test.cc
modules/perception/common/geometry/basic_test.cc
+7
-8
modules/perception/common/geometry/common.h
modules/perception/common/geometry/common.h
+5
-5
未找到文件。
modules/perception/common/geometry/basic_test.cc
浏览文件 @
e64051d6
...
...
@@ -28,7 +28,6 @@ namespace common {
using
base
::
PointF
;
using
base
::
PointCloud
;
using
base
::
AttributePointCloud
;
TEST
(
GeometryBasicTest
,
cross_product_test
)
{
Eigen
::
Vector2f
p1
(
0.0
,
0.0
);
...
...
@@ -153,7 +152,7 @@ TEST(GeometryBasicTest, convert_cartesian_to_polar_coordinate) {
TEST
(
GeometryCommonTest
,
is_point_xy_in_polygon_2d_xy
)
{
base
::
PointF
pt
,
temp
;
Attribute
PointCloud
<
PointF
>
polygon
;
PointCloud
<
PointF
>
polygon
;
temp
.
x
=
10.
f
;
temp
.
y
=
10.
f
;
temp
.
z
=
10.
f
;
...
...
@@ -221,7 +220,7 @@ TEST(GeometryCommonTest, is_point_in_bbox) {
TEST
(
GeometryCommonTest
,
calculate_bbox_size_center_2d_xy
)
{
Eigen
::
Vector3f
size
;
Eigen
::
Vector3d
center
;
Attribute
PointCloud
<
PointF
>
cloud
;
PointCloud
<
PointF
>
cloud
;
base
::
PointF
temp
;
temp
.
x
=
10.
f
;
temp
.
y
=
10.
f
;
...
...
@@ -237,7 +236,7 @@ TEST(GeometryCommonTest, calculate_bbox_size_center_2d_xy) {
cloud
.
push_back
(
temp
);
Eigen
::
Vector3f
direction
(
1.0
,
0.0
,
0.0
);
CalculateBBoxSizeCenter2DXY
<
Attribute
PointCloud
<
PointF
>>
(
cloud
,
direction
,
CalculateBBoxSizeCenter2DXY
<
PointCloud
<
PointF
>>
(
cloud
,
direction
,
&
size
,
&
center
);
EXPECT_NEAR
(
size
(
0
),
30.
f
,
std
::
numeric_limits
<
float
>::
epsilon
());
EXPECT_NEAR
(
size
(
1
),
25.
f
,
std
::
numeric_limits
<
float
>::
epsilon
());
...
...
@@ -283,7 +282,7 @@ TEST(GeometryCommonTest, calculate_iou_2d_xy) {
TEST
(
GeometryCommonTest
,
calculate_dist_and_dir_to_segs
)
{
Eigen
::
Vector3f
pt
(
0.0
,
0.0
,
0.0
);
Attribute
PointCloud
<
PointF
>
cloud
;
PointCloud
<
PointF
>
cloud
;
base
::
PointF
temp
;
temp
.
x
=
10.
f
;
temp
.
y
=
0.
f
;
...
...
@@ -316,7 +315,7 @@ TEST(GeometryCommonTest, calculate_dist_and_dir_to_segs) {
TEST
(
GeometryCommonTest
,
calculate_dist_and_dir_to_boundary
)
{
Eigen
::
Vector3f
pt
(
0.0
,
0.0
,
0.0
);
Attribute
PointCloud
<
PointF
>
left
,
right
;
PointCloud
<
PointF
>
left
,
right
;
base
::
PointF
temp
;
temp
.
x
=
10.
f
;
temp
.
y
=
0.
f
;
...
...
@@ -350,8 +349,8 @@ TEST(GeometryCommonTest, calculate_dist_and_dir_to_boundary) {
TEST
(
GeometryCommonTest
,
calculate_dist_and_dir_to_boundary_list
)
{
Eigen
::
Vector3f
pt
(
0.0
,
0.0
,
0.0
);
Attribute
PointCloud
<
PointF
>
left
,
right
;
std
::
vector
<
Attribute
PointCloud
<
PointF
>>
left_list
,
right_list
;
PointCloud
<
PointF
>
left
,
right
;
std
::
vector
<
PointCloud
<
PointF
>>
left_list
,
right_list
;
base
::
PointF
temp
;
temp
.
x
=
10.
f
;
temp
.
y
=
0.
f
;
...
...
modules/perception/common/geometry/common.h
浏览文件 @
e64051d6
...
...
@@ -217,7 +217,7 @@ Type CalculateIOUBBox(const base::BBox2D<Type> &box1,
template
<
typename
PointT
>
bool
CalculateDistAndDirToSegs
(
const
Eigen
::
Matrix
<
typename
PointT
::
Type
,
3
,
1
>
&
pt
,
const
base
::
Attribute
PointCloud
<
PointT
>
&
segs
,
typename
PointT
::
Type
*
dist
,
const
base
::
PointCloud
<
PointT
>
&
segs
,
typename
PointT
::
Type
*
dist
,
Eigen
::
Matrix
<
typename
PointT
::
Type
,
3
,
1
>
*
dir
)
{
if
(
segs
.
size
()
<
2
)
{
return
false
;
...
...
@@ -283,8 +283,8 @@ bool CalculateDistAndDirToSegs(
template
<
typename
PointT
>
void
CalculateDistAndDirToBoundary
(
const
Eigen
::
Matrix
<
typename
PointT
::
Type
,
3
,
1
>
&
pt
,
const
base
::
Attribute
PointCloud
<
PointT
>
&
left_boundary
,
const
base
::
Attribute
PointCloud
<
PointT
>
&
right_boundary
,
const
base
::
PointCloud
<
PointT
>
&
left_boundary
,
const
base
::
PointCloud
<
PointT
>
&
right_boundary
,
typename
PointT
::
Type
*
dist
,
Eigen
::
Matrix
<
typename
PointT
::
Type
,
3
,
1
>
*
dir
)
{
using
Type
=
typename
PointT
::
Type
;
...
...
@@ -313,8 +313,8 @@ void CalculateDistAndDirToBoundary(
template
<
typename
PointT
>
void
CalculateDistAndDirToBoundary
(
const
Eigen
::
Matrix
<
typename
PointT
::
Type
,
3
,
1
>
&
pt
,
const
std
::
vector
<
base
::
Attribute
PointCloud
<
PointT
>>
&
left_boundary
,
const
std
::
vector
<
base
::
Attribute
PointCloud
<
PointT
>>
&
right_boundary
,
const
std
::
vector
<
base
::
PointCloud
<
PointT
>>
&
left_boundary
,
const
std
::
vector
<
base
::
PointCloud
<
PointT
>>
&
right_boundary
,
typename
PointT
::
Type
*
dist
,
Eigen
::
Matrix
<
typename
PointT
::
Type
,
3
,
1
>
*
dir
)
{
using
Type
=
typename
PointT
::
Type
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录