Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
2873e308
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,发现更多精彩内容 >>
提交
2873e308
编写于
9月 07, 2017
作者:
F
FangzhenLi-hust
提交者:
weidezhang
9月 07, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
perception/lidar/common bug fix (#1590)
* perception/lidar/common bug fix * fix coding style
上级
996cbe4d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
22 addition
and
14 deletion
+22
-14
modules/perception/obstacle/common/convex_hullxy.h
modules/perception/obstacle/common/convex_hullxy.h
+6
-1
modules/perception/obstacle/common/disjoint_set_test.cc
modules/perception/obstacle/common/disjoint_set_test.cc
+2
-2
modules/perception/obstacle/common/pose_util.cc
modules/perception/obstacle/common/pose_util.cc
+14
-11
未找到文件。
modules/perception/obstacle/common/convex_hullxy.h
浏览文件 @
2873e308
...
...
@@ -87,6 +87,12 @@ class ConvexHull2DXY : public pcl::ConvexHull<PointInT> {
// Array of coordinates for each point
coordT
*
points
=
reinterpret_cast
<
coordT
*>
(
calloc
(
indices_
->
size
()
*
dimension
,
sizeof
(
coordT
)));
if
(
points
==
NULL
)
{
hull
->
points
.
resize
(
0
);
hull
->
width
=
hull
->
height
=
0
;
polygons
->
resize
(
0
);
return
;
}
// Build input data, using appropriate projection
int
j
=
0
;
...
...
@@ -121,7 +127,6 @@ class ConvexHull2DXY : public pcl::ConvexHull<PointInT> {
qh_freeqhull
(
!
qh_ALL
);
int
curlong
,
totlong
;
qh_memfreeshort
(
&
curlong
,
&
totlong
);
return
;
}
...
...
modules/perception/obstacle/common/disjoint_set_test.cc
浏览文件 @
2873e308
...
...
@@ -35,11 +35,11 @@ class DisjointSetTest : public testing::Test {
_node1
=
nullptr
;
}
if
(
_node2
!=
nullptr
)
{
delete
_node
1
;
delete
_node
2
;
_node2
=
nullptr
;
}
if
(
_node3
!=
nullptr
)
{
delete
_node
1
;
delete
_node
3
;
_node3
=
nullptr
;
}
}
...
...
modules/perception/obstacle/common/pose_util.cc
浏览文件 @
2873e308
...
...
@@ -15,17 +15,16 @@
*****************************************************************************/
#include "modules/perception/obstacle/common/pose_util.h"
#include "modules/common/log.h"
namespace
apollo
{
namespace
perception
{
bool
ReadPoseFile
(
const
std
::
string
&
filename
,
Eigen
::
Matrix4d
*
pose
,
int
*
frame_id
,
double
*
time_stamp
)
{
bool
ReadPoseFile
(
const
std
::
string
&
filename
,
Eigen
::
Matrix4d
*
pose
,
int
*
frame_id
,
double
*
time_stamp
)
{
std
::
ifstream
ifs
(
filename
.
c_str
());
if
(
!
ifs
.
is_open
())
{
std
::
cerr
<<
"Failed to open file "
<<
filename
<<
std
::
endl
;
AERROR
<<
"Failed to open file "
<<
filename
;
return
false
;
}
char
buffer
[
1024
];
...
...
@@ -34,12 +33,16 @@ bool ReadPoseFile(const std::string& filename,
double
time_samp
=
0
;
double
quat
[
4
];
double
matrix3x3
[
9
];
double
&
pose03
=
(
*
pose
)(
0
,
3
);
double
&
pose13
=
(
*
pose
)(
1
,
3
);
double
&
pose23
=
(
*
pose
)(
2
,
3
);
sscanf
(
buffer
,
"%d %lf %lf %lf %lf %lf %lf %lf %lf"
,
&
id
,
&
(
time_samp
),
&
pose03
,
&
pose13
,
&
pose23
,
&
(
quat
[
0
]),
&
(
quat
[
1
]),
&
(
quat
[
2
]),
&
(
quat
[
3
]));
double
&
pose03
=
(
*
pose
)(
0
,
3
);
double
&
pose13
=
(
*
pose
)(
1
,
3
);
double
&
pose23
=
(
*
pose
)(
2
,
3
);
int
ret
=
sscanf
(
buffer
,
"%d %lf %lf %lf %lf %lf %lf %lf %lf"
,
&
id
,
&
(
time_samp
),
&
pose03
,
&
pose13
,
&
pose23
,
&
(
quat
[
0
]),
&
(
quat
[
1
]),
&
(
quat
[
2
]),
&
(
quat
[
3
]));
if
(
ret
!=
9
)
{
AERROR
<<
"Failed to scan parameters."
;
return
false
;
}
QuaternionToRotationMatrix
<
double
>
(
quat
,
matrix3x3
);
for
(
int
i
=
0
;
i
<
3
;
++
i
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录