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
fc57597c
Commit
fc57597c
authored
Dec 10, 2021
by
oscar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交更新
parent
fc18fe55
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
TrackingRos.cpp
TrackingRos.cpp
+13
-0
TrackingRos.h
TrackingRos.h
+3
-1
No files found.
TrackingRos.cpp
View file @
fc57597c
...
...
@@ -2,6 +2,8 @@
#include "Component.h"
#include <sensor_msgs/PointCloud2.h>
#include "LogBase.h"
#include <yaml-cpp/yaml.h>
TrackingRos
::~
TrackingRos
()
{
...
...
@@ -16,6 +18,12 @@ TrackingRos::~TrackingRos()
void
TrackingRos
::
Init
(
ros
::
NodeHandle
&
nh
)
{
YAML
::
Node
config
=
YAML
::
LoadFile
(
"7-1.yaml"
);
auto
value
=
config
[
"TRACKING"
][
"TRANS"
].
as
<
vector
<
vector
<
float
>>
>
();
m_coordinate
.
Init
(
value
[
0
][
0
],
value
[
0
][
1
],
value
[
0
][
2
],
value
[
0
][
3
],
value
[
1
][
0
],
value
[
1
][
1
]);
m_pub
=
nh
.
advertise
<
jfx_common_msgs
::
det_tracking_array
>
(
"/tracking_res"
,
100
);
m_pubCloud
=
nh
.
advertise
<
sensor_msgs
::
PointCloud2
>
(
"/tracking_cloud"
,
100
);
...
...
@@ -115,6 +123,11 @@ void TrackingRos::ThreadTrackingProcess()
obj
.
v_x
=
data
[
7
];
obj
.
v_y
=
data
[
8
];
obj
.
v_z
=
data
[
9
];
ekf
::
Array
pos
=
{
obj
.
x
,
obj
.
y
};
ekf
::
Array
out
;
m_coordinate
.
Dev2WGS84
(
pos
,
out
,
false
);
obj
.
Lat
=
out
[
0
];
obj
.
Long
=
out
[
1
];
}
iter
.
second
->
m_obj
=
std
::
make_shared
<
jfx_common_msgs
::
det_tracking
>
(
obj
);
}
...
...
TrackingRos.h
View file @
fc57597c
...
...
@@ -7,7 +7,7 @@
#include "SafeQueue.hpp"
//#include "TrackingMsg.h"
#include "ros/ros.h"
#include "coordinate_convert.h"
using
objTrackListPtr
=
std
::
shared_ptr
<
jfx_common_msgs
::
det_tracking_array
>
;
...
...
@@ -36,4 +36,6 @@ public:
std
::
thread
m_trackingThread
;
//运行事件线程
ros
::
Publisher
m_pub
;
//发送所有物体信息的publisher
ros
::
Publisher
m_pubCloud
;
//发送点云数据
CoordinateConvert
m_coordinate
;
};
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