Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
M
map_location
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
map_location
Commits
f5dd3b5c
Commit
f5dd3b5c
authored
Apr 11, 2022
by
muyusheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
2e6fd105
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
306 additions
and
16 deletions
+306
-16
.gitmodules
.gitmodules
+1
-0
CMakeLists.txt
CMakeLists.txt
+13
-16
EgoMotionStruct.h
include/EgoMotionStruct.h
+292
-0
No files found.
.gitmodules
View file @
f5dd3b5c
[submodule "jfxmap"]
path = jfxmap
url = http://git.corp.roadlinks.cn:2020/jfxsim/jfxmap.git
branch = rav4_api
CMakeLists.txt
View file @
f5dd3b5c
...
...
@@ -9,17 +9,17 @@ SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g -ggdb")
SET
(
CMAKE_CXX_FLAGS_RELEASE
"$ENV{CXXFLAGS} -O3 -Wall"
)
include_directories
(
${
PROJEC
T_SOURCE_DIR
}
/
${
PROJECT_SOURCE_DIR
}
/include/
${
PROJECT_SOURCE_DIR
}
/src
/
${
PROJECT_SOURCE_DIR
}
/../ego_motion/include
${
PROJEC
T_SOURCE_DIR
}
/jfxmap/offline/Core
${
PROJEC
T_SOURCE_DIR
}
/jfxmap/offline/Match
${
PROJEC
T_SOURCE_DIR
}
/jfxmap/offline/Route
${
PROJEC
T_SOURCE_DIR
}
/jfxmap/offline/Utils
${
PROJEC
T_SOURCE_DIR
}
/jfxmap/offline/xxtea-c
${
PROJEC
T_SOURCE_DIR
}
/jfxmap/submodules/ajson
${
PROJEC
T_SOURCE_DIR
}
/jfxmap/submodules/xxtea-c
${
CMAKE_CURREN
T_SOURCE_DIR
}
/
${
CMAKE_CURRENT_SOURCE_DIR
}
/src/map_location/jfxmap/offline/Match
${
CMAKE_CURRENT_SOURCE_DIR
}
/include
/
${
CMAKE_CURRENT_SOURCE_DIR
}
/src/
${
CMAKE_CURREN
T_SOURCE_DIR
}
/jfxmap/offline/Core
${
CMAKE_CURREN
T_SOURCE_DIR
}
/jfxmap/offline/Match
${
CMAKE_CURREN
T_SOURCE_DIR
}
/jfxmap/offline/Route
${
CMAKE_CURREN
T_SOURCE_DIR
}
/jfxmap/offline/Utils
${
CMAKE_CURREN
T_SOURCE_DIR
}
/jfxmap/offline/xxtea-c
${
CMAKE_CURREN
T_SOURCE_DIR
}
/jfxmap/submodules/ajson
${
CMAKE_CURREN
T_SOURCE_DIR
}
/jfxmap/submodules/xxtea-c
)
file
(
GLOB MAP_SRC_LIST
...
...
@@ -27,15 +27,12 @@ file(GLOB MAP_SRC_LIST
"jfxmap/offline/Core/*.cpp"
"jfxmap/offline/Route/*.cpp"
"jfxmap/offline/Utils/*.cpp"
#"jfxmap/offline/Projects/rav4/**/*.cpp"
#"jfxmap/offline/Projects/rav4/**/*.c"
"jfxmap/submodules/xxtea-c/*.c"
#"jfxmap/offline/Projects/rav4/Main.cpp"
)
add_library
(
${
PROJECT_NAME
}
SHARED
${
PROJEC
T_SOURCE_DIR
}
/src/MapLocationBase.cpp
${
PROJEC
T_SOURCE_DIR
}
/src/MapLocation.cpp
${
CMAKE_CURREN
T_SOURCE_DIR
}
/src/MapLocationBase.cpp
${
CMAKE_CURREN
T_SOURCE_DIR
}
/src/MapLocation.cpp
${
MAP_SRC_LIST
}
)
...
...
include/EgoMotionStruct.h
0 → 100644
View file @
f5dd3b5c
#
pragma
once
#include <string>
#include <vector>
namespace
JfxLocation
{
enum
LineType
//LineType 描述车道线类型
{
LineType_Unknown
=
0
,
// 0 << 0
LineType_LaneLine
=
2
,
// 1 << 1 (车道线)
LineType_Curb
=
4
,
// 1 << 2 (路沿)
LineType_Center
=
8
,
// 1 << 3, Center line, virtual and in the median of lane(车道中心线)
LineType_Guardrail
=
16
,
// 1 << 4(车道线由护栏组成)
LineType_ConcreteBarrier
=
32
,
// 1 << 5(车道线由混凝土屏障构成)
LineType_Fence
=
64
,
// 1 << 6(围栏)
LineType_Wall
=
128
,
// 1 << 7(墙)
LineType_Canopy
=
256
,
// 1 << 8(遮棚)
LineType_Virtual
=
512
,
// 1 << 9(虚拟线)
LineType_Cone
=
1024
// 1 << 10(锥桶连线)
};
enum
LineColor
{
LineColor_Unknown
=
0
,
// 0 << 0
LineColor_WHITE
=
2
,
// 1 << 1(白色)
LineColor_YELLOW
=
4
,
// 1 << 2 (黄色)
LineColor_ORANGE
=
8
,
// 1 << 3 (橙色)
LineColor_BLUE
=
16
,
// 1 << 4(蓝色)
LineColor_GREEN
=
32
,
// 1 << 5(绿色)
LineColor_GRAY
=
64
,
// 1 << 6 (灰色)
LineColor_LETF_GRAY_RIGHT_YELLOW
=
128
,
// 1 << 7(左灰右黄)
LineColor_LETF_YELLOW_RIGHT_WHITE
=
256
// 1 << 8(左黄右白)
};
enum
LineMarking
{
LineMarking_Unknown
=
0
,
// 0 << 0
LineMarking_SolidLine
=
2
,
// 1 << 1(单实线)
LineMarking_DashedLine
=
4
,
// 1 << 2(单虚线)
LineMarking_ShortDashedLine
=
8
,
// 1 << 3(短虚线)
LineMarking_DoubleSolidLine
=
16
,
// 1 << 4 (双实线)
LineMarking_DoubleDashedLine
=
32
,
// 1 << 5(双虚线)
LineMarking_LeftSolidRightDashed
=
64
,
// 1 << 6(左实右虚)
LineMarking_RightSolidLeftDashed
=
128
,
// 1 << 7(左虚右实)
LineMarking_ShadedArea
=
256
,
// 1 << 8, diversion line(导流线)
LineMarking_LaneVirtualMarking
=
512
,
// 1 << 9, virtual line of lane center(车道虚拟线)
LineMarking_IntersectionVirualMarking
=
1024
,
// 1 << 10,virtual line at intersection(路口虚拟线)
LineMarking_CurbVirtualMarking
=
2048
,
// 1 << 11, virtual line of road edge(路边缘虚拟线)
LineMarking_UnclosedRoad
=
4096
,
// 1 << 12, line for non-closure road (非封闭路段[线])
LineMarking_RoadVirtualLine
=
8192
// 1 << 13, virtual line of road(道路虚拟线)
};
enum
LineSource
{
// barrier properties
LINE_SOURCE_OBSTACLE_BLOCKED
=
4
,
//(1 << 2) (基于拥堵跟车预测,如果被前车近距离遮挡,则会预测)
LINE_SOURCE_HISTORY_BASED
=
16
,
//(1 << 4) (基于历史观测进行预测)
LINE_SOURCE_EXTRAPOLATION
=
32
,
//(1 << 5)(基于车辆运动和车道线情况,即自车行驶状态和车道线趋势一致进行预测)
// tracking state
LINE_SOURCE_UNKNOWN
=
512
,
//(1 << 9) (未知)
LINE_SOURCE_NEW
=
1024
,
// (1 << 10) (新的)
LINE_SOURCE_MEASURED
=
2048
,
//(1 << 11) (更新)
LINE_SOURCE_PREDICTED
=
4096
// (1 << 12) (预测)
};
enum
LinePosition
{
LinePosition_Left
=
0
,
// 0 << 0(左)
LinePosition_Right
=
2
,
// 1 << 1 (右)
LinePosition_LeftLeft
=
4
,
// 1 << 2(左左)
LinePosition_RightRight
=
8
,
// 1 << 3(右右)
LinePosition_LeftOutside
=
16
,
// 1 << 4 the left out side branch for Y structure lines(导流左分支线)
LinePosition_RightOutside
=
32
,
// 1 << 5 the right out side branch for Y structure lines (导流右分支线)
LinePosition_LeftLeftLeft
=
64
,
// 1 << 6(左左左)
LinePosition_RightRightRight
=
128
// 1 << 7 (右右右 )
};
struct
VehSpeed
//轮速信息
{
int64_t
time_stamp
;
//时间戳,单位微妙milliseconds
std
::
vector
<
float
>
speed
;
//速度,包括6个float,其中4个方向速度,加车速,还有方向盘的转动
};
struct
GPSFrame
//gps信息
{
std
::
string
info
;
double
longitude
;
//经度
double
latitude
;
//纬度
int64_t
time_stamp
;
//时间戳,单位微妙milliseconds
double
longitude_cent
;
std
::
string
longitude_dir
;
double
latitude_cent
;
std
::
string
latitude_dir
;
float
ground_speed
;
float
ground_course
;
int64_t
gps_time
;
float
altitude
;
float
accuracy
;
};
struct
IMUFrame
{
float
acc_x
;
float
acc_y
;
float
acc_z
;
float
gyro_x
;
float
gyro_y
;
float
gyro_z
;
float
temperature
;
int64_t
time_stamp
;
};
struct
Point
{
float
x
;
float
y
;
float
z
;
};
struct
Point3D
{
double
x
;
double
y
;
double
z
;
};
struct
Quaternion
{
float
w
;
float
x
;
float
y
;
float
z
;
};
struct
CurveLine
{
std
::
vector
<
Point
>
points
;
// vcs下曲线对应的采样点
float
width
;
//曲线宽度,即曲线垂直于Z轴方向的宽度,unit:m
Point
start_pt
;
//ADAS曲线的起点
std
::
vector
<
double
>
y_coeff
;
// if type = CurveType_ADAS, y = y_coeff[0] + y_coeff[1] * x + y_coeff[2] * x^2 + y_coeff[3] * x^3
double
t_max
;
// 对于CurveType_ADAS类型表示vcs下曲线x方向长度,unit:m
int32_t
color
;
//曲线颜色,枚举类型详细可见 LineColor 描述
int32_t
marking
;
// 曲线线型,枚举类型详细可见 LineMarking 描述
float
parsing_conf
;
//车道线检测置信度,表征车道线的观测质量,置信度[0~1]
float
rmse
;
//车道线归一化拟合误差,即观测(采样点)和线的均方误差[0~1],值越高,拟合越好
};
struct
Line
{
int32_t
id
;
//车道线的索引id
int32_t
life_time
;
//检测到该车道线的持续时长,指车道线的生命周期,unit: ms
std
::
vector
<
CurveLine
>
lines_3d
;
// 车道线的分段曲线,每条车道线包含若干个曲线段,存放在lines_3d里面,详细可见 CurveLine 描述【前视为单段】
// line properties
int32_t
type
;
// 车道线类型,枚举类型详细可见 LineType 描述
int32_t
source
;
// 车道线来源,有感知和预测输出,枚举类型详细可见 LineSource 描述
int32_t
position
;
// 车道线位置属性,枚举类型详细可见 LinePosition 描述
float
conf
;
//车道线置信度[0~1]
};
struct
Lines
{
int64_t
time_stamp
;
//同步时间戳,unit: ms
std
::
vector
<
Line
>
lines
;
//一帧图像包含的所有车道线
float
dtlc
;
//自车前轮外侧到车道线内沿横向距离,unit: m
float
ttlc
;
//穿行时距,自车前轮外侧到车道线内沿横向距离/自车横向速度,unit: s
};
struct
Pose
{
Point3D
position
;
// position in x,y,z direction
Quaternion
orientation
;
//quaternion attitude
Point3D
std_position
;
//standard deviation of position in x,y,z direction
Quaternion
std_orientation
;
//standard deviation of x, y, z, w component of quaternion
};
struct
Velocity
{
Point3D
linear_velocity
;
//# linear velocity, m/s, in ENU
Point3D
angular_velocity
;
//# angular velocity, rad/s, in vehicle frame
Point3D
std_linear_velocity
;
//# standard deviation of velocity in x,y,z direction, m/s
Point3D
std_angular_velocity
;
//# standard deviation of angular velocity that rotates around x, y, z axle, rad / s
};
struct
Bias
{
Point3D
linear_acceleration_bias
;
//# linear velocity, m/s, in ENU
Point3D
angular_acceleration_bias
;
//# angular velocity, rad/s, in vehicle frame
Point3D
std_linear_acceleration_bias
;
//# standard deviation of velocity in x,y,z direction, m/s
Point3D
std_angular_acceleration_bias
;
//# standard deviation of angular velocity that rotates around x, y, z axle, rad / s
};
struct
Attitude
{
double
yaw
;
//# yaw angle, (-pi,pi]
double
pitch
;
//# pitch angle, (-pi,pi]
double
roll
;
//# roll angle, (-pi,pi]
double
std_yaw
;
//# standard deviation of yaw angle, [0,pi]
double
std_pitch
;
//# standard deviation of piych angle, [0,pi]
double
std_roll
;
//# standard deviation of roll angle, [0,pi]
};
struct
EkfStatus
{
std
::
string
loc_states
;
//# status of ekf
std
::
string
pos_type
;
//# type of every ego position
};
struct
Location
{
int64_t
time_stamp
;
//同步时间戳,unit: ms
int32_t
gnss_available
;
//GNSS is avaiable or not(true or false) 0 false,1 true
int8_t
position_status
;
//status to localizer, JF defines per the algorithm internal status
// could be : flag if localizer initializedand flag of fused sources
int8_t
utm_zone_id
;
//UTM zone id, range in [1...60]
int8_t
is_south
;
//Flag of South and North earth: 1: South of earth 0 : North of earth
double
utm_offset_x
;
//Offset of X (UTM easting) direction in UTM Zone, unit: m
double
utm_offset_y
;
//Offset of Y (UTM northing) direction in UTM Zone, unit: m
Pose
pose
;
//# position in 3 directions and orientation of quaternion
//# position: vehicle origin(center of rare axis) in WGS84
//# x - longitude, y - latitude, z - height
//# position std : meter in x, y, z direction
//# orientation : orientation of vehicle frame(front : x, left : y, up : z) in ENU
//# orientation std : not sure if it is proper to use quaternion, just to keep it for future
Velocity
velocity
;
//# Linear velocity and angular velocity
//# linear velocity: in ENU, unit m/s
//# angular velocity: in vehicle frame at the time, unit rad/s
Attitude
attitude
;
//# Attitude angle
Bias
bias
;
//# Zero offset of IMU, in the frame of IMU itself.
EkfStatus
ekf_status
;
//# status of ekf(ekf_stats) and type of every ego position(pos_type)
//# ekf_stats pos_type
//# LOC_INIT
//# BADRTK_LOWSPEED
//# LOWSPEED
//# BADRTK
//# INITING
//# LOC_SURE
//# BASEONIMUMMRTK
//# BASEONIMURTK
//# BASEONIMUMM
//# LOC_PREDICT
//# BASEONIMU
//# NO_CONVERGENCE
//# BASEONMM(suspend)
//# BASEONRTK(suspend)
};
struct
MatchingResult
{
int64_t
time_stamp
;
//同步时间戳,unit: ms
Point3D
foot_point
;
//# Perpendicular
double
foot_prob
;
Point3D
vision_horizontal_point
;
//# visual computing horizontal point
double
horizontal_prob
;
Point3D
vision_vertical_point
;
//# visual computing vertical point
double
vertical_prob
;
uint32_t
match_status
;
//# match status, 1: 使用RTK确定初始车道后递推的结果, 2: 使用感知确定初始车道后递推的结果
uint8_t
change_lanes
;
//# change lane or not
uint8_t
lane_seq_no
;
//# vehicle lane number
uint8_t
lane_num
;
//# total number of lanes
uint8_t
road_rank
;
//# 0: 未调查
//# 1: 高速道路
//# 2: 国道
//# 3: 省道
//# 4: 县道
//# 5: 乡道
//# 6: 内部道路
//# 7: 城市快速
//# 8: 城市主干道
//# 9: 城市次干道
//# 10: 城市内部路
//# 11: 城市小路
//# 99: 其它
uint8_t
road_type
;
//# 0: Not investigate
//# 1: Normal road
//# 2: Bridge
//# 3: Tunnel
//# 4: Under elevated bridge
//# 5: City valley
float
angle_with_lane
;
//# Angle with the lane edge
uint8_t
special_type
;
//# refer to road type
float
special_type_begin_dis
;
//# The distance to the begin of special road type, unit: m
float
special_type_end_dis
;
//# The distance to the end of special road type, unit: m
uint8_t
in_road_crossing
;
//# Is it within the road crossing area
float
left_lane_edge_dis
;
//# distance to the left lane edge
float
right_lane_edge_dis
;
//# distance to the right lane edge
double
gnss_time
;
//# gnss time
double
gnss_longitude
;
//# longitude in WGS84 coordinate system, degree
double
gnss_latitude
;
//# latitude in WGS84 coordinate system, degree
float
gnss_height
;
//# height in WGS84 coordinate system, m
float
gnss_heading
;
//# heading angle of dual antenna, degree
float
gnss_ground_speed
;
//# ground apeed, m / s
float
gnss_longitude_standard_deviation
;
//# standard deviation of position of longitude in WGS84 coordinate system, m
float
gnss_latitude_standard_deviation
;
//# standard deviation of position of latitude in WGS84 coordinate system, m
float
gnss_height_standard_deviation
;
//# standard deviation of position of height in WGS84 coordinate system, m
std
::
string
gnss_solution_status
;
//# gnss solution status : 131(best) > 67(may) > 4n(bad) > 3(bad) > 1(bad)
};
}
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