Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
100d051a
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,体验更适合开发者的 AI 搜索 >>
提交
100d051a
编写于
12月 11, 2018
作者:
J
jiaxuanxu
提交者:
Jiangtao Hu
12月 13, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Planning: Add sliding window for Open Space Planning
上级
e4a2a9a5
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
16 addition
and
33 deletion
+16
-33
modules/planning/open_space_planning.cc
modules/planning/open_space_planning.cc
+16
-33
未找到文件。
modules/planning/open_space_planning.cc
浏览文件 @
100d051a
...
...
@@ -751,46 +751,28 @@ void OpenSpacePlanning::AddOpenSpaceSpeedProfile(
auto
open_space_debug
=
debug
->
planning_data
().
open_space
();
chart
->
set_title
(
"Open Space Speed Plan Visualization"
);
auto
*
options
=
chart
->
mutable_options
();
options
->
mutable_x
()
->
set_min
(
0
);
options
->
mutable_x
()
->
set_max
(
100
);
options
->
mutable_x
()
->
set_window_size
(
20.0
);
options
->
mutable_x
()
->
set_label_string
(
"time (s)"
);
options
->
mutable_y
()
->
set_min
(
2.1
);
options
->
mutable_y
()
->
set_max
(
-
1.1
);
options
->
mutable_y
()
->
set_label_string
(
"speed (m/s)"
);
auto
smoothed_trajectory
=
open_space_debug
.
smoothed_trajectory
();
auto
*
s
moothed_lin
e
=
chart
->
add_line
();
s
moothed_lin
e
->
set_label
(
"Speed Profile"
);
for
(
const
auto
&
point
:
smoothed_trajectory
.
vehicle_motion_point
())
{
auto
*
point_debug
=
s
moothed_lin
e
->
add_point
();
point_debug
->
set_x
(
point
.
trajectory_point
().
relative
_time
());
point_debug
->
set_y
(
point
.
trajectory_point
().
v
());
//
auto smoothed_trajectory = open_space_debug.smoothed_trajectory();
auto
*
s
peed_profil
e
=
chart
->
add_line
();
s
peed_profil
e
->
set_label
(
"Speed Profile"
);
for
(
const
auto
&
point
:
last_trajectory_
->
trajectory_points
())
{
auto
*
point_debug
=
s
peed_profil
e
->
add_point
();
point_debug
->
set_x
(
point
.
relative_time
()
+
last_trajectory_
->
header
_time
());
point_debug
->
set_y
(
point
.
v
());
}
// Set chartJS's dataset properties
auto
*
smoothed_properties
=
smoothed_line
->
mutable_properties
();
(
*
smoothed_properties
)[
"borderWidth"
]
=
"2"
;
(
*
smoothed_properties
)[
"pointRadius"
]
=
"0"
;
(
*
smoothed_properties
)[
"lineTension"
]
=
"0"
;
(
*
smoothed_properties
)[
"fill"
]
=
"false"
;
(
*
smoothed_properties
)[
"showLine"
]
=
"true"
;
auto
*
aux_line
=
chart
->
add_line
();
aux_line
->
set_label
(
"Zero"
);
auto
*
aux_point_start
=
aux_line
->
add_point
();
aux_point_start
->
set_x
(
0
);
aux_point_start
->
set_y
(
0
);
auto
*
aux_point_end
=
aux_line
->
add_point
();
aux_point_end
->
set_x
(
100
);
aux_point_end
->
set_y
(
0
);
// Set chartJS's dataset properties
auto
*
aux_properties
=
aux_line
->
mutable_properties
();
(
*
aux_properties
)[
"borderWidth"
]
=
"2"
;
(
*
aux_properties
)[
"pointRadius"
]
=
"0"
;
(
*
aux_properties
)[
"lineTension"
]
=
"0"
;
(
*
aux_properties
)[
"fill"
]
=
"false"
;
(
*
aux_properties
)[
"showLine"
]
=
"true"
;
auto
*
speed_profile_properties
=
speed_profile
->
mutable_properties
();
(
*
speed_profile_properties
)[
"borderWidth"
]
=
"2"
;
(
*
speed_profile_properties
)[
"pointRadius"
]
=
"0"
;
(
*
speed_profile_properties
)[
"lineTension"
]
=
"0"
;
(
*
speed_profile_properties
)[
"fill"
]
=
"false"
;
(
*
speed_profile_properties
)[
"showLine"
]
=
"true"
;
/*
auto* gear_shift_line = chart->add_line();
gear_shift_line->set_label("Gear");
size_t gear_shift_num =
...
...
@@ -812,6 +794,7 @@ void OpenSpacePlanning::AddOpenSpaceSpeedProfile(
(*gear_line_properties)["lineTension"] = "0";
(*gear_line_properties)["fill"] = "false";
(*gear_line_properties)["showLine"] = "true";
*/
}
void
OpenSpacePlanning
::
ExportOpenSpaceChart
(
planning_internal
::
Debug
*
debug
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录