Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
4e7c6c0b
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,体验更适合开发者的 AI 搜索 >>
提交
4e7c6c0b
编写于
7月 21, 2020
作者:
J
jmtao
提交者:
Yifei Jiang
7月 21, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
planning: update learning data proto to align with the layout better
上级
ac7a7aa5
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
19 addition
and
16 deletion
+19
-16
modules/planning/common/feature_output.cc
modules/planning/common/feature_output.cc
+6
-5
modules/planning/common/learning_based_data.cc
modules/planning/common/learning_based_data.cc
+6
-5
modules/planning/pipeline/evaluator.cc
modules/planning/pipeline/evaluator.cc
+5
-4
modules/planning/planning_component.cc
modules/planning/planning_component.cc
+1
-1
modules/planning/proto/learning_data.proto
modules/planning/proto/learning_data.proto
+1
-1
未找到文件。
modules/planning/common/feature_output.cc
浏览文件 @
4e7c6c0b
...
...
@@ -41,18 +41,19 @@ bool FeatureOutput::Ready() {
void
FeatureOutput
::
InsertLearningDataFrame
(
const
std
::
string
&
record_file
,
const
LearningDataFrame
&
learning_data_frame
)
{
learning_data_
.
add_learning_data
()
->
CopyFrom
(
learning_data_frame
);
learning_data_
.
add_learning_data
_frame
()
->
CopyFrom
(
learning_data_frame
);
// write frames into a file
if
(
learning_data_
.
learning_data_size
()
>=
if
(
learning_data_
.
learning_data_
frame_
size
()
>=
FLAGS_learning_data_frame_num_per_file
)
{
WriteLearningData
(
record_file
);
}
}
LearningDataFrame
*
FeatureOutput
::
GetLatestLearningDataFrame
()
{
const
int
size
=
learning_data_
.
learning_data_size
();
return
size
>
0
?
learning_data_
.
mutable_learning_data
(
size
-
1
)
:
nullptr
;
const
int
size
=
learning_data_
.
learning_data_frame_size
();
return
size
>
0
?
learning_data_
.
mutable_learning_data_frame
(
size
-
1
)
:
nullptr
;
}
void
FeatureOutput
::
InsertPlanningResult
()
{}
...
...
@@ -72,7 +73,7 @@ void FeatureOutput::WriteLearningData(const std::string& record_file) {
void
FeatureOutput
::
WriteRemainderiLearningData
(
const
std
::
string
&
record_file
)
{
if
(
learning_data_
.
learning_data_size
()
>
0
)
{
if
(
learning_data_
.
learning_data_
frame_
size
()
>
0
)
{
WriteLearningData
(
record_file
);
}
}
...
...
modules/planning/common/learning_based_data.cc
浏览文件 @
4e7c6c0b
...
...
@@ -27,16 +27,17 @@ void LearningBasedData::Clear() {
void
LearningBasedData
::
InsertLearningDataFrame
(
const
LearningDataFrame
&
learning_data_frame
)
{
learning_data_
.
add_learning_data
()
->
CopyFrom
(
learning_data_frame
);
learning_data_
.
add_learning_data
_frame
()
->
CopyFrom
(
learning_data_frame
);
while
(
learning_data_
.
learning_data_size
()
>
10
)
{
learning_data_
.
mutable_learning_data
()
->
DeleteSubrange
(
0
,
1
);
while
(
learning_data_
.
learning_data_
frame_
size
()
>
10
)
{
learning_data_
.
mutable_learning_data
_frame
()
->
DeleteSubrange
(
0
,
1
);
}
}
LearningDataFrame
*
LearningBasedData
::
GetLatestLearningDataFrame
()
{
const
int
size
=
learning_data_
.
learning_data_size
();
return
size
>
0
?
learning_data_
.
mutable_learning_data
(
size
-
1
)
:
nullptr
;
const
int
size
=
learning_data_
.
learning_data_frame_size
();
return
size
>
0
?
learning_data_
.
mutable_learning_data_frame
(
size
-
1
)
:
nullptr
;
}
}
// namespace planning
...
...
modules/planning/pipeline/evaluator.cc
浏览文件 @
4e7c6c0b
...
...
@@ -54,8 +54,8 @@ void Evaluator::Evaluate(const std::string& source_file) {
cyber
::
common
::
GetProtoFromFile
(
source_file
,
&
learning_data_
);
for
(
int
i
=
0
;
i
<
learning_data_
.
learning_data_size
();
++
i
)
{
auto
learning_data_frame
=
learning_data_
.
mutable_learning_data
(
i
);
for
(
int
i
=
0
;
i
<
learning_data_
.
learning_data_
frame_
size
();
++
i
)
{
auto
learning_data_frame
=
learning_data_
.
mutable_learning_data
_frame
(
i
);
if
(
learning_data_frame
->
adc_trajectory_point_size
()
<=
0
)
{
continue
;
}
...
...
@@ -72,14 +72,15 @@ void Evaluator::Evaluate(const std::string& source_file) {
// evaluate adc future trajectory
std
::
vector
<
TrajectoryPointFeature
>
adc_future_trajectory
;
for
(
const
auto
&
tp
:
learning_data_
.
learning_data
(
i
)
for
(
const
auto
&
tp
:
learning_data_
.
learning_data
_frame
(
i
)
.
output
()
.
adc_future_trajectory_point
())
{
adc_future_trajectory
.
push_back
(
tp
);
}
std
::
vector
<
TrajectoryPointFeature
>
evaluated_adc_future_trajectory
;
trajectory_evaluator_
.
EvaluateADCFutureTrajectory
(
learning_data_
.
learning_data
(
i
).
frame_num
(),
adc_future_trajectory
,
learning_data_
.
learning_data_frame
(
i
).
frame_num
(),
adc_future_trajectory
,
start_point_timestamp_sec
,
FLAGS_trajectory_delta_t
,
&
evaluated_adc_future_trajectory
);
learning_data_frame
->
mutable_output
()
->
clear_adc_future_trajectory_point
();
...
...
modules/planning/planning_component.cc
浏览文件 @
4e7c6c0b
...
...
@@ -175,7 +175,7 @@ bool PlanningComponent::Proc(
injector_
->
learning_based_data
()
->
GetLatestLearningDataFrame
();
if
(
learning_data_frame
)
{
planning_learning_data
.
mutable_learning_data
()
->
add_learning_data
()
->
add_learning_data
_frame
()
->
CopyFrom
(
*
learning_data_frame
);
common
::
util
::
FillHeader
(
node_
->
Name
(),
&
planning_learning_data
);
planning_learning_data_writer_
->
Write
(
planning_learning_data
);
...
...
modules/planning/proto/learning_data.proto
浏览文件 @
4e7c6c0b
...
...
@@ -229,7 +229,7 @@ message LearningDataFrame {
}
message
LearningData
{
repeated
LearningDataFrame
learning_data
=
1
;
repeated
LearningDataFrame
learning_data
_frame
=
1
;
}
message
PlanningLearningData
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录