Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
9da6455d
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,发现更多精彩内容 >>
提交
9da6455d
编写于
9月 01, 2017
作者:
A
Aaron Xiao
提交者:
siyangy
9月 01, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
HMI: Remove RoutingRequest sending function which has been moved to DreamView. (#1441)
上级
58a5d0aa
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
0 addition
and
77 deletion
+0
-77
modules/hmi/conf/ros_bridge_adapter.pb.txt
modules/hmi/conf/ros_bridge_adapter.pb.txt
+0
-9
modules/hmi/proto/hmi_message.proto
modules/hmi/proto/hmi_message.proto
+0
-2
modules/hmi/ros_bridge/BUILD
modules/hmi/ros_bridge/BUILD
+0
-1
modules/hmi/ros_bridge/ros_bridge.cc
modules/hmi/ros_bridge/ros_bridge.cc
+0
-49
modules/hmi/web/ros_bridge_api.py
modules/hmi/web/ros_bridge_api.py
+0
-10
modules/hmi/web/templates/cards/left_panel.tpl
modules/hmi/web/templates/cards/left_panel.tpl
+0
-6
未找到文件。
modules/hmi/conf/ros_bridge_adapter.pb.txt
浏览文件 @
9da6455d
config {
type: LOCALIZATION
mode: RECEIVE_ONLY
message_history_limit: 1
}
config {
config {
type: CHASSIS
type: CHASSIS
mode: RECEIVE_ONLY
mode: RECEIVE_ONLY
...
@@ -17,8 +12,4 @@ config {
...
@@ -17,8 +12,4 @@ config {
type: PAD
type: PAD
mode: PUBLISH_ONLY
mode: PUBLISH_ONLY
}
}
config {
type: ROUTING_REQUEST
mode: PUBLISH_ONLY
}
is_ros: true
is_ros: true
modules/hmi/proto/hmi_message.proto
浏览文件 @
9da6455d
...
@@ -22,6 +22,4 @@ message HMICommand {
...
@@ -22,6 +22,4 @@ message HMICommand {
optional
bool
reset_first
=
2
;
optional
bool
reset_first
=
2
;
}
}
optional
ChangeDrivingMode
change_driving_mode
=
2
;
optional
ChangeDrivingMode
change_driving_mode
=
2
;
optional
bool
new_routing_request
=
3
;
}
}
modules/hmi/ros_bridge/BUILD
浏览文件 @
9da6455d
...
@@ -13,7 +13,6 @@ cc_binary(
...
@@ -13,7 +13,6 @@ cc_binary(
"//modules/common/adapters:adapter_manager"
,
"//modules/common/adapters:adapter_manager"
,
"//modules/control/common"
,
"//modules/control/common"
,
"//modules/control/proto:control_proto"
,
"//modules/control/proto:control_proto"
,
"//modules/map/hdmap:hdmap_util"
,
"@ros//:ros_common"
,
"@ros//:ros_common"
,
],
],
)
)
...
...
modules/hmi/ros_bridge/ros_bridge.cc
浏览文件 @
9da6455d
...
@@ -25,7 +25,6 @@
...
@@ -25,7 +25,6 @@
#include "modules/common/util/file.h"
#include "modules/common/util/file.h"
#include "modules/control/common/control_gflags.h"
#include "modules/control/common/control_gflags.h"
#include "modules/control/proto/pad_msg.pb.h"
#include "modules/control/proto/pad_msg.pb.h"
#include "modules/map/hdmap/hdmap_util.h"
DEFINE_string
(
adapter_config_file
,
DEFINE_string
(
adapter_config_file
,
...
@@ -36,7 +35,6 @@ using apollo::common::adapter::AdapterManager;
...
@@ -36,7 +35,6 @@ using apollo::common::adapter::AdapterManager;
using
apollo
::
common
::
adapter
::
AdapterManagerConfig
;
using
apollo
::
common
::
adapter
::
AdapterManagerConfig
;
using
apollo
::
control
::
DrivingAction
;
using
apollo
::
control
::
DrivingAction
;
using
apollo
::
canbus
::
Chassis
;
using
apollo
::
canbus
::
Chassis
;
using
apollo
::
hdmap
::
HDMapUtil
;
namespace
apollo
{
namespace
apollo
{
namespace
hmi
{
namespace
hmi
{
...
@@ -53,13 +51,6 @@ class RosBridge {
...
@@ -53,13 +51,6 @@ class RosBridge {
&
adapter_conf
));
&
adapter_conf
));
AdapterManager
::
Init
(
adapter_conf
);
AdapterManager
::
Init
(
adapter_conf
);
AdapterManager
::
AddHMICommandCallback
(
OnHMICommand
);
AdapterManager
::
AddHMICommandCallback
(
OnHMICommand
);
// Init RoutingRequest template.
CHECK
(
apollo
::
common
::
util
::
GetProtoFromASCIIFile
(
apollo
::
hdmap
::
EndWayPointFile
(),
routing_request_template
.
mutable_end
()));
// Init HDMap.
CHECK
(
HDMapUtil
::
BaseMapPtr
());
}
}
private:
private:
...
@@ -71,10 +62,6 @@ class RosBridge {
...
@@ -71,10 +62,6 @@ class RosBridge {
}
}
ChangeDrivingModeTo
(
cmd
.
target_mode
());
ChangeDrivingModeTo
(
cmd
.
target_mode
());
}
}
if
(
command
.
new_routing_request
())
{
instance
()
->
SendRoutingRequest
();
}
}
}
static
bool
ChangeDrivingModeTo
(
const
Chassis
::
DrivingMode
target_mode
)
{
static
bool
ChangeDrivingModeTo
(
const
Chassis
::
DrivingMode
target_mode
)
{
...
@@ -118,43 +105,7 @@ class RosBridge {
...
@@ -118,43 +105,7 @@ class RosBridge {
AINFO
<<
"Sent PadMessage"
;
AINFO
<<
"Sent PadMessage"
;
}
}
void
SendRoutingRequest
()
{
// Observe position from Localization.
auto
*
localization
=
AdapterManager
::
GetLocalization
();
localization
->
Observe
();
if
(
localization
->
Empty
())
{
AERROR
<<
"No Localization message received!"
;
return
;
}
const
auto
&
pos
=
localization
->
GetLatestObserved
().
pose
().
position
();
// Look up lane info from map.
apollo
::
hdmap
::
LaneInfoConstPtr
lane
=
nullptr
;
double
s
,
l
;
HDMapUtil
::
BaseMap
().
GetNearestLane
(
pos
,
&
lane
,
&
s
,
&
l
);
if
(
lane
==
nullptr
)
{
AERROR
<<
"Cannot get nearest lane from current position."
;
return
;
}
// Populate message and send.
routing
::
RoutingRequest
routing_request
=
routing_request_template
;
auto
*
start_point
=
routing_request
.
mutable_start
();
start_point
->
set_id
(
lane
->
id
().
id
());
start_point
->
set_s
(
s
);
auto
*
pose
=
start_point
->
mutable_pose
();
pose
->
set_x
(
pos
.
x
());
pose
->
set_y
(
pos
.
y
());
pose
->
set_z
(
pos
.
z
());
AdapterManager
::
FillRoutingRequestHeader
(
kHMIRosBridgeName
,
&
routing_request
);
AdapterManager
::
PublishRoutingRequest
(
routing_request
);
}
private:
private:
routing
::
RoutingRequest
routing_request_template
;
DECLARE_SINGLETON
(
RosBridge
);
DECLARE_SINGLETON
(
RosBridge
);
};
};
...
...
modules/hmi/web/ros_bridge_api.py
浏览文件 @
9da6455d
...
@@ -27,7 +27,6 @@ class RosBridgeApi(object):
...
@@ -27,7 +27,6 @@ class RosBridgeApi(object):
"""
"""
HMI ros API:
HMI ros API:
change_driving_mode [manual | auto]
change_driving_mode [manual | auto]
new_routing_request
"""
"""
ros_command_pub
=
None
ros_command_pub
=
None
ros_command_seq_num
=
0
ros_command_seq_num
=
0
...
@@ -62,15 +61,6 @@ class RosBridgeApi(object):
...
@@ -62,15 +61,6 @@ class RosBridgeApi(object):
Config
.
log
.
debug
(
'Publishing message: %s'
,
str
(
cmd_msg
))
Config
.
log
.
debug
(
'Publishing message: %s'
,
str
(
cmd_msg
))
cls
.
ros_command_pub
.
publish
(
cmd_msg
)
cls
.
ros_command_pub
.
publish
(
cmd_msg
)
@
classmethod
def
new_routing_request
(
cls
):
"""SocketIO Api: new_routing_request()"""
Config
.
log
.
info
(
'RosBridgeApi new_routing_request'
)
cmd_msg
=
cls
.
__new_command_message
()
cmd_msg
.
new_routing_request
=
True
Config
.
log
.
debug
(
'Publishing message: %s'
,
str
(
cmd_msg
))
cls
.
ros_command_pub
.
publish
(
cmd_msg
)
@
classmethod
@
classmethod
def
__new_command_message
(
cls
):
def
__new_command_message
(
cls
):
"""Create a new HMICommand message with header filled."""
"""Create a new HMICommand message with header filled."""
...
...
modules/hmi/web/templates/cards/left_panel.tpl
浏览文件 @
9da6455d
...
@@ -135,12 +135,6 @@
...
@@ -135,12 +135,6 @@
>
Start Auto
</button>
>
Start Auto
</button>
<span
class=
"glyphicon"
></span>
<span
class=
"glyphicon"
></span>
</div>
</div>
<div
class=
"col-xs-4 quick_start_col3"
>
<button
type=
"button"
class=
"btn hmi_large_btn"
onclick=
"io_request('ros_bridge_api', 'new_routing_request')"
>
RoutingReq
</button>
<span
class=
"glyphicon"
></span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录