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
07b8ef9b
Commit
07b8ef9b
authored
Dec 21, 2021
by
oscar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交测试
parent
88cde9d0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
4 deletions
+20
-4
BaseTrack.cpp
BaseTracker/BaseTrack.cpp
+10
-0
BaseTrack.h
BaseTracker/BaseTrack.h
+1
-0
TrackingRos.cpp
TrackingRos.cpp
+9
-4
No files found.
BaseTracker/BaseTrack.cpp
View file @
07b8ef9b
...
...
@@ -67,6 +67,16 @@ int BaseTrack::GetStateData(std::vector<float>& data)
data
.
push_back
(
kf_
->
x_
[
i
]);
return
0
;
}
int
BaseTrack
::
GetPredictData
(
std
::
vector
<
float
>&
data
)
{
if
(
kf_
==
nullptr
||
m_num_obs
>
m_num_states
)
return
-
1
;
data
.
clear
();
for
(
int
i
=
0
;
i
<
m_num_obs
;
i
++
)
data
.
push_back
(
kf_
->
x_predict_
[
i
]);
return
0
;
}
float
BaseTrack
::
GetNIS
()
const
{
if
(
kf_
==
nullptr
)
...
...
BaseTracker/BaseTrack.h
View file @
07b8ef9b
...
...
@@ -20,6 +20,7 @@ public:
virtual
void
Update
(
const
std
::
vector
<
float
>&
data
);
virtual
void
UpdateHit
();
virtual
int
GetStateData
(
std
::
vector
<
float
>&
data
);
virtual
int
GetPredictData
(
std
::
vector
<
float
>&
data
);
virtual
float
GetNIS
()
const
;
virtual
float
GetProb
()
const
;
virtual
bool
IsLost
();
...
...
TrackingRos.cpp
View file @
07b8ef9b
...
...
@@ -222,10 +222,15 @@ void TrackingRos::ThreadTrackingProcess()
obj
.
v_y
=
data
[
8
];
obj
.
v_z
=
data
[
9
];
obj
.
obj_id
=
iter
.
first
;
SDK_LOG
(
SDK_INFO
,
"frame = %llu, id = %llu, input(%f,%f,%f,%f,%f,%f,%f) output(%f,%f,%f,%f,%f,%f,%f) prob = %f"
,
obj
.
frame
,
iter
.
first
,
objsPtr
->
array
[
updateId
[
iter
.
first
]].
x
,
objsPtr
->
array
[
updateId
[
iter
.
first
]].
y
,
objsPtr
->
array
[
updateId
[
iter
.
first
]].
z
,
objsPtr
->
array
[
updateId
[
iter
.
first
]].
l
,
objsPtr
->
array
[
updateId
[
iter
.
first
]].
w
,
objsPtr
->
array
[
updateId
[
iter
.
first
]].
h
,
objsPtr
->
array
[
updateId
[
iter
.
first
]].
rot_y
,
obj
.
x
,
obj
.
y
,
obj
.
z
,
obj
.
l
,
obj
.
w
,
obj
.
h
,
obj
.
rot_y
,
iter
.
second
->
GetProb
());
std
::
vector
<
float
>
predict
;
if
(
iter
.
second
->
GetProb
(
predict
)
==
0
)
{
SDK_LOG
(
SDK_INFO
,
"frame = %llu, id = %llu, input(%f,%f,%f,%f,%f,%f,%f) predict(%f,%f,%f,%f,%f,%f,%f) output(%f,%f,%f,%f,%f,%f,%f) prob = %f"
,
obj
.
frame
,
iter
.
first
,
objsPtr
->
array
[
updateId
[
iter
.
first
]].
x
,
objsPtr
->
array
[
updateId
[
iter
.
first
]].
y
,
objsPtr
->
array
[
updateId
[
iter
.
first
]].
z
,
objsPtr
->
array
[
updateId
[
iter
.
first
]].
l
,
objsPtr
->
array
[
updateId
[
iter
.
first
]].
w
,
objsPtr
->
array
[
updateId
[
iter
.
first
]].
h
,
objsPtr
->
array
[
updateId
[
iter
.
first
]].
rot_y
,
predict
[
0
],
predict
[
1
],
predict
[
2
],
predict
[
3
],
predict
[
4
],
predict
[
5
],
predict
[
6
],
obj
.
x
,
obj
.
y
,
obj
.
z
,
obj
.
l
,
obj
.
w
,
obj
.
h
,
obj
.
rot_y
,
iter
.
second
->
GetProb
());
}
float
gx
=
0.0
f
;
float
gy
=
0.0
f
;
CalculateGuassPos
(
obj
.
x
,
obj
.
y
,
obj
.
z
,
m_trans
,
gx
,
gy
);
...
...
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