Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
86e34f7e
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 搜索 >>
提交
86e34f7e
编写于
7月 20, 2017
作者:
J
jiangyifei
提交者:
Jiangtao Hu
7月 20, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
added prediction traj in obstacle
上级
c7fff3d0
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
86 addition
and
98 deletion
+86
-98
modules/planning/common/BUILD
modules/planning/common/BUILD
+5
-5
modules/planning/common/map_object.cc
modules/planning/common/map_object.cc
+1
-1
modules/planning/common/map_object.h
modules/planning/common/map_object.h
+5
-5
modules/planning/common/obstacle.cc
modules/planning/common/obstacle.cc
+24
-34
modules/planning/common/obstacle.h
modules/planning/common/obstacle.h
+51
-53
未找到文件。
modules/planning/common/BUILD
浏览文件 @
86e34f7e
...
...
@@ -50,6 +50,7 @@ cc_library(
deps
=
[
"//modules/common/math:box2d"
,
"//modules/planning/common:planning_object"
,
"//modules/planning/common/trajectory:prediction_trajectory"
,
],
)
...
...
@@ -127,13 +128,12 @@ cc_library(
"frame.h"
,
],
deps
=
[
"//modules/planning/common:planning_data"
,
"//modules/planning/common:environment"
,
"//modules/common:log"
,
"//modules/planning/common:environment"
,
"//modules/planning/common:planning_data"
,
],
)
cc_library
(
name
=
"speed_limit"
,
srcs
=
[
...
...
@@ -161,8 +161,8 @@ cc_library(
":frame"
,
":planning_data"
,
":planning_gflags"
,
"//modules/common/status"
,
"//modules/common"
,
"//modules/common/status"
,
"//modules/planning/state_machine:master_state_machine"
,
],
)
...
...
@@ -171,8 +171,8 @@ cc_library(
name
=
"planning_common"
,
deps
=
[
"@eigen//:eigen"
,
":frame"
,
":data_center"
,
":frame"
,
":planning_gflags"
,
":speed_limit"
,
"//modules/common:log"
,
...
...
modules/planning/common/map_object.cc
浏览文件 @
86e34f7e
...
...
@@ -24,7 +24,7 @@ namespace apollo {
namespace
planning
{
std
::
string
MapObject
::
Id
()
const
{
return
id_
;
return
id_
;
}
}
// namespace planning
...
...
modules/planning/common/map_object.h
浏览文件 @
86e34f7e
...
...
@@ -27,12 +27,12 @@ namespace apollo {
namespace
planning
{
class
MapObject
:
public
PlanningObject
{
public:
MapObject
()
=
default
;
std
::
string
Id
()
const
;
public:
MapObject
()
=
default
;
std
::
string
Id
()
const
;
private:
std
::
string
id_
;
private:
std
::
string
id_
;
};
}
// namespace planning
...
...
modules/planning/common/obstacle.cc
浏览文件 @
86e34f7e
...
...
@@ -20,86 +20,76 @@
#include "modules/planning/common/obstacle.h"
//
#include <sstream>
#include <sstream>
namespace
apollo
{
namespace
planning
{
int
Obstacle
::
Id
()
const
{
return
id_
;
return
id_
;
}
void
Obstacle
::
SetId
(
int
id
)
{
id_
=
id
;
id_
=
id
;
}
double
Obstacle
::
Height
()
const
{
return
height_
;
return
height_
;
}
void
Obstacle
::
SetHeight
(
const
double
height
)
{
height_
=
height
;
height_
=
height
;
}
double
Obstacle
::
Width
()
const
{
return
width_
;
return
width_
;
}
void
Obstacle
::
SetWidth
(
const
double
width
)
{
width_
=
width
;
width_
=
width
;
}
double
Obstacle
::
Length
()
const
{
return
length_
;
return
length_
;
}
void
Obstacle
::
SetLength
(
const
double
length
)
{
length_
=
length
;
length_
=
length
;
}
double
Obstacle
::
Heading
()
const
{
return
heading_
;
return
heading_
;
}
void
Obstacle
::
SetHeading
(
const
double
heading
)
{
heading_
=
heading
;
heading_
=
heading
;
}
::
apollo
::
common
::
math
::
Box2d
Obstacle
::
BoundingBox
()
const
{
return
::
apollo
::
common
::
math
::
Box2d
(
center_
,
heading_
,
length_
,
width_
);
return
::
apollo
::
common
::
math
::
Box2d
(
center_
,
heading_
,
length_
,
width_
);
}
const
Obstacle
::
ObstacleType
&
Obstacle
::
Type
()
const
{
return
type_
;
const
Obstacle
::
ObstacleType
&
Obstacle
::
Type
()
const
{
return
type_
;
}
void
Obstacle
::
SetType
(
const
ObstacleType
&
type
)
{
type_
=
type
;
void
Obstacle
::
SetType
(
const
ObstacleType
&
type
)
{
type_
=
type
;
}
// TODO: to be added
/*
const std::vector<PredictionTrajectory>&
const
std
::
vector
<
PredictionTrajectory
>
&
Obstacle
::
prediction_trajectories
()
const
{
return _prediction_trajectories
;
return
prediction_trajectories_
;
}
*/
// TODO: to be added
/*
void
Obstacle
::
add_prediction_trajectory
(
const PredictionTrajectory
&
prediction_trajectory) {
_prediction_trajectories
.push_back(prediction_trajectory);
const
PredictionTrajectory
&
prediction_trajectory
)
{
prediction_trajectories_
.
push_back
(
prediction_trajectory
);
}
*/
// TODO: to be added
/*
std::vector<PredictionTrajectory>* Obstacle::mutable_prediction_trajectories() {
return &_prediction_trajectories;
std
::
vector
<
PredictionTrajectory
>
*
Obstacle
::
mutable_prediction_trajectories
()
{
return
&
prediction_trajectories_
;
}
*/
}
// namespace planning
}
// namespace apollo
}
// namespace planning
}
// namespace apollo
modules/planning/common/obstacle.h
浏览文件 @
86e34f7e
...
...
@@ -26,64 +26,62 @@
#include <vector>
#include "modules/common/math/box2d.h"
//#include "
common/trajectory/prediction_trajectory.h"
#include "modules/planning/
common/trajectory/prediction_trajectory.h"
namespace
apollo
{
namespace
planning
{
class
Obstacle
:
public
PlanningObject
{
public:
enum
class
ObstacleType
{
UNKNOWN
=
0
,
UNKNOWN_MOVABLE
=
1
,
UNKNOWN_UNMOVABLE
=
2
,
PEDESTRIAN
=
3
,
BICYCLE
=
4
,
VEHICLE
=
5
,
};
Obstacle
()
=
default
;
int
Id
()
const
;
void
SetId
(
int
id
);
const
ObstacleType
&
Type
()
const
;
void
SetType
(
const
ObstacleType
&
type
);
double
Height
()
const
;
void
SetHeight
(
const
double
height
);
double
Width
()
const
;
void
SetWidth
(
const
double
width
);
double
Length
()
const
;
void
SetLength
(
const
double
length
);
double
Heading
()
const
;
void
SetHeading
(
const
double
heading
);
::
apollo
::
common
::
math
::
Box2d
BoundingBox
()
const
;
// TODO: to be added
//const std::vector<PredictionTrajectory>& prediction_trajectories() const;
//void add_prediction_trajectory(
// const PredictionTrajectory& prediction_trajectory);
//std::vector<PredictionTrajectory>* mutable_prediction_trajectories();
private:
int
id_
=
0
;
double
height_
=
0.0
;
double
width_
=
0.0
;
double
length_
=
0.0
;
double
heading_
=
0.0
;
::
apollo
::
common
::
math
::
Vec2d
center_
;
// TODO: to be added
//std::vector<PredictionTrajectory> prediction_trajectories_;
ObstacleType
type_
=
ObstacleType
::
VEHICLE
;
public:
enum
class
ObstacleType
{
UNKNOWN
=
0
,
UNKNOWN_MOVABLE
=
1
,
UNKNOWN_UNMOVABLE
=
2
,
PEDESTRIAN
=
3
,
BICYCLE
=
4
,
VEHICLE
=
5
,
};
Obstacle
()
=
default
;
int
Id
()
const
;
void
SetId
(
int
id
);
const
ObstacleType
&
Type
()
const
;
void
SetType
(
const
ObstacleType
&
type
);
double
Height
()
const
;
void
SetHeight
(
const
double
height
);
double
Width
()
const
;
void
SetWidth
(
const
double
width
);
double
Length
()
const
;
void
SetLength
(
const
double
length
);
double
Heading
()
const
;
void
SetHeading
(
const
double
heading
);
::
apollo
::
common
::
math
::
Box2d
BoundingBox
()
const
;
const
std
::
vector
<
PredictionTrajectory
>
&
prediction_trajectories
()
const
;
void
add_prediction_trajectory
(
const
PredictionTrajectory
&
prediction_trajectory
);
std
::
vector
<
PredictionTrajectory
>
*
mutable_prediction_trajectories
();
private:
int
id_
=
0
;
double
height_
=
0.0
;
double
width_
=
0.0
;
double
length_
=
0.0
;
double
heading_
=
0.0
;
::
apollo
::
common
::
math
::
Vec2d
center_
;
std
::
vector
<
PredictionTrajectory
>
prediction_trajectories_
;
ObstacleType
type_
=
ObstacleType
::
VEHICLE
;
};
}
// namespace planning
}
// namespace apollo
}
// namespace planning
}
// namespace apollo
#endif // MODULES_PLANNING_COMMON_OBSTACLE_H
#endif
// MODULES_PLANNING_COMMON_OBSTACLE_H
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录