Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
5ec1cd59
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,发现更多精彩内容 >>
提交
5ec1cd59
编写于
6月 25, 2018
作者:
C
Calvin Miao
提交者:
Jiangtao Hu
6月 25, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixed a couple of security bugs
上级
c4e2db3b
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
30 addition
and
16 deletion
+30
-16
modules/localization/msf/local_tool/local_visualization/engine/visualization_engine.cc
...l_tool/local_visualization/engine/visualization_engine.cc
+18
-7
modules/perception/obstacle/camera/visualizer/glfw_fusion_viewer.cc
...rception/obstacle/camera/visualizer/glfw_fusion_viewer.cc
+1
-0
modules/prediction/common/prediction_map.cc
modules/prediction/common/prediction_map.cc
+11
-9
未找到文件。
modules/localization/msf/local_tool/local_visualization/engine/visualization_engine.cc
浏览文件 @
5ec1cd59
...
...
@@ -195,12 +195,22 @@ void VisualizationEngine::Preprocess(const std::string &map_folder,
std
::
string
image_resolution_path
=
image_path
+
buf
;
AINFO
<<
"image_resolution_path: "
<<
image_resolution_path
;
EnsureDirectory
(
image_visual_path
);
if
(
!
EnsureDirectory
(
image_visual_path
))
{
AERROR
<<
"image_visual_path: "
<<
image_visual_path
<<
" cannot be created."
;
return
;
}
if
(
DirectoryExists
(
image_visual_resolution_path_
))
{
AINFO
<<
"image_visual_resolution_path: "
<<
image_visual_resolution_path_
<<
"already exists."
;
return
;
}
if
(
!
EnsureDirectory
(
image_visual_resolution_path_
))
{
AERROR
<<
"image_visual_resolution_path: "
<<
image_visual_resolution_path_
<<
" cannot be created."
;
return
;
}
EnsureDirectory
(
image_visual_resolution_path_
);
boost
::
filesystem
::
path
image_resolution_path_boost
(
image_resolution_path
);
// push path of map's images to vector
...
...
@@ -256,8 +266,8 @@ void VisualizationEngine::Draw() {
for
(
int
i
=
0
;
i
<
3
;
++
i
)
{
for
(
int
j
=
0
;
j
<
3
;
++
j
)
{
subMat_
[
i
]
[
j
].
copyTo
(
big_window_
(
cv
::
Rect
(
j
*
1024
,
i
*
1024
,
1024
,
1024
)));
subMat_
[
i
]
[
j
].
copyTo
(
big_window_
(
cv
::
Rect
(
j
*
1024
,
i
*
1024
,
1024
,
1024
)));
}
}
...
...
@@ -491,9 +501,10 @@ void VisualizationEngine::DrawLegend() {
unsigned
char
b
=
color_table
[
i
%
3
][
0
];
unsigned
char
g
=
color_table
[
i
%
3
][
1
];
unsigned
char
r
=
color_table
[
i
%
3
][
2
];
cv
::
circle
(
image_window_
,
cv
::
Point
(
755
,
(
15
+
textSize
.
height
)
*
(
i
+
1
)
-
textSize
.
height
/
2
),
8
,
cv
::
Scalar
(
b
,
g
,
r
),
3
);
cv
::
circle
(
image_window_
,
cv
::
Point
(
755
,
(
15
+
textSize
.
height
)
*
(
i
+
1
)
-
textSize
.
height
/
2
),
8
,
cv
::
Scalar
(
b
,
g
,
r
),
3
);
}
}
...
...
modules/perception/obstacle/camera/visualizer/glfw_fusion_viewer.cc
浏览文件 @
5ec1cd59
...
...
@@ -800,6 +800,7 @@ void GLFWFusionViewer::keyboard(int key) {
break
;
case
GLFW_KEY_E
:
// E
draw_lane_objects_
=
!
draw_lane_objects_
;
break
;
case
GLFW_KEY_F
:
// F
show_fusion_
=
!
show_fusion_
;
break
;
...
...
modules/prediction/common/prediction_map.cc
浏览文件 @
5ec1cd59
...
...
@@ -26,8 +26,8 @@
#include <vector>
#include "modules/common/math/linear_interpolation.h"
#include "modules/common/math/vec2d.h"
#include "modules/common/math/polygon2d.h"
#include "modules/common/math/vec2d.h"
#include "modules/map/hdmap/hdmap_util.h"
#include "modules/map/proto/map_id.pb.h"
#include "modules/prediction/common/prediction_gflags.h"
...
...
@@ -56,8 +56,8 @@ double PredictionMap::HeadingOnLane(std::shared_ptr<const LaneInfo> lane_info,
return
lane_info
->
Heading
(
s
);
}
double
PredictionMap
::
CurvatureOnLane
(
const
std
::
string
&
lane_id
,
const
double
s
)
{
double
PredictionMap
::
CurvatureOnLane
(
const
std
::
string
&
lane_id
,
const
double
s
)
{
std
::
shared_ptr
<
const
hdmap
::
LaneInfo
>
lane_info
=
LaneById
(
lane_id
);
return
lane_info
->
Curvature
(
s
);
}
...
...
@@ -212,16 +212,15 @@ std::vector<std::shared_ptr<const JunctionInfo>> PredictionMap::GetJunctions(
return
junctions
;
}
bool
PredictionMap
::
InJunction
(
const
Eigen
::
Vector2d
&
point
,
const
double
radius
)
{
bool
PredictionMap
::
InJunction
(
const
Eigen
::
Vector2d
&
point
,
const
double
radius
)
{
auto
junction_infos
=
GetJunctions
(
point
,
radius
);
Vec2d
vec
(
point
[
0
],
point
[
1
]);
if
(
junction_infos
.
empty
())
{
return
false
;
}
for
(
const
auto
junction_info
:
junction_infos
)
{
if
(
junction_info
==
nullptr
||
!
junction_info
->
junction
().
has_polygon
())
{
if
(
junction_info
==
nullptr
||
!
junction_info
->
junction
().
has_polygon
())
{
continue
;
}
std
::
vector
<
Vec2d
>
vertices
;
...
...
@@ -244,8 +243,11 @@ double PredictionMap::PathHeading(std::shared_ptr<const LaneInfo> lane_info,
common
::
math
::
Vec2d
vec_point
=
{
point
.
x
(),
point
.
y
()};
double
s
=
-
1.0
;
double
l
=
0.0
;
lane_info
->
GetProjection
(
vec_point
,
&
s
,
&
l
);
return
HeadingOnLane
(
lane_info
,
s
);
if
(
lane_info
->
GetProjection
(
vec_point
,
&
s
,
&
l
))
{
return
HeadingOnLane
(
lane_info
,
s
);
}
else
{
return
M_PI
;
}
}
bool
PredictionMap
::
SmoothPointFromLane
(
const
std
::
string
&
id
,
const
double
s
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录