Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
J
jfxmap_python
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
jfxmap_python
Commits
843a9540
Commit
843a9540
authored
Jan 06, 2022
by
oscar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交so库调用
parent
c77a3957
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
3 deletions
+26
-3
jfxmap.py
script/jfxmap_lib/jfxmap.py
+15
-0
libjfxmap_python.so
script/jfxmap_lib/libjfxmap_python.so
+0
-0
trans_data.py
script/trans_data.py
+11
-3
No files found.
script/jfxmap_lib/jfxmap.py
0 → 100644
View file @
843a9540
import
os
import
sys
sys
.
path
.
append
(
"./jfxmap_lib/"
)
import
libjfxmap_python
# ret = libjfxmap_python.add(3,4)
# print(ret)
def
init_jfxmap
(
path
,
cfg
):
ret
=
libjfxmap_python
.
InitMap
(
path
,
cfg
)
return
ret
def
get_map_data
(
lat
,
lon
,
heading
):
info
=
libjfxmap_python
.
GetMapData
(
lat
,
lon
,
heading
)
return
info
.
isInMap
,
info
.
lOutRaodId
,
info
.
vctlOutPreRoadId
,
info
.
vctlOutNxtRoadId
,
info
.
nLaneCnt
,
info
.
nOutLaneNum
,
info
.
nOutLaneType
,
info
.
nOutLeftEdgeCrossType
,
info
.
nOutRightEdgeCrossType
,
info
.
nOutSpeedLimit
,
info
.
dOutLaneAngle
,
info
.
ptOutFoot_lat
,
info
.
ptOutFoot_lon
\ No newline at end of file
script/jfxmap_lib/libjfxmap_python.so
100644 → 100755
View file @
843a9540
No preview for this file type
script/trans_data.py
View file @
843a9540
...
...
@@ -14,7 +14,7 @@ import scipy
from
utils.getloc_coll
import
get_loc
,
get_world_loc
from
easydict
import
EasyDict
import
yaml
from
jfxmap_lib.jfxmap
import
init_jfxmap
,
get_map_data
def
compute_pitch
(
A
,
B
,
C
):
...
...
@@ -445,6 +445,11 @@ if __name__ == '__main__':
jsn_file
=
os
.
path
.
join
(
root_path
,
child_dir
+
".json"
)
print
(
jsn_file
)
p_dir
=
"/home/oscar/ros/git/catkin_ws_xishan/src/jfx_traffic_events/thirdparty/jfxmap/"
f_path
=
"./maps/xishan/mapconfig.json"
ret
=
init_jfxmap
(
p_dir
,
f_path
)
print
(
ret
)
vis
=
True
with
open
(
jsn_file
,
'r'
,
encoding
=
'utf-8'
,
errors
=
'ignore'
)
as
fp
:
jsn
=
json
.
load
(
fp
)
...
...
@@ -479,10 +484,13 @@ if __name__ == '__main__':
for
bbox
in
bboxes
:
lidar_loc
,
out_BL
,
out_center_BL
=
get_loc
([
bbox
[
4
][
0
],
bbox
[
4
][
1
],
bbox
[
4
][
2
],
bbox
[
6
][
0
],
bbox
[
6
][
1
],
bbox
[
6
][
2
],
bbox
[
2
]],
0
,
Trans
,
kitti2origin
)
print
(
out_center_BL
)
angle
=
bbox
[
2
]
/
np
.
pi
*
180
isInMap
=
get_map_data
(
out_center_BL
[
0
],
out_center_BL
[
1
],
angle
)
print
(
"call get data isInMap = "
,
isInMap
)
flag
=
in_hull
(
xyz
,
bbox
[
1
])
pickcloud
=
xyz
[
flag
]
dz
=
np
.
array
([
0
,
0
,
1
0
])
dz
=
np
.
array
([
0
,
0
,
0
])
addz
=
np
.
add
(
pickcloud
,
dz
)
print
(
pickcloud
)
print
(
addz
)
...
...
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