Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
3e2b342a
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,发现更多精彩内容 >>
提交
3e2b342a
编写于
2月 15, 2018
作者:
Y
YajiaZhang
提交者:
Kecheng Xu
2月 16, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
planning: renamed PathTimeNeighborhood to PathTimeGraph
上级
a1531113
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
45 addition
and
42 deletion
+45
-42
modules/planning/lattice/behavior_decider/BUILD
modules/planning/lattice/behavior_decider/BUILD
+7
-7
modules/planning/lattice/behavior_decider/behavior_decider.cc
...les/planning/lattice/behavior_decider/behavior_decider.cc
+1
-1
modules/planning/lattice/behavior_decider/behavior_decider.h
modules/planning/lattice/behavior_decider/behavior_decider.h
+3
-3
modules/planning/lattice/behavior_decider/condition_filter.cc
...les/planning/lattice/behavior_decider/condition_filter.cc
+1
-1
modules/planning/lattice/behavior_decider/condition_filter.h
modules/planning/lattice/behavior_decider/condition_filter.h
+3
-3
modules/planning/lattice/behavior_decider/path_time_graph.cc
modules/planning/lattice/behavior_decider/path_time_graph.cc
+13
-13
modules/planning/lattice/behavior_decider/path_time_graph.h
modules/planning/lattice/behavior_decider/path_time_graph.h
+8
-5
modules/planning/lattice/trajectory_generator/BUILD
modules/planning/lattice/trajectory_generator/BUILD
+1
-1
modules/planning/lattice/trajectory_generator/trajectory_evaluator.cc
...ning/lattice/trajectory_generator/trajectory_evaluator.cc
+1
-1
modules/planning/lattice/trajectory_generator/trajectory_evaluator.h
...nning/lattice/trajectory_generator/trajectory_evaluator.h
+3
-3
modules/planning/planner/lattice/BUILD
modules/planning/planner/lattice/BUILD
+1
-1
modules/planning/planner/lattice/lattice_planner.cc
modules/planning/planner/lattice/lattice_planner.cc
+3
-3
未找到文件。
modules/planning/lattice/behavior_decider/BUILD
浏览文件 @
3e2b342a
...
...
@@ -18,8 +18,8 @@ cc_library(
"//modules/planning/common:frame"
,
"//modules/planning/common:planning_gflags"
,
"//modules/planning/common/trajectory:discretized_trajectory"
,
"//modules/planning/lattice/behavior_decider:path_time_graph"
,
"//modules/planning/lattice/behavior_decider:condition_filter"
,
"//modules/planning/lattice/behavior_decider:path_time_neighborhood"
,
"//modules/planning/lattice/behavior_decider:scenario_manager"
,
"//modules/planning/proto:lattice_sampling_config_proto"
,
"//modules/planning/proto:planning_proto"
,
...
...
@@ -86,12 +86,12 @@ cc_library(
)
cc_library
(
name
=
"path_time_neighborhood"
,
srcs
=
[
"path_time_neighborhood.cc"
,
],
name
=
"path_time_graph"
,
hdrs
=
[
"path_time_neighborhood.h"
,
"path_time_graph.h"
,
],
srcs
=
[
"path_time_graph.cc"
,
],
deps
=
[
"//modules/common"
,
...
...
@@ -117,8 +117,8 @@ cc_library(
],
deps
=
[
"//modules/common/math:linear_interpolation"
,
"//modules/planning/lattice/behavior_decider:path_time_graph"
,
"//modules/planning/lattice/behavior_decider:feasible_region"
,
"//modules/planning/lattice/behavior_decider:path_time_neighborhood"
,
"//modules/planning/proto:lattice_structure_proto"
,
"//modules/planning/proto:planning_proto"
,
],
...
...
modules/planning/lattice/behavior_decider/behavior_decider.cc
浏览文件 @
3e2b342a
...
...
@@ -35,7 +35,7 @@ using apollo::common::PointENU;
BehaviorDecider
::
BehaviorDecider
()
{}
void
BehaviorDecider
::
UpdatePathTimeNeighborhood
(
std
::
shared_ptr
<
PathTime
Neighborhood
>
p
)
{
std
::
shared_ptr
<
PathTime
Graph
>
p
)
{
path_time_neighborhood_
=
p
;
}
...
...
modules/planning/lattice/behavior_decider/behavior_decider.h
浏览文件 @
3e2b342a
...
...
@@ -29,7 +29,7 @@
#include "modules/planning/common/frame.h"
#include "modules/planning/common/reference_line_info.h"
#include "modules/planning/common/trajectory/discretized_trajectory.h"
#include "modules/planning/lattice/behavior_decider/path_time_
neighborhood
.h"
#include "modules/planning/lattice/behavior_decider/path_time_
graph
.h"
#include "modules/planning/proto/lattice_structure.pb.h"
#include "modules/planning/proto/planning.pb.h"
...
...
@@ -40,7 +40,7 @@ class BehaviorDecider {
public:
BehaviorDecider
();
void
UpdatePathTimeNeighborhood
(
std
::
shared_ptr
<
PathTime
Neighborhood
>
p
);
void
UpdatePathTimeNeighborhood
(
std
::
shared_ptr
<
PathTime
Graph
>
p
);
virtual
~
BehaviorDecider
()
=
default
;
...
...
@@ -51,7 +51,7 @@ class BehaviorDecider {
const
std
::
vector
<
common
::
PathPoint
>&
discretized_reference_line
);
private:
std
::
shared_ptr
<
PathTime
Neighborhood
>
path_time_neighborhood_
;
std
::
shared_ptr
<
PathTime
Graph
>
path_time_neighborhood_
;
};
}
// namespace planning
...
...
modules/planning/lattice/behavior_decider/condition_filter.cc
浏览文件 @
3e2b342a
...
...
@@ -36,7 +36,7 @@ using PathTimePointPair = std::pair<PathTimePoint, PathTimePoint>;
ConditionFilter
::
ConditionFilter
(
const
std
::
array
<
double
,
3
>&
init_s
,
const
double
speed_limit
,
std
::
shared_ptr
<
PathTime
Neighborhood
>
path_time_neighborhood
)
std
::
shared_ptr
<
PathTime
Graph
>
path_time_neighborhood
)
:
feasible_region_
(
init_s
,
speed_limit
),
ptr_path_time_neighborhood_
(
path_time_neighborhood
)
{}
...
...
modules/planning/lattice/behavior_decider/condition_filter.h
浏览文件 @
3e2b342a
...
...
@@ -29,7 +29,7 @@
#include <vector>
#include "modules/planning/lattice/behavior_decider/feasible_region.h"
#include "modules/planning/lattice/behavior_decider/path_time_
neighborhood
.h"
#include "modules/planning/lattice/behavior_decider/path_time_
graph
.h"
#include "modules/planning/proto/lattice_structure.pb.h"
#include "modules/planning/proto/planning_internal.pb.h"
...
...
@@ -39,7 +39,7 @@ namespace planning {
class
ConditionFilter
{
public:
ConditionFilter
(
const
std
::
array
<
double
,
3
>&
init_s
,
const
double
speed_limit
,
std
::
shared_ptr
<
PathTime
Neighborhood
>
path_time_neighborhood
);
std
::
shared_ptr
<
PathTime
Graph
>
path_time_neighborhood
);
std
::
vector
<
SampleBound
>
QuerySampleBounds
(
const
double
t
)
const
;
...
...
@@ -68,7 +68,7 @@ class ConditionFilter {
private:
FeasibleRegion
feasible_region_
;
std
::
shared_ptr
<
PathTime
Neighborhood
>
ptr_path_time_neighborhood_
;
std
::
shared_ptr
<
PathTime
Graph
>
ptr_path_time_neighborhood_
;
};
}
// namespace planning
...
...
modules/planning/lattice/behavior_decider/path_time_
neighborhood
.cc
→
modules/planning/lattice/behavior_decider/path_time_
graph
.cc
浏览文件 @
3e2b342a
...
...
@@ -18,7 +18,7 @@
* @file
**/
#include "modules/planning/lattice/behavior_decider/path_time_
neighborhood
.h"
#include "modules/planning/lattice/behavior_decider/path_time_
graph
.h"
#include <algorithm>
#include <cmath>
...
...
@@ -68,7 +68,7 @@ int LastIndexBefore(const prediction::Trajectory& trajectory, const double t) {
}
// namespace
PathTime
Neighborhood
::
PathTimeNeighborhood
(
PathTime
Graph
::
PathTimeGraph
(
const
std
::
vector
<
const
Obstacle
*>&
obstacles
,
const
double
ego_s
,
const
std
::
vector
<
PathPoint
>&
discretized_ref_points
)
{
path_range_
.
first
=
ego_s
;
...
...
@@ -81,7 +81,7 @@ PathTimeNeighborhood::PathTimeNeighborhood(
SetupObstacles
(
obstacles
,
discretized_ref_points
);
}
SLBoundary
PathTime
Neighborhood
::
ComputeObstacleBoundary
(
SLBoundary
PathTime
Graph
::
ComputeObstacleBoundary
(
const
Box2d
&
box
,
const
std
::
vector
<
PathPoint
>&
discretized_ref_points
)
const
{
double
start_s
(
std
::
numeric_limits
<
double
>::
max
());
...
...
@@ -109,7 +109,7 @@ SLBoundary PathTimeNeighborhood::ComputeObstacleBoundary(
return
sl_boundary
;
}
void
PathTime
Neighborhood
::
SetupObstacles
(
void
PathTime
Graph
::
SetupObstacles
(
const
std
::
vector
<
const
Obstacle
*>&
obstacles
,
const
std
::
vector
<
PathPoint
>&
discretized_ref_points
)
{
...
...
@@ -200,7 +200,7 @@ void PathTimeNeighborhood::SetupObstacles(
}
}
void
PathTime
Neighborhood
::
SetStaticPathTimeObstacle
(
void
PathTime
Graph
::
SetStaticPathTimeObstacle
(
const
Obstacle
*
obstacle
,
const
std
::
vector
<
PathPoint
>&
discretized_ref_points
)
{
TrajectoryPoint
start_point
=
obstacle
->
GetPointAtTime
(
0.0
);
...
...
@@ -222,7 +222,7 @@ void PathTimeNeighborhood::SetStaticPathTimeObstacle(
FLAGS_trajectory_time_length
));
}
double
PathTime
Neighborhood
::
SpeedAtT
(
const
std
::
string
&
obstacle_id
,
double
PathTime
Graph
::
SpeedAtT
(
const
std
::
string
&
obstacle_id
,
const
double
s
,
const
double
t
)
const
{
bool
found
=
prediction_traj_map_
.
find
(
obstacle_id
)
!=
prediction_traj_map_
.
end
();
...
...
@@ -267,7 +267,7 @@ double PathTimeNeighborhood::SpeedAtT(const std::string& obstacle_id,
return
std
::
cos
(
ref_theta
)
*
v_x
+
std
::
sin
(
ref_theta
)
*
v_y
;
}
PathTimePoint
PathTime
Neighborhood
::
SetPathTimePoint
(
PathTimePoint
PathTime
Graph
::
SetPathTimePoint
(
const
std
::
string
&
obstacle_id
,
const
double
s
,
const
double
t
)
const
{
PathTimePoint
path_time_point
;
path_time_point
.
set_s
(
s
);
...
...
@@ -278,11 +278,11 @@ PathTimePoint PathTimeNeighborhood::SetPathTimePoint(
}
const
std
::
vector
<
PathTimeObstacle
>&
PathTime
Neighborhood
::
GetPathTimeObstacles
()
const
{
PathTime
Graph
::
GetPathTimeObstacles
()
const
{
return
path_time_obstacles_
;
}
bool
PathTime
Neighborhood
::
GetPathTimeObstacle
(
bool
PathTime
Graph
::
GetPathTimeObstacle
(
const
std
::
string
&
obstacle_id
,
PathTimeObstacle
*
path_time_obstacle
)
{
if
(
path_time_obstacle_map_
.
find
(
obstacle_id
)
==
path_time_obstacle_map_
.
end
())
{
...
...
@@ -293,7 +293,7 @@ bool PathTimeNeighborhood::GetPathTimeObstacle(
}
std
::
vector
<
std
::
pair
<
double
,
double
>>
PathTime
Neighborhood
::
GetPathBlockingIntervals
(
const
double
t
)
const
{
PathTime
Graph
::
GetPathBlockingIntervals
(
const
double
t
)
const
{
CHECK
(
time_range_
.
first
<=
t
&&
t
<=
time_range_
.
second
);
std
::
vector
<
std
::
pair
<
double
,
double
>>
intervals
;
for
(
const
auto
&
pt_obstacle
:
path_time_obstacles_
)
{
...
...
@@ -314,7 +314,7 @@ PathTimeNeighborhood::GetPathBlockingIntervals(const double t) const {
}
std
::
vector
<
std
::
vector
<
std
::
pair
<
double
,
double
>>>
PathTime
Neighborhood
::
GetPathBlockingIntervals
(
const
double
t_start
,
PathTime
Graph
::
GetPathBlockingIntervals
(
const
double
t_start
,
const
double
t_end
,
const
double
t_resolution
)
{
std
::
vector
<
std
::
vector
<
std
::
pair
<
double
,
double
>>>
intervals
;
...
...
@@ -324,11 +324,11 @@ PathTimeNeighborhood::GetPathBlockingIntervals(const double t_start,
return
intervals
;
}
std
::
pair
<
double
,
double
>
PathTime
Neighborhood
::
get_path_range
()
const
{
std
::
pair
<
double
,
double
>
PathTime
Graph
::
get_path_range
()
const
{
return
path_range_
;
}
std
::
pair
<
double
,
double
>
PathTime
Neighborhood
::
get_time_range
()
const
{
std
::
pair
<
double
,
double
>
PathTime
Graph
::
get_time_range
()
const
{
return
time_range_
;
}
...
...
modules/planning/lattice/behavior_decider/path_time_
neighborhood
.h
→
modules/planning/lattice/behavior_decider/path_time_
graph
.h
浏览文件 @
3e2b342a
...
...
@@ -18,8 +18,8 @@
* @file
**/
#ifndef MODULES_PLANNING_LATTICE_BEHAVIOR_DECIDER_PATH_TIME_
NEIGHBORHOOD
_H_
#define MODULES_PLANNING_LATTICE_BEHAVIOR_DECIDER_PATH_TIME_
NEIGHBORHOOD
_H_
#ifndef MODULES_PLANNING_LATTICE_BEHAVIOR_DECIDER_PATH_TIME_
GRAPH
_H_
#define MODULES_PLANNING_LATTICE_BEHAVIOR_DECIDER_PATH_TIME_
GRAPH
_H_
#include <array>
#include <string>
...
...
@@ -37,9 +37,9 @@
namespace
apollo
{
namespace
planning
{
class
PathTime
Neighborhood
{
class
PathTime
Graph
{
public:
PathTime
Neighborhood
(
PathTime
Graph
(
const
std
::
vector
<
const
Obstacle
*>&
obstacles
,
const
double
ego_s
,
const
std
::
vector
<
common
::
PathPoint
>&
discretized_ref_points
);
...
...
@@ -61,6 +61,9 @@ class PathTimeNeighborhood {
std
::
pair
<
double
,
double
>
get_time_range
()
const
;
std
::
vector
<
std
::
pair
<
double
,
double
>>
GetPathTimeNeighborhoodPoints
(
const
double
s_dist
,
const
double
t_density
)
const
;
private:
void
SetupObstacles
(
const
std
::
vector
<
const
Obstacle
*>&
obstacles
,
...
...
@@ -95,4 +98,4 @@ class PathTimeNeighborhood {
}
// namespace planning
}
// namespace apollo
#endif // MODULES_PLANNING_LATTICE_BEHAVIOR_DECIDER_PATH_TIME_
NEIGHBORHOOD
_H_
#endif // MODULES_PLANNING_LATTICE_BEHAVIOR_DECIDER_PATH_TIME_
GRAPH
_H_
modules/planning/lattice/trajectory_generator/BUILD
浏览文件 @
3e2b342a
...
...
@@ -51,9 +51,9 @@ cc_library(
"//modules/common"
,
"//modules/planning/common:planning_gflags"
,
"//modules/planning/constraint_checker:constraint_checker1d"
,
"//modules/planning/lattice/behavior_decider:path_time_neighborhood"
,
"//modules/planning/math/curve1d"
,
"//modules/planning/proto:lattice_sampling_config_proto"
,
"//modules/planning/lattice/behavior_decider:path_time_graph"
,
],
)
...
...
modules/planning/lattice/trajectory_generator/trajectory_evaluator.cc
浏览文件 @
3e2b342a
...
...
@@ -39,7 +39,7 @@ TrajectoryEvaluator::TrajectoryEvaluator(
const
std
::
vector
<
std
::
shared_ptr
<
Trajectory1d
>>&
lon_trajectories
,
const
std
::
vector
<
std
::
shared_ptr
<
Trajectory1d
>>&
lat_trajectories
,
bool
is_auto_tuning
,
std
::
shared_ptr
<
PathTime
Neighborhood
>
pathtime_neighborhood
)
std
::
shared_ptr
<
PathTime
Graph
>
pathtime_neighborhood
)
:
is_auto_tuning_
(
is_auto_tuning
),
pathtime_neighborhood_
(
pathtime_neighborhood
)
{
...
...
modules/planning/lattice/trajectory_generator/trajectory_evaluator.h
浏览文件 @
3e2b342a
...
...
@@ -27,7 +27,7 @@
#include <utility>
#include <vector>
#include "
modules/planning/lattice/behavior_decider/path_time_neighborhood
.h"
#include "
../behavior_decider/path_time_graph
.h"
#include "modules/planning/math/curve1d/curve1d.h"
#include "modules/planning/proto/lattice_structure.pb.h"
#include "modules/planning/proto/planning_config.pb.h"
...
...
@@ -53,7 +53,7 @@ class TrajectoryEvaluator {
const
std
::
vector
<
std
::
shared_ptr
<
Curve1d
>>&
lon_trajectories
,
const
std
::
vector
<
std
::
shared_ptr
<
Curve1d
>>&
lat_trajectories
,
bool
is_auto_tuning
,
std
::
shared_ptr
<
PathTime
Neighborhood
>
pathtime_neighborhood
);
std
::
shared_ptr
<
PathTime
Graph
>
pathtime_neighborhood
);
virtual
~
TrajectoryEvaluator
()
=
default
;
...
...
@@ -118,7 +118,7 @@ class TrajectoryEvaluator {
bool
is_auto_tuning_
=
false
;
std
::
shared_ptr
<
PathTime
Neighborhood
>
pathtime_neighborhood_
;
std
::
shared_ptr
<
PathTime
Graph
>
pathtime_neighborhood_
;
std
::
vector
<
std
::
vector
<
std
::
pair
<
double
,
double
>>>
path_time_intervals_
;
};
...
...
modules/planning/planner/lattice/BUILD
浏览文件 @
3e2b342a
...
...
@@ -18,7 +18,7 @@ cc_library(
"//modules/planning/constraint_checker"
,
"//modules/planning/constraint_checker:collision_checker"
,
"//modules/planning/lattice/behavior_decider"
,
"//modules/planning/lattice/behavior_decider:path_time_
neighborhood
"
,
"//modules/planning/lattice/behavior_decider:path_time_
graph
"
,
"//modules/planning/lattice/trajectory_generator:backup_trajectory_generator"
,
"//modules/planning/lattice/trajectory_generator:trajectory1d_generator"
,
"//modules/planning/lattice/trajectory_generator:trajectory_combiner"
,
...
...
modules/planning/planner/lattice/lattice_planner.cc
浏览文件 @
3e2b342a
...
...
@@ -26,6 +26,7 @@
#include <utility>
#include <vector>
#include "../../lattice/behavior_decider/path_time_graph.h"
#include "modules/common/adapters/adapter_manager.h"
#include "modules/common/log.h"
#include "modules/common/macro.h"
...
...
@@ -33,7 +34,6 @@
#include "modules/planning/common/planning_gflags.h"
#include "modules/planning/constraint_checker/collision_checker.h"
#include "modules/planning/constraint_checker/constraint_checker.h"
#include "modules/planning/lattice/behavior_decider/path_time_neighborhood.h"
#include "modules/planning/lattice/trajectory_generator/backup_trajectory_generator.h"
#include "modules/planning/lattice/trajectory_generator/trajectory1d_generator.h"
#include "modules/planning/lattice/trajectory_generator/trajectory_combiner.h"
...
...
@@ -159,8 +159,8 @@ Status LatticePlanner::PlanOnReferenceLine(
current_time
=
Clock
::
NowInSeconds
();
// 4. parse the decision and get the planning target.
std
::
shared_ptr
<
PathTime
Neighborhood
>
path_time_neighborhood_ptr
(
new
PathTime
Neighborhood
(
frame
->
obstacles
(),
init_s
[
0
],
std
::
shared_ptr
<
PathTime
Graph
>
path_time_neighborhood_ptr
(
new
PathTime
Graph
(
frame
->
obstacles
(),
init_s
[
0
],
discretized_reference_line
));
decider_
.
UpdatePathTimeNeighborhood
(
path_time_neighborhood_ptr
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录