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
838af9be
Commit
838af9be
authored
Dec 10, 2021
by
oscar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交更新
parent
14e09eac
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
8 deletions
+12
-8
Iou.cpp
BaseTracker/Iou.cpp
+0
-0
Track3D.cpp
BaseTracker/Track3D.cpp
+3
-3
TrackingRos.cpp
TrackingRos.cpp
+8
-5
TrackingRos.h
TrackingRos.h
+1
-0
No files found.
BaseTracker/Iou.cpp
View file @
838af9be
This diff is collapsed.
Click to expand it.
BaseTracker/Track3D.cpp
View file @
838af9be
...
...
@@ -91,9 +91,9 @@ double Track3D::CalculateIou(const std::vector<float>& data)
GetStateData
(
states
);
//SDK_LOG(SDK_INFO, "calculate size1 = %d, size2 = %d",states.size(),data.size());
std
::
vector
<
float
>
truth_poses
{
states
[
0
],
states
[
1
],
states
[
2
],
0
,
0
,
states
[
6
]
/
180
*
3.1415926
,
states
[
3
]
/
2
,
states
[
4
]
/
2
,
states
[
5
]
/
2
};
std
::
vector
<
float
>
landmark_poses
{
data
[
0
],
data
[
1
],
data
[
2
],
0
,
0
,
data
[
6
]
/
180
*
3.1415926
,
data
[
3
]
/
2
,
data
[
4
]
/
2
,
data
[
5
]
/
2
};
double
i3d_iou
=
CuboidIoU
(
truth_poses
,
landmark_poses
);
//
std::vector<float> truth_poses{ states[0], states[1], states[2],0, 0, states[6]/180* 3.1415926, states[3]/2, states[4]/2, states[5]/2 };
//
std::vector<float> landmark_poses{ data[0], data[1], data[2],0, 0, data[6] / 180 * 3.1415926, data[3]/2, data[4]/2, data[5]/2 };
//
double i3d_iou = CuboidIoU(truth_poses, landmark_poses);
cv
::
RotatedRect
rect1
=
cv
::
RotatedRect
(
cv
::
Point2f
(
states
[
0
],
states
[
1
]),
cv
::
Size2f
(
states
[
3
],
states
[
4
]),
states
[
6
]);
...
...
TrackingRos.cpp
View file @
838af9be
...
...
@@ -17,7 +17,8 @@ TrackingRos::~TrackingRos()
void
TrackingRos
::
Init
(
ros
::
NodeHandle
&
nh
)
{
m_pub
=
nh
.
advertise
<
jfx_common_msgs
::
det_tracking_array
>
(
"/tracking_res"
,
100
);
m_pubCloud
=
nh
.
advertise
<
sensor_msgs
::
PointCloud2
>
(
"/tracking_cloud"
,
100
);
m_objsQueue
.
set_max_num_items
(
2
);
m_isTrackingRun
=
true
;
...
...
@@ -28,7 +29,7 @@ void TrackingRos::TrackingCallBackFunc(const jfx_common_msgs::det_tracking_array
{
objTrackListPtr
objsPtr
=
std
::
make_shared
<
jfx_common_msgs
::
det_tracking_array
>
();
objsPtr
->
array
=
msg
->
array
;
objsPtr
->
cloud
=
msg
->
cloud
;
//
objsPtr->cloud = msg->cloud;
SDK_LOG
(
SDK_INFO
,
"recv msg size = %d"
,
msg
->
array
.
size
());
//for (auto& item : msg->array)
...
...
@@ -54,6 +55,8 @@ void TrackingRos::TrackingCallBackFunc(const jfx_common_msgs::det_tracking_array
//}
//objsPtr->cloud = msg->cloud;
m_objsQueue
.
push
(
objsPtr
);
m_pubCloud
.
publish
(
msg
->
cloud
);
}
void
TrackingRos
::
ThreadTrackingProcess
()
...
...
@@ -75,8 +78,8 @@ void TrackingRos::ThreadTrackingProcess()
data
.
push_back
(
obj
.
x
);
data
.
push_back
(
obj
.
y
);
data
.
push_back
(
obj
.
z
);
data
.
push_back
(
obj
.
w
);
data
.
push_back
(
obj
.
l
);
data
.
push_back
(
obj
.
w
);
data
.
push_back
(
obj
.
h
);
data
.
push_back
(
obj
.
rot_y
);
input
.
emplace_back
(
data
);
...
...
@@ -105,8 +108,8 @@ void TrackingRos::ThreadTrackingProcess()
obj
.
x
=
data
[
0
];
obj
.
y
=
data
[
1
];
obj
.
z
=
data
[
2
];
obj
.
w
=
data
[
3
];
obj
.
l
=
data
[
4
];
obj
.
l
=
data
[
3
];
obj
.
w
=
data
[
4
];
obj
.
h
=
data
[
5
];
obj
.
rot_y
=
data
[
6
];
obj
.
v_x
=
data
[
7
];
...
...
TrackingRos.h
View file @
838af9be
...
...
@@ -35,4 +35,5 @@ public:
bool
m_isTrackingRun
=
false
;
//记录是否在运行
std
::
thread
m_trackingThread
;
//运行事件线程
ros
::
Publisher
m_pub
;
//发送所有物体信息的publisher
ros
::
Publisher
m_pubCloud
;
//发送点云数据
};
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