Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
1c5b179d
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 搜索 >>
提交
1c5b179d
编写于
7月 28, 2017
作者:
J
Jiangtao Hu
提交者:
lianglia-apollo
7月 28, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
moving SpeedPoint to common/path_point.proto
上级
247f5308
变更
17
隐藏空白更改
内联
并排
Showing
17 changed file
with
59 addition
and
51 deletion
+59
-51
modules/common/proto/path_point.proto
modules/common/proto/path_point.proto
+9
-2
modules/planning/common/planning_data.cc
modules/planning/common/planning_data.cc
+1
-1
modules/planning/common/planning_util.cc
modules/planning/common/planning_util.cc
+1
-0
modules/planning/common/planning_util.h
modules/planning/common/planning_util.h
+13
-14
modules/planning/common/speed/speed_data.cc
modules/planning/common/speed/speed_data.cc
+8
-8
modules/planning/common/speed/speed_data.h
modules/planning/common/speed/speed_data.h
+9
-8
modules/planning/common/speed_limit.cc
modules/planning/common/speed_limit.cc
+2
-0
modules/planning/common/speed_limit.h
modules/planning/common/speed_limit.h
+4
-4
modules/planning/optimizer/dp_st_speed/BUILD
modules/planning/optimizer/dp_st_speed/BUILD
+1
-0
modules/planning/optimizer/dp_st_speed/dp_st_graph.cc
modules/planning/optimizer/dp_st_speed/dp_st_graph.cc
+2
-0
modules/planning/optimizer/qp_spline_path/BUILD
modules/planning/optimizer/qp_spline_path/BUILD
+1
-0
modules/planning/optimizer/qp_spline_path/qp_frenet_frame.cc
modules/planning/optimizer/qp_spline_path/qp_frenet_frame.cc
+3
-0
modules/planning/optimizer/qp_spline_path/qp_frenet_frame.h
modules/planning/optimizer/qp_spline_path/qp_frenet_frame.h
+2
-2
modules/planning/optimizer/st_graph/st_boundary_mapper.cc
modules/planning/optimizer/st_graph/st_boundary_mapper.cc
+1
-0
modules/planning/planner/em/em_planner.cc
modules/planning/planner/em/em_planner.cc
+1
-0
modules/planning/planner/em/em_planner.h
modules/planning/planner/em/em_planner.h
+1
-1
modules/planning/proto/planning.proto
modules/planning/proto/planning.proto
+0
-11
未找到文件。
modules/common/proto/path_point.proto
浏览文件 @
1c5b179d
...
...
@@ -14,8 +14,15 @@ message FrenetFramePoint {
optional
double
ddl
=
4
;
}
message
EStop
{
optional
bool
is_estop
=
1
;
message
SpeedPoint
{
optional
double
s
=
1
;
optional
double
t
=
2
;
// speed (m/s)
optional
double
v
=
3
;
// acceleration (m/s^2)
optional
double
a
=
4
;
// jerk (m/s^3)
optional
double
da
=
5
;
}
message
PathPoint
{
...
...
modules/planning/common/planning_data.cc
浏览文件 @
1c5b179d
...
...
@@ -81,7 +81,7 @@ bool PlanningData::aggregate(const double time_resolution,
for
(
double
cur_rel_time
=
0.0
;
cur_rel_time
<
speed_data_
.
total_time
();
cur_rel_time
+=
time_resolution
)
{
SpeedPoint
speed_point
;
common
::
SpeedPoint
speed_point
;
QUIT_IF
(
!
speed_data_
.
get_speed_point_with_time
(
cur_rel_time
,
&
speed_point
),
false
,
ERROR
,
"Fail to get speed point with relative time %f"
,
cur_rel_time
);
...
...
modules/planning/common/planning_util.cc
浏览文件 @
1c5b179d
...
...
@@ -30,6 +30,7 @@ namespace planning {
namespace
util
{
using
common
::
PathPoint
;
using
common
::
SpeedPoint
;
using
common
::
TrajectoryPoint
;
SpeedPoint
MakeSpeedPoint
(
const
double
s
,
const
double
t
,
double
v
,
double
a
,
...
...
modules/planning/common/planning_util.h
浏览文件 @
1c5b179d
...
...
@@ -34,30 +34,29 @@ namespace apollo {
namespace
planning
{
namespace
util
{
SpeedPoint
MakeSpeedPoint
(
const
double
s
,
const
double
t
,
double
v
,
double
a
,
common
::
SpeedPoint
MakeSpeedPoint
(
const
double
s
,
const
double
t
,
double
v
,
double
a
,
double
da
);
common
::
SLPoint
interpolate
(
const
common
::
SLPoint
&
start
,
const
common
::
SLPoint
&
end
,
const
double
weight
);
apollo
::
common
::
PathPoint
interpolate
(
const
apollo
::
common
::
PathPoint
&
p0
,
const
apollo
::
common
::
PathPoint
&
p1
,
const
double
s
);
SpeedPoint
interpolate
(
const
SpeedPoint
&
start
,
const
SpeedPoint
&
end
,
const
double
weight
);
common
::
PathPoint
interpolate
(
const
common
::
PathPoint
&
p0
,
const
common
::
PathPoint
&
p1
,
const
double
s
);
common
::
SpeedPoint
interpolate
(
const
common
::
SpeedPoint
&
start
,
const
common
::
SpeedPoint
&
end
,
const
double
weight
);
// @ weight shall between 1 and 0
apollo
::
common
::
PathPoint
interpolate_linear_approximation
(
const
apollo
::
common
::
PathPoint
&
p0
,
const
apollo
::
common
::
PathPoint
&
p1
,
common
::
PathPoint
interpolate_linear_approximation
(
const
common
::
PathPoint
&
p0
,
const
common
::
PathPoint
&
p1
,
const
double
s
);
apollo
::
common
::
TrajectoryPoint
interpolate
(
const
apollo
::
common
::
TrajectoryPoint
&
tp0
,
const
apollo
::
common
::
TrajectoryPoint
&
tp1
,
const
double
t
);
common
::
TrajectoryPoint
interpolate
(
const
common
::
TrajectoryPoint
&
tp0
,
const
common
::
TrajectoryPoint
&
tp1
,
const
double
t
);
apollo
::
common
::
TrajectoryPoint
interpolate_linear_approximation
(
const
apollo
::
common
::
TrajectoryPoint
&
tp0
,
const
apollo
::
common
::
TrajectoryPoint
&
tp1
,
const
double
t
);
common
::
TrajectoryPoint
interpolate_linear_approximation
(
const
common
::
TrajectoryPoint
&
tp0
,
const
common
::
TrajectoryPoint
&
tp1
,
const
double
t
);
}
// namespace util
}
// namespace planning
}
// namespace apollo
...
...
modules/planning/common/speed/speed_data.cc
浏览文件 @
1c5b179d
...
...
@@ -33,7 +33,7 @@ namespace planning {
namespace
{
bool
speed_time_comp
(
const
double
t
,
const
SpeedPoint
&
speed_point
)
{
bool
speed_time_comp
(
const
double
t
,
const
common
::
SpeedPoint
&
speed_point
)
{
return
t
<
speed_point
.
t
();
}
...
...
@@ -45,20 +45,20 @@ void SpeedData::add_speed_point(const double s, const double time,
speed_vector_
.
push_back
(
util
::
MakeSpeedPoint
(
s
,
time
,
v
,
a
,
da
));
}
SpeedData
::
SpeedData
(
const
std
::
vector
<
SpeedPoint
>&
speed_points
)
SpeedData
::
SpeedData
(
const
std
::
vector
<
common
::
SpeedPoint
>&
speed_points
)
:
speed_vector_
(
speed_points
)
{
}
const
std
::
vector
<
SpeedPoint
>&
SpeedData
::
speed_vector
()
const
{
const
std
::
vector
<
common
::
SpeedPoint
>&
SpeedData
::
speed_vector
()
const
{
return
speed_vector_
;
}
void
SpeedData
::
set_speed_vector
(
const
std
::
vector
<
SpeedPoint
>&
speed_points
)
{
void
SpeedData
::
set_speed_vector
(
const
std
::
vector
<
common
::
SpeedPoint
>&
speed_points
)
{
speed_vector_
=
std
::
move
(
speed_points
);
}
bool
SpeedData
::
get_speed_point_with_time
(
const
double
t
,
SpeedPoint
*
const
speed_point
)
const
{
common
::
SpeedPoint
*
const
speed_point
)
const
{
if
(
speed_vector_
.
size
()
<
2
)
{
return
false
;
}
...
...
@@ -112,15 +112,15 @@ std::uint32_t SpeedData::find_index(const double t) const {
1
;
}
SpeedPoint
SpeedData
::
interpolate
(
const
SpeedPoint
&
left
,
const
SpeedPoint
&
right
,
common
::
SpeedPoint
SpeedData
::
interpolate
(
const
common
::
SpeedPoint
&
left
,
const
common
::
SpeedPoint
&
right
,
const
double
weight
)
const
{
double
s
=
(
1
-
weight
)
*
left
.
s
()
+
weight
*
right
.
s
();
double
t
=
(
1
-
weight
)
*
left
.
t
()
+
weight
*
right
.
t
();
double
v
=
(
1
-
weight
)
*
left
.
v
()
+
weight
*
right
.
v
();
double
a
=
(
1
-
weight
)
*
left
.
a
()
+
weight
*
right
.
a
();
double
da
=
(
1
-
weight
)
*
left
.
da
()
+
weight
*
right
.
da
();
SpeedPoint
speed_point
;
common
::
SpeedPoint
speed_point
;
speed_point
.
set_s
(
s
);
speed_point
.
set_t
(
t
);
speed_point
.
set_v
(
v
);
...
...
modules/planning/common/speed/speed_data.h
浏览文件 @
1c5b179d
...
...
@@ -23,7 +23,7 @@
#include <string>
#include <vector>
#include "modules/
planning/proto/planning
.pb.h"
#include "modules/
common/proto/path_point
.pb.h"
namespace
apollo
{
namespace
planning
{
...
...
@@ -32,11 +32,11 @@ class SpeedData {
public:
SpeedData
()
=
default
;
explicit
SpeedData
(
const
std
::
vector
<
SpeedPoint
>&
speed_points
);
explicit
SpeedData
(
const
std
::
vector
<
common
::
SpeedPoint
>&
speed_points
);
const
std
::
vector
<
SpeedPoint
>&
speed_vector
()
const
;
const
std
::
vector
<
common
::
SpeedPoint
>&
speed_vector
()
const
;
void
set_speed_vector
(
const
std
::
vector
<
SpeedPoint
>&
speed_points
);
void
set_speed_vector
(
const
std
::
vector
<
common
::
SpeedPoint
>&
speed_points
);
virtual
std
::
string
DebugString
()
const
;
...
...
@@ -44,17 +44,18 @@ class SpeedData {
const
double
a
,
const
double
da
);
bool
get_speed_point_with_time
(
const
double
time
,
SpeedPoint
*
const
speed_point
)
const
;
common
::
SpeedPoint
*
const
speed_point
)
const
;
double
total_time
()
const
;
void
Clear
();
private:
SpeedPoint
interpolate
(
const
SpeedPoint
&
left
,
const
SpeedPoint
&
right
,
const
double
weight
)
const
;
common
::
SpeedPoint
interpolate
(
const
common
::
SpeedPoint
&
left
,
const
common
::
SpeedPoint
&
right
,
const
double
weight
)
const
;
std
::
uint32_t
find_index
(
const
double
s
)
const
;
std
::
vector
<
SpeedPoint
>
speed_vector_
;
std
::
vector
<
common
::
SpeedPoint
>
speed_vector_
;
};
}
// namespace planning
...
...
modules/planning/common/speed_limit.cc
浏览文件 @
1c5b179d
...
...
@@ -25,6 +25,8 @@
namespace
apollo
{
namespace
planning
{
using
common
::
SpeedPoint
;
void
SpeedLimit
::
add_speed_limit
(
const
SpeedPoint
&
speed_point
)
{
_speed_point
.
push_back
(
speed_point
);
}
...
...
modules/planning/common/speed_limit.h
浏览文件 @
1c5b179d
...
...
@@ -20,7 +20,7 @@
#include <vector>
#include "modules/
planning/proto/planning
.pb.h"
#include "modules/
common/proto/path_point
.pb.h"
#ifndef MODULES_PLANNING_COMMON_SPEED_LIMIT_H_
#define MODULES_PLANNING_COMMON_SPEED_LIMIT_H_
...
...
@@ -31,13 +31,13 @@ namespace planning {
class
SpeedLimit
{
public:
SpeedLimit
()
=
default
;
void
add_speed_limit
(
const
SpeedPoint
&
speed_point
);
void
add_speed_limit
(
const
common
::
SpeedPoint
&
speed_point
);
void
add_speed_limit
(
const
double
s
,
const
double
t
,
const
double
v
,
const
double
a
,
const
double
da
);
const
std
::
vector
<
SpeedPoint
>&
speed_limits
()
const
;
const
std
::
vector
<
common
::
SpeedPoint
>&
speed_limits
()
const
;
double
get_speed_limit
(
const
double
s
)
const
;
private:
std
::
vector
<
SpeedPoint
>
_speed_point
;
std
::
vector
<
common
::
SpeedPoint
>
_speed_point
;
};
}
// namespace planning
...
...
modules/planning/optimizer/dp_st_speed/BUILD
浏览文件 @
1c5b179d
...
...
@@ -48,6 +48,7 @@ cc_library(
":dp_st_cost"
,
"//modules/common/configs/proto:vehicle_config_proto"
,
"//modules/common/proto:common_proto"
,
"//modules/common/proto:path_point_proto"
,
"//modules/planning/common:data_center"
,
"//modules/planning/common:decision_data"
,
"//modules/planning/common/speed:speed_data"
,
...
...
modules/planning/optimizer/dp_st_speed/dp_st_graph.cc
浏览文件 @
1c5b179d
...
...
@@ -25,6 +25,7 @@
#include <string>
#include "modules/common/log.h"
#include "modules/common/proto/path_point.pb.h"
#include "modules/planning/common/data_center.h"
#include "modules/planning/math/double.h"
...
...
@@ -32,6 +33,7 @@ namespace apollo {
namespace
planning
{
using
apollo
::
common
::
ErrorCode
;
using
apollo
::
common
::
SpeedPoint
;
using
apollo
::
common
::
Status
;
DpStGraph
::
DpStGraph
(
const
DpStSpeedConfig
&
dp_config
)
...
...
modules/planning/optimizer/qp_spline_path/BUILD
浏览文件 @
1c5b179d
...
...
@@ -20,6 +20,7 @@ cc_library(
"//modules/common/configs:vehicle_config_helper"
,
"//modules/common/math"
,
"//modules/common/math/qp_solver"
,
"//modules/common/proto:path_point_proto"
,
"//modules/common/util"
,
"//modules/map/proto:map_proto"
,
"//modules/planning/common:data_center"
,
...
...
modules/planning/optimizer/qp_spline_path/qp_frenet_frame.cc
浏览文件 @
1c5b179d
...
...
@@ -24,6 +24,7 @@
#include "modules/common/configs/vehicle_config_helper.h"
#include "modules/common/macro.h"
#include "modules/common/proto/path_point.pb.h"
#include "modules/common/util/util.h"
#include "modules/planning/common/planning_gflags.h"
#include "modules/planning/common/planning_util.h"
...
...
@@ -33,6 +34,8 @@
namespace
apollo
{
namespace
planning
{
using
common
::
SpeedPoint
;
constexpr
double
kEpsilontol
=
1e-6
;
bool
QpFrenetFrame
::
Init
(
const
ReferenceLine
&
reference_line
,
...
...
modules/planning/optimizer/qp_spline_path/qp_frenet_frame.h
浏览文件 @
1c5b179d
...
...
@@ -66,7 +66,7 @@ class QpFrenetFrame {
private:
bool
find_longitudinal_distance
(
const
double
time
,
SpeedPoint
*
const
speed_point
);
common
::
SpeedPoint
*
const
speed_point
);
bool
calcualate_discretized_veh_loc
();
...
...
@@ -123,7 +123,7 @@ class QpFrenetFrame {
double
_time_resolution
=
0.1
;
std
::
vector
<
double
>
_evaluated_knots
;
std
::
vector
<
SpeedPoint
>
_discretized_veh_loc
;
std
::
vector
<
common
::
SpeedPoint
>
_discretized_veh_loc
;
std
::
vector
<
std
::
pair
<
double
,
double
>>
_hdmap_bound
;
std
::
vector
<
std
::
pair
<
double
,
double
>>
_static_obstacle_bound
;
std
::
vector
<
std
::
pair
<
double
,
double
>>
_dynamic_obstacle_bound
;
...
...
modules/planning/optimizer/st_graph/st_boundary_mapper.cc
浏览文件 @
1c5b179d
...
...
@@ -35,6 +35,7 @@ namespace planning {
using
apollo
::
common
::
ErrorCode
;
using
apollo
::
common
::
PathPoint
;
using
apollo
::
common
::
SpeedPoint
;
using
apollo
::
common
::
Status
;
using
apollo
::
hdmap
::
HDMap
;
using
apollo
::
localization
::
Pose
;
...
...
modules/planning/planner/em/em_planner.cc
浏览文件 @
1c5b179d
...
...
@@ -44,6 +44,7 @@ using common::Status;
using
common
::
adapter
::
AdapterManager
;
using
common
::
time
::
Clock
;
using
common
::
ErrorCode
;
using
common
::
SpeedPoint
;
using
common
::
TrajectoryPoint
;
using
common
::
VehicleState
;
...
...
modules/planning/planner/em/em_planner.h
浏览文件 @
1c5b179d
...
...
@@ -71,7 +71,7 @@ class EMPlanner : public Planner {
private:
void
RegisterOptimizers
();
std
::
vector
<
SpeedPoint
>
GenerateInitSpeedProfile
(
const
double
init_v
,
std
::
vector
<
common
::
SpeedPoint
>
GenerateInitSpeedProfile
(
const
double
init_v
,
const
double
init_a
);
private:
...
...
modules/planning/proto/planning.proto
浏览文件 @
1c5b179d
...
...
@@ -9,17 +9,6 @@ import "modules/canbus/proto/chassis.proto";
import
"modules/planning/proto/decision.proto"
;
import
"modules/planning/proto/planning_internal.proto"
;
message
SpeedPoint
{
optional
double
s
=
1
;
optional
double
t
=
2
;
// speed (m/s)
optional
double
v
=
3
;
// acceleration (m/s^2)
optional
double
a
=
4
;
// jerk (m/s^3)
optional
double
da
=
5
;
}
// Deprecated: replaced by apollo.common.TrajectoryPoint
message
ADCTrajectoryPoint
{
optional
double
x
=
1
;
// in meters.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录