Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
e783a95d
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,发现更多精彩内容 >>
提交
e783a95d
编写于
3月 21, 2019
作者:
P
panjiacheng
提交者:
Yajia Zhang
4月 03, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Planning: temporary updates just for running dreamland.
上级
22ac3be0
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
38 addition
and
9 deletion
+38
-9
modules/planning/conf/planning_config.pb.txt
modules/planning/conf/planning_config.pb.txt
+1
-1
modules/planning/conf/scenario/lane_follow_config.pb.txt
modules/planning/conf/scenario/lane_follow_config.pb.txt
+4
-4
modules/planning/scenarios/side_pass/side_pass_scenario.cc
modules/planning/scenarios/side_pass/side_pass_scenario.cc
+1
-0
modules/planning/tasks/deciders/path_assessment_decider.cc
modules/planning/tasks/deciders/path_assessment_decider.cc
+15
-0
modules/planning/tasks/deciders/path_bounds_decider.cc
modules/planning/tasks/deciders/path_bounds_decider.cc
+8
-4
modules/planning/tasks/optimizers/path_decider/path_decider.cc
...es/planning/tasks/optimizers/path_decider/path_decider.cc
+1
-0
modules/planning/tasks/optimizers/piecewise_jerk_path/piecewise_jerk_path_optimizer.cc
...zers/piecewise_jerk_path/piecewise_jerk_path_optimizer.cc
+3
-0
modules/planning/tasks/task_factory.cc
modules/planning/tasks/task_factory.cc
+5
-0
未找到文件。
modules/planning/conf/planning_config.pb.txt
浏览文件 @
e783a95d
...
...
@@ -310,6 +310,6 @@ default_task_config: {
default_task_config: {
task_type: PATH_BOUNDS_DECIDER
path_bounds_decider_config {
is_lane_borrowing:
fals
e
is_lane_borrowing:
tru
e
}
}
modules/planning/conf/scenario/lane_follow_config.pb.txt
浏览文件 @
e783a95d
...
...
@@ -7,7 +7,7 @@ stage_config: {
task_type: PATH_BOUNDS_DECIDER
task_type: PIECEWISE_JERK_PATH_OPTIMIZER
task_type: PATH_ASSESSMENT_DECIDER
task_type: PATH_DECIDER
#
task_type: PATH_DECIDER
task_type: SPEED_BOUNDS_PRIORI_DECIDER
task_type: DP_ST_SPEED_OPTIMIZER
task_type: SPEED_DECIDER
...
...
@@ -27,9 +27,9 @@ stage_config: {
task_config: {
task_type: PATH_ASSESSMENT_DECIDER
}
task_config: {
task_type: PATH_DECIDER
}
#
task_config: {
#
task_type: PATH_DECIDER
#
}
task_config: {
task_type: SPEED_BOUNDS_PRIORI_DECIDER
}
...
...
modules/planning/scenarios/side_pass/side_pass_scenario.cc
浏览文件 @
e783a95d
...
...
@@ -89,6 +89,7 @@ std::unique_ptr<Stage> SidePassScenario::CreateStage(
bool
SidePassScenario
::
IsTransferable
(
const
Scenario
&
target_scenario
,
const
Frame
&
frame
)
{
// Sanity checks.
return
false
;
if
(
frame
.
reference_line_info
().
size
()
>
1
)
{
return
false
;
}
...
...
modules/planning/tasks/deciders/path_assessment_decider.cc
浏览文件 @
e783a95d
...
...
@@ -25,6 +25,8 @@
#include "modules/map/hdmap/hdmap_util.h"
#include "modules/planning/tasks/deciders/path_decider_obstacle_utils.h"
// #define ADEBUG AINFO
namespace
apollo
{
namespace
planning
{
...
...
@@ -50,6 +52,10 @@ Status PathAssessmentDecider::Process(
CHECK_NOTNULL
(
reference_line_info
);
const
auto
&
candidate_path_data
=
reference_line_info
->
GetCandidatePathData
();
if
(
candidate_path_data
.
empty
())
{
ADEBUG
<<
"Candidate path data is empty."
;
}
// Remove invalid path.
std
::
vector
<
PathData
>
valid_path_data
;
for
(
const
auto
&
curr_path_data
:
candidate_path_data
)
{
...
...
@@ -69,6 +75,8 @@ Status PathAssessmentDecider::Process(
const
std
::
string
msg
=
"Neither regular nor fallback path is valid."
;
AERROR
<<
msg
;
return
Status
(
ErrorCode
::
PLANNING_ERROR
,
msg
);
}
else
{
ADEBUG
<<
"There are "
<<
valid_path_data
.
size
()
<<
" valid path data."
;
}
// Analyze and add important info for speed decider to use.
...
...
@@ -76,6 +84,7 @@ Status PathAssessmentDecider::Process(
if
(
curr_path_data
.
path_label
()
==
"fallback"
)
{
continue
;
}
ADEBUG
<<
"Path length = "
<<
curr_path_data
.
frenet_frame_path
().
size
();
SetPathInfo
(
*
reference_line_info
,
&
curr_path_data
);
}
...
...
@@ -89,6 +98,7 @@ Status PathAssessmentDecider::Process(
// in sorting.
return
lhs
.
path_label
()
==
"regular"
;
});
ADEBUG
<<
"Using "
<<
valid_path_data
.
front
().
path_label
()
<<
" path."
;
*
(
reference_line_info
->
mutable_path_data
())
=
valid_path_data
.
front
();
reference_line_info
->
SetBlockingObstacleId
(
valid_path_data
.
front
().
blocking_obstacle_id
());
...
...
@@ -100,14 +110,17 @@ bool PathAssessmentDecider::IsValidRegularPath(
const
ReferenceLineInfo
&
reference_line_info
,
const
PathData
&
path_data
)
{
// Check if the path is greatly off the reference line.
if
(
IsGreatlyOffReferenceLine
(
path_data
))
{
ADEBUG
<<
"Regular Path: ADC is greatly off reference line."
;
return
false
;
}
// Check if the path is greatly off the road.
if
(
IsGreatlyOffRoad
(
reference_line_info
,
path_data
))
{
ADEBUG
<<
"Regular Path: ADC is greatly off road."
;
return
false
;
}
// Check if there is any collision.
if
(
IsCollidingWithStaticObstacles
(
reference_line_info
,
path_data
))
{
ADEBUG
<<
"Regular Path: ADC has collision."
;
return
false
;
}
return
true
;
...
...
@@ -117,10 +130,12 @@ bool PathAssessmentDecider::IsValidFallbackPath(
const
ReferenceLineInfo
&
reference_line_info
,
const
PathData
&
path_data
)
{
// Check if the path is greatly off the reference line.
if
(
IsGreatlyOffReferenceLine
(
path_data
))
{
ADEBUG
<<
"Fallback Path: ADC is greatly off reference line."
;
return
false
;
}
// Check if the path is greatly off the road.
if
(
IsGreatlyOffRoad
(
reference_line_info
,
path_data
))
{
ADEBUG
<<
"Fallback Path: ADC is greatly off road."
;
return
false
;
}
return
true
;
...
...
modules/planning/tasks/deciders/path_bounds_decider.cc
浏览文件 @
e783a95d
...
...
@@ -31,6 +31,8 @@
#include "modules/map/hdmap/hdmap_util.h"
#include "modules/planning/tasks/deciders/path_decider_obstacle_utils.h"
// #define ADEBUG AINFO
namespace
apollo
{
namespace
planning
{
...
...
@@ -52,7 +54,7 @@ constexpr double kPathBoundsDeciderHorizon = 100.0;
constexpr
double
kPathBoundsDeciderResolution
=
0.5
;
constexpr
double
kDefaultLaneWidth
=
5.0
;
constexpr
double
kDefaultRoadWidth
=
20.0
;
constexpr
double
kObstacleSBuffer
=
1
.0
;
constexpr
double
kObstacleSBuffer
=
2
.0
;
constexpr
double
kObstacleLBuffer
=
0.4
;
PathBoundsDecider
::
PathBoundsDecider
(
const
TaskConfig
&
config
)
...
...
@@ -101,8 +103,8 @@ Status PathBoundsDecider::Process(
std
::
vector
<
LaneBorrowInfo
>
lane_borrow_info_list
;
if
(
config
.
path_bounds_decider_config
().
is_lane_borrowing
())
{
// Try borrowing from left and from right neighbor lane.
lane_borrow_info_list
=
{
LaneBorrowInfo
::
LEFT_BORROW
,
LaneBorrowInfo
::
RIGHT_BORROW
};
lane_borrow_info_list
=
{
LaneBorrowInfo
::
LEFT_BORROW
};
//
,
//
LaneBorrowInfo::RIGHT_BORROW};
}
else
{
// Only use self-lane with no lane borrowing
lane_borrow_info_list
=
{
LaneBorrowInfo
::
NO_BORROW
};
...
...
@@ -206,7 +208,7 @@ std::string PathBoundsDecider::GenerateRegularPathBound(
AERROR
<<
msg
;
return
msg
;
}
//
PathBoundsDebugString(*path_bound);
PathBoundsDebugString
(
*
path_bound
);
// 4. Adjust the boundary considering dynamic obstacles
// TODO(all): may need to implement this in the future.
...
...
@@ -318,6 +320,7 @@ bool PathBoundsDecider::GetBoundaryFromLanesAndADC(
hdmap
::
LaneInfoConstPtr
adjacent_lane
=
nullptr
;
if
(
lane_borrow_info
==
LaneBorrowInfo
::
LEFT_BORROW
)
{
// Borrowing left neighbor lane.
ADEBUG
<<
"Borrowing the left lane."
;
if
(
curr_lane
.
left_neighbor_forward_lane_id_size
()
>
0
)
{
adjacent_lane
=
HDMapUtil
::
BaseMapPtr
()
->
GetLaneById
(
curr_lane
.
left_neighbor_forward_lane_id
(
0
));
...
...
@@ -328,6 +331,7 @@ bool PathBoundsDecider::GetBoundaryFromLanesAndADC(
}
}
else
if
(
lane_borrow_info
==
LaneBorrowInfo
::
RIGHT_BORROW
)
{
// Borrowing right neighbor lane.
ADEBUG
<<
"Borrowing the right lane."
;
if
(
curr_lane
.
right_neighbor_forward_lane_id_size
()
>
0
)
{
adjacent_lane
=
HDMapUtil
::
BaseMapPtr
()
->
GetLaneById
(
curr_lane
.
right_neighbor_forward_lane_id
(
0
));
...
...
modules/planning/tasks/optimizers/path_decider/path_decider.cc
浏览文件 @
e783a95d
...
...
@@ -110,6 +110,7 @@ bool PathDecider::MakeStaticObstacleDecision(
if
(
obstacle
->
Id
()
==
blocking_obstacle_id
)
{
// Add stop decision
ADEBUG
<<
"Blocking obstacle = "
<<
blocking_obstacle_id
;
ObjectDecisionType
object_decision
;
*
object_decision
.
mutable_stop
()
=
GenerateObjectStopDecision
(
*
obstacle
);
path_decision
->
AddLongitudinalDecision
(
"PathDecider/blocking_obstacle"
,
...
...
modules/planning/tasks/optimizers/piecewise_jerk_path/piecewise_jerk_path_optimizer.cc
浏览文件 @
e783a95d
...
...
@@ -28,6 +28,8 @@
#include "modules/planning/common/trajectory1d/piecewise_jerk_trajectory1d.h"
#include "modules/planning/math/finite_element_qp/fem_1d_qp_problem.h"
// #define ADEBUG AINFO
namespace
apollo
{
namespace
planning
{
...
...
@@ -54,6 +56,7 @@ common::Status PiecewiseJerkPathOptimizer::Process(
const
auto
&
path_boundaries
=
reference_line_info_
->
GetCandidatePathBoundaries
();
ADEBUG
<<
"There are "
<<
path_boundaries
.
size
()
<<
" path boundaries."
;
std
::
vector
<
PathData
>
candidate_path_data
;
for
(
const
auto
&
path_boundary
:
path_boundaries
)
{
...
...
modules/planning/tasks/task_factory.cc
浏览文件 @
e783a95d
...
...
@@ -29,6 +29,7 @@
#include "modules/planning/tasks/deciders/open_space_roi_decider.h"
#include "modules/planning/tasks/deciders/path_assessment_decider.h"
#include "modules/planning/tasks/deciders/path_bounds_decider.h"
#include "modules/planning/tasks/deciders/path_assessment_decider.h"
#include "modules/planning/tasks/deciders/side_pass_path_decider.h"
#include "modules/planning/tasks/deciders/side_pass_safety.h"
#include "modules/planning/tasks/deciders/speed_bounds_decider/speed_bounds_decider.h"
...
...
@@ -63,6 +64,10 @@ void TaskFactory::Init(const PlanningConfig& config) {
[](
const
TaskConfig
&
config
)
->
Task
*
{
return
new
PathBoundsDecider
(
config
);
});
task_factory_
.
Register
(
TaskConfig
::
PATH_ASSESSMENT_DECIDER
,
[](
const
TaskConfig
&
config
)
->
Task
*
{
return
new
PathAssessmentDecider
(
config
);
});
task_factory_
.
Register
(
TaskConfig
::
PIECEWISE_JERK_PATH_OPTIMIZER
,
[](
const
TaskConfig
&
config
)
->
Task
*
{
return
new
PiecewiseJerkPathOptimizer
(
config
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录