Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
63abf1ec
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,发现更多精彩内容 >>
提交
63abf1ec
编写于
2月 21, 2018
作者:
D
Dong Li
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
build: fix compile warnings
上级
d14c36a6
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
14 addition
and
16 deletion
+14
-16
modules/localization/msf/local_map/base_map/base_map_cache.h
modules/localization/msf/local_map/base_map/base_map_cache.h
+6
-12
modules/perception/obstacle/common/geometry_util.h
modules/perception/obstacle/common/geometry_util.h
+2
-2
modules/perception/onboard/common_shared_data.h
modules/perception/onboard/common_shared_data.h
+2
-1
modules/perception/tool/data_generator/velodyne64.cc
modules/perception/tool/data_generator/velodyne64.cc
+4
-1
未找到文件。
modules/localization/msf/local_map/base_map/base_map_cache.h
浏览文件 @
63abf1ec
...
...
@@ -59,20 +59,16 @@ class LRUCache {
/**@brief Change cache's max capacity. New capacity must be larger than size
* in use. */
bool
ChangeCapacity
(
int
capacity
)
{
if
(
list_
.
size
(
)
>
capacity
)
{
if
(
static_cast
<
int
>
(
list_
.
size
()
)
>
capacity
)
{
return
false
;
}
capacity_
=
capacity
;
return
true
;
}
/**@brief return cache's in use. */
int
Size
()
{
return
list_
.
size
();
}
int
Size
()
{
return
list_
.
size
();
}
/**@brief return cache's max capacity. */
int
Capacity
()
{
return
capacity_
;
}
int
Capacity
()
{
return
capacity_
;
}
protected:
/**@brief do something before remove a element from cache.
...
...
@@ -123,7 +119,7 @@ Element *LRUCache<Key, Element>::Put(const Key &key, Element *value) {
return
node_remove
;
}
// reached capacity, remove value in list, remove key in map
if
(
map_
.
size
(
)
>=
capacity_
)
{
if
(
static_cast
<
int
>
(
map_
.
size
()
)
>=
capacity_
)
{
node_remove
=
ClearOne
();
// ListReverseIterator ritr = list_.rbegin();
// while(ritr != list_.rend()) {
...
...
@@ -136,7 +132,7 @@ Element *LRUCache<Key, Element>::Put(const Key &key, Element *value) {
// ++ritr;
// }
}
if
(
map_
.
size
(
)
>=
capacity_
)
{
if
(
static_cast
<
int
>
(
map_
.
size
()
)
>=
capacity_
)
{
std
::
cout
<<
"LRUCache Warning: the cache size is temporarily increased!"
<<
std
::
endl
;
}
...
...
@@ -223,9 +219,7 @@ class MapNodeCacheL2 : public LRUCache<Key, MapNode> {
* Return true if the element can be removed. Return false if the element
* can't be removed. Then the cache will try to find another element to
* remove. */
virtual
bool
Destroy
(
MapNode
**
value
)
{
return
!
((
*
value
)
->
GetIsReserved
());
}
virtual
bool
Destroy
(
MapNode
**
value
)
{
return
!
((
*
value
)
->
GetIsReserved
());
}
};
}
// namespace msf
...
...
modules/perception/obstacle/common/geometry_util.h
浏览文件 @
63abf1ec
...
...
@@ -33,7 +33,7 @@ namespace perception {
template
<
typename
PointT
>
void
TransformPointCloud
(
const
Eigen
::
Matrix4d
&
trans_mat
,
pcl
::
PointCloud
<
PointT
>*
cloud_in_out
)
{
for
(
in
t
i
=
0
;
i
<
cloud_in_out
->
size
();
++
i
)
{
for
(
std
::
size_
t
i
=
0
;
i
<
cloud_in_out
->
size
();
++
i
)
{
PointT
&
p
=
cloud_in_out
->
at
(
i
);
Eigen
::
Vector4d
v
(
p
.
x
,
p
.
y
,
p
.
z
,
1
);
v
=
trans_mat
*
v
;
...
...
@@ -68,7 +68,7 @@ void TransformPointCloud(const pcl::PointCloud<PointType>& cloud_in,
if
(
cloud_out
->
points
.
size
()
<
cloud_in
.
points
.
size
())
{
cloud_out
->
points
.
resize
(
cloud_in
.
points
.
size
());
}
for
(
in
t
i
=
0
;
i
<
cloud_in
.
size
();
++
i
)
{
for
(
std
::
size_
t
i
=
0
;
i
<
cloud_in
.
size
();
++
i
)
{
const
PointType
&
p
=
cloud_in
.
at
(
i
);
Eigen
::
Vector4d
v
(
p
.
x
,
p
.
y
,
p
.
z
,
1
);
v
=
trans_mat
*
v
;
...
...
modules/perception/onboard/common_shared_data.h
浏览文件 @
63abf1ec
...
...
@@ -154,7 +154,8 @@ void CommonSharedData<M>::RemoveStaleData() {
bool
has_change
=
false
;
for
(
auto
iter
=
data_added_time_map_
.
begin
();
iter
!=
data_added_time_map_
.
end
();)
{
if
(
now
-
iter
->
second
>
FLAGS_shared_data_stale_time
)
{
if
(
now
-
iter
->
second
>
static_cast
<
uint64_t
>
(
FLAGS_shared_data_stale_time
))
{
const
size_t
erase_cnt
=
data_map_
.
erase
(
iter
->
first
);
if
(
erase_cnt
!=
1u
)
{
AWARN
<<
"_data_map erase cnt:"
<<
erase_cnt
<<
" key:"
<<
iter
->
first
;
...
...
modules/perception/tool/data_generator/velodyne64.cc
浏览文件 @
63abf1ec
...
...
@@ -20,6 +20,8 @@
#include "modules/perception/tool/data_generator/velodyne64.h"
#include <cmath>
namespace
apollo
{
namespace
perception
{
namespace
data_generator
{
...
...
@@ -92,7 +94,8 @@ void Velodyne64::TransPointCloudMsgToPCL(
size_t
points_num
=
0
;
for
(
size_t
i
=
0
;
i
<
in_cloud
.
size
();
++
i
)
{
pcl_util
::
PointXYZIT
&
pt
=
in_cloud
.
points
[
i
];
if
(
!
isnan
(
pt
.
x
)
&&
!
isnan
(
pt
.
y
)
&&
!
isnan
(
pt
.
z
)
&&
!
isnan
(
pt
.
intensity
))
{
if
(
!
std
::
isnan
(
pt
.
x
)
&&
!
std
::
isnan
(
pt
.
y
)
&&
!
std
::
isnan
(
pt
.
z
)
&&
!
std
::
isnan
(
pt
.
intensity
))
{
cloud
->
points
[
points_num
].
x
=
pt
.
x
;
cloud
->
points
[
points_num
].
y
=
pt
.
y
;
cloud
->
points
[
points_num
].
z
=
pt
.
z
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录