Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
7504c156
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,发现更多精彩内容 >>
提交
7504c156
编写于
8月 07, 2017
作者:
D
Dong Li
提交者:
Jiangtao Hu
8月 07, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
planning added min_s, min_t, max_s, max_t function in st graph. which is
used to calculate the fence point in st graph
上级
9986cc88
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
30 addition
and
0 deletion
+30
-0
modules/planning/optimizer/st_graph/st_graph_boundary.cc
modules/planning/optimizer/st_graph/st_graph_boundary.cc
+17
-0
modules/planning/optimizer/st_graph/st_graph_boundary.h
modules/planning/optimizer/st_graph/st_graph_boundary.h
+9
-0
modules/planning/optimizer/st_graph/st_graph_boundary_test.cc
...les/planning/optimizer/st_graph/st_graph_boundary_test.cc
+4
-0
未找到文件。
modules/planning/optimizer/st_graph/st_graph_boundary.cc
浏览文件 @
7504c156
...
...
@@ -46,6 +46,12 @@ StGraphBoundary::StGraphBoundary(const PathObstacle* path_obstacle,
CHECK_EQ
(
points
.
size
(),
4
)
<<
"StGraphBoundary must have exactly four points. Input points size: "
<<
points
.
size
();
for
(
const
auto
&
point
:
points
)
{
min_s_
=
std
::
fmin
(
min_s_
,
point
.
s
());
min_t_
=
std
::
fmin
(
min_t_
,
point
.
t
());
max_s_
=
std
::
fmax
(
max_s_
,
point
.
s
());
max_t_
=
std
::
fmax
(
max_t_
,
point
.
t
());
}
}
StGraphBoundary
::
StGraphBoundary
(
...
...
@@ -56,6 +62,12 @@ StGraphBoundary::StGraphBoundary(
CHECK_EQ
(
points
.
size
(),
4
)
<<
"StGraphBoundary must have exactly four points. Input points size: "
<<
points
.
size
();
for
(
const
auto
&
point
:
points
)
{
min_s_
=
std
::
fmin
(
min_s_
,
point
.
y
());
min_t_
=
std
::
fmin
(
min_t_
,
point
.
x
());
max_s_
=
std
::
fmax
(
max_s_
,
point
.
y
());
max_t_
=
std
::
fmax
(
max_t_
,
point
.
x
());
}
}
bool
StGraphBoundary
::
IsPointInBoundary
(
...
...
@@ -153,5 +165,10 @@ void StGraphBoundary::GetBoundaryTimeScope(double* start_t,
*
end_t
=
right
.
t
();
}
double
StGraphBoundary
::
min_s
()
const
{
return
min_s_
;
}
double
StGraphBoundary
::
min_t
()
const
{
return
min_t_
;
}
double
StGraphBoundary
::
max_s
()
const
{
return
max_s_
;
}
double
StGraphBoundary
::
max_t
()
const
{
return
max_t_
;
}
}
// namespace planning
}
// namespace apollo
modules/planning/optimizer/st_graph/st_graph_boundary.h
浏览文件 @
7504c156
...
...
@@ -79,12 +79,21 @@ class StGraphBoundary : public common::math::Polygon2d {
const
PathObstacle
*
path_obstacle
()
const
;
double
min_s
()
const
;
double
min_t
()
const
;
double
max_s
()
const
;
double
max_t
()
const
;
private:
const
PathObstacle
*
path_obstacle_
=
nullptr
;
BoundaryType
boundary_type_
=
BoundaryType
::
UNKNOWN
;
std
::
string
id_
;
double
characteristic_length_
=
1.0
;
double
s_high_limit_
=
200.0
;
double
min_s_
=
std
::
numeric_limits
<
double
>::
max
();
double
max_s_
=
std
::
numeric_limits
<
double
>::
lowest
();
double
min_t_
=
std
::
numeric_limits
<
double
>::
max
();
double
max_t_
=
std
::
numeric_limits
<
double
>::
lowest
();
};
}
// namespace planning
...
...
modules/planning/optimizer/st_graph/st_graph_boundary_test.cc
浏览文件 @
7504c156
...
...
@@ -45,6 +45,10 @@ TEST(StGraphBoundaryTest, basic_test) {
boundary
.
GetBoundaryTimeScope
(
&
left_t
,
&
right_t
);
EXPECT_DOUBLE_EQ
(
left_t
,
0.0
);
EXPECT_DOUBLE_EQ
(
right_t
,
10.0
);
EXPECT_FLOAT_EQ
(
0.0
,
boundary
.
min_s
());
EXPECT_FLOAT_EQ
(
5.0
,
boundary
.
max_s
());
EXPECT_FLOAT_EQ
(
0.0
,
boundary
.
min_t
());
EXPECT_FLOAT_EQ
(
10.0
,
boundary
.
max_t
());
}
}
// namespace planning
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录