Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
f5aa2078
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,发现更多精彩内容 >>
提交
f5aa2078
编写于
3月 02, 2020
作者:
J
jmtao
提交者:
Yifei Jiang
3月 02, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
planning: add timestamp to every adc trajectory point in learning data
上级
1cb8748a
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
19 addition
and
13 deletion
+19
-13
modules/planning/pipeline/feature_generator.cc
modules/planning/pipeline/feature_generator.cc
+9
-6
modules/planning/pipeline/feature_generator.h
modules/planning/pipeline/feature_generator.h
+1
-1
modules/planning/pipeline/records_to_offline_data.cc
modules/planning/pipeline/records_to_offline_data.cc
+1
-1
modules/planning/proto/learning_data.proto
modules/planning/proto/learning_data.proto
+8
-5
未找到文件。
modules/planning/pipeline/feature_generator.cc
浏览文件 @
f5aa2078
...
...
@@ -135,7 +135,7 @@ void FeatureGenerator::OnPerceptionObstacle(
for
(
const
auto
&
m
:
perception_obstacles_map_
)
{
const
auto
&
perception_obstale
=
m
.
second
;
ObstacleTrajectoryPoint
obstacle_trajectory_point
;
obstacle_trajectory_point
.
set_timestamp
(
perception_obstale
.
timestamp
());
obstacle_trajectory_point
.
set_timestamp
_sec
(
perception_obstale
.
timestamp
());
obstacle_trajectory_point
.
mutable_position
()
->
CopyFrom
(
perception_obstale
.
position
());
obstacle_trajectory_point
.
set_theta
(
perception_obstale
.
theta
());
...
...
@@ -219,7 +219,8 @@ void FeatureGenerator::GenerateObstacleData(
for
(
const
auto
&
obj_traj_point
:
obstacle_history
)
{
auto
obstacle_trajectory_point
=
obstacle_feature
->
add_obstacle_trajectory_point
();
obstacle_trajectory_point
->
set_timestamp
(
obj_traj_point
.
timestamp
());
obstacle_trajectory_point
->
set_timestamp_sec
(
obj_traj_point
.
timestamp_sec
());
// convert position to relative coordinate
const
auto
&
relative_posistion
=
...
...
@@ -272,8 +273,7 @@ void FeatureGenerator::GenerateObstacleData(
}
}
void
FeatureGenerator
::
GenerateTrajectoryPoints
(
void
FeatureGenerator
::
GenerateADCTrajectoryPoints
(
const
std
::
list
<
apollo
::
localization
::
LocalizationEstimate
>&
localization_for_label
,
LearningDataFrame
*
learning_data_frame
)
{
...
...
@@ -287,7 +287,10 @@ void FeatureGenerator::GenerateTrajectoryPoints(
if
((
i
%
localization_sample_interval_for_trajectory_point
)
!=
0
)
{
continue
;
}
auto
trajectory_point
=
learning_data_frame
->
add_trajectory_point
();
auto
adc_trajectory_point
=
learning_data_frame
->
add_adc_trajectory_point
();
adc_trajectory_point
->
set_timestamp_sec
(
le
.
measurement_time
());
auto
trajectory_point
=
adc_trajectory_point
->
mutable_trajectory_point
();
auto
&
pose
=
le
.
pose
();
trajectory_point
->
mutable_path_point
()
->
set_x
(
pose
.
position
().
x
());
trajectory_point
->
mutable_path_point
()
->
set_y
(
pose
.
position
().
y
());
...
...
@@ -346,7 +349,7 @@ void FeatureGenerator::GenerateLearningDataFrame() {
GenerateObstacleData
(
learning_data_frame
);
// add trajectory_points
GenerateTrajectoryPoints
(
localization_for_label_
,
learning_data_frame
);
Generate
ADC
TrajectoryPoints
(
localization_for_label_
,
learning_data_frame
);
}
void
FeatureGenerator
::
ProcessOfflineData
(
const
std
::
string
&
record_filename
)
{
...
...
modules/planning/pipeline/feature_generator.h
浏览文件 @
f5aa2078
...
...
@@ -51,7 +51,7 @@ class FeatureGenerator {
void
GenerateObstacleData
(
LearningDataFrame
*
learning_data_frame
);
void
GenerateTrajectoryPoints
(
void
Generate
ADC
TrajectoryPoints
(
const
std
::
list
<
apollo
::
localization
::
LocalizationEstimate
>&
localization_for_label
,
LearningDataFrame
*
learning_data_frame
);
...
...
modules/planning/pipeline/records_to_offline_data.cc
浏览文件 @
f5aa2078
...
...
@@ -45,7 +45,7 @@ void GenerateDataForLearning() {
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
()
AINFO
<<
"
\t
Processing: [ "
<<
i
+
1
<<
" / "
<<
offline_bags
.
size
()
<<
" ]: "
<<
offline_bags
[
i
];
feature_generator
.
ProcessOfflineData
(
offline_bags
[
i
]);
}
...
...
modules/planning/proto/learning_data.proto
浏览文件 @
f5aa2078
...
...
@@ -53,7 +53,7 @@ message LocalizationFeature {
}
message
ObstacleTrajectoryPoint
{
optional
double
timestamp
=
1
;
// GPS time in seconds.
optional
double
timestamp
_sec
=
1
;
// obstacle position in the OBJECT coordinate system
optional
apollo.common.Point3D
position
=
2
;
...
...
@@ -89,12 +89,15 @@ message TrafficLightFeature {
optional
apollo.perception.TrafficLight.Color
color
=
2
;
}
message
ADCTrajectoryPoint
{
optional
double
timestamp_sec
=
1
;
// localization measurement_time
optional
apollo.common.TrajectoryPoint
trajectory_point
=
2
;
}
message
LearningDataFrame
{
//
M
essage publishing time in seconds.
//
localization m
essage publishing time in seconds.
optional
double
timestamp_sec
=
1
;
// Sequence number for each frame
// sequence_num, always starting from 1.
optional
uint32
frame_num
=
2
;
// Features from chassis
...
...
@@ -113,7 +116,7 @@ message LearningDataFrame {
repeated
TrafficLightFeature
traffic_light
=
7
;
// ADC ground-truth label trajectory
repeated
apollo.common.TrajectoryPoint
trajectory_point
=
8
;
repeated
ADCTrajectoryPoint
adc_
trajectory_point
=
8
;
}
message
LearningData
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录