Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
8cac0222
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,发现更多精彩内容 >>
提交
8cac0222
编写于
7月 19, 2017
作者:
K
kechxu
提交者:
Jiangtao Hu
7月 19, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Initial implement of prediction_map.cc
上级
464f474f
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
38 addition
and
1 deletion
+38
-1
modules/prediction/common/prediction_gflags.cc
modules/prediction/common/prediction_gflags.cc
+2
-0
modules/prediction/common/prediction_gflags.h
modules/prediction/common/prediction_gflags.h
+1
-0
modules/prediction/map/BUILD
modules/prediction/map/BUILD
+3
-1
modules/prediction/map/prediction_map.cc
modules/prediction/map/prediction_map.cc
+23
-0
modules/prediction/map/prediction_map.h
modules/prediction/map/prediction_map.h
+9
-0
未找到文件。
modules/prediction/common/prediction_gflags.cc
浏览文件 @
8cac0222
...
...
@@ -41,3 +41,5 @@ DEFINE_double(still_obstacle_speed_threshold, 1.0,
"Speed threshold for still obstacles"
);
DEFINE_double
(
still_obstacle_position_std
,
1.0
,
"Position standard deviation for still obstacles"
);
// TODO(kechxu) specify the map file here
DEFINE_string
(
map_file
,
"/path/to/map_file"
,
"Path to map file"
);
modules/prediction/common/prediction_gflags.h
浏览文件 @
8cac0222
...
...
@@ -35,5 +35,6 @@ DECLARE_int32(still_obstacle_history_length);
DECLARE_bool
(
enable_kf_tracking
);
DECLARE_double
(
still_obstacle_speed_threshold
);
DECLARE_double
(
still_obstacle_position_std
);
DECLARE_string
(
map_file
);
#endif // MODULES_PREDICTION_COMMON_PREDICTION_GFLAGS_H_
modules/prediction/map/BUILD
浏览文件 @
8cac0222
...
...
@@ -11,9 +11,11 @@ cc_library(
"prediction_map.cc"
,
],
deps
=
[
"@eigen//:eigen"
,
"//modules/map/hdmap:hdmap"
,
"//modules/common:macro"
,
]
"//modules/prediction/common:prediction_common"
,
],
)
cpplint
()
modules/prediction/map/prediction_map.cc
浏览文件 @
8cac0222
...
...
@@ -15,9 +15,32 @@
*****************************************************************************/
#include "modules/prediction/map/prediction_map.h"
#include "modules/prediction/common/prediction_gflags.h"
#include "modules/map/hdmap/hdmap.h"
namespace
apollo
{
namespace
prediction
{
using
apollo
::
hdmap
::
LaneInfo
;
PredictionMap
::
PredictionMap
()
:
hdmap_
(
nullptr
)
{
LoadMap
();
}
PredictionMap
::~
PredictionMap
()
{
Clear
();
}
void
PredictionMap
::
LoadMap
()
{
hdmap_
.
reset
(
new
apollo
::
hdmap
::
HDMapImpl
());
CHECK
(
hdmap_
!=
nullptr
);
hdmap_
->
load_map_from_file
(
FLAGS_map_file
);
ADEBUG
<<
"Load map file: "
<<
FLAGS_map_file
;
}
void
PredictionMap
::
Clear
()
{
hdmap_
.
reset
();
}
}
// namespace prediction
}
// namespace apollo
modules/prediction/map/prediction_map.h
浏览文件 @
8cac0222
...
...
@@ -19,6 +19,8 @@
#include <memory>
#include "Eigen/Dense"
#include "modules/common/macro.h"
#include "modules/map/hdmap/hdmap_impl.h"
...
...
@@ -29,6 +31,13 @@ class PredictionMap {
public:
~
PredictionMap
();
void
LoadMap
();
void
Clear
();
Eigen
::
Vector2d
PositionOnLane
(
const
apollo
::
hdmap
::
LaneInfo
&
lane_info
,
const
double
s
);
private:
std
::
unique_ptr
<
apollo
::
hdmap
::
HDMapImpl
>
hdmap_
;
DECLARE_SINGLETON
(
PredictionMap
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录