Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
67000691
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,发现更多精彩内容 >>
提交
67000691
编写于
11月 02, 2017
作者:
S
siyangy
提交者:
Jiangtao Hu
11月 02, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Dreamview: fix sim control with rerouting
上级
3940e41d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
18 addition
and
10 deletion
+18
-10
modules/dreamview/backend/sim_control/sim_control.cc
modules/dreamview/backend/sim_control/sim_control.cc
+8
-3
modules/dreamview/backend/sim_control/sim_control.h
modules/dreamview/backend/sim_control/sim_control.h
+2
-0
modules/map/hdmap/hdmap.cc
modules/map/hdmap/hdmap.cc
+8
-7
未找到文件。
modules/dreamview/backend/sim_control/sim_control.cc
浏览文件 @
67000691
...
...
@@ -65,6 +65,7 @@ SimControl::SimControl(const MapService* map_service)
next_point_index_
(
0
),
received_planning_
(
false
),
planning_count_
(
-
1
),
re_routing_triggered_
(
false
),
enabled_
(
FLAGS_enable_sim_control
)
{}
void
SimControl
::
Init
(
bool
set_start_point
)
{
...
...
@@ -122,9 +123,12 @@ void SimControl::OnRoutingResponse(const RoutingResponse& routing) {
CHECK_LE
(
2
,
routing
.
routing_request
().
waypoint_size
());
const
auto
&
start_pose
=
routing
.
routing_request
().
waypoint
(
0
).
pose
();
current_routing_header_
=
routing
.
header
();
// If this is from a planning re-routing request, don't reset car's location.
if
(
routing
.
routing_request
().
header
().
module_name
()
!=
"planning"
)
{
current_routing_header_
=
routing
.
header
();
re_routing_triggered_
=
routing
.
routing_request
().
header
().
module_name
()
==
"planning"
;
if
(
!
re_routing_triggered_
)
{
ClearPlanning
();
SetStartPoint
(
start_pose
.
x
(),
start_pose
.
y
());
}
...
...
@@ -143,7 +147,8 @@ void SimControl::Stop() {
void
SimControl
::
OnPlanning
(
const
apollo
::
planning
::
ADCTrajectory
&
trajectory
)
{
// Reset current trajectory and the indices upon receiving a new trajectory.
// The routing SimControl owns must match with the one Planning has.
if
(
CompareHeader
(
trajectory
.
routing_header
(),
current_routing_header_
))
{
if
(
re_routing_triggered_
||
CompareHeader
(
trajectory
.
routing_header
(),
current_routing_header_
))
{
// Hold a few cycles until the position information is fully refreshed on
// planning side. Don't wait for the very first planning received.
++
planning_count_
;
...
...
modules/dreamview/backend/sim_control/sim_control.h
浏览文件 @
67000691
...
...
@@ -120,6 +120,8 @@ class SimControl {
// Number of planning received in terms of one RoutingResponse.
int
planning_count_
;
bool
re_routing_triggered_
;
// Whether the sim control is enabled.
bool
enabled_
;
...
...
modules/map/hdmap/hdmap.cc
浏览文件 @
67000691
...
...
@@ -21,6 +21,7 @@ namespace apollo {
namespace
hdmap
{
int
HDMap
::
LoadMapFromFile
(
const
std
::
string
&
map_filename
)
{
AINFO
<<
"Loading HDMap: "
<<
map_filename
<<
"..."
;
return
impl_
.
LoadMapFromFile
(
map_filename
);
}
...
...
@@ -113,8 +114,8 @@ int HDMap::GetRoads(const apollo::common::PointENU& point, double distance,
}
int
HDMap
::
GetNearestLane
(
const
common
::
PointENU
&
point
,
LaneInfoConstPtr
*
nearest_lane
,
double
*
nearest_
s
,
double
*
nearest_
l
)
const
{
LaneInfoConstPtr
*
nearest_lane
,
double
*
nearest_s
,
double
*
nearest_l
)
const
{
return
impl_
.
GetNearestLane
(
point
,
nearest_lane
,
nearest_s
,
nearest_l
);
}
...
...
@@ -125,9 +126,9 @@ int HDMap::GetNearestLaneWithHeading(const apollo::common::PointENU& point,
LaneInfoConstPtr
*
nearest_lane
,
double
*
nearest_s
,
double
*
nearest_l
)
const
{
return
impl_
.
GetNearestLaneWithHeading
(
point
,
distance
,
central_heading
,
max_heading_difference
,
nearest_lane
,
nearest_s
,
nearest_l
);
return
impl_
.
GetNearestLaneWithHeading
(
point
,
distance
,
central_heading
,
max_heading_difference
,
nearest_lane
,
nearest_s
,
nearest_l
);
}
int
HDMap
::
GetLanesWithHeading
(
const
apollo
::
common
::
PointENU
&
point
,
...
...
@@ -135,8 +136,8 @@ int HDMap::GetLanesWithHeading(const apollo::common::PointENU& point,
const
double
central_heading
,
const
double
max_heading_difference
,
std
::
vector
<
LaneInfoConstPtr
>*
lanes
)
const
{
return
impl_
.
GetLanesWithHeading
(
point
,
distance
,
central_heading
,
max_heading_difference
,
lanes
);
return
impl_
.
GetLanesWithHeading
(
point
,
distance
,
central_heading
,
max_heading_difference
,
lanes
);
}
int
HDMap
::
GetRoadBoundaries
(
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录