Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
80e15612
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,发现更多精彩内容 >>
提交
80e15612
编写于
1月 09, 2019
作者:
P
panjiacheng
提交者:
Kecheng Xu
1月 14, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Prediction: Introducing the lane-scanning evaluator.
上级
3263e162
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
166 addition
and
6 deletion
+166
-6
modules/prediction/container/obstacles/obstacles_container.cc
...les/prediction/container/obstacles/obstacles_container.cc
+1
-0
modules/prediction/evaluator/vehicle/BUILD
modules/prediction/evaluator/vehicle/BUILD
+14
-0
modules/prediction/evaluator/vehicle/lane_scanning_evaluator.cc
...s/prediction/evaluator/vehicle/lane_scanning_evaluator.cc
+72
-0
modules/prediction/evaluator/vehicle/lane_scanning_evaluator.h
...es/prediction/evaluator/vehicle/lane_scanning_evaluator.h
+79
-0
modules/prediction/proto/feature.proto
modules/prediction/proto/feature.proto
+0
-6
未找到文件。
modules/prediction/container/obstacles/obstacles_container.cc
浏览文件 @
80e15612
...
...
@@ -277,6 +277,7 @@ void ObstaclesContainer::BuildLaneGraph() {
continue
;
}
obstacle_ptr
->
BuildLaneGraph
();
obstacle_ptr
->
BuildLaneGraphFromLeftToRight
();
}
}
...
...
modules/prediction/evaluator/vehicle/BUILD
浏览文件 @
80e15612
...
...
@@ -165,4 +165,18 @@ cc_test(
],
)
cc_library
(
name
=
"lane_scanning_evaluator"
,
srcs
=
[
"lane_scanning_evaluator.cc"
,
],
hdrs
=
[
"lane_scanning_evaluator.h"
,
],
deps
=
[
"//modules/prediction/container:container_manager"
,
"//modules/prediction/evaluator"
,
],
)
cpplint
()
modules/prediction/evaluator/vehicle/lane_scanning_evaluator.cc
0 → 100644
浏览文件 @
80e15612
/******************************************************************************
* Copyright 2018 The Apollo Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*****************************************************************************/
#include <limits>
#include <utility>
#include "modules/common/util/file.h"
#include "modules/prediction/common/feature_output.h"
#include "modules/prediction/common/prediction_gflags.h"
#include "modules/prediction/common/prediction_system_gflags.h"
#include "modules/prediction/container/container_manager.h"
#include "modules/prediction/container/obstacles/obstacles_container.h"
#include "modules/prediction/evaluator/vehicle/lane_scanning_evaluator.h"
namespace
apollo
{
namespace
prediction
{
using
apollo
::
common
::
adapter
::
AdapterConfig
;
using
apollo
::
common
::
util
::
GetProtoFromFile
;
// Helper function for converting world coordinate of a point
// to relative coordinate with respect to the object (obstacle or ADC).
std
::
pair
<
double
,
double
>
WorldCoordToObjCoord
(
std
::
pair
<
double
,
double
>
input_world_coord
,
std
::
pair
<
double
,
double
>
obj_world_coord
,
double
obj_world_angle
)
{
double
x_diff
=
input_world_coord
.
first
-
obj_world_coord
.
first
;
double
y_diff
=
input_world_coord
.
second
-
obj_world_coord
.
second
;
double
rho
=
std
::
sqrt
(
x_diff
*
x_diff
+
y_diff
*
y_diff
);
double
theta
=
std
::
atan2
(
y_diff
,
x_diff
)
-
obj_world_angle
;
return
std
::
make_pair
(
std
::
cos
(
theta
)
*
rho
,
std
::
sin
(
theta
)
*
rho
);
}
double
WorldAngleToObjAngle
(
double
input_world_angle
,
double
obj_world_angle
)
{
return
common
::
math
::
NormalizeAngle
(
input_world_angle
-
obj_world_angle
);
}
LaneScanningEvaluator
::
LaneScanningEvaluator
()
{
}
void
LaneScanningEvaluator
::
Evaluate
(
Obstacle
*
obstacle_ptr
)
{
}
void
LaneScanningEvaluator
::
ExtractFeatures
(
const
Obstacle
*
obstacle_ptr
,
std
::
vector
<
double
>*
feature_values
)
{
}
void
LaneScanningEvaluator
::
ExtractObstacleFeatures
(
const
Obstacle
*
obstacle_ptr
,
std
::
vector
<
double
>*
feature_values
)
{
}
void
LaneScanningEvaluator
::
ExtractStaticEnvFeatures
(
const
Obstacle
*
obstacle_ptr
,
std
::
vector
<
double
>*
feature_values
)
{
}
}
// namespace prediction
}
// namespace apollo
modules/prediction/evaluator/vehicle/lane_scanning_evaluator.h
0 → 100644
浏览文件 @
80e15612
/******************************************************************************
* Copyright 2018 The Apollo Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*****************************************************************************/
#pragma once
#include <memory>
#include <string>
#include <vector>
#include "modules/prediction/evaluator/evaluator.h"
namespace
apollo
{
namespace
prediction
{
class
LaneScanningEvaluator
:
public
Evaluator
{
public:
/**
* @brief Constructor
*/
LaneScanningEvaluator
();
/**
* @brief Destructor
*/
virtual
~
LaneScanningEvaluator
()
=
default
;
/**
* @brief Override Evaluate
* @param Obstacle pointer
*/
void
Evaluate
(
Obstacle
*
obstacle_ptr
)
override
;
/**
* @brief Extract features for learning model's input
* @param Obstacle pointer
*/
void
ExtractFeatures
(
const
Obstacle
*
obstacle_ptr
,
std
::
vector
<
double
>*
feature_values
);
private:
/**
* @brief Extract the features for obstacles
* @param Obstacle pointer
* A vector of doubles to be filled up with extracted features
*/
void
ExtractObstacleFeatures
(
const
Obstacle
*
obstacle_ptr
,
std
::
vector
<
double
>*
feature_values
);
/**
* @brief Set lane feature vector
* @param Obstacle pointer
* A vector of doubles to be filled up with extracted features
*/
void
ExtractStaticEnvFeatures
(
const
Obstacle
*
obstacle_ptr
,
std
::
vector
<
double
>*
feature_values
);
private:
static
const
size_t
OBSTACLE_FEATURE_SIZE
=
23
+
5
*
9
;
static
const
size_t
INTERACTION_FEATURE_SIZE
=
8
;
static
const
size_t
SINGLE_LANE_FEATURE_SIZE
=
4
;
static
const
size_t
LANE_POINTS_SIZE
=
20
;
};
}
// namespace prediction
}
// namespace apollo
modules/prediction/proto/feature.proto
浏览文件 @
80e15612
...
...
@@ -64,12 +64,6 @@ message ObstaclePriority {
optional
Priority
priority
=
25
[
default
=
NORMAL
];
}
// Ground truth information for labeling purpose
message
FutureStatus
{
repeated
apollo.common.TrajectoryPoint
future_traj_points
=
1
;
}
// next id = 32
message
Feature
{
// Obstacle ID
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录