Skip to content
Snippets Groups Projects
Unverified Commit 9f49f65a authored by Kei Okada's avatar Kei Okada Committed by GitHub
Browse files

Merge pull request #46 from k-okada/master

set timestamp
parents 681c6343 5cca6467
No related branches found
No related tags found
No related merge requests found
...@@ -163,6 +163,9 @@ void CameraDriver::ReconfigureCallback(UVCCameraConfig &new_config, uint32_t lev ...@@ -163,6 +163,9 @@ 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(frame->capture_time.tv_sec, frame->capture_time.tv_usec); 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