Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
E
event_src
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
oscar
event_src
Commits
30bc2a31
Commit
30bc2a31
authored
Jan 29, 2023
by
haoshuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
定义地图为static对象
parent
820494d5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
JfxEvents.cpp
events/JfxEvents.cpp
+6
-4
JfxEvents.h
events/JfxEvents.h
+2
-1
No files found.
events/JfxEvents.cpp
View file @
30bc2a31
...
...
@@ -14,7 +14,7 @@ lon 现实1mi大概是lon的0.0000038337=3.8e-6
const
double
lat_dt
=
5e-6
;
const
double
lon_dt
=
5e-6
;
jf
::
MapInterface
JfxEvents
::
m_OfflineMap
;
JfxEvents
::
JfxEvents
()
{
}
...
...
@@ -55,8 +55,9 @@ void JfxEvents::Init(std::string map_path, std::string map_dir,std::string map_c
//m_OfflineMap.reset(new jf::MapInterface(dir, m_cfg.map_cfg));
dir
=
map_path
+
map_dir
;
SDK_LOG
(
SDK_INFO
,
"dir = %s, cfg = %s"
,
dir
.
c_str
(),
map_cfg
.
c_str
());
m_OfflineMap
.
reset
(
new
jf
::
MapInterface
());
m_OfflineMap
->
Init
(
dir
,
map_cfg
);
//m_OfflineMap.reset(new jf::MapInterface());
//m_OfflineMap->Init(dir,map_cfg);
m_OfflineMap
.
Init
(
dir
,
map_cfg
);
m_Queue
.
set_max_num_items
(
1
);
m_sendQueue
.
set_max_num_items
(
10
);
...
...
@@ -217,7 +218,8 @@ int JfxEvents::CalculateMap(ObjInfoAll& objAll, TrkObj& sendObj)
std
::
vector
<
long
>
vctlOutNxtRoadId
;
//ROS_INFO("begin call jfxmap");
bool
result
=
m_OfflineMap
->
GetMapData
(
ptInLoc
,
dCarAngle
,
lOutRaodId
,
vctlOutPreRoadId
,
vctlOutNxtRoadId
,
//bool result = m_OfflineMap->GetMapData(ptInLoc, dCarAngle, lOutRaodId, vctlOutPreRoadId, vctlOutNxtRoadId,
bool
result
=
m_OfflineMap
.
GetMapData
(
ptInLoc
,
dCarAngle
,
lOutRaodId
,
vctlOutPreRoadId
,
vctlOutNxtRoadId
,
nLaneCnt
,
nOutLaneNum
,
nOutLaneType
,
nOutLeftEdgeCrossType
,
nOutRightEdgeCrossType
,
nOutSpeedLimit
,
dOutLaneAngle
,
ptOutFoot
);
...
...
events/JfxEvents.h
View file @
30bc2a31
...
...
@@ -238,7 +238,8 @@ public:
int
m_frameNum
=
0
;
uint64_t
m_curTime
=
0
;
//记录当前帧的时间
std
::
unique_ptr
<
jf
::
MapInterface
>
m_OfflineMap
;
//std::unique_ptr<jf::MapInterface> m_OfflineMap;
static
jf
::
MapInterface
m_OfflineMap
;
std
::
mutex
m_sendMtx
;
SendEventProcessCallback
m_sendCb
=
nullptr
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment