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
fe14b68f
Commit
fe14b68f
authored
Dec 27, 2022
by
haoshuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
初始化地图防到最前面
parent
b89ab227
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
8 deletions
+17
-8
EventsRos.cpp
EventsRos.cpp
+10
-3
JfxEvents.cpp
events/JfxEvents.cpp
+5
-2
JfxEvents.h
events/JfxEvents.h
+2
-3
No files found.
EventsRos.cpp
View file @
fe14b68f
...
...
@@ -41,7 +41,14 @@ int EventsRos::loadConfig(ros::NodeHandle& nh)
nh
.
param
<
std
::
string
>
(
"unittest_yaml"
,
config_yaml
,
""
);
m_config
=
YAML
::
LoadFile
(
config_yaml
);
}
//map init
SDK_LOG
(
SDK_INFO
,
"EventsRos::loadConfig-InitMap"
);
string
map_path
=
m_root_dir
;
string
map_dir
=
m_config
[
"pro_dir"
].
as
<
std
::
string
>
();
string
map_cfg
=
m_config
[
"map_cfg"
].
as
<
std
::
string
>
();
m_jfx_events
.
Init
(
map_path
,
map_dir
,
map_cfg
);
SDK_LOG
(
SDK_INFO
,
"EventsRos::loadConfig-InitMap end"
);
//map init end
EventsConfig
&
config
=
m_jfx_events
.
m_cfg
;
m_devNo
=
m_config
[
"devNo"
].
as
<
std
::
string
>
();
//nh.param<std::string>("devNo", m_devNo, "none");
...
...
@@ -305,8 +312,8 @@ int EventsRos::Start()
}
#endif
});
m_jfx_events
.
Init
();
//stop !!!
//
m_jfx_events.Init();
return
0
;
}
...
...
events/JfxEvents.cpp
View file @
fe14b68f
...
...
@@ -48,11 +48,14 @@ void JfxEvents::SetEventsCallback(SendEventProcessCallback cb)
std
::
lock_guard
<
std
::
mutex
>
lock
(
m_sendMtx
);
m_sendCb
=
cb
;
}
void
JfxEvents
::
Init
()
void
JfxEvents
::
Init
(
std
::
string
map_path
,
std
::
string
map_dir
,
std
::
string
map_cfg
)
{
std
::
string
dir
=
m_cfg
.
pro_path
+
m_cfg
.
pro_dir
;
SDK_LOG
(
SDK_INFO
,
"m_cfg.pro_dir = %s, m_cfg.map_cfg- = %s"
,
dir
.
c_str
(),
m_cfg
.
map_cfg
.
c_str
());
m_OfflineMap
.
reset
(
new
jf
::
MapInterface
(
dir
,
m_cfg
.
map_cfg
));
//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
(
dir
,
map_cfg
));
m_Queue
.
set_max_num_items
(
1
);
m_sendQueue
.
set_max_num_items
(
10
);
...
...
events/JfxEvents.h
View file @
fe14b68f
...
...
@@ -198,7 +198,7 @@ public:
JfxEvents
();
~
JfxEvents
();
void
Init
();
void
Init
(
std
::
string
map_path
,
std
::
string
map_dir
,
std
::
string
map_cfg
);
void
PushEventInfos
(
TrkObjsPtr
&
inputs
);
...
...
@@ -273,4 +273,4 @@ public:
//无路口车道,记录总的数量
TrafficJam
m_totelTrafficJam
;
};
\ No newline at end of file
};
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