Skip to content
Snippets Groups Projects
Commit 5cca6467 authored by Kei Okada's avatar Kei Okada
Browse files

set only when frame->capture_time is 0

parent ea3bf5c6
No related branches found
No related tags found
No related merge requests found
...@@ -162,7 +162,10 @@ void CameraDriver::ReconfigureCallback(UVCCameraConfig &new_config, uint32_t lev ...@@ -162,7 +162,10 @@ void CameraDriver::ReconfigureCallback(UVCCameraConfig &new_config, uint32_t lev
} }
void CameraDriver::ImageCallback(uvc_frame_t *frame) { 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_); boost::recursive_mutex::scoped_lock(mutex_);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment