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
1a1a66a0
Commit
1a1a66a0
authored
Mar 09, 2023
by
oscar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加配置文件里加入路口编号的配置。
parent
b3be51a2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
EventsRos.cpp
EventsRos.cpp
+4
-1
JfxEvents.cpp
events/JfxEvents.cpp
+3
-2
JfxEvents.h
events/JfxEvents.h
+3
-1
No files found.
EventsRos.cpp
View file @
1a1a66a0
...
...
@@ -49,7 +49,10 @@ int EventsRos::loadConfig(ros::NodeHandle& nh)
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
);
int
cross_id
=
17
;
if
(
m_config
[
"road_cross_index"
])
cross_id
=
m_config
[
"road_cross_index"
].
as
<
int32_t
>
();
m_jfx_events
.
Init
(
map_path
,
map_dir
,
map_cfg
,
cross_csv
,
cross_id
);
SDK_LOG
(
SDK_INFO
,
"EventsRos::loadConfig-InitMap end"
);
//map init end
EventsConfig
&
config
=
m_jfx_events
.
m_cfg
;
...
...
events/JfxEvents.cpp
View file @
1a1a66a0
...
...
@@ -48,7 +48,7 @@ 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
,
std
::
string
cross_csv
)
void
JfxEvents
::
Init
(
std
::
string
map_path
,
std
::
string
map_dir
,
std
::
string
map_cfg
,
std
::
string
cross_csv
,
int
cross_id
)
{
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
());
...
...
@@ -66,6 +66,7 @@ void JfxEvents::Init(std::string map_path, std::string map_dir,std::string map_c
SDK_LOG
(
SDK_INFO
,
"dir = %s, cfg = %s,csv = %s"
,
dir
.
c_str
(),
map_cfg
.
c_str
(),
csv
.
c_str
());
m_OfflineMap
.
Init
(
dir
,
map_cfg
,
csv
);
m_isMapCsv
=
1
;
m_cross_id
=
cross_id
;
#endif
}
//m_OfflineMap.reset(new jf::MapInterface());
...
...
@@ -232,7 +233,7 @@ int JfxEvents::CalculateMap(ObjInfoAll& objAll, TrkObj& sendObj)
#ifdef _USING_NEW_JFXMAP_
jf
::
RoadInfo
roadInfo
=
{};
int64_t
lCrossId
=
17
;
int64_t
lCrossId
=
m_cross_id
;
#endif
//ROS_INFO("begin call jfxmap");
//bool result = m_OfflineMap->GetMapData(ptInLoc, dCarAngle, lOutRaodId, vctlOutPreRoadId, vctlOutNxtRoadId,
...
...
events/JfxEvents.h
View file @
1a1a66a0
...
...
@@ -198,7 +198,7 @@ public:
JfxEvents
();
~
JfxEvents
();
void
Init
(
std
::
string
map_path
,
std
::
string
map_dir
,
std
::
string
map_cfg
,
std
::
string
cross_csv
);
void
Init
(
std
::
string
map_path
,
std
::
string
map_dir
,
std
::
string
map_cfg
,
std
::
string
cross_csv
,
int
cross_id
);
void
PushEventInfos
(
TrkObjsPtr
&
inputs
);
...
...
@@ -276,4 +276,6 @@ public:
//无路口车道,记录总的数量
TrafficJam
m_totelTrafficJam
;
int
m_cross_id
=
0
;
//路口id
};
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