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
ac10d6e4
Commit
ac10d6e4
authored
Feb 16, 2023
by
oscar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改地图加载时传入csv文件,没有就用原来的接口。
parent
30bc2a31
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
5 deletions
+17
-5
EventsRos.cpp
EventsRos.cpp
+4
-1
JfxEvents.cpp
events/JfxEvents.cpp
+12
-3
JfxEvents.h
events/JfxEvents.h
+1
-1
No files found.
EventsRos.cpp
View file @
ac10d6e4
...
...
@@ -46,7 +46,10 @@ int EventsRos::loadConfig(ros::NodeHandle& nh)
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
);
string
cross_csv
;
if
(
m_config
[
"road_cross_csv"
])
cross_csv
=
m_config
[
"road_cross_csv"
].
as
<
std
::
string
>
();
m_jfx_events
.
Init
(
map_path
,
map_dir
,
map_cfg
,
cross_csv
);
SDK_LOG
(
SDK_INFO
,
"EventsRos::loadConfig-InitMap end"
);
//map init end
EventsConfig
&
config
=
m_jfx_events
.
m_cfg
;
...
...
events/JfxEvents.cpp
View file @
ac10d6e4
...
...
@@ -48,16 +48,25 @@ void JfxEvents::SetEventsCallback(SendEventProcessCallback cb)
std
::
lock_guard
<
std
::
mutex
>
lock
(
m_sendMtx
);
m_sendCb
=
cb
;
}
void
JfxEvents
::
Init
(
std
::
string
map_path
,
std
::
string
map_dir
,
std
::
string
map_cfg
)
void
JfxEvents
::
Init
(
std
::
string
map_path
,
std
::
string
map_dir
,
std
::
string
map_cfg
,
std
::
string
cross_csv
)
{
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));
dir
=
map_path
+
map_dir
;
SDK_LOG
(
SDK_INFO
,
"dir = %s, cfg = %s"
,
dir
.
c_str
(),
map_cfg
.
c_str
());
if
(
cross_csv
.
empty
())
{
SDK_LOG
(
SDK_INFO
,
"dir = %s, cfg = %s"
,
dir
.
c_str
(),
map_cfg
.
c_str
());
m_OfflineMap
.
Init
(
dir
,
map_cfg
);
}
else
{
// std::string csv = map_path + cross_csv;
SDK_LOG
(
SDK_INFO
,
"dir = %s, cfg = %s,csv = %s"
,
dir
.
c_str
(),
map_cfg
.
c_str
(),
cross_csv
.
c_str
());
m_OfflineMap
.
Init
(
dir
,
map_cfg
,
cross_csv
);
}
//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
);
...
...
events/JfxEvents.h
View file @
ac10d6e4
...
...
@@ -198,7 +198,7 @@ public:
JfxEvents
();
~
JfxEvents
();
void
Init
(
std
::
string
map_path
,
std
::
string
map_dir
,
std
::
string
map_cfg
);
void
Init
(
std
::
string
map_path
,
std
::
string
map_dir
,
std
::
string
map_cfg
,
std
::
string
cross_csv
);
void
PushEventInfos
(
TrkObjsPtr
&
inputs
);
...
...
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