Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
9db10404
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,发现更多精彩内容 >>
提交
9db10404
编写于
9月 13, 2018
作者:
Y
Yajia Zhang
提交者:
Kecheng Xu
9月 13, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
prediction: code refactor on prediction component
上级
61011dc2
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
11 addition
and
10 deletion
+11
-10
modules/prediction/prediction_component.cc
modules/prediction/prediction_component.cc
+4
-5
modules/prediction/prediction_component.h
modules/prediction/prediction_component.h
+3
-1
modules/prediction/util/data_extraction.cc
modules/prediction/util/data_extraction.cc
+2
-2
modules/prediction/util/data_extraction.h
modules/prediction/util/data_extraction.h
+2
-2
未找到文件。
modules/prediction/prediction_component.cc
浏览文件 @
9db10404
...
...
@@ -23,8 +23,6 @@
#include "boost/filesystem.hpp"
#include "boost/range/iterator_range.hpp"
// #include "rosbag/bag.h"
// #include "rosbag/view.h"
#include "modules/common/adapters/adapter_gflags.h"
#include "modules/common/math/vec2d.h"
...
...
@@ -87,7 +85,8 @@ std::string PredictionComponent::Name() const {
// }
// bag.close();
// }
void
PredictionComponent
::
ProcessRosbag
(
const
std
::
string
&
filename
)
{
void
PredictionComponent
::
ProcessOfflineData
(
const
std
::
string
&
filename
)
{
// TODO(all) implement
}
...
...
@@ -154,14 +153,14 @@ bool PredictionComponent::Init() {
apollo
::
common
::
util
::
split
(
FLAGS_prediction_offline_bags
,
':'
,
&
inputs
);
for
(
const
auto
&
input
:
inputs
)
{
std
::
vector
<
std
::
string
>
offline_bags
;
GetDataFiles
(
boost
::
filesystem
::
path
(
input
),
&
offline_bags
);
GetDataFile
Name
s
(
boost
::
filesystem
::
path
(
input
),
&
offline_bags
);
std
::
sort
(
offline_bags
.
begin
(),
offline_bags
.
end
());
AINFO
<<
"For input "
<<
input
<<
", found "
<<
offline_bags
.
size
()
<<
" rosbags to process"
;
for
(
std
::
size_t
i
=
0
;
i
<
offline_bags
.
size
();
++
i
)
{
AINFO
<<
"
\t
Processing: [ "
<<
i
<<
" / "
<<
offline_bags
.
size
()
<<
" ]: "
<<
offline_bags
[
i
];
Process
Rosbag
(
offline_bags
[
i
]);
Process
OfflineData
(
offline_bags
[
i
]);
}
}
Stop
();
...
...
modules/prediction/prediction_component.h
浏览文件 @
9db10404
...
...
@@ -93,11 +93,13 @@ class PredictionComponent :
* @brief process rosbag in offline mode, mainly for extracting prediction
* features.
*/
void
Process
Rosbag
(
const
std
::
string
&
filename
);
void
Process
OfflineData
(
const
std
::
string
&
filename
);
private:
double
start_time_
=
0.0
;
PredictionConf
prediction_conf_
;
common
::
adapter
::
AdapterManagerConfig
adapter_conf_
;
};
...
...
modules/prediction/util/data_extraction.cc
浏览文件 @
9db10404
...
...
@@ -24,7 +24,7 @@
namespace
apollo
{
namespace
prediction
{
void
GetDataFiles
(
const
boost
::
filesystem
::
path
&
p
,
void
GetDataFile
Name
s
(
const
boost
::
filesystem
::
path
&
p
,
std
::
vector
<
std
::
string
>*
bag_files
)
{
CHECK
(
bag_files
);
if
(
!
boost
::
filesystem
::
exists
(
p
))
{
...
...
@@ -41,7 +41,7 @@ void GetDataFiles(const boost::filesystem::path& p,
if
(
boost
::
filesystem
::
is_directory
(
p
))
{
for
(
auto
&
entry
:
boost
::
make_iterator_range
(
boost
::
filesystem
::
directory_iterator
(
p
),
{}))
{
GetDataFiles
(
entry
.
path
(),
bag_files
);
GetDataFile
Name
s
(
entry
.
path
(),
bag_files
);
}
}
}
...
...
modules/prediction/util/data_extraction.h
浏览文件 @
9db10404
...
...
@@ -26,8 +26,8 @@
namespace
apollo
{
namespace
prediction
{
void
GetDataFiles
(
const
boost
::
filesystem
::
path
&
p
,
std
::
vector
<
std
::
string
>*
bag
_files
);
void
GetDataFile
Name
s
(
const
boost
::
filesystem
::
path
&
p
,
std
::
vector
<
std
::
string
>*
data
_files
);
}
// namespace prediction
}
// namespace apollo
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录