Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
77f4a449
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,体验更适合开发者的 AI 搜索 >>
提交
77f4a449
编写于
9月 14, 2017
作者:
Z
Zhang Liangliang
提交者:
Jiangtao Hu
9月 14, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ALL: fixed all lint errors.
上级
b7244a7c
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
33 addition
and
32 deletion
+33
-32
modules/perception/obstacle/common/file_system_util.cc
modules/perception/obstacle/common/file_system_util.cc
+1
-1
modules/planning/tasks/dp_poly_path/trajectory_cost.cc
modules/planning/tasks/dp_poly_path/trajectory_cost.cc
+23
-24
modules/planning/tasks/dp_poly_path/trajectory_cost.h
modules/planning/tasks/dp_poly_path/trajectory_cost.h
+5
-5
modules/planning/tasks/qp_spline_st_speed/qp_spline_st_graph.h
...es/planning/tasks/qp_spline_st_speed/qp_spline_st_graph.h
+1
-0
modules/planning/tasks/qp_spline_st_speed/qp_spline_st_speed_optimizer.cc
.../tasks/qp_spline_st_speed/qp_spline_st_speed_optimizer.cc
+1
-0
modules/prediction/container/pose/pose_container_test.cc
modules/prediction/container/pose/pose_container_test.cc
+1
-1
modules/routing/common/routing_gflags.cc
modules/routing/common/routing_gflags.cc
+1
-1
未找到文件。
modules/perception/obstacle/common/file_system_util.cc
浏览文件 @
77f4a449
...
...
@@ -18,7 +18,7 @@
#include <algorithm>
#include
<boost/filesystem.hpp>
#include
"boost/filesystem.hpp"
namespace
apollo
{
namespace
perception
{
...
...
modules/planning/tasks/dp_poly_path/trajectory_cost.cc
浏览文件 @
77f4a449
...
...
@@ -15,7 +15,7 @@
*****************************************************************************/
/**
* @file
trjactory_cost.h
* @file
**/
#include "modules/planning/tasks/dp_poly_path/trajectory_cost.h"
...
...
@@ -35,15 +35,14 @@ using apollo::common::math::Vec2d;
using
apollo
::
common
::
TrajectoryPoint
;
TrajectoryCost
::
TrajectoryCost
(
const
DpPolyPathConfig
&
config
,
const
ReferenceLine
&
reference_line
,
const
std
::
vector
<
const
PathObstacle
*>&
obstacles
,
const
DpPolyPathConfig
&
config
,
const
ReferenceLine
&
reference_line
,
const
std
::
vector
<
const
PathObstacle
*>
&
obstacles
,
const
common
::
VehicleParam
&
vehicle_param
,
const
SpeedData
&
heuristic_speed_data
)
:
config_
(
config
),
reference_line_
(
&
reference_line
),
vehicle_param_
(
vehicle_param
),
heuristic_speed_data_
(
heuristic_speed_data
)
{
const
SpeedData
&
heuristic_speed_data
)
:
config_
(
config
),
reference_line_
(
&
reference_line
),
vehicle_param_
(
vehicle_param
),
heuristic_speed_data_
(
heuristic_speed_data
)
{
const
double
total_time
=
std
::
min
(
heuristic_speed_data_
.
TotalTime
(),
FLAGS_prediction_total_time
);
...
...
@@ -56,13 +55,13 @@ TrajectoryCost::TrajectoryCost(
}
const
auto
ptr_obstacle
=
ptr_path_obstacle
->
obstacle
();
if
(
ptr_obstacle
->
PerceptionId
()
<
0
)
{
//Virtual obsatcle
//
Virtual obsatcle
continue
;
}
std
::
vector
<
Box2d
>
box_by_time
;
for
(
uint32_t
t
=
0
;
t
<=
num_of_time_stamps_
;
++
t
)
{
TrajectoryPoint
trajectory_point
=
ptr_obstacle
->
GetPointAtTime
(
t
*
config
.
eval_time_interval
());
ptr_obstacle
->
GetPointAtTime
(
t
*
config
.
eval_time_interval
());
Box2d
obs_box
=
ptr_obstacle
->
GetBoundingBox
(
trajectory_point
);
box_by_time
.
push_back
(
obs_box
);
}
...
...
@@ -77,15 +76,15 @@ double TrajectoryCost::Calculate(const QuinticPolynomialCurve1d &curve,
// path_cost
double
path_s
=
0.0
;
while
(
path_s
<
(
end_s
-
start_s
))
{
double
l
=
std
::
fabs
(
curve
.
Evaluate
(
0
,
path_s
));
const
double
l
=
std
::
fabs
(
curve
.
Evaluate
(
0
,
path_s
));
total_cost
+=
l
;
double
dl
=
std
::
fabs
(
curve
.
Evaluate
(
1
,
path_s
));
const
double
dl
=
std
::
fabs
(
curve
.
Evaluate
(
1
,
path_s
));
total_cost
+=
dl
;
path_s
+=
config_
.
path_resolution
();
}
// obstacle cost
uint32_t
start_index
=
0
;
bool
is_found_start_index
=
false
;
...
...
@@ -109,24 +108,24 @@ double TrajectoryCost::Calculate(const QuinticPolynomialCurve1d &curve,
for
(;
start_index
<
end_index
;
++
start_index
)
{
common
::
SpeedPoint
speed_point
;
heuristic_speed_data_
.
EvaluateByTime
(
start_index
*
config_
.
eval_time_interval
(),
&
speed_point
);
double
s
=
speed_point
.
s
()
-
start_s
;
double
l
=
curve
.
Evaluate
(
0
,
s
);
double
dl
=
curve
.
Evaluate
(
1
,
s
);
start_index
*
config_
.
eval_time_interval
(),
&
speed_point
);
const
double
s
=
speed_point
.
s
()
-
start_s
;
const
double
l
=
curve
.
Evaluate
(
0
,
s
);
const
double
dl
=
curve
.
Evaluate
(
1
,
s
);
Vec2d
ego_xy_point
;
common
::
SLPoint
sl
;
sl
.
set_s
(
speed_point
.
s
());
sl
.
set_l
(
l
);
reference_line_
->
SLToXY
(
sl
,
&
ego_xy_point
);
ReferencePoint
reference_point
=
reference_line_
->
GetReferencePoint
(
speed_point
.
s
());
ReferencePoint
reference_point
=
reference_line_
->
GetReferencePoint
(
speed_point
.
s
());
double
one_minus_kappa_r_d
=
1
-
reference_point
.
kappa
()
*
l
;
double
delta_theta
=
std
::
atan2
(
dl
,
one_minus_kappa_r_d
);
double
theta
=
common
::
math
::
NormalizeAngle
(
delta_theta
+
reference_point
.
heading
());
Box2d
ego_box
=
{
ego_xy_point
,
theta
,
vehicle_param_
.
length
(),
vehicle_param_
.
width
()};
double
theta
=
common
::
math
::
NormalizeAngle
(
delta_theta
+
reference_point
.
heading
());
Box2d
ego_box
=
{
ego_xy_point
,
theta
,
vehicle_param_
.
length
(),
vehicle_param_
.
width
()};
for
(
const
auto
&
obstacle_trajectory
:
obstacle_boxes_
)
{
auto
&
obstacle_box
=
obstacle_trajectory
[
start_index
];
double
distance
=
obstacle_box
.
DistanceTo
(
ego_box
);
...
...
modules/planning/tasks/dp_poly_path/trajectory_cost.h
浏览文件 @
77f4a449
...
...
@@ -18,8 +18,8 @@
* @file trjactory_cost.h
**/
#ifndef MODULES_PLANNING_TASKS_DP_POLY_PATH_TRAJECTORY_COST_H
#define MODULES_PLANNING_TASKS_DP_POLY_PATH_TRAJECTORY_COST_H
#ifndef MODULES_PLANNING_TASKS_DP_POLY_PATH_TRAJECTORY_COST_H
_
#define MODULES_PLANNING_TASKS_DP_POLY_PATH_TRAJECTORY_COST_H
_
#include <vector>
...
...
@@ -40,7 +40,7 @@ class TrajectoryCost {
public:
explicit
TrajectoryCost
(
const
DpPolyPathConfig
&
config
,
const
ReferenceLine
&
reference_line
,
const
std
::
vector
<
const
PathObstacle
*>&
obstacles
,
const
std
::
vector
<
const
PathObstacle
*>
&
obstacles
,
const
common
::
VehicleParam
&
vehicle_param
,
const
SpeedData
&
heuristic_speed_data
);
double
Calculate
(
const
QuinticPolynomialCurve1d
&
curve
,
const
double
start_s
,
...
...
@@ -51,7 +51,7 @@ class TrajectoryCost {
const
ReferenceLine
*
reference_line_
=
nullptr
;
const
common
::
VehicleParam
vehicle_param_
;
SpeedData
heuristic_speed_data_
;
uint32_t
num_of_time_stamps_
;
uint32_t
num_of_time_stamps_
=
0
;
std
::
vector
<
std
::
vector
<
common
::
math
::
Box2d
>>
obstacle_boxes_
;
std
::
vector
<
double
>
obstacle_probabilities_
;
};
...
...
@@ -59,4 +59,4 @@ class TrajectoryCost {
}
// namespace planning
}
// namespace apollo
#endif // MODULES_PLANNING_TASKS_DP_POLY_PATH_TRAJECTORY_COST_H
#endif // MODULES_PLANNING_TASKS_DP_POLY_PATH_TRAJECTORY_COST_H
_
modules/planning/tasks/qp_spline_st_speed/qp_spline_st_graph.h
浏览文件 @
77f4a449
...
...
@@ -22,6 +22,7 @@
#define MODULES_PLANNING_TASKS_QP_SPLINE_ST_SPEED_QP_SPLINE_ST_GRAPH_H_
#include <memory>
#include <utility>
#include <vector>
#include "modules/common/configs/proto/vehicle_config.pb.h"
...
...
modules/planning/tasks/qp_spline_st_speed/qp_spline_st_speed_optimizer.cc
浏览文件 @
77f4a449
...
...
@@ -21,6 +21,7 @@
#include "modules/planning/tasks/qp_spline_st_speed/qp_spline_st_speed_optimizer.h"
#include <algorithm>
#include <utility>
#include <vector>
#include "modules/common/proto/pnc_point.pb.h"
...
...
modules/prediction/container/pose/pose_container_test.cc
浏览文件 @
77f4a449
...
...
@@ -33,7 +33,7 @@ class PoseContainerTest : public ::testing::Test {
PoseContainerTest
()
=
default
;
virtual
~
PoseContainerTest
()
=
default
;
v
irtual
v
oid
SetUp
()
override
{}
void
SetUp
()
override
{}
protected:
void
InitPose
(
LocalizationEstimate
*
localization
);
...
...
modules/routing/common/routing_gflags.cc
浏览文件 @
77f4a449
...
...
@@ -28,4 +28,4 @@ DEFINE_bool(use_road_id, true, "enable use road id to cut routing result");
DEFINE_double
(
min_length_for_lane_change
,
10.0
,
"min length for lane change, in creater, in meter"
);
DEFINE_bool
(
enable_change_lane_in_result
,
false
,
"contain change lane operator in result"
);
\ No newline at end of file
"contain change lane operator in result"
);
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录