Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mobile_robotics
ADC
external
libuvc_ros
Commits
5cca6467
Commit
5cca6467
authored
Apr 12, 2018
by
Kei Okada
Browse files
set only when frame->capture_time is 0
parent
ea3bf5c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
libuvc_camera/src/camera_driver.cpp
View file @
5cca6467
...
...
@@ -162,7 +162,10 @@ void CameraDriver::ReconfigureCallback(UVCCameraConfig &new_config, uint32_t lev
}
void
CameraDriver
::
ImageCallback
(
uvc_frame_t
*
frame
)
{
ros
::
Time
timestamp
=
ros
::
Time
::
now
();
ros
::
Time
timestamp
=
ros
::
Time
(
frame
->
capture_time
.
tv_sec
,
frame
->
capture_time
.
tv_usec
);
if
(
timestamp
==
ros
::
Time
(
0
)
)
{
timestamp
=
ros
::
Time
::
now
();
}
boost
::
recursive_mutex
::
scoped_lock
(
mutex_
);
...
...
Write
Preview
Supports
Markdown
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