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
0bf03a12
Commit
0bf03a12
authored
Sep 19, 2022
by
oscar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交参数可以配置topic名称
parent
c546d668
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
5 deletions
+22
-5
TrackingRos.cpp
TrackingRos.cpp
+20
-4
TrackingRos.h
TrackingRos.h
+1
-0
jfx_tracking.cpp
jfx_tracking.cpp
+1
-1
No files found.
TrackingRos.cpp
View file @
0bf03a12
...
...
@@ -321,10 +321,26 @@ void TrackingRos::Init(ros::NodeHandle& nh)
SDK_IDX_LOG
(
1
,
SDK_INFO
,
"date,frameNum,time,id,input_radian,input_angle,predict_radian,predict_angle,output_radian,output_angle,input_type,input_x,input_y,input_z,input_l,input_w,input_h,last_type,predict_x,predict_y,predict_z,predict_l,predict_w,preditc_h,output_type,output_x,output_y,output_z,output_l,output_w,output_h,output_rot_y,v_x,v_y,v_z,lat,lon"
);
//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
);
m_pubBoundingBoxes
=
nh
.
advertise
<
jsk_recognition_msgs
::
BoundingBoxArray
>
(
"/tracking_bbox"
,
100
);
m_pubMarkerArray
=
nh
.
advertise
<
visualization_msgs
::
MarkerArray
>
(
"/tracking_loc"
,
100
);
std
::
string
fusion_topic
=
"/fusion_res"
;
std
::
string
tracking_topic
=
"/tracking_res"
;
std
::
string
cloud_topic
=
"/tracking_cloud"
;
std
::
string
tracking_box_topic
=
"/tracking_bbox"
;
std
::
string
tracking_marker_topic
=
"/tracking_loc"
;
if
(
config
[
"fusion_topic_name"
])
fusion_topic
=
config
[
"fusion_topic_name"
].
as
<
std
::
string
>
();
if
(
config
[
"tracking_topic_name"
])
tracking_topic
=
config
[
"tracking_topic_name"
].
as
<
std
::
string
>
();
if
(
config
[
"cloud_topic_name"
])
cloud_topic
=
config
[
"cloud_topic_name"
].
as
<
std
::
string
>
();
if
(
config
[
"tracking_box_topic_name"
])
tracking_box_topic
=
config
[
"tracking_box_topic_name"
].
as
<
std
::
string
>
();
if
(
config
[
"tracking_marker_topic_name"
])
tracking_marker_topic
=
config
[
"tracking_marker_topic_name"
].
as
<
std
::
string
>
();
m_subFusionRes
=
nh
.
subscribe
<
jfx_common_msgs
::
det_tracking_array
>
(
fusion_topic
.
c_str
(),
1000
,
&
TrackingRos
::
TrackingCallBackFunc
,
this
);
m_pub
=
nh
.
advertise
<
jfx_common_msgs
::
det_tracking_array
>
(
tracking_topic
.
c_str
(),
100
);
m_pubCloud
=
nh
.
advertise
<
sensor_msgs
::
PointCloud2
>
(
cloud_topic
.
c_str
(),
100
);
m_pubBoundingBoxes
=
nh
.
advertise
<
jsk_recognition_msgs
::
BoundingBoxArray
>
(
tracking_box_topic
.
c_str
(),
100
);
m_pubMarkerArray
=
nh
.
advertise
<
visualization_msgs
::
MarkerArray
>
(
tracking_marker_topic
.
c_str
(),
100
);
#ifdef _SEND_ABUZHABI_
m_pubAbuzhabi
=
nh
.
advertise
<
std_msgs
::
String
>
(
"/abuzhabi_msg"
,
100
);
#endif
...
...
TrackingRos.h
View file @
0bf03a12
...
...
@@ -46,6 +46,7 @@ public:
ros
::
Publisher
m_pubCloud
;
//发送点云数据
ros
::
Publisher
m_pubBoundingBoxes
;
//发送3D框信息
ros
::
Publisher
m_pubMarkerArray
;
//发送marker框信息
ros
::
Subscriber
m_subFusionRes
;
#ifdef _SEND_ABUZHABI_
ros
::
Publisher
m_pubAbuzhabi
;
//阿布扎比发送的数据
#endif
...
...
jfx_tracking.cpp
View file @
0bf03a12
...
...
@@ -57,7 +57,7 @@ int main(int argc, char*argv[]) {
TrackingRos
jfx_tracking
;
jfx_tracking
.
Init
(
nh
);
ros
::
Subscriber
track_sub
=
nh
.
subscribe
<
jfx_common_msgs
::
det_tracking_array
>
(
"/fusion_res"
,
1000
,
&
TrackingRos
::
TrackingCallBackFunc
,
&
jfx_tracking
);
//
ros::Subscriber track_sub = nh.subscribe<jfx_common_msgs::det_tracking_array>("/fusion_res", 1000, &TrackingRos::TrackingCallBackFunc, &jfx_tracking);
//rospy.Subscriber("/detection/lidar_detector/objects", det_tracking_array, callback)
ros
::
spin
();
...
...
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