Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
139830ad
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,发现更多精彩内容 >>
提交
139830ad
编写于
8月 22, 2017
作者:
C
Calvin Miao
提交者:
Aaron Xiao
8月 22, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Prediction: updated function declaration
上级
2414634c
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
9 addition
and
10 deletion
+9
-10
modules/prediction/common/prediction_map.cc
modules/prediction/common/prediction_map.cc
+3
-3
modules/prediction/common/prediction_map.h
modules/prediction/common/prediction_map.h
+4
-4
modules/prediction/common/prediction_map_test.cc
modules/prediction/common/prediction_map_test.cc
+1
-1
modules/prediction/predictor/vehicle/lane_sequence_predictor.cc
...s/prediction/predictor/vehicle/lane_sequence_predictor.cc
+1
-2
未找到文件。
modules/prediction/common/prediction_map.cc
浏览文件 @
139830ad
...
...
@@ -169,20 +169,20 @@ double PredictionMap::PathHeading(
return
HeadingOnLane
(
lane_info
,
s
);
}
int
PredictionMap
::
SmoothPointFromLane
(
bool
PredictionMap
::
SmoothPointFromLane
(
const
std
::
string
&
id
,
const
double
s
,
const
double
l
,
Eigen
::
Vector2d
*
point
,
double
*
heading
)
{
if
(
point
==
nullptr
||
heading
==
nullptr
)
{
return
-
1
;
return
false
;
}
std
::
shared_ptr
<
const
LaneInfo
>
lane
=
LaneById
(
id
);
apollo
::
common
::
PointENU
hdmap_point
=
lane
->
get_smooth_point
(
s
);
*
heading
=
PathHeading
(
lane
,
hdmap_point
);
point
->
operator
[](
0
)
=
hdmap_point
.
x
()
-
std
::
sin
(
*
heading
)
*
l
;
point
->
operator
[](
1
)
=
hdmap_point
.
y
()
+
std
::
cos
(
*
heading
)
*
l
;
return
0
;
return
true
;
}
void
PredictionMap
::
NearbyLanesByCurrentLanes
(
...
...
modules/prediction/common/prediction_map.h
浏览文件 @
139830ad
...
...
@@ -68,7 +68,7 @@ class PredictionMap {
* @param id The ID of the target lane ID in the form of string.
* @return A shared pointer to the lane with the input lane ID.
*/
std
::
shared_ptr
<
const
apollo
::
hdmap
::
LaneInfo
>
LaneById
(
st
atic
st
d
::
shared_ptr
<
const
apollo
::
hdmap
::
LaneInfo
>
LaneById
(
const
std
::
string
&
id
);
/**
...
...
@@ -128,9 +128,9 @@ class PredictionMap {
* @param l The lateral coordinate of the position.
* @param point The point corresponding to the s,l-value coordinate.
* @param heading The lane heading on the point.
* @return If the process is successful.
0: success, -1: failure.
* @return If the process is successful.
*/
int
SmoothPointFromLane
(
bool
SmoothPointFromLane
(
const
std
::
string
&
id
,
const
double
s
,
const
double
l
,
Eigen
::
Vector2d
*
point
,
double
*
heading
);
...
...
@@ -256,7 +256,7 @@ class PredictionMap {
* @param lane_id The lane ID.
* @return Integer corresponding to the lane turn type.
*/
int
LaneTurnType
(
const
std
::
string
&
lane_id
);
static
int
LaneTurnType
(
const
std
::
string
&
lane_id
);
private:
DECLARE_SINGLETON
(
PredictionMap
);
...
...
modules/prediction/common/prediction_map_test.cc
浏览文件 @
139830ad
...
...
@@ -165,7 +165,7 @@ TEST_F(PredictionMapTest, get_smooth_point_from_lane) {
double
heading
=
M_PI
;
Eigen
::
Vector2d
point
;
EXPECT_
EQ
(
0
,
map_
->
SmoothPointFromLane
(
id
,
s
,
l
,
&
point
,
&
heading
));
EXPECT_
TRUE
(
map_
->
SmoothPointFromLane
(
id
,
s
,
l
,
&
point
,
&
heading
));
EXPECT_DOUBLE_EQ
(
124.85930930657942
,
point
.
x
());
EXPECT_DOUBLE_EQ
(
348.52732962417451
,
point
.
y
());
EXPECT_DOUBLE_EQ
(
-
0.061427808505166936
,
heading
);
...
...
modules/prediction/predictor/vehicle/lane_sequence_predictor.cc
浏览文件 @
139830ad
...
...
@@ -180,8 +180,7 @@ void LaneSequencePredictor::DrawLaneSequenceTrajectoryPoints(
for
(
size_t
i
=
0
;
i
<
static_cast
<
size_t
>
(
total_time
/
freq
);
++
i
)
{
Eigen
::
Vector2d
point
;
double
theta
=
M_PI
;
if
(
map
->
SmoothPointFromLane
(
lane_id
,
lane_s
,
lane_l
,
&
point
,
&
theta
)
!=
0
)
{
if
(
!
map
->
SmoothPointFromLane
(
lane_id
,
lane_s
,
lane_l
,
&
point
,
&
theta
))
{
AERROR
<<
"Unable to get smooth point from lane ["
<<
lane_id
<<
"] with s ["
<<
lane_s
<<
"] and l ["
<<
lane_l
<<
"]"
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录