Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
ac502568
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,发现更多精彩内容 >>
提交
ac502568
编写于
7月 27, 2017
作者:
J
Jiangtao Hu
提交者:
Yifei Jiang
7月 27, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
record planning input into debug pb.
上级
754a4d9e
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
40 addition
and
2 deletion
+40
-2
modules/planning/common/planning_gflags.cc
modules/planning/common/planning_gflags.cc
+2
-0
modules/planning/common/planning_gflags.h
modules/planning/common/planning_gflags.h
+2
-0
modules/planning/planning.cc
modules/planning/planning.cc
+25
-1
modules/planning/planning.h
modules/planning/planning.h
+1
-0
modules/planning/proto/BUILD
modules/planning/proto/BUILD
+1
-0
modules/planning/proto/planning_internal.proto
modules/planning/proto/planning_internal.proto
+9
-1
未找到文件。
modules/planning/common/planning_gflags.cc
浏览文件 @
ac502568
...
...
@@ -311,3 +311,5 @@ DEFINE_double(backward_routing_distance, 100.0,
"The backward routing distance."
);
DEFINE_double
(
decision_valid_stop_range
,
0.5
,
"The valid stop range in decision."
);
DEFINE_bool
(
enable_record_debug
,
true
,
"True to enable record debug into debug protobuf."
);
modules/planning/common/planning_gflags.h
浏览文件 @
ac502568
...
...
@@ -214,4 +214,6 @@ DECLARE_string(offline_routing_file);
DECLARE_double
(
backward_routing_distance
);
DECLARE_double
(
decision_valid_stop_range
);
DECLARE_bool
(
enable_record_debug
);
#endif // MODULES_PLANNING_COMMON_PLANNING_GFLAGS_H_
modules/planning/planning.cc
浏览文件 @
ac502568
...
...
@@ -105,6 +105,28 @@ Status Planning::Start() {
return
Status
::
OK
();
}
void
Planning
::
RecordInput
(
ADCTrajectory
*
trajectory_pb
)
{
if
(
!
FLAGS_enable_record_debug
)
{
ADEBUG
<<
"Skip record input into debug"
;
return
;
}
auto
planning_data
=
trajectory_pb
->
mutable_debug
()
->
mutable_planning_data
();
auto
adc_position
=
planning_data
->
mutable_adc_position
();
const
auto
&
localization
=
AdapterManager
::
GetLocalization
()
->
GetLatestObserved
();
adc_position
->
CopyFrom
(
localization
);
const
auto
&
chassis
=
AdapterManager
::
GetChassis
()
->
GetLatestObserved
();
auto
debug_chassis
=
planning_data
->
mutable_chassis
();
debug_chassis
->
CopyFrom
(
chassis
);
const
auto
&
routing_result
=
AdapterManager
::
GetRoutingResult
()
->
GetLatestObserved
();
auto
debug_routing
=
planning_data
->
mutable_routing
();
debug_routing
->
CopyFrom
(
routing_result
);
}
void
Planning
::
RunOnce
()
{
AdapterManager
::
Observe
();
if
(
AdapterManager
::
GetLocalization
()
->
Empty
())
{
...
...
@@ -139,13 +161,15 @@ void Planning::RunOnce() {
apollo
::
common
::
time
::
ToSecond
(
apollo
::
common
::
time
::
Clock
::
Now
())
+
planning_cycle_time
;
ADCTrajectory
trajectory_pb
;
RecordInput
(
&
trajectory_pb
);
if
(
!
DataCenter
::
instance
()
->
init_current_frame
(
AdapterManager
::
GetPlanning
()
->
GetSeqNum
()
+
1
))
{
AERROR
<<
"DataCenter init frame failed"
;
return
;
}
ADCTrajectory
trajectory_pb
;
bool
is_auto_mode
=
chassis
.
driving_mode
()
==
chassis
.
COMPLETE_AUTO_DRIVE
;
bool
res_planning
=
Plan
(
is_auto_mode
,
execution_start_time
,
&
trajectory_pb
);
if
(
res_planning
)
{
...
...
modules/planning/planning.h
浏览文件 @
ac502568
...
...
@@ -86,6 +86,7 @@ class Planning : public apollo::common::ApolloApp {
private:
void
RegisterPlanners
();
void
RunOnce
();
void
RecordInput
(
ADCTrajectory
*
trajectory_pb
);
std
::
pair
<
common
::
TrajectoryPoint
,
std
::
uint32_t
>
ComputeStartingPointFromLastTrajectory
(
const
double
curr_time
)
const
;
...
...
modules/planning/proto/BUILD
浏览文件 @
ac502568
...
...
@@ -21,6 +21,7 @@ cc_proto_library(
"//modules/common/proto:path_point_proto"
,
"//modules/decision/proto:decision_proto"
,
"//modules/localization/proto:localization_proto"
,
"//modules/map/proto:map_proto"
,
"//modules/perception/proto:perception_proto"
,
"//modules/prediction/proto:prediction_proto"
,
],
...
...
modules/planning/proto/planning_internal.proto
浏览文件 @
ac502568
...
...
@@ -2,11 +2,13 @@ syntax = "proto2";
package
apollo
.
planning_internal
;
import
"modules/canbus/proto/chassis.proto"
;
import
"modules/common/proto/header.proto"
;
import
"modules/common/proto/error_code.proto"
;
import
"modules/common/proto/path_point.proto"
;
import
"modules/localization/proto/localization.proto"
;
import
"modules/localization/proto/pose.proto"
;
import
"modules/map/proto/routing.proto"
;
import
"modules/perception/proto/perception_obstacle.proto"
;
import
"modules/planning/proto/decision.proto"
;
import
"modules/prediction/proto/prediction_obstacle.proto"
;
...
...
@@ -85,9 +87,15 @@ message PathDebug {
optional
apollo.common.Path
path
=
2
;
}
// next id:
7
// next id:
10
message
PlanningData
{
optional
apollo.common.Header
header
=
1
;
// input
optional
apollo.localization.LocalizationEstimate
adc_position
=
7
;
optional
apollo.canbus.Chassis
chassis
=
8
;
optional
apollo.hdmap.RoutingResult
routing
=
9
;
optional
apollo.localization.Pose
init_status
=
2
;
// initial status of adc
// processed planning_obstacles
repeated
PlanningObstacle
planning_obstacle
=
4
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录