Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
ab0a7787
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 搜索 >>
提交
ab0a7787
编写于
9月 14, 2020
作者:
Q
QIU1995NONAME
提交者:
Chang Songhong
9月 14, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
V2X: Uncomment HDMAP based function
上级
0b566672
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
15 addition
and
21 deletion
+15
-21
modules/v2x/v2x_proxy/app/BUILD
modules/v2x/v2x_proxy/app/BUILD
+1
-0
modules/v2x/v2x_proxy/app/utils.cc
modules/v2x/v2x_proxy/app/utils.cc
+13
-19
modules/v2x/v2x_proxy/os_interface/os_interface.h
modules/v2x/v2x_proxy/os_interface/os_interface.h
+1
-2
未找到文件。
modules/v2x/v2x_proxy/app/BUILD
浏览文件 @
ab0a7787
...
@@ -9,6 +9,7 @@ cc_library(
...
@@ -9,6 +9,7 @@ cc_library(
hdrs
=
[
"utils.h"
],
hdrs
=
[
"utils.h"
],
deps
=
[
deps
=
[
"//cyber"
,
"//cyber"
,
"//modules/common/math:quaternion"
,
"//modules/map/hdmap:hdmap_util"
,
"//modules/map/hdmap:hdmap_util"
,
"//modules/v2x/v2x_proxy/obu_interface:obu_interface_grpc_impl"
,
"//modules/v2x/v2x_proxy/obu_interface:obu_interface_grpc_impl"
,
"//modules/v2x/v2x_proxy/os_interface"
,
"//modules/v2x/v2x_proxy/os_interface"
,
...
...
modules/v2x/v2x_proxy/app/utils.cc
浏览文件 @
ab0a7787
...
@@ -22,6 +22,8 @@
...
@@ -22,6 +22,8 @@
#include <sstream>
#include <sstream>
#include "modules/common/math/quaternion.h"
namespace
apollo
{
namespace
apollo
{
namespace
v2x
{
namespace
v2x
{
...
@@ -492,8 +494,6 @@ bool GetRsuInfo(const std::shared_ptr<::apollo::hdmap::HDMap> &hdmap,
...
@@ -492,8 +494,6 @@ bool GetRsuInfo(const std::shared_ptr<::apollo::hdmap::HDMap> &hdmap,
if
(
!
out_heading
)
{
if
(
!
out_heading
)
{
return
false
;
return
false
;
}
}
// TODO(qiumiaohan): uncomment when HDMAP done
#if 0
*
out_junction_id
=
kUnknownJunctionId
;
*
out_junction_id
=
kUnknownJunctionId
;
auto
res
=
std
::
make_shared
<::
apollo
::
v2x
::
CarStatus
>
();
auto
res
=
std
::
make_shared
<::
apollo
::
v2x
::
CarStatus
>
();
if
(
nullptr
==
res
)
{
if
(
nullptr
==
res
)
{
...
@@ -505,22 +505,18 @@ bool GetRsuInfo(const std::shared_ptr<::apollo::hdmap::HDMap> &hdmap,
...
@@ -505,22 +505,18 @@ bool GetRsuInfo(const std::shared_ptr<::apollo::hdmap::HDMap> &hdmap,
if
(
!
os_location
.
has_pose
())
{
if
(
!
os_location
.
has_pose
())
{
return
false
;
return
false
;
}
}
std::shared_ptr<::v2x::proxy::ObuLocationT> obu_location = nullptr;
res
->
mutable_localization
()
->
CopyFrom
(
os_location
);
if (!::v2x::proxy::adapter_location_os2obu(os_location, obu_location)) {
return false;
}
res->mutable_localization()->CopyFrom(*obu_location);
::
apollo
::
common
::
PointENU
point
;
::
apollo
::
common
::
PointENU
point
;
point
.
set_x
(
os_location
.
pose
().
position
().
x
());
point
.
set_x
(
os_location
.
pose
().
position
().
x
());
point
.
set_y
(
os_location
.
pose
().
position
().
y
());
point
.
set_y
(
os_location
.
pose
().
position
().
y
());
double heading = ::apollo::comm
m
on::math::QuaternionToHeading(
double
heading
=
::
apollo
::
common
::
math
::
QuaternionToHeading
(
os_location.pose().orientation().qw(),
os_location
.
pose
().
orientation
().
qw
(),
os_location.pose().orientation().qx(),
os_location
.
pose
().
orientation
().
qx
(),
os_location.pose().orientation().qy(),
os_location
.
pose
().
orientation
().
qy
(),
os_location.pose().orientation().qz());
os_location
.
pose
().
orientation
().
qz
());
*
out_heading
=
heading
;
*
out_heading
=
heading
;
std
::
vector
<::
apollo
::
hdmap
::
RSUInfoConstPtr
>
rsus
;
std
::
vector
<::
apollo
::
hdmap
::
RSUInfoConstPtr
>
rsus
;
if (0 != hdmap->GetForwardNearestRSU(point, distance, heading,
if
(
0
!=
hdmap
->
GetForwardNearestRSU
s
(
point
,
distance
,
heading
,
max_heading_difference
,
&
rsus
)
||
max_heading_difference
,
&
rsus
)
||
rsus
.
empty
())
{
rsus
.
empty
())
{
AINFO
<<
"no rsu is found"
;
AINFO
<<
"no rsu is found"
;
...
@@ -533,21 +529,19 @@ bool GetRsuInfo(const std::shared_ptr<::apollo::hdmap::HDMap> &hdmap,
...
@@ -533,21 +529,19 @@ bool GetRsuInfo(const std::shared_ptr<::apollo::hdmap::HDMap> &hdmap,
return
false
;
return
false
;
}
}
AINFO
<<
"This RSU is in the white list"
;
AINFO
<<
"This RSU is in the white list"
;
AINFO << "Junction id " << rsus[0]->
RSU
().junction_id().id();
AINFO
<<
"Junction id "
<<
rsus
[
0
]
->
rsu
().
junction_id
().
id
();
auto junction_info = hdmap->GetJunctionById(rsus[0]->
RSU
().junction_id());
auto
junction_info
=
hdmap
->
GetJunctionById
(
rsus
[
0
]
->
rsu
().
junction_id
());
if
(
nullptr
==
junction_info
)
{
if
(
nullptr
==
junction_info
)
{
return
false
;
return
false
;
}
}
std::shared_ptr<::apollo::
obu::normal::
Junction> obu_junction = nullptr;
std
::
shared_ptr
<::
apollo
::
v2x
::
Obu
Junction
>
obu_junction
=
nullptr
;
if (!ProtoAdapter::JunctionHd2obu(junction_info, obu_junction)) {
if
(
!
ProtoAdapter
::
JunctionHd2obu
(
junction_info
,
&
obu_junction
))
{
return
false
;
return
false
;
}
}
res
->
mutable_junction
()
->
CopyFrom
(
*
obu_junction
);
res
->
mutable_junction
()
->
CopyFrom
(
*
obu_junction
);
*
v2x_car_status
=
res
;
*
v2x_car_status
=
res
;
*
out_junction_id
=
junction_info
->
id
().
id
();
*
out_junction_id
=
junction_info
->
id
().
id
();
return
true
;
return
true
;
#endif
return
false
;
}
}
OSLightColor
GetNextColor
(
OSLightColor
color
)
{
OSLightColor
GetNextColor
(
OSLightColor
color
)
{
...
...
modules/v2x/v2x_proxy/os_interface/os_interface.h
浏览文件 @
ab0a7787
...
@@ -83,8 +83,7 @@ class OsInterFace {
...
@@ -83,8 +83,7 @@ class OsInterFace {
localization_reader_
=
nullptr
;
localization_reader_
=
nullptr
;
std
::
shared_ptr
<::
apollo
::
cyber
::
Reader
<::
apollo
::
planning
::
ADCTrajectory
>>
std
::
shared_ptr
<::
apollo
::
cyber
::
Reader
<::
apollo
::
planning
::
ADCTrajectory
>>
planning_reader_
=
nullptr
;
planning_reader_
=
nullptr
;
std
::
shared_ptr
<
std
::
shared_ptr
<::
apollo
::
cyber
::
Writer
<::
apollo
::
v2x
::
obu
::
ObuTrafficLight
>>
::
apollo
::
cyber
::
Writer
<::
apollo
::
v2x
::
obu
::
ObuTrafficLight
>>
v2x_obu_traffic_light_writer_
=
nullptr
;
v2x_obu_traffic_light_writer_
=
nullptr
;
std
::
shared_ptr
<
std
::
shared_ptr
<
::
apollo
::
cyber
::
Writer
<::
apollo
::
v2x
::
IntersectionTrafficLightData
>>
::
apollo
::
cyber
::
Writer
<::
apollo
::
v2x
::
IntersectionTrafficLightData
>>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录