Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
c4ff1f45
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,发现更多精彩内容 >>
提交
c4ff1f45
编写于
5月 16, 2019
作者:
Y
Yajia Zhang
提交者:
Calvin Miao
5月 20, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
planning: deprecate some gflags
上级
81ed6350
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
30 addition
and
51 deletion
+30
-51
modules/planning/common/planning_gflags.cc
modules/planning/common/planning_gflags.cc
+1
-8
modules/planning/common/planning_gflags.h
modules/planning/common/planning_gflags.h
+1
-5
modules/planning/common/trajectory1d/constant_deceleration_trajectory1d.cc
...common/trajectory1d/constant_deceleration_trajectory1d.cc
+1
-1
modules/planning/common/trajectory1d/constant_jerk_trajectory1d.cc
...lanning/common/trajectory1d/constant_jerk_trajectory1d.cc
+2
-2
modules/planning/common/trajectory1d/piecewise_acceleration_trajectory1d.cc
...ommon/trajectory1d/piecewise_acceleration_trajectory1d.cc
+2
-2
modules/planning/common/trajectory1d/piecewise_jerk_trajectory1d.cc
...anning/common/trajectory1d/piecewise_jerk_trajectory1d.cc
+2
-2
modules/planning/conf/planning.conf
modules/planning/conf/planning.conf
+0
-3
modules/planning/integration_tests/garage_test.cc
modules/planning/integration_tests/garage_test.cc
+0
-2
modules/planning/integration_tests/planning_test_base.cc
modules/planning/integration_tests/planning_test_base.cc
+0
-2
modules/planning/integration_tests/sunnyvale_big_loop_test.cc
...les/planning/integration_tests/sunnyvale_big_loop_test.cc
+0
-2
modules/planning/integration_tests/sunnyvale_loop_test.cc
modules/planning/integration_tests/sunnyvale_loop_test.cc
+0
-1
modules/planning/lattice/behavior/path_time_graph.cc
modules/planning/lattice/behavior/path_time_graph.cc
+8
-8
modules/planning/lattice/trajectory_generation/end_condition_sampler.cc
...ng/lattice/trajectory_generation/end_condition_sampler.cc
+2
-2
modules/planning/lattice/trajectory_generation/trajectory_combiner.cc
...ning/lattice/trajectory_generation/trajectory_combiner.cc
+2
-2
modules/planning/lattice/trajectory_generation/trajectory_evaluator.cc
...ing/lattice/trajectory_generation/trajectory_evaluator.cc
+9
-9
未找到文件。
modules/planning/common/planning_gflags.cc
浏览文件 @
c4ff1f45
...
...
@@ -73,8 +73,6 @@ DEFINE_bool(enable_scenario_bare_intersection, false,
DEFINE_bool
(
enable_scenario_pull_over
,
false
,
"enable side pass scenario in planning"
);
DEFINE_bool
(
enable_scenario_side_pass
,
true
,
"enable side pass scenario in planning"
);
DEFINE_double
(
side_pass_min_signal_intersection_distance
,
50.0
,
"meter, for intersection has signal, ADC will enter side pass "
"scenario only when it is farther than this threshoold"
);
...
...
@@ -331,14 +329,11 @@ DEFINE_uint32(max_planning_thread_pool_size, 15,
"num of thread used in planning thread pool."
);
DEFINE_bool
(
use_multi_thread_to_add_obstacles
,
false
,
"use multiple thread to add obstacles."
);
DEFINE_bool
(
enable_multi_thread_in_dp_poly_path
,
false
,
"Enable multiple thread to calculation curve cost in dp_poly_path."
);
DEFINE_bool
(
enable_multi_thread_in_dp_st_graph
,
false
,
"Enable multiple thread to calculation curve cost in dp_st_graph."
);
/// Lattice Planner
DEFINE_double
(
lattice
_epsilon
,
1e-6
,
"Epsilon in lattice planner."
);
DEFINE_double
(
numerical
_epsilon
,
1e-6
,
"Epsilon in lattice planner."
);
DEFINE_double
(
default_cruise_speed
,
5.0
,
"default cruise speed"
);
DEFINE_bool
(
enable_auto_tuning
,
false
,
"enable auto tuning data emission"
);
DEFINE_double
(
trajectory_time_resolution
,
0.1
,
...
...
@@ -502,8 +497,6 @@ DEFINE_bool(
enable_parallel_trajectory_smoothing
,
false
,
"Whether to partition the trajectory first and do smoothing in parallel"
);
DEFINE_bool
(
use_osqp_optimizer_for_qp_st
,
false
,
"Use OSQP optimizer for QpSt speed optimization."
);
DEFINE_bool
(
use_osqp_optimizer_for_reference_line
,
true
,
"Use OSQP optimizer for reference line optimization."
);
DEFINE_bool
(
enable_osqp_debug
,
false
,
...
...
modules/planning/common/planning_gflags.h
浏览文件 @
c4ff1f45
...
...
@@ -38,7 +38,6 @@ DECLARE_string(scenario_valet_parking_config_file);
DECLARE_bool
(
enable_scenario_bare_intersection
);
DECLARE_bool
(
enable_scenario_pull_over
);
DECLARE_bool
(
enable_scenario_side_pass
);
DECLARE_double
(
side_pass_min_signal_intersection_distance
);
DECLARE_bool
(
enable_scenario_side_pass_multiple_parked_obstacles
);
DECLARE_bool
(
enable_scenario_stop_sign
);
...
...
@@ -162,11 +161,9 @@ DECLARE_bool(enable_sqp_solver);
/// thread pool
DECLARE_uint32
(
max_planning_thread_pool_size
);
DECLARE_bool
(
use_multi_thread_to_add_obstacles
);
DECLARE_bool
(
enable_multi_thread_in_dp_poly_path
);
DECLARE_bool
(
enable_multi_thread_in_dp_st_graph
);
// lattice planner
DECLARE_double
(
lattice_epsilon
);
DECLARE_double
(
numerical_epsilon
);
DECLARE_double
(
default_cruise_speed
);
DECLARE_bool
(
enable_auto_tuning
);
...
...
@@ -248,7 +245,6 @@ DECLARE_double(destination_to_adc_buffer);
DECLARE_double
(
destination_to_pathend_buffer
);
DECLARE_double
(
pull_over_road_edge_buffer
);
DECLARE_bool
(
use_osqp_optimizer_for_qp_st
);
DECLARE_bool
(
use_osqp_optimizer_for_reference_line
);
DECLARE_bool
(
enable_osqp_debug
);
DECLARE_bool
(
export_chart
);
...
...
modules/planning/common/trajectory1d/constant_deceleration_trajectory1d.cc
浏览文件 @
c4ff1f45
...
...
@@ -31,7 +31,7 @@ namespace planning {
ConstantDecelerationTrajectory1d
::
ConstantDecelerationTrajectory1d
(
const
double
init_s
,
const
double
init_v
,
const
double
a
)
:
init_s_
(
init_s
),
init_v_
(
init_v
),
deceleration_
(
-
a
)
{
if
(
init_v_
<
-
FLAGS_
lattice
_epsilon
)
{
if
(
init_v_
<
-
FLAGS_
numerical
_epsilon
)
{
AERROR
<<
"negative init v = "
<<
init_v_
;
}
init_v_
=
std
::
fabs
(
init_v_
);
...
...
modules/planning/common/trajectory1d/constant_jerk_trajectory1d.cc
浏览文件 @
c4ff1f45
...
...
@@ -32,7 +32,7 @@ ConstantJerkTrajectory1d::ConstantJerkTrajectory1d(const double p0,
const
double
j
,
const
double
param
)
:
p0_
(
p0
),
v0_
(
v0
),
a0_
(
a0
),
param_
(
param
),
jerk_
(
j
)
{
CHECK_GT
(
param
,
FLAGS_
lattice
_epsilon
);
CHECK_GT
(
param
,
FLAGS_
numerical
_epsilon
);
p1_
=
Evaluate
(
0
,
param_
);
v1_
=
Evaluate
(
1
,
param_
);
a1_
=
Evaluate
(
2
,
param_
);
...
...
@@ -40,7 +40,7 @@ ConstantJerkTrajectory1d::ConstantJerkTrajectory1d(const double p0,
double
ConstantJerkTrajectory1d
::
Evaluate
(
const
std
::
uint32_t
order
,
const
double
param
)
const
{
CHECK_GT
(
param
,
-
FLAGS_
lattice
_epsilon
);
CHECK_GT
(
param
,
-
FLAGS_
numerical
_epsilon
);
switch
(
order
)
{
case
0
:
{
return
p0_
+
v0_
*
param
+
0.5
*
a0_
*
param
*
param
+
...
...
modules/planning/common/trajectory1d/piecewise_acceleration_trajectory1d.cc
浏览文件 @
c4ff1f45
...
...
@@ -45,13 +45,13 @@ void PiecewiseAccelerationTrajectory1d::AppendSegment(const double a,
double
t0
=
t_
.
back
();
double
v1
=
v0
+
a
*
t_duration
;
CHECK
(
v1
>=
-
FLAGS_
lattice
_epsilon
);
CHECK
(
v1
>=
-
FLAGS_
numerical
_epsilon
);
double
delta_s
=
(
v0
+
v1
)
*
t_duration
*
0.5
;
double
s1
=
s0
+
delta_s
;
double
t1
=
t0
+
t_duration
;
CHECK
(
s1
>=
s0
-
FLAGS_
lattice
_epsilon
);
CHECK
(
s1
>=
s0
-
FLAGS_
numerical
_epsilon
);
s1
=
std
::
max
(
s1
,
s0
);
s_
.
push_back
(
s1
);
v_
.
push_back
(
v1
);
...
...
modules/planning/common/trajectory1d/piecewise_jerk_trajectory1d.cc
浏览文件 @
c4ff1f45
...
...
@@ -38,7 +38,7 @@ PiecewiseJerkTrajectory1d::PiecewiseJerkTrajectory1d(const double p,
void
PiecewiseJerkTrajectory1d
::
AppendSegment
(
const
double
jerk
,
const
double
param
)
{
CHECK_GT
(
param
,
FLAGS_
lattice
_epsilon
);
CHECK_GT
(
param
,
FLAGS_
numerical
_epsilon
);
param_
.
push_back
(
param_
.
back
()
+
param
);
...
...
@@ -53,7 +53,7 @@ void PiecewiseJerkTrajectory1d::AppendSegment(const double jerk,
double
PiecewiseJerkTrajectory1d
::
Evaluate
(
const
std
::
uint32_t
order
,
const
double
param
)
const
{
CHECK_GE
(
param
,
-
FLAGS_
lattice
_epsilon
);
CHECK_GE
(
param
,
-
FLAGS_
numerical
_epsilon
);
auto
it_lower
=
std
::
lower_bound
(
param_
.
begin
(),
param_
.
end
(),
param
);
...
...
modules/planning/conf/planning.conf
浏览文件 @
c4ff1f45
...
...
@@ -8,11 +8,8 @@
--
enable_reference_line_stitching
--
min_length_for_lane_change
=
5
.
0
--
nouse_multi_thread_to_add_obstacles
--
enable_multi_thread_in_dp_poly_path
--
enable_multi_thread_in_dp_st_graph
--
nouse_osqp_optimizer_for_qp_st
--
use_osqp_optimizer_for_reference_line
--
enable_scenario_side_pass
--
enable_scenario_traffic_light
# --smoother_config_filename=/apollo/modules/planning/conf/spiral_smoother_config.pb.txt
...
...
modules/planning/integration_tests/garage_test.cc
浏览文件 @
c4ff1f45
...
...
@@ -35,7 +35,6 @@ class GarageTest : public PlanningTestBase {
public:
virtual
void
SetUp
()
{
FLAGS_use_multi_thread_to_add_obstacles
=
false
;
FLAGS_enable_multi_thread_in_dp_poly_path
=
false
;
FLAGS_enable_multi_thread_in_dp_st_graph
=
false
;
FLAGS_use_navigation_mode
=
false
;
FLAGS_map_dir
=
"modules/planning/testdata/garage_map"
;
...
...
@@ -50,7 +49,6 @@ class GarageTest : public PlanningTestBase {
FLAGS_enable_lag_prediction
=
false
;
FLAGS_enable_rss_info
=
false
;
FLAGS_enable_scenario_side_pass
=
false
;
FLAGS_enable_scenario_stop_sign
=
false
;
FLAGS_enable_scenario_traffic_light
=
false
;
}
...
...
modules/planning/integration_tests/planning_test_base.cc
浏览文件 @
c4ff1f45
...
...
@@ -51,7 +51,6 @@ DEFINE_string(test_previous_planning_file, "",
void
PlanningTestBase
::
SetUpTestCase
()
{
FLAGS_use_multi_thread_to_add_obstacles
=
false
;
FLAGS_enable_multi_thread_in_dp_poly_path
=
false
;
FLAGS_enable_multi_thread_in_dp_st_graph
=
false
;
FLAGS_planning_config_file
=
"/apollo/modules/planning/conf/planning_config.pb.txt"
;
...
...
@@ -73,7 +72,6 @@ void PlanningTestBase::SetUpTestCase() {
FLAGS_enable_trajectory_check
=
false
;
FLAGS_planning_test_mode
=
true
;
FLAGS_enable_lag_prediction
=
false
;
FLAGS_use_osqp_optimizer_for_qp_st
=
false
;
FLAGS_use_osqp_optimizer_for_reference_line
=
false
;
}
...
...
modules/planning/integration_tests/sunnyvale_big_loop_test.cc
浏览文件 @
c4ff1f45
...
...
@@ -49,9 +49,7 @@ class SunnyvaleBigLoopTest : public PlanningTestBase {
FLAGS_test_base_map_filename
=
"base_map.bin"
;
FLAGS_test_data_dir
=
"modules/planning/testdata/sunnyvale_big_loop_test"
;
FLAGS_planning_upper_speed_limit
=
12.5
;
FLAGS_enable_multi_thread_in_dp_poly_path
=
false
;
FLAGS_enable_scenario_side_pass
=
false
;
FLAGS_enable_scenario_stop_sign
=
false
;
FLAGS_enable_scenario_traffic_light
=
false
;
FLAGS_enable_rss_info
=
false
;
...
...
modules/planning/integration_tests/sunnyvale_loop_test.cc
浏览文件 @
c4ff1f45
...
...
@@ -39,7 +39,6 @@ class SunnyvaleLoopTest : public PlanningTestBase {
FLAGS_planning_upper_speed_limit
=
12.5
;
FLAGS_use_multi_thread_to_add_obstacles
=
false
;
FLAGS_enable_scenario_side_pass
=
false
;
FLAGS_enable_scenario_stop_sign
=
false
;
FLAGS_enable_scenario_traffic_light
=
false
;
FLAGS_enable_rss_info
=
false
;
...
...
modules/planning/lattice/behavior/path_time_graph.cc
浏览文件 @
c4ff1f45
...
...
@@ -287,7 +287,7 @@ std::vector<STPoint> PathTimeGraph::GetObstacleSurroundingPoints(
}
double
time_gap
=
t1
-
t0
;
CHECK
(
time_gap
>
-
FLAGS_
lattice
_epsilon
);
CHECK
(
time_gap
>
-
FLAGS_
numerical
_epsilon
);
time_gap
=
std
::
fabs
(
time_gap
);
size_t
num_sections
=
static_cast
<
size_t
>
(
time_gap
/
t_min_density
+
1
);
...
...
@@ -314,7 +314,7 @@ bool PathTimeGraph::IsObstacleInGraph(const std::string& obstacle_id) {
std
::
vector
<
std
::
pair
<
double
,
double
>>
PathTimeGraph
::
GetLateralBounds
(
const
double
s_start
,
const
double
s_end
,
const
double
s_resolution
)
{
CHECK_LT
(
s_start
,
s_end
);
CHECK_GT
(
s_resolution
,
FLAGS_
lattice
_epsilon
);
CHECK_GT
(
s_resolution
,
FLAGS_
numerical
_epsilon
);
std
::
vector
<
std
::
pair
<
double
,
double
>>
bounds
;
std
::
vector
<
double
>
discretized_path
;
double
s_range
=
s_end
-
s_start
;
...
...
@@ -369,15 +369,15 @@ void PathTimeGraph::UpdateLateralBoundsByObstacle(
discretized_path
.
begin
(),
discretized_path
.
end
(),
sl_boundary
.
start_s
());
size_t
start_index
=
start_iter
-
discretized_path
.
begin
();
size_t
end_index
=
end_iter
-
discretized_path
.
begin
();
if
(
sl_boundary
.
end_l
()
>
-
FLAGS_
lattice
_epsilon
&&
sl_boundary
.
start_l
()
<
FLAGS_
lattice
_epsilon
)
{
if
(
sl_boundary
.
end_l
()
>
-
FLAGS_
numerical
_epsilon
&&
sl_boundary
.
start_l
()
<
FLAGS_
numerical
_epsilon
)
{
for
(
size_t
i
=
start_index
;
i
<
end_index
;
++
i
)
{
bounds
->
operator
[](
i
).
first
=
-
FLAGS_
lattice
_epsilon
;
bounds
->
operator
[](
i
).
second
=
FLAGS_
lattice
_epsilon
;
bounds
->
operator
[](
i
).
first
=
-
FLAGS_
numerical
_epsilon
;
bounds
->
operator
[](
i
).
second
=
FLAGS_
numerical
_epsilon
;
}
return
;
}
if
(
sl_boundary
.
end_l
()
<
FLAGS_
lattice
_epsilon
)
{
if
(
sl_boundary
.
end_l
()
<
FLAGS_
numerical
_epsilon
)
{
for
(
size_t
i
=
start_index
;
i
<
std
::
min
(
end_index
+
1
,
bounds
->
size
());
++
i
)
{
bounds
->
operator
[](
i
).
first
=
...
...
@@ -386,7 +386,7 @@ void PathTimeGraph::UpdateLateralBoundsByObstacle(
}
return
;
}
if
(
sl_boundary
.
start_l
()
>
-
FLAGS_
lattice
_epsilon
)
{
if
(
sl_boundary
.
start_l
()
>
-
FLAGS_
numerical
_epsilon
)
{
for
(
size_t
i
=
start_index
;
i
<
std
::
min
(
end_index
+
1
,
bounds
->
size
());
++
i
)
{
bounds
->
operator
[](
i
).
second
=
...
...
modules/planning/lattice/trajectory_generation/end_condition_sampler.cc
浏览文件 @
c4ff1f45
...
...
@@ -159,7 +159,7 @@ void EndConditionSampler::QueryFollowPathTimePoints(
std
::
vector
<
SamplePoint
>*
const
sample_points
)
const
{
std
::
vector
<
STPoint
>
follow_path_time_points
=
ptr_path_time_graph_
->
GetObstacleSurroundingPoints
(
obstacle_id
,
-
FLAGS_
lattice
_epsilon
,
FLAGS_time_min_density
);
obstacle_id
,
-
FLAGS_
numerical
_epsilon
,
FLAGS_time_min_density
);
for
(
const
auto
&
path_time_point
:
follow_path_time_points
)
{
double
v
=
ptr_prediction_querier_
->
ProjectVelocityAlongReferenceLine
(
...
...
@@ -188,7 +188,7 @@ void EndConditionSampler::QueryOvertakePathTimePoints(
std
::
vector
<
SamplePoint
>*
sample_points
)
const
{
std
::
vector
<
STPoint
>
overtake_path_time_points
=
ptr_path_time_graph_
->
GetObstacleSurroundingPoints
(
obstacle_id
,
FLAGS_
lattice
_epsilon
,
FLAGS_time_min_density
);
obstacle_id
,
FLAGS_
numerical
_epsilon
,
FLAGS_time_min_density
);
for
(
const
auto
&
path_time_point
:
overtake_path_time_points
)
{
double
v
=
ptr_prediction_querier_
->
ProjectVelocityAlongReferenceLine
(
...
...
modules/planning/lattice/trajectory_generation/trajectory_combiner.cc
浏览文件 @
c4ff1f45
...
...
@@ -40,7 +40,7 @@ DiscretizedTrajectory TrajectoryCombiner::Combine(
double
accumulated_trajectory_s
=
0.0
;
PathPoint
prev_trajectory_point
;
double
last_s
=
-
FLAGS_
lattice
_epsilon
;
double
last_s
=
-
FLAGS_
numerical
_epsilon
;
double
t_param
=
0.0
;
while
(
t_param
<
FLAGS_trajectory_time_length
)
{
// linear extrapolation is handled internally in LatticeTrajectory1d;
...
...
@@ -52,7 +52,7 @@ DiscretizedTrajectory TrajectoryCombiner::Combine(
last_s
=
s
;
double
s_dot
=
std
::
max
(
FLAGS_
lattice
_epsilon
,
lon_trajectory
.
Evaluate
(
1
,
t_param
));
std
::
max
(
FLAGS_
numerical
_epsilon
,
lon_trajectory
.
Evaluate
(
1
,
t_param
));
double
s_ddot
=
lon_trajectory
.
Evaluate
(
2
,
t_param
);
if
(
s
>
s_ref_max
)
{
break
;
...
...
modules/planning/lattice/trajectory_generation/trajectory_evaluator.cc
浏览文件 @
c4ff1f45
...
...
@@ -179,7 +179,7 @@ double TrajectoryEvaluator::LatOffsetCost(
cost_abs_sum
+=
std
::
fabs
(
cost
)
*
FLAGS_weight_same_side_offset
;
}
}
return
cost_sqr_sum
/
(
cost_abs_sum
+
FLAGS_
lattice
_epsilon
);
return
cost_sqr_sum
/
(
cost_abs_sum
+
FLAGS_
numerical
_epsilon
);
}
double
TrajectoryEvaluator
::
LatComfortCost
(
...
...
@@ -212,7 +212,7 @@ double TrajectoryEvaluator::LonComfortCost(
cost_sqr_sum
+=
cost
*
cost
;
cost_abs_sum
+=
std
::
fabs
(
cost
);
}
return
cost_sqr_sum
/
(
cost_abs_sum
+
FLAGS_
lattice
_epsilon
);
return
cost_sqr_sum
/
(
cost_abs_sum
+
FLAGS_
numerical
_epsilon
);
}
double
TrajectoryEvaluator
::
LonObjectiveCost
(
...
...
@@ -232,7 +232,7 @@ double TrajectoryEvaluator::LonObjectiveCost(
speed_cost_weight_sum
+=
t
*
t
;
}
double
speed_cost
=
speed_cost_sqr_sum
/
(
speed_cost_weight_sum
+
FLAGS_
lattice
_epsilon
);
speed_cost_sqr_sum
/
(
speed_cost_weight_sum
+
FLAGS_
numerical
_epsilon
);
double
dist_travelled_cost
=
1.0
/
(
1.0
+
dist_s
);
return
(
speed_cost
*
FLAGS_weight_target_speed
+
dist_travelled_cost
*
FLAGS_weight_dist_travelled
)
/
...
...
@@ -266,7 +266,7 @@ double TrajectoryEvaluator::LonCollisionCost(
cost_abs_sum
+=
cost
;
}
}
return
cost_sqr_sum
/
(
cost_abs_sum
+
FLAGS_
lattice
_epsilon
);
return
cost_sqr_sum
/
(
cost_abs_sum
+
FLAGS_
numerical
_epsilon
);
}
double
TrajectoryEvaluator
::
CentripetalAccelerationCost
(
...
...
@@ -286,7 +286,7 @@ double TrajectoryEvaluator::CentripetalAccelerationCost(
}
return
centripetal_acc_sqr_sum
/
(
centripetal_acc_sum
+
FLAGS_
lattice
_epsilon
);
(
centripetal_acc_sum
+
FLAGS_
numerical
_epsilon
);
}
std
::
vector
<
double
>
TrajectoryEvaluator
::
ComputeLongitudinalGuideVelocity
(
...
...
@@ -298,7 +298,7 @@ std::vector<double> TrajectoryEvaluator::ComputeLongitudinalGuideVelocity(
if
(
!
planning_target
.
has_stop_point
())
{
PiecewiseAccelerationTrajectory1d
lon_traj
(
init_s_
[
0
],
cruise_v
);
lon_traj
.
AppendSegment
(
0.0
,
FLAGS_trajectory_time_length
+
+
FLAGS_lattice
_epsilon
);
0.0
,
FLAGS_trajectory_time_length
+
FLAGS_numerical
_epsilon
);
for
(
double
t
=
0.0
;
t
<
FLAGS_trajectory_time_length
;
t
+=
FLAGS_trajectory_time_resolution
)
{
...
...
@@ -306,10 +306,10 @@ std::vector<double> TrajectoryEvaluator::ComputeLongitudinalGuideVelocity(
}
}
else
{
double
dist_s
=
planning_target
.
stop_point
().
s
()
-
init_s_
[
0
];
if
(
dist_s
<
FLAGS_
lattice
_epsilon
)
{
if
(
dist_s
<
FLAGS_
numerical
_epsilon
)
{
PiecewiseAccelerationTrajectory1d
lon_traj
(
init_s_
[
0
],
0.0
);
lon_traj
.
AppendSegment
(
0.0
,
FLAGS_trajectory_time_length
+
FLAGS_
lattice
_epsilon
);
0.0
,
FLAGS_trajectory_time_length
+
FLAGS_
numerical
_epsilon
);
for
(
double
t
=
0.0
;
t
<
FLAGS_trajectory_time_length
;
t
+=
FLAGS_trajectory_time_resolution
)
{
...
...
@@ -327,7 +327,7 @@ std::vector<double> TrajectoryEvaluator::ComputeLongitudinalGuideVelocity(
PiecewiseBrakingTrajectoryGenerator
::
Generate
(
planning_target
.
stop_point
().
s
(),
init_s_
[
0
],
planning_target
.
cruise_speed
(),
init_s_
[
1
],
a_comfort
,
d_comfort
,
FLAGS_trajectory_time_length
+
FLAGS_
lattice
_epsilon
);
FLAGS_trajectory_time_length
+
FLAGS_
numerical
_epsilon
);
for
(
double
t
=
0.0
;
t
<
FLAGS_trajectory_time_length
;
t
+=
FLAGS_trajectory_time_resolution
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录