Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
5d62db31
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,发现更多精彩内容 >>
提交
5d62db31
编写于
11月 20, 2018
作者:
J
JasonZhou404
提交者:
Jiangtao Hu
12月 13, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Planning: OpenSpace: fix wrong relative time adjustment in FillplanningPb
上级
aaea7922
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
33 addition
and
11 deletion
+33
-11
modules/planning/conf/planner_open_space_config.pb.txt
modules/planning/conf/planner_open_space_config.pb.txt
+1
-1
modules/planning/open_space/distance_approach_ipopt_interface.cc
.../planning/open_space/distance_approach_ipopt_interface.cc
+1
-1
modules/planning/open_space/distance_approach_problem.cc
modules/planning/open_space/distance_approach_problem.cc
+1
-0
modules/planning/open_space/open_space_trajectory_generator.cc
...es/planning/open_space/open_space_trajectory_generator.cc
+3
-3
modules/planning/open_space_planning.cc
modules/planning/open_space_planning.cc
+20
-1
modules/planning/open_space_planning.h
modules/planning/open_space_planning.h
+2
-0
modules/planning/planning_base.h
modules/planning/planning_base.h
+2
-2
modules/tools/open_space_visualization/distance_approach_visualizer.py
.../open_space_visualization/distance_approach_visualizer.py
+3
-3
未找到文件。
modules/planning/conf/planner_open_space_config.pb.txt
浏览文件 @
5d62db31
...
...
@@ -6,7 +6,7 @@ warm_start_config : {
xy_grid_resolution : 0.2
phi_grid_resolution : 0.05
max_steering : 0.6
next_node_num :
1
0
next_node_num :
2
0
step_size : 0.5
back_penalty : 0.0
gear_switch_penalty : 10.0
...
...
modules/planning/open_space/distance_approach_ipopt_interface.cc
浏览文件 @
5d62db31
...
...
@@ -1269,7 +1269,7 @@ bool DistanceApproachIPOPTInterface::eval_jac_g(int n, const double* x,
ADEBUG
<<
"eval_jac_g done"
;
return
true
;
}
// NOLINT
}
// NOLINT
bool
DistanceApproachIPOPTInterface
::
eval_h
(
int
n
,
const
double
*
x
,
bool
new_x
,
double
obj_factor
,
int
m
,
...
...
modules/planning/open_space/distance_approach_problem.cc
浏览文件 @
5d62db31
...
...
@@ -59,6 +59,7 @@ bool DistanceApproachProblem::Solve(
app
->
Options
()
->
SetNumericValue
(
"mumps_pivtol"
,
1e-6
);
app
->
Options
()
->
SetIntegerValue
(
"max_iter"
,
1000
);
app
->
Options
()
->
SetNumericValue
(
"tol"
,
1e-4
);
app
->
Options
()
->
SetNumericValue
(
"acceptable_constr_viol_tol"
,
1e-1
);
app
->
Options
()
->
SetNumericValue
(
"min_hessian_perturbation"
,
1e-12
);
app
->
Options
()
->
SetNumericValue
(
"jacobian_regularization_value"
,
1e-7
);
app
->
Options
()
->
SetStringValue
(
"print_timing_statistics"
,
"no"
);
...
...
modules/planning/open_space/open_space_trajectory_generator.cc
浏览文件 @
5d62db31
...
...
@@ -330,8 +330,8 @@ Status OpenSpaceTrajectoryGenerator::TrajectoryPartition(
if
(
horizon_
<
3
)
return
Status
(
ErrorCode
::
PLANNING_ERROR
,
"Invalid trajectory length!"
);
if
(
state_result_ds
(
3
,
0
)
>
-
1e-16
&&
state_result_ds
(
3
,
1
)
>
-
1e-16
&&
state_result_ds
(
3
,
2
)
>
-
1e-16
)
{
if
(
state_result_ds
(
3
,
0
)
>
1e-16
&&
state_result_ds
(
3
,
1
)
>
1e-16
&&
state_result_ds
(
3
,
2
)
>
1e-16
)
{
gear_positions_
.
push_back
(
canbus
::
Chassis
::
GEAR_DRIVE
);
}
else
if
(
state_result_ds
(
3
,
0
)
<
-
1e-16
&&
state_result_ds
(
3
,
1
)
<
-
1e-16
&&
state_result_ds
(
3
,
2
)
<
-
1e-16
)
{
...
...
@@ -354,7 +354,7 @@ Status OpenSpaceTrajectoryGenerator::TrajectoryPartition(
}
// shift from GEAR_REVERSE to GEAR_DRIVE if v > 0
// then add a new trajectory with GEAR_DRIVE
if
(
state_result_ds
(
3
,
i
)
>
-
1e-16
&&
if
(
state_result_ds
(
3
,
i
)
>
1e-16
&&
gear_positions_
.
back
()
==
canbus
::
Chassis
::
GEAR_REVERSE
)
{
current_trajectory
=
trajectory_partition
.
add_trajectory
();
gear_positions_
.
push_back
(
canbus
::
Chassis
::
GEAR_DRIVE
);
...
...
modules/planning/open_space_planning.cc
浏览文件 @
5d62db31
...
...
@@ -311,7 +311,7 @@ void AddOpenSpaceTrajectory(const OpenSpaceDebug& open_space_debug,
Chart
*
chart
)
{
chart
->
set_title
(
"Open Space Trajectory Visualization"
);
auto
*
options
=
chart
->
mutable_options
();
CHECK
(
open_space_debug
.
xy_boundary_size
()
==
4
);
CHECK
_EQ
(
open_space_debug
.
xy_boundary_size
(),
4
);
options
->
mutable_x
()
->
set_min
(
open_space_debug
.
xy_boundary
(
0
));
options
->
mutable_x
()
->
set_max
(
open_space_debug
.
xy_boundary
(
1
));
options
->
mutable_x
()
->
set_label_string
(
"x (meter)"
);
...
...
@@ -363,5 +363,24 @@ bool OpenSpacePlanning::CheckPlanningConfig(const PlanningConfig& config) {
return
true
;
}
void
OpenSpacePlanning
::
FillPlanningPb
(
const
double
timestamp
,
ADCTrajectory
*
const
trajectory_pb
)
{
trajectory_pb
->
mutable_header
()
->
set_timestamp_sec
(
timestamp
);
if
(
!
local_view_
.
prediction_obstacles
->
has_header
())
{
trajectory_pb
->
mutable_header
()
->
set_lidar_timestamp
(
local_view_
.
prediction_obstacles
->
header
().
lidar_timestamp
());
trajectory_pb
->
mutable_header
()
->
set_camera_timestamp
(
local_view_
.
prediction_obstacles
->
header
().
camera_timestamp
());
trajectory_pb
->
mutable_header
()
->
set_radar_timestamp
(
local_view_
.
prediction_obstacles
->
header
().
radar_timestamp
());
}
trajectory_pb
->
mutable_routing_header
()
->
CopyFrom
(
local_view_
.
routing
->
header
());
if
(
FLAGS_use_planning_fallback
&&
trajectory_pb
->
trajectory_point_size
()
==
0
)
{
SetFallbackTrajectory
(
trajectory_pb
);
}
}
}
// namespace planning
}
// namespace apollo
modules/planning/open_space_planning.h
浏览文件 @
5d62db31
...
...
@@ -69,6 +69,8 @@ class OpenSpacePlanning : public PlanningBase {
void
ExportOpenSpaceChart
(
const
planning_internal
::
OpenSpaceDebug
&
debug_info
,
planning_internal
::
Debug
*
debug_chart
);
void
FillPlanningPb
(
const
double
timestamp
,
ADCTrajectory
*
const
trajectory_pb
)
override
;
private:
common
::
Status
InitFrame
(
const
uint32_t
sequence_num
,
...
...
modules/planning/planning_base.h
浏览文件 @
5d62db31
...
...
@@ -72,8 +72,8 @@ class PlanningBase {
ADCTrajectory
*
const
trajectory
)
=
0
;
protected:
void
FillPlanningPb
(
const
double
timestamp
,
ADCTrajectory
*
const
trajectory_pb
);
v
irtual
v
oid
FillPlanningPb
(
const
double
timestamp
,
ADCTrajectory
*
const
trajectory_pb
);
void
SetFallbackTrajectory
(
ADCTrajectory
*
const
trajectory_pb
);
virtual
void
ExportChart
(
const
planning_internal
::
Debug
&
debug_info
,
...
...
modules/tools/open_space_visualization/distance_approach_visualizer.py
浏览文件 @
5d62db31
...
...
@@ -30,8 +30,8 @@ OpenSpacePlanner = DistancePlanner()
# parameter(except max, min and car size is defined in proto)
num_output_buffer
=
10000
sx
=
-
10.0
sy
=
3
sx
=
-
8
sy
=
4
sphi
=
0.0
scenario
=
"backward"
...
...
@@ -110,7 +110,7 @@ start = time.time()
print
(
"planning start"
)
if
not
OpenSpacePlanner
.
DistancePlan
(
sx
,
sy
,
sphi
,
ex
,
ey
,
ephi
,
XYbounds_ctype
):
print
(
"planning fail"
)
exit
()
#
exit()
end
=
time
.
time
()
print
(
"planning time is "
+
str
(
end
-
start
))
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录