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
d544325c
Commit
d544325c
authored
Oct 17, 2022
by
haoshuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add acc to sendmsg
parent
2506230a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
0 deletions
+33
-0
Track3D.cpp
BaseTracker/Track3D.cpp
+26
-0
Track3D.h
BaseTracker/Track3D.h
+3
-0
TrackingRos.cpp
TrackingRos.cpp
+4
-0
No files found.
BaseTracker/Track3D.cpp
View file @
d544325c
...
...
@@ -455,3 +455,28 @@ void Track3D::MeasureIouData(const std::vector<float>& input, std::vector<float>
out
.
push_back
(
input
[
4
]);
}
double
Track3D
::
get_acceleration_x
(
double
time_interval
){
if
(
time_interval
==
0
){
return
0
;
}
int
n
=
m_points
.
size
();
if
(
n
<
3
){
return
0
;
}
double
v_0
=
(
m_points
[
n
-
1
].
x
-
m_points
[
n
-
2
].
x
)
/
time_interval
;
double
v_1
=
(
m_points
[
n
-
2
].
x
-
m_points
[
n
-
3
].
x
)
/
time_interval
;
return
(
v_0
-
v_1
)
/
time_interval
;
}
double
Track3D
::
get_acceleration_y
(
double
time_interval
){
if
(
time_interval
==
0
){
return
0
;
}
int
n
=
m_points
.
size
();
if
(
n
<
3
){
return
0
;
}
double
v_0
=
(
m_points
[
n
-
1
].
y
-
m_points
[
n
-
2
].
y
)
/
time_interval
;
double
v_1
=
(
m_points
[
n
-
2
].
y
-
m_points
[
n
-
3
].
y
)
/
time_interval
;
return
(
v_0
-
v_1
)
/
time_interval
;
}
\ No newline at end of file
BaseTracker/Track3D.h
View file @
d544325c
...
...
@@ -53,6 +53,9 @@ public:
virtual
int
GetIouData
(
std
::
vector
<
float
>&
data
,
int
&
obj_type
);
static
void
MeasureIouData
(
const
std
::
vector
<
float
>&
input
,
std
::
vector
<
float
>&
out
,
int
&
obj_type
);
double
get_acceleration_x
(
double
time_interval
);
double
get_acceleration_y
(
double
time_interval
);
trackOjbPtr
m_obj
=
nullptr
;
std
::
vector
<
point2d
>
m_points
;
//保存最近的5个移动的点位
...
...
TrackingRos.cpp
View file @
d544325c
...
...
@@ -554,6 +554,8 @@ void TrackingRos::ThreadTrackingProcess()
obj
.
v_y
=
data
[
8
];
obj
.
v_z
=
data
[
9
];
obj
.
obj_id
=
iter
.
first
;
obj
.
acc_x
=
iter
.
second
->
get_acceleration_x
(
0.1
);
obj
.
acc_y
=
iter
.
second
->
get_acceleration_y
(
0.1
);
#ifdef _ABUZHABI_
double
lon
=
0.0
f
;
...
...
@@ -623,6 +625,8 @@ void TrackingRos::ThreadTrackingProcess()
obj
.
v_y
=
data
[
8
];
obj
.
v_z
=
data
[
9
];
obj
.
obj_id
=
iter
.
first
;
obj
.
acc_x
=
iter
.
second
->
get_acceleration_x
(
0.1
);
obj
.
acc_y
=
iter
.
second
->
get_acceleration_y
(
0.1
);
#ifdef _ABUZHABI_
double
lon
=
0.0
f
;
double
lat
=
0.0
f
;
...
...
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