Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
d900e1ba
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,发现更多精彩内容 >>
提交
d900e1ba
编写于
7月 19, 2017
作者:
A
Aaron Xiao
提交者:
Jiangtao Hu
7月 19, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Migrate DiscretizedTrajectory to Apollo 1.5.
上级
b5416cc4
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
363 addition
and
28 deletion
+363
-28
modules/planning/common/path/BUILD
modules/planning/common/path/BUILD
+1
-0
modules/planning/common/path/path_point_util.cc
modules/planning/common/path/path_point_util.cc
+108
-16
modules/planning/common/path/path_point_util.h
modules/planning/common/path/path_point_util.h
+16
-4
modules/planning/common/trajectory/BUILD
modules/planning/common/trajectory/BUILD
+19
-3
modules/planning/common/trajectory/discretized_trajectory.cc
modules/planning/common/trajectory/discretized_trajectory.cc
+142
-0
modules/planning/common/trajectory/discretized_trajectory.h
modules/planning/common/trajectory/discretized_trajectory.h
+71
-0
modules/planning/common/trajectory/trajectory.h
modules/planning/common/trajectory/trajectory.h
+4
-5
modules/planning/math/BUILD
modules/planning/math/BUILD
+2
-0
未找到文件。
modules/planning/common/path/BUILD
浏览文件 @
d900e1ba
...
@@ -16,6 +16,7 @@ cc_library(
...
@@ -16,6 +16,7 @@ cc_library(
"//modules/common/proto:path_point_proto"
,
"//modules/common/proto:path_point_proto"
,
"//modules/planning/math:hermite_spline"
,
"//modules/planning/math:hermite_spline"
,
"//modules/planning/math:integration"
,
"//modules/planning/math:integration"
,
"//modules/planning/math:interpolation"
,
"@eigen//:eigen"
,
"@eigen//:eigen"
,
],
],
)
)
...
...
modules/planning/common/path/path_point_util.cc
浏览文件 @
d900e1ba
...
@@ -24,13 +24,17 @@
...
@@ -24,13 +24,17 @@
#include "modules/planning/math/hermite_spline.h"
#include "modules/planning/math/hermite_spline.h"
#include "modules/planning/math/integration.h"
#include "modules/planning/math/integration.h"
#include "modules/planning/math/interpolation.h"
namespace
apollo
{
namespace
apollo
{
namespace
planning
{
namespace
planning
{
namespace
util
{
namespace
util
{
common
::
PathPoint
interpolate
(
const
common
::
PathPoint
&
p0
,
using
apollo
::
common
::
PathPoint
;
const
common
::
PathPoint
&
p1
,
const
double
s
)
{
using
apollo
::
common
::
TrajectoryPoint
;
PathPoint
interpolate
(
const
PathPoint
&
p0
,
const
PathPoint
&
p1
,
const
double
s
)
{
double
s0
=
p0
.
s
();
double
s0
=
p0
.
s
();
double
s1
=
p1
.
s
();
double
s1
=
p1
.
s
();
CHECK
(
s0
<=
s
&&
s
<=
s1
);
CHECK
(
s0
<=
s
&&
s
<=
s1
);
...
@@ -54,7 +58,7 @@ common::PathPoint interpolate(const common::PathPoint& p0,
...
@@ -54,7 +58,7 @@ common::PathPoint interpolate(const common::PathPoint& p0,
double
dkappa
=
geometry_spline
.
evaluate
(
2
,
s
);
double
dkappa
=
geometry_spline
.
evaluate
(
2
,
s
);
double
d2kappa
=
geometry_spline
.
evaluate
(
3
,
s
);
double
d2kappa
=
geometry_spline
.
evaluate
(
3
,
s
);
common
::
PathPoint
p
;
PathPoint
p
;
p
.
set_x
(
x
);
p
.
set_x
(
x
);
p
.
set_y
(
y
);
p
.
set_y
(
y
);
p
.
set_theta
(
theta
);
p
.
set_theta
(
theta
);
...
@@ -65,25 +69,25 @@ common::PathPoint interpolate(const common::PathPoint& p0,
...
@@ -65,25 +69,25 @@ common::PathPoint interpolate(const common::PathPoint& p0,
return
std
::
move
(
p
);
return
std
::
move
(
p
);
}
}
common
::
PathPoint
interpolate_linear_approximation
(
PathPoint
interpolate_linear_approximation
(
const
PathPoint
&
p0
,
const
common
::
PathPoint
&
left
,
const
common
::
PathPoint
&
right
,
const
PathPoint
&
p1
,
const
double
s
)
{
const
double
s
)
{
double
s0
=
left
.
s
();
double
s0
=
p0
.
s
();
double
s1
=
right
.
s
();
double
s1
=
p1
.
s
();
CHECK
(
s0
<
s1
);
CHECK
(
s0
<
s1
);
common
::
PathPoint
path_point
;
PathPoint
path_point
;
double
weight
=
(
s
-
s0
)
/
(
s1
-
s0
);
double
weight
=
(
s
-
s0
)
/
(
s1
-
s0
);
double
x
=
(
1
-
weight
)
*
left
.
x
()
+
weight
*
right
.
x
();
double
x
=
(
1
-
weight
)
*
p0
.
x
()
+
weight
*
p1
.
x
();
double
y
=
(
1
-
weight
)
*
left
.
y
()
+
weight
*
right
.
y
();
double
y
=
(
1
-
weight
)
*
p0
.
y
()
+
weight
*
p1
.
y
();
double
cos_heading
=
double
cos_heading
=
(
1
-
weight
)
*
std
::
cos
(
left
.
theta
())
+
weight
*
std
::
cos
(
right
.
theta
());
(
1
-
weight
)
*
std
::
cos
(
p0
.
theta
())
+
weight
*
std
::
cos
(
p1
.
theta
());
double
sin_heading
=
double
sin_heading
=
(
1
-
weight
)
*
std
::
sin
(
left
.
theta
())
+
weight
*
std
::
sin
(
right
.
theta
());
(
1
-
weight
)
*
std
::
sin
(
p0
.
theta
())
+
weight
*
std
::
sin
(
p1
.
theta
());
double
theta
=
std
::
atan2
(
sin_heading
,
cos_heading
);
double
theta
=
std
::
atan2
(
sin_heading
,
cos_heading
);
double
kappa
=
(
1
-
weight
)
*
left
.
kappa
()
+
weight
*
right
.
kappa
();
double
kappa
=
(
1
-
weight
)
*
p0
.
kappa
()
+
weight
*
p1
.
kappa
();
double
dkappa
=
(
1
-
weight
)
*
left
.
dkappa
()
+
weight
*
right
.
dkappa
();
double
dkappa
=
(
1
-
weight
)
*
p0
.
dkappa
()
+
weight
*
p1
.
dkappa
();
double
ddkappa
=
(
1
-
weight
)
*
left
.
ddkappa
()
+
weight
*
right
.
ddkappa
();
double
ddkappa
=
(
1
-
weight
)
*
p0
.
ddkappa
()
+
weight
*
p1
.
ddkappa
();
path_point
.
set_x
(
x
);
path_point
.
set_x
(
x
);
path_point
.
set_y
(
y
);
path_point
.
set_y
(
y
);
path_point
.
set_theta
(
theta
);
path_point
.
set_theta
(
theta
);
...
@@ -93,6 +97,94 @@ common::PathPoint interpolate_linear_approximation(
...
@@ -93,6 +97,94 @@ common::PathPoint interpolate_linear_approximation(
return
path_point
;
return
path_point
;
}
}
TrajectoryPoint
interpolate
(
const
TrajectoryPoint
&
tp0
,
const
TrajectoryPoint
&
tp1
,
const
double
t
)
{
const
PathPoint
&
pp0
=
tp0
.
path_point
();
const
PathPoint
&
pp1
=
tp1
.
path_point
();
double
t0
=
tp0
.
relative_time
();
double
t1
=
tp1
.
relative_time
();
std
::
array
<
double
,
2
>
dx0
{
{
tp0
.
v
(),
tp0
.
a
()
}
};
std
::
array
<
double
,
2
>
dx1
{
{
tp1
.
v
(),
tp1
.
a
()
}
};
HermiteSpline
<
double
,
3
>
dynamic_spline
(
dx0
,
dx1
,
t0
,
t1
);
double
s0
=
0.0
;
auto
func_v
=
[
&
dynamic_spline
](
const
double
t
)
{
return
dynamic_spline
.
evaluate
(
0
,
t
);
};
double
s1
=
Integration
::
gauss_legendre
(
func_v
,
t0
,
t1
);
double
s
=
Integration
::
gauss_legendre
(
func_v
,
t0
,
t
);
double
v
=
dynamic_spline
.
evaluate
(
0
,
t
);
double
a
=
dynamic_spline
.
evaluate
(
1
,
t
);
std
::
array
<
double
,
2
>
gx0
{
{
pp0
.
theta
(),
pp0
.
kappa
()
}
};
std
::
array
<
double
,
2
>
gx1
{
{
pp1
.
theta
(),
pp1
.
kappa
()
}
};
HermiteSpline
<
double
,
3
>
geometry_spline
(
gx0
,
gx1
,
s0
,
s1
);
auto
func_cos_theta
=
[
&
geometry_spline
](
const
double
s
)
{
auto
theta
=
geometry_spline
.
evaluate
(
0
,
s
);
return
std
::
cos
(
theta
);
};
auto
func_sin_theta
=
[
&
geometry_spline
](
const
double
s
)
{
auto
theta
=
geometry_spline
.
evaluate
(
0
,
s
);
return
std
::
sin
(
theta
);
};
double
x
=
pp0
.
x
()
+
Integration
::
gauss_legendre
(
func_cos_theta
,
s0
,
s
);
double
y
=
pp0
.
y
()
+
Integration
::
gauss_legendre
(
func_sin_theta
,
s0
,
s
);
double
theta
=
geometry_spline
.
evaluate
(
0
,
s
);
double
kappa
=
geometry_spline
.
evaluate
(
1
,
s
);
double
dkappa
=
geometry_spline
.
evaluate
(
2
,
s
);
double
d2kappa
=
geometry_spline
.
evaluate
(
3
,
s
);
TrajectoryPoint
tp
;
tp
.
set_v
(
v
);
tp
.
set_a
(
a
);
PathPoint
*
path_point
=
tp
.
mutable_path_point
();
path_point
->
set_x
(
x
);
path_point
->
set_y
(
y
);
path_point
->
set_theta
(
theta
);
path_point
->
set_kappa
(
kappa
);
path_point
->
set_dkappa
(
dkappa
);
path_point
->
set_ddkappa
(
d2kappa
);
path_point
->
set_s
(
s
);
// check the diff of computed s1 and p1.s()?
return
tp
;
}
TrajectoryPoint
interpolate_linear_approximation
(
const
TrajectoryPoint
&
tp0
,
const
TrajectoryPoint
&
tp1
,
const
double
t
)
{
const
PathPoint
&
pp0
=
tp0
.
path_point
();
const
PathPoint
&
pp1
=
tp1
.
path_point
();
double
t0
=
tp0
.
relative_time
();
double
t1
=
tp1
.
relative_time
();
TrajectoryPoint
tp
;
tp
.
set_v
(
Interpolation
::
lerp
(
tp0
.
v
(),
t0
,
tp1
.
v
(),
t1
,
t
));
tp
.
set_a
(
Interpolation
::
lerp
(
tp0
.
a
(),
t0
,
tp1
.
a
(),
t1
,
t
));
tp
.
set_relative_time
(
t
);
tp
.
set_dkappa
(
Interpolation
::
lerp
(
tp0
.
dkappa
(),
t0
,
tp1
.
dkappa
(),
t1
,
t
));
PathPoint
*
path_point
=
tp
.
mutable_path_point
();
path_point
->
set_x
(
Interpolation
::
lerp
(
pp0
.
x
(),
t0
,
pp1
.
x
(),
t1
,
t
));
path_point
->
set_y
(
Interpolation
::
lerp
(
pp0
.
y
(),
t0
,
pp1
.
y
(),
t1
,
t
));
path_point
->
set_theta
(
Interpolation
::
lerp
(
pp0
.
theta
(),
t0
,
pp1
.
theta
(),
t1
,
t
));
path_point
->
set_kappa
(
Interpolation
::
lerp
(
pp0
.
kappa
(),
t0
,
pp1
.
kappa
(),
t1
,
t
));
path_point
->
set_dkappa
(
Interpolation
::
lerp
(
pp0
.
dkappa
(),
t0
,
pp1
.
dkappa
(),
t1
,
t
));
path_point
->
set_ddkappa
(
Interpolation
::
lerp
(
pp0
.
ddkappa
(),
t0
,
pp1
.
ddkappa
(),
t1
,
t
));
path_point
->
set_s
(
Interpolation
::
lerp
(
pp0
.
s
(),
t0
,
pp1
.
s
(),
t1
,
t
));
return
tp
;
}
}
// namespace util
}
// namespace util
}
// namespace planning
}
// namespace planning
}
// namespace apollo
}
// namespace apollo
modules/planning/common/path/path_point_util.h
浏览文件 @
d900e1ba
...
@@ -29,14 +29,26 @@ namespace apollo {
...
@@ -29,14 +29,26 @@ namespace apollo {
namespace
planning
{
namespace
planning
{
namespace
util
{
namespace
util
{
common
::
PathPoint
interpolate
(
const
common
::
PathPoint
&
p0
,
apollo
::
common
::
PathPoint
interpolate
(
const
common
::
PathPoint
&
p1
,
const
double
s
);
const
apollo
::
common
::
PathPoint
&
p0
,
const
apollo
::
common
::
PathPoint
&
p1
,
const
double
s
);
// @ weight shall between 1 and 0
// @ weight shall between 1 and 0
common
::
PathPoint
interpolate_linear_approximation
(
apollo
::
common
::
PathPoint
interpolate_linear_approximation
(
const
common
::
PathPoint
&
left
,
const
common
::
PathPoint
&
right
,
const
apollo
::
common
::
PathPoint
&
p0
,
const
apollo
::
common
::
PathPoint
&
p1
,
const
double
s
);
const
double
s
);
apollo
::
common
::
TrajectoryPoint
interpolate
(
const
apollo
::
common
::
TrajectoryPoint
&
tp0
,
const
apollo
::
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
);
}
// namespace util
}
// namespace util
}
// namespace planning
}
// namespace planning
}
// namespace apollo
}
// namespace apollo
...
...
modules/planning/common/trajectory/BUILD
浏览文件 @
d900e1ba
...
@@ -2,12 +2,28 @@ package(default_visibility = ["//visibility:public"])
...
@@ -2,12 +2,28 @@ package(default_visibility = ["//visibility:public"])
cc_library
(
cc_library
(
name
=
"trajectory"
,
name
=
"trajectory"
,
hdrs
=
glob
(
[
hdrs
=
[
"
*
.h"
,
"
trajectory
.h"
,
]
)
,
],
deps
=
[
deps
=
[
"//external:gflags"
,
"//external:gflags"
,
"//modules/common/math"
,
"//modules/common/math"
,
"//modules/common/proto:path_point_proto"
,
"//modules/common/proto:path_point_proto"
,
],
],
)
)
cc_library
(
name
=
"discretized_trajectory"
,
srcs
=
[
"discretized_trajectory.cc"
,
],
hdrs
=
[
"discretized_trajectory.h"
,
],
deps
=
[
":trajectory"
,
"//modules/common/proto:path_point_proto"
,
"//modules/planning/common/path:path_point_util"
,
"@eigen//:eigen"
,
],
)
modules/planning/common/trajectory/discretized_trajectory.cc
0 → 100644
浏览文件 @
d900e1ba
/******************************************************************************
* Copyright 2017 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.
*****************************************************************************/
/**
* @file discretized_trajectory.cpp
**/
#include "modules/planning/common/trajectory/discretized_trajectory.h"
#include <climits>
#include "glog/logging.h"
#include "modules/planning/common/path/path_point_util.h"
namespace
apollo
{
namespace
planning
{
using
apollo
::
common
::
TrajectoryPoint
;
DiscretizedTrajectory
::
DiscretizedTrajectory
(
std
::
vector
<
TrajectoryPoint
>
trajectory_points
)
{
_trajectory_points
=
std
::
move
(
trajectory_points
);
}
double
DiscretizedTrajectory
::
time_length
()
const
{
if
(
_trajectory_points
.
empty
())
{
return
0.0
;
}
return
_trajectory_points
.
back
().
relative_time
()
-
_trajectory_points
.
front
().
relative_time
();
}
TrajectoryPoint
DiscretizedTrajectory
::
evaluate
(
const
double
relative_time
)
const
{
CHECK
(
!
_trajectory_points
.
empty
());
CHECK
(
_trajectory_points
.
front
().
relative_time
()
<=
relative_time
&&
_trajectory_points
.
back
().
relative_time
()
<=
relative_time
)
<<
"Invalid relative time input!"
;
auto
comp
=
[](
const
TrajectoryPoint
&
p
,
const
double
relative_time
)
{
return
p
.
relative_time
()
<
relative_time
;
};
auto
it_lower
=
std
::
lower_bound
(
_trajectory_points
.
begin
(),
_trajectory_points
.
end
(),
relative_time
,
comp
);
if
(
it_lower
==
_trajectory_points
.
begin
())
{
return
_trajectory_points
.
front
();
}
return
util
::
interpolate
(
*
(
it_lower
-
1
),
*
it_lower
,
relative_time
);
}
TrajectoryPoint
DiscretizedTrajectory
::
evaluate_linear_approximation
(
const
double
relative_time
)
const
{
auto
comp
=
[](
const
TrajectoryPoint
&
p
,
const
double
relative_time
)
{
return
p
.
relative_time
()
<
relative_time
;
};
auto
it_lower
=
std
::
lower_bound
(
_trajectory_points
.
begin
(),
_trajectory_points
.
end
(),
relative_time
,
comp
);
if
(
it_lower
==
_trajectory_points
.
begin
())
{
return
_trajectory_points
.
front
();
}
return
util
::
interpolate_linear_approximation
(
*
(
it_lower
-
1
),
*
it_lower
,
relative_time
);
}
std
::
size_t
DiscretizedTrajectory
::
query_nearest_point
(
const
double
relative_time
)
const
{
auto
func
=
[](
const
TrajectoryPoint
&
tp
,
const
double
relative_time
)
{
return
tp
.
relative_time
()
<
relative_time
;
};
auto
it_lower
=
std
::
lower_bound
(
_trajectory_points
.
begin
(),
_trajectory_points
.
end
(),
relative_time
,
func
);
return
(
std
::
size_t
)(
it_lower
-
_trajectory_points
.
begin
());
}
std
::
size_t
DiscretizedTrajectory
::
query_nearest_point
(
const
Eigen
::
Vector2d
&
position
)
const
{
double
dist_min
=
std
::
numeric_limits
<
double
>::
max
();
std
::
size_t
index_min
=
0
;
for
(
std
::
size_t
i
=
0
;
i
<
_trajectory_points
.
size
();
++
i
)
{
const
Eigen
::
Vector2d
coordinate
(
_trajectory_points
[
i
].
path_point
().
x
(),
_trajectory_points
[
i
].
path_point
().
y
());
Eigen
::
Vector2d
dist_vec
=
coordinate
-
position
;
double
dist
=
dist_vec
.
dot
(
dist_vec
);
if
(
dist
<
dist_min
)
{
dist_min
=
dist
;
index_min
=
i
;
}
}
return
index_min
;
}
void
DiscretizedTrajectory
::
add_trajectory_point
(
const
TrajectoryPoint
&
trajectory_point
)
{
if
(
!
_trajectory_points
.
empty
())
{
CHECK_GT
(
trajectory_point
.
relative_time
(),
_trajectory_points
.
back
().
relative_time
());
}
_trajectory_points
.
push_back
(
trajectory_point
);
}
const
TrajectoryPoint
&
DiscretizedTrajectory
::
trajectory_point_at
(
const
std
::
size_t
index
)
const
{
CHECK
(
index
<
num_of_points
());
return
_trajectory_points
[
index
];
}
TrajectoryPoint
DiscretizedTrajectory
::
start_point
()
const
{
CHECK
(
!
_trajectory_points
.
empty
());
return
_trajectory_points
.
front
();
}
TrajectoryPoint
DiscretizedTrajectory
::
end_point
()
const
{
CHECK
(
!
_trajectory_points
.
empty
());
return
_trajectory_points
.
back
();
}
std
::
size_t
DiscretizedTrajectory
::
num_of_points
()
const
{
return
_trajectory_points
.
size
();
}
}
// namespace planning
}
// namespace apollo
modules/planning/common/trajectory/discretized_trajectory.h
0 → 100644
浏览文件 @
d900e1ba
/******************************************************************************
* Copyright 2017 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.
*****************************************************************************/
/**
* @file discretized_trajectory.h
**/
#ifndef MODULES_PLANNING_COMMON_TRAJECTORY_DISCRETIZED_TRAJECTORY_H
#define MODULES_PLANNING_COMMON_TRAJECTORY_DISCRETIZED_TRAJECTORY_H
#include "Eigen/Core"
#include "modules/planning/common/trajectory/trajectory.h"
namespace
apollo
{
namespace
planning
{
class
DiscretizedTrajectory
:
public
Trajectory
{
public:
DiscretizedTrajectory
()
=
default
;
DiscretizedTrajectory
(
std
::
vector
<
apollo
::
common
::
TrajectoryPoint
>
trajectory_points
);
virtual
~
DiscretizedTrajectory
()
=
default
;
virtual
double
time_length
()
const
override
;
virtual
apollo
::
common
::
TrajectoryPoint
evaluate
(
const
double
relative_time
)
const
override
;
virtual
apollo
::
common
::
TrajectoryPoint
start_point
()
const
override
;
virtual
apollo
::
common
::
TrajectoryPoint
end_point
()
const
override
;
virtual
apollo
::
common
::
TrajectoryPoint
evaluate_linear_approximation
(
const
double
relative_time
)
const
;
virtual
std
::
size_t
query_nearest_point
(
const
double
relative_time
)
const
;
virtual
std
::
size_t
query_nearest_point
(
const
Eigen
::
Vector2d
&
position
)
const
;
virtual
void
add_trajectory_point
(
const
apollo
::
common
::
TrajectoryPoint
&
trajectory_point
);
const
apollo
::
common
::
TrajectoryPoint
&
trajectory_point_at
(
const
std
::
size_t
index
)
const
;
std
::
size_t
num_of_points
()
const
;
protected:
std
::
vector
<
apollo
::
common
::
TrajectoryPoint
>
_trajectory_points
;
};
}
// namespace planning
}
// namespace apollo
#endif // MODULES_PLANNING_COMMON_TRAJECTORY_DISCRETIZED_TRAJECTORY_H
modules/planning/common/trajectory/trajectory.h
浏览文件 @
d900e1ba
...
@@ -21,8 +21,6 @@
...
@@ -21,8 +21,6 @@
#ifndef MODULES_PLANNING_COMMON_TRAJECTORY_TRAJECTORY_H_
#ifndef MODULES_PLANNING_COMMON_TRAJECTORY_TRAJECTORY_H_
#define MODULES_PLANNING_COMMON_TRAJECTORY_TRAJECTORY_H_
#define MODULES_PLANNING_COMMON_TRAJECTORY_TRAJECTORY_H_
#include <cstdlib>
#include "modules/common/proto/path_point.pb.h"
#include "modules/common/proto/path_point.pb.h"
namespace
apollo
{
namespace
apollo
{
...
@@ -36,11 +34,12 @@ class Trajectory {
...
@@ -36,11 +34,12 @@ class Trajectory {
virtual
double
time_length
()
const
=
0
;
virtual
double
time_length
()
const
=
0
;
virtual
TrajectoryPoint
evaluate
(
const
double
relative_time
)
const
=
0
;
virtual
apollo
::
common
::
TrajectoryPoint
evaluate
(
const
double
relative_time
)
const
=
0
;
virtual
TrajectoryPoint
start_point
()
const
=
0
;
virtual
apollo
::
common
::
TrajectoryPoint
start_point
()
const
=
0
;
virtual
TrajectoryPoint
end_point
()
const
=
0
;
virtual
apollo
::
common
::
TrajectoryPoint
end_point
()
const
=
0
;
};
};
}
// namespace planning
}
// namespace planning
...
...
modules/planning/math/BUILD
浏览文件 @
d900e1ba
...
@@ -73,6 +73,8 @@ cc_library(
...
@@ -73,6 +73,8 @@ cc_library(
"interpolation.h"
,
"interpolation.h"
,
]),
]),
deps
=
[
deps
=
[
":hermite_spline"
,
"//modules/common/math:math_utils"
,
"@glog//:glog"
,
"@glog//:glog"
,
],
],
)
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录