Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
ed5ad5c0
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,发现更多精彩内容 >>
提交
ed5ad5c0
编写于
12月 10, 2017
作者:
Q
Qi Luo
提交者:
Dong Li
12月 10, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Localization : Simple code cleaning to mute compile warnings
上级
38c35cff
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
25 addition
and
31 deletion
+25
-31
modules/localization/msf/common/util/threadpool.h
modules/localization/msf/common/util/threadpool.h
+3
-3
modules/localization/msf/local_map/lossy_map/lossy_map_matrix_2d.cc
...calization/msf/local_map/lossy_map/lossy_map_matrix_2d.cc
+8
-11
modules/localization/msf/local_tool/map_creation/lossless_map_to_lossy_map.cc
.../msf/local_tool/map_creation/lossless_map_to_lossy_map.cc
+11
-12
modules/localization/msf/msf_localization.cc
modules/localization/msf/msf_localization.cc
+3
-5
未找到文件。
modules/localization/msf/common/util/threadpool.h
浏览文件 @
ed5ad5c0
...
...
@@ -169,10 +169,10 @@ class ThreadPoolImpl : public std::enable_shared_from_this<ThreadPoolImpl> {
public:
/// Constructor.
ThreadPoolImpl
()
:
worker_count_
(
0
),
:
terminate_all_workers_
(
false
),
worker_count_
(
0
),
target_worker_count_
(
0
),
active_worker_count_
(
0
),
terminate_all_workers_
(
false
)
{
active_worker_count_
(
0
)
{
m_scheduler
.
Clear
();
}
...
...
modules/localization/msf/local_map/lossy_map/lossy_map_matrix_2d.cc
浏览文件 @
ed5ad5c0
...
...
@@ -71,7 +71,7 @@ LossyMapMatrix2D::LossyMapMatrix2D(const LossyMapMatrix2D& matrix)
}
}
LossyMapMatrix2D
&
LossyMapMatrix2D
::
operator
=
(
const
LossyMapMatrix2D
&
matrix
)
{
LossyMapMatrix2D
&
LossyMapMatrix2D
::
operator
=
(
const
LossyMapMatrix2D
&
matrix
)
{
Init
(
matrix
.
rows_
,
matrix
.
cols_
);
for
(
unsigned
int
y
=
0
;
y
<
rows_
;
++
y
)
{
for
(
unsigned
int
x
=
0
;
x
<
cols_
;
++
x
)
{
...
...
@@ -143,8 +143,7 @@ uint16_t LossyMapMatrix2D::EncodeVar(const LossyMapCell2D& cell) const {
return
intensity_var
;
}
void
LossyMapMatrix2D
::
DecodeVar
(
uint16_t
data
,
LossyMapCell2D
*
cell
)
const
{
void
LossyMapMatrix2D
::
DecodeVar
(
uint16_t
data
,
LossyMapCell2D
*
cell
)
const
{
float
var
=
data
;
var
=
(
var_range_
/
var
-
1.0
)
/
var_ratio_
;
cell
->
intensity_var
=
var
*
var
;
...
...
@@ -171,8 +170,7 @@ void LossyMapMatrix2D::DecodeAltitudeGround(uint16_t data,
return
;
}
uint16_t
LossyMapMatrix2D
::
EncodeAltitudeAvg
(
const
LossyMapCell2D
&
cell
)
const
{
uint16_t
LossyMapMatrix2D
::
EncodeAltitudeAvg
(
const
LossyMapCell2D
&
cell
)
const
{
float
delta_alt
=
cell
.
altitude
-
alt_avg_min_
;
delta_alt
/=
alt_avg_interval_
;
int
ratio
=
delta_alt
+
0.5
;
...
...
@@ -428,18 +426,17 @@ unsigned int LossyMapMatrix2D::GetBinarySize() const {
unsigned
int
target_size
=
sizeof
(
unsigned
int
)
*
2
+
sizeof
(
float
)
*
4
;
// rows and cols and alts
// count, intensity, intensity_var, altitude_avg, altitude_ground
target_size
+=
rows_
*
cols_
*
(
sizeof
(
unsigned
char
)
+
sizeof
(
unsigned
char
)
+
sizeof
(
uint16_t
)
+
sizeof
(
uint16_t
)
+
sizeof
(
uint16_t
));
target_size
+=
rows_
*
cols_
*
(
sizeof
(
unsigned
char
)
+
sizeof
(
unsigned
char
)
+
sizeof
(
uint16_t
)
+
sizeof
(
uint16_t
)
+
sizeof
(
uint16_t
));
return
target_size
;
}
void
LossyMapMatrix2D
::
GetIntensityImg
(
cv
::
Mat
*
intensity_img
)
const
{
*
intensity_img
=
cv
::
Mat
(
cv
::
Size
(
cols_
,
rows_
),
CV_8UC1
);
for
(
int
y
=
0
;
y
<
rows_
;
++
y
)
{
for
(
int
x
=
0
;
x
<
cols_
;
++
x
)
{
for
(
unsigned
int
y
=
0
;
y
<
rows_
;
++
y
)
{
for
(
unsigned
int
x
=
0
;
x
<
cols_
;
++
x
)
{
unsigned
int
id
=
y
*
cols_
+
x
;
intensity_img
->
at
<
unsigned
char
>
(
y
,
x
)
=
(
unsigned
char
)(
map_cells_
[
id
].
intensity
);
...
...
modules/localization/msf/local_tool/map_creation/lossless_map_to_lossy_map.cc
浏览文件 @
ed5ad5c0
...
...
@@ -52,8 +52,8 @@ MapNodeIndex GetMapIndexFromMapFolder(const std::string& map_folder) {
}
bool
GetAllMapIndex
(
const
std
::
string
&
src_map_folder
,
const
std
::
string
&
dst_map_folder
,
std
::
list
<
MapNodeIndex
>*
buf
)
{
const
std
::
string
&
dst_map_folder
,
std
::
list
<
MapNodeIndex
>*
buf
)
{
std
::
string
src_map_path
=
src_map_folder
+
"/map"
;
std
::
string
dst_map_path
=
dst_map_folder
+
"/map"
;
boost
::
filesystem
::
path
src_map_path_boost
(
src_map_path
);
...
...
@@ -66,7 +66,6 @@ bool GetAllMapIndex(const std::string& src_map_folder,
// push path of map's index to list
buf
->
clear
();
// std::deque<std::string> map_bin_path;
int
index
=
0
;
boost
::
filesystem
::
recursive_directory_iterator
end_iter
;
boost
::
filesystem
::
recursive_directory_iterator
iter
(
src_map_path_boost
);
for
(;
iter
!=
end_iter
;
++
iter
)
{
...
...
@@ -95,17 +94,17 @@ bool GetAllMapIndex(const std::string& src_map_folder,
}
// namespace localization
}
// namespace apollo
using
apollo
::
localization
::
msf
::
MapNodeIndex
;
using
apollo
::
localization
::
msf
::
LossyMapMatrix
;
using
apollo
::
localization
::
msf
::
LossyMapConfig
;
using
apollo
::
localization
::
msf
::
LossyMapNodePool
;
using
apollo
::
localization
::
msf
::
LossyMap
;
using
apollo
::
localization
::
msf
::
LossyMapNode
;
using
apollo
::
localization
::
msf
::
LosslessMapNodePool
;
using
apollo
::
localization
::
msf
::
LosslessMapConfig
;
using
apollo
::
localization
::
msf
::
LosslessMap
;
using
apollo
::
localization
::
msf
::
LosslessMap
Node
;
using
apollo
::
localization
::
msf
::
LosslessMap
Config
;
using
apollo
::
localization
::
msf
::
LosslessMapMatrix
;
using
apollo
::
localization
::
msf
::
LosslessMapNode
;
using
apollo
::
localization
::
msf
::
LosslessMapNodePool
;
using
apollo
::
localization
::
msf
::
LossyMap
;
using
apollo
::
localization
::
msf
::
LossyMapConfig
;
using
apollo
::
localization
::
msf
::
LossyMapMatrix
;
using
apollo
::
localization
::
msf
::
LossyMapNode
;
using
apollo
::
localization
::
msf
::
LossyMapNodePool
;
using
apollo
::
localization
::
msf
::
MapNodeIndex
;
int
main
(
int
argc
,
char
**
argv
)
{
boost
::
program_options
::
options_description
boost_desc
(
"Allowed options"
);
...
...
modules/localization/msf/msf_localization.cc
浏览文件 @
ed5ad5c0
...
...
@@ -29,10 +29,10 @@ namespace apollo {
namespace
localization
{
using
::
Eigen
::
Vector3d
;
using
apollo
::
common
::
Status
;
using
apollo
::
common
::
adapter
::
AdapterManager
;
using
apollo
::
common
::
adapter
::
ImuAdapter
;
using
apollo
::
common
::
monitor
::
MonitorMessageItem
;
using
apollo
::
common
::
Status
;
using
apollo
::
common
::
time
::
Clock
;
MSFLocalization
::
MSFLocalization
()
...
...
@@ -124,15 +124,13 @@ Status MSFLocalization::Init() {
switch
(
state
.
error_code
())
{
case
LocalizationErrorCode
::
INTEG_ERROR
:
return
Status
(
common
::
LOCALIZATION_ERROR_INTEG
,
state
.
error_msg
());
break
;
case
LocalizationErrorCode
::
LIDAR_ERROR
:
return
Status
(
common
::
LOCALIZATION_ERROR_LIDAR
,
state
.
error_msg
());
break
;
case
LocalizationErrorCode
::
GNSS_ERROR
:
return
Status
(
common
::
LOCALIZATION_ERROR_GNSS
,
state
.
error_msg
());
default:
return
Status
::
OK
();
}
return
Status
::
OK
();
}
void
MSFLocalization
::
InitParams
()
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录