Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
1fcda2fa
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,发现更多精彩内容 >>
提交
1fcda2fa
编写于
9月 02, 2017
作者:
J
jiangyifei
提交者:
Dong Li
9月 02, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[planning] added init point in plot planning path
上级
12539c28
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
20 addition
and
2 deletion
+20
-2
modules/tools/mapshow/planning.py
modules/tools/mapshow/planning.py
+10
-1
modules/tools/mapshow/plot_planning.py
modules/tools/mapshow/plot_planning.py
+1
-0
modules/tools/mapshow/subplot_path.py
modules/tools/mapshow/subplot_path.py
+9
-1
未找到文件。
modules/tools/mapshow/planning.py
浏览文件 @
1fcda2fa
...
...
@@ -23,7 +23,7 @@ from modules.planning.proto import planning_internal_pb2
class
Planning
:
def
__init__
(
self
,
planning_pb
=
None
):
self
.
data_lock
=
threading
.
Lock
()
self
.
init_point_lock
=
threading
.
Lock
()
self
.
planning_pb
=
planning_pb
self
.
path_data_lock
=
threading
.
Lock
()
self
.
path_data_x
=
{}
...
...
@@ -60,10 +60,19 @@ class Planning:
self
.
sl_aggregated_boundary_high_l
=
[]
self
.
sl_aggregated_boundary_s
=
[]
self
.
init_point_x
=
[]
self
.
init_point_y
=
[]
def
update_planning_pb
(
self
,
planning_pb
):
self
.
planning_pb
=
planning_pb
def
compute_init_point
(
self
):
self
.
init_point_lock
.
acquire
()
init_point
=
self
.
planning_pb
.
debug
.
planning_data
.
init_point
self
.
init_point_x
=
[
init_point
.
path_point
.
x
]
self
.
init_point_y
=
[
init_point
.
path_point
.
y
]
self
.
init_point_lock
.
release
()
def
compute_sl_data
(
self
):
sl_sampled_s
=
[]
sl_map_lower_boundary
=
[]
...
...
modules/tools/mapshow/plot_planning.py
浏览文件 @
1fcda2fa
...
...
@@ -52,6 +52,7 @@ def planning_callback(planning_pb):
planning
.
compute_sl_data
()
planning
.
compute_path_data
()
planning
.
compute_speed_data
()
planning
.
compute_init_point
()
def
add_listener
():
rospy
.
init_node
(
'st_plot'
,
anonymous
=
True
)
...
...
modules/tools/mapshow/subplot_path.py
浏览文件 @
1fcda2fa
...
...
@@ -39,7 +39,7 @@ class PathSubplot:
self
.
vehicle_position_line
,
=
ax
.
plot
([
0
],
[
0
],
'go'
,
alpha
=
0.3
)
self
.
vehicle_polygon_line
,
=
ax
.
plot
([
0
],
[
0
],
'g-'
)
self
.
init_point_line
,
=
ax
.
plot
([
0
],
[
0
],
'ro'
,
alpha
=
0.3
)
self
.
set_visible
(
False
)
ax
.
set_title
(
"PLANNING PATH"
)
...
...
@@ -48,6 +48,7 @@ class PathSubplot:
line
.
set_visible
(
visible
)
self
.
vehicle_position_line
.
set_visible
(
False
)
self
.
vehicle_polygon_line
.
set_visible
(
False
)
self
.
init_point_line
.
set_visible
(
False
)
def
show
(
self
,
planning
,
localization
):
cnt
=
0
...
...
@@ -67,6 +68,13 @@ class PathSubplot:
cnt
+=
1
planning
.
path_data_lock
.
release
()
planning
.
init_point_lock
.
acquire
()
print
planning
.
init_point_x
self
.
init_point_line
.
set_xdata
(
planning
.
init_point_x
)
self
.
init_point_line
.
set_ydata
(
planning
.
init_point_y
)
self
.
init_point_line
.
set_visible
(
True
)
planning
.
init_point_lock
.
release
()
localization
.
localization_data_lock
.
acquire
()
self
.
draw_vehicle
(
localization
)
try
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录