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
d7fb55f3
Commit
d7fb55f3
authored
Jan 12, 2022
by
oscar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改崩溃
parent
42c71822
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
TrackingRosEx.cpp
TrackingRosEx.cpp
+7
-5
No files found.
TrackingRosEx.cpp
View file @
d7fb55f3
...
...
@@ -395,12 +395,13 @@ void TrackingRos::TrackingCameraCallBackFunc(const jfx_common_msgs::InferResesCo
countC
=
0
;
}
double
d_timestamp
=
msg
->
header
.
stamp
.
toSec
(
);
unsigned
long
long
timestamp
=
(
unsigned
long
long
)(
d_timestamp
*
1000
);
unsigned
long
long
timestamp
=
(
unsigned
long
long
)(
msg
->
header
.
stamp
.
sec
*
1000
+
msg
->
header
.
stamp
.
nsec
*
1e-6
);
SDK_LOG
(
SDK_INFO
,
"msg time = %llu"
,
timestamp
);
objTrackListPtr
cloudPtr
=
GetNearestCloudMsg
(
timestamp
);
timestamp
=
cloudPtr
->
cloud
.
header
.
stamp
.
toSec
()
*
1000000
;
if
(
cloudPtr
)
timestamp
=
(
unsigned
long
long
)
(
cloudPtr
->
cloud
.
header
.
stamp
.
sec
*
1000000
+
cloudPtr
->
cloud
.
header
.
stamp
.
nsec
*
1e-3
);
SDK_LOG
(
SDK_INFO
,
"cloudPtr time = %llu"
,
timestamp
);
objTrackListPtr
objsPtr
=
std
::
make_shared
<
jfx_common_msgs
::
det_tracking_array
>
();
if
(
cloudPtr
)
...
...
@@ -541,7 +542,8 @@ objTrackListPtr TrackingRos::GetNearestCloudMsg(unsigned long long timestamp)
std
::
lock_guard
<
std
::
mutex
>
lock
(
m_mtx
);
for
(
int
i
=
0
;
i
<
m_objsCloudQueue
.
size
();
i
++
)
{
unsigned
long
long
time_s
=
m_objsCloudQueue
[
i
]
->
cloud
.
header
.
stamp
.
toSec
()
*
1000000
;
//unsigned long long time_s = m_objsCloudQueue[i]->cloud.header.stamp.toSec() * 1000000;
unsigned
long
long
time_s
=
(
unsigned
long
long
)(
m_objsCloudQueue
[
i
]
->
cloud
.
header
.
stamp
.
sec
*
1000000
+
m_objsCloudQueue
[
i
]
->
cloud
.
header
.
stamp
.
nsec
*
1e-3
);
if
(
labs
(
timestamp
-
time_s
)
<
std
::
min
(
100
,
interval
))
{
msg
=
m_objsCloudQueue
[
i
];
...
...
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