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
2cfd59b0
Commit
2cfd59b0
authored
Jan 14, 2022
by
oscar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交新消息发送
parent
63dee96d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
4 deletions
+28
-4
TrackingRosEx.cpp
TrackingRosEx.cpp
+28
-4
No files found.
TrackingRosEx.cpp
View file @
2cfd59b0
...
...
@@ -2,6 +2,7 @@
#include "Component.h"
#include <sensor_msgs/PointCloud2.h>
#include <jsk_recognition_msgs/BoundingBoxArray.h>
#include <visualization_msgs/MarkerArray.h>
#include "LogBase.h"
#include <yaml-cpp/yaml.h>
#include "matrix.h"
...
...
@@ -649,10 +650,6 @@ void TrackingRos::ThreadTrackingProcess()
#ifdef _USING_NSIGHT_
nvtxRangePop
();
#endif
if
(
lostId
.
size
()
>
0
)
{
}
uint64_t
rTime
=
GetCurTime
()
-
begin
;
//SDK_LOG(SDK_INFO, "m_tracker.Run time = %llu", rTime);
std
::
map
<
uint64_t
,
std
::
shared_ptr
<
Track3D
>
>&
trackers
=
m_tracker
.
GetStates
();
...
...
@@ -676,6 +673,7 @@ void TrackingRos::ThreadTrackingProcess()
//SDK_LOG(SDK_INFO, "run before size = %d, after size = %d,",objsPtr->array.size(), trackers.size());
jfx_common_msgs
::
det_tracking_array
sendObjs
=
{};
jsk_recognition_msgs
::
BoundingBoxArray
sendBoxes
=
{};
visualization_msgs
::
MarkerArray
markerArray
=
{};
sendBoxes
.
header
.
frame_id
=
"/rslidar"
;
for
(
auto
&
iter
:
trackers
)
{
...
...
@@ -794,6 +792,32 @@ void TrackingRos::ThreadTrackingProcess()
box
.
pose
.
orientation
.
z
=
R_quat
.
z
();
//SDK_LOG(SDK_INFO, "rot_y_angle = %f", rot_y_angle);
box
.
pose
.
orientation
.
w
=
R_quat
.
w
();
visualization_msgs
::
Marker
t_marker
=
{};
t_marker
.
id
=
obj
.
obj_id
;
t_marker
.
header
.
frame_id
=
"/rslidar"
;
t_marker
.
action
=
Marker
::
ADD
;
t_marker
.
type
=
Marker
::
TEXT_VIEW_FACING
;
t_marker
.
pose
.
position
.
x
=
obj
.
x
;
t_marker
.
pose
.
position
.
y
=
obj
.
y
;
t_marker
.
pose
.
position
.
z
=
obj
.
z
+
obj
.
h
/
2
+
0.3
;
t_marker
.
pose
.
orientation
.
x
=
0.0
;
t_marker
.
pose
.
orientation
.
y
=
0.0
;
t_marker
.
pose
.
orientation
.
z
=
0.0
;
t_marker
.
pose
.
orientation
.
w
=
1.0
;
t_marker
.
scale
.
x
=
1.2
;
t_marker
.
scale
.
y
=
1.2
;
t_marker
.
scale
.
z
=
1.2
;
t_marker
.
color
.
a
=
1.0
;
t_marker
.
color
.
r
=
0
;
t_marker
.
color
.
g
=
1.0
;
t_marker
.
color
.
b
=
0
;
//t_marker.lifetime = rospy.Duration(0.5)
char
str
[
256
]
=
{};
snprintf
(
str
,
"id:%llu,type:%d"
,
mobj
.
obj_id
,
obj
.
type
);
t_marker
.
text
=
str
;
markerArray
.
markers
.
emplace_back
(
t_marker
);
sendBoxes
.
boxes
.
emplace_back
(
box
);
sendObjs
.
array
.
emplace_back
(
obj
);
}
...
...
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