Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
J
jfx_kalman_filter_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
jfx_kalman_filter_src
Commits
7ff25cff
Commit
7ff25cff
authored
Mar 31, 2023
by
oscar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交距离检查逻辑,距离太远的就不发送了。
parent
581aa2bc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
TrackingRos.cpp
TrackingRos.cpp
+16
-0
TrackingRos.h
TrackingRos.h
+4
-0
No files found.
TrackingRos.cpp
View file @
7ff25cff
...
...
@@ -20,7 +20,9 @@
#include "SendMsg.h"
#include "std_msgs/String.h"
#endif
#include <GeographicLib/Geodesic.hpp>
using
namespace
GeographicLib
;
float
to360
(
float
rot_y
,
float
lidar_x_angle
)
{
...
...
@@ -390,6 +392,12 @@ void TrackingRos::Init(ros::NodeHandle& nh)
#ifdef _SEND_ABUZHABI_
m_pubAbuzhabi
=
nh
.
advertise
<
std_msgs
::
String
>
(
"/abuzhabi_msg"
,
100
);
#endif
if
(
config
[
"CROSS_CENTER_LON"
])
m_cross_center_lon
=
config
[
"CROSS_CENTER_LON"
].
as
<
double
>
();
if
(
config
[
"CROSS_CENTER_LAT"
])
m_cross_center_lat
=
config
[
"CROSS_CENTER_LAT"
].
as
<
double
>
();
if
(
config
[
"CLEAR_DISTANCE"
])
m_clear_distance
=
config
[
"CLEAR_DISTANCE"
].
as
<
double
>
();
m_objsQueue
.
set_max_num_items
(
2
);
...
...
@@ -493,6 +501,7 @@ void TrackingRos::ThreadTrackingProcess()
{
SDK_LOG
(
SDK_INFO
,
"TrackingRos::ThreadTrackingProcess begin"
);
uint64_t
beginT
=
GetCurTime
();
Geodesic
geod
=
Geodesic
::
WGS84
();
while
(
m_isTrackingRun
)
{
objTrackListPtr
objsPtr
;
...
...
@@ -723,6 +732,13 @@ void TrackingRos::ThreadTrackingProcess()
}
if
(
is_need_send
==
1
)
{
if
(
m_cross_center_lon
!=
0
&&
m_clear_distance
!=
0
)
{
double
s12
,
azi1
,
azi2
;
geod
.
Inverse
(
obj
.
Lat
,
obj
.
Long
,
m_cross_center_lat
,
m_cross_center_lon
,
s12
,
azi1
,
azi2
);
if
(
s12
>
m_clear_distance
)
continue
;
}
//暂存rot_y
float
rot_y_angle_temp
=
obj
.
rot_y
;
...
...
TrackingRos.h
View file @
7ff25cff
...
...
@@ -68,4 +68,8 @@ public:
std
::
string
m_nodeName
;
//点位信息,现在就是10-1,1-1等信息
YAML
::
Node
m_config
;
//配置的yaml文件
int
mark_type_text
=
0
;
//0-type,1-object_id,2-object-type,3-text...
double
m_cross_center_lon
=
0
;
double
m_cross_center_lat
=
0
;
double
m_clear_distance
=
0
;
};
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