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
57010ec4
Commit
57010ec4
authored
Aug 23, 2022
by
oscar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
55af11a8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
TrackingRos2.cpp
ros2/TrackingRos2.cpp
+9
-3
TrackingRos2.h
ros2/TrackingRos2.h
+2
-1
No files found.
ros2/TrackingRos2.cpp
View file @
57010ec4
...
...
@@ -33,7 +33,7 @@ TrackingRos2::TrackingRos2(const rclcpp::NodeOptions& node_options)
std
::
placeholders
::
_1
));
std
::
string
pub_topic
=
"/perception/object_recognition/tracking/objects"
;
m_tracking_res
=
this
->
create_publisher
<
autoware_auto_perception_msgs
::
msg
::
TrackedObjects
>
(
pub_topic
,
10
);
wit_perception_msgs
::
msg
::
TrackedObjectsEx
>
(
pub_topic
,
10
);
m_pubMarker
=
this
->
create_publisher
<
visualization_msgs
::
msg
::
MarkerArray
>
(
"output/sensors_fusion_obj_markers"
,
10
);
m_pubMarkerText
=
this
->
create_publisher
<
visualization_msgs
::
msg
::
MarkerArray
>
(
...
...
@@ -92,6 +92,7 @@ void TrackingRos2::TrackingPorcess(objTrackListPtr objsPtr) {
if
(
!
objsPtr
)
return
;
visualization_msgs
::
msg
::
MarkerArray
makerArray
=
{};
visualization_msgs
::
msg
::
MarkerArray
makerTextArray
=
{};
wit_perception_msgs
::
msg
::
TrackedObjectsEx
sendObjsEx
=
{};
autoware_auto_perception_msgs
::
msg
::
TrackedObjects
sendObjs
=
{};
sendObjs
.
header
=
objsPtr
->
header
;
sendObjs
.
header
.
frame_id
=
"top_lidar"
;
...
...
@@ -497,8 +498,13 @@ void TrackingRos2::TrackingPorcess(objTrackListPtr objsPtr) {
float
(
pt
[
5
]
-
pt
[
4
])
/
1000
,
float
(
pt
[
6
]
-
pt
[
5
])
/
1000
,
float
(
pt
[
7
]
-
pt
[
6
])
/
1000
,
float
(
pt
[
8
]
-
pt
[
7
])
/
1000
,
float
(
GetCurTime
()
-
start_timestamp
)
/
1000
);
beginPrint
=
GetCurTime
();
}
m_tracking_res
->
publish
(
sendObjs
);
sendObjsEx
.
tracks
=
sendObjs
;
sendObjsEx
.
pt
=
objsPtr
->
pt
;
sendObjsEx
.
pt
.
push_back
(
GetCurTime
());
//打印时间戳
//(top收到的时间戳,三个点云同步完成时间戳,点云拼接完的时间戳,点云检测完成时间,检测结果发送时间)
// (收到检测结果时间戳,与相机融合之后的时间戳,融合之后发送的时间戳,tracking收到消息时间戳,tracking发送的时间戳)
m_tracking_res
->
publish
(
sendObjsEx
);
m_pubMarker
->
publish
(
makerArray
);
m_pubMarkerText
->
publish
(
makerTextArray
);
// m_pubBoundingBoxes.publish(sendBoxes);
...
...
ros2/TrackingRos2.h
View file @
57010ec4
...
...
@@ -12,6 +12,7 @@
#include "autoware_auto_perception_msgs/msg/object_classification.hpp"
#include "wit_perception_msgs/msg/detected_objects_with_feature_ex.hpp"
#include "wit_perception_msgs/msg/detected_object_with_feature_ex.hpp"
#include "wit_perception_msgs/msg/tracked_objects_ex.hpp"
#include "visualization_msgs/msg/marker_array.hpp"
#include "TrackingObj.h"
//#define ONLINE
...
...
@@ -34,7 +35,7 @@ class TrackingRos2 : public rclcpp::Node {
private
:
rclcpp
::
Subscription
<
wit_perception_msgs
::
msg
::
DetectedObjectsWithFeatureEx
>::
SharedPtr
m_fusion_res
;
rclcpp
::
Publisher
<
autoware_auto_perception_msgs
::
msg
::
TrackedObjects
>::
SharedPtr
m_tracking_res
;
rclcpp
::
Publisher
<
wit_perception_msgs
::
msg
::
TrackedObjectsEx
>::
SharedPtr
m_tracking_res
;
rclcpp
::
Publisher
<
visualization_msgs
::
msg
::
MarkerArray
>::
SharedPtr
m_pubMarker
;
rclcpp
::
Publisher
<
visualization_msgs
::
msg
::
MarkerArray
>::
SharedPtr
m_pubMarkerText
;
...
...
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