intel / driving-data-collection-reference-kit

BSD 3-Clause "New" or "Revised" License
8 stars 8 forks source link

Time sync issue with field.header.stamp ? #1

Open anbublr opened 5 years ago

anbublr commented 5 years ago

The timestamps of GPS and LIDAR data packets seems to have a problem - pls. check if this is a bug.

See the ROSbag samples below - in particular the two fields = time and field.header.stamp. There seems to be an problem in the consistency while writing the data.

Thanks!

guest@myserver:~$ rostopic echo -b 1.bag -p /frontNear/image_raw| head -n 25 %time,field.header.seq,field.header.stamp,field.header.frame_id,field.image.header.seq,field.image.header.stamp,field.image.header.frame_id,field.image.height,field.image.width,field.image.encoding,field.image.isbigendian,field.image.step,field.datafile.header.seq,field.datafile.header.stamp,field.datafile.header.frameid,field.datafile.host,field.datafile.uuid,field.datafile.filepath,field.datafile_.file_offsetbegin,field.datafile.file_offsetend,field.datafile.hash 1530018381010286378,17380,653560256000,,0,653560256000,usb_cam2,1080,3840,yuyv,0,7680,0,653560256000,,ark4-pc,e601395e-8aa1-4b84-aada-5f59b0c5e09a,./dev1/dump17380.dat,0,8294399, 1530018381043570899,17381,653593629000,,0,653593629000,usb_cam2,1080,3840,yuyv,0,7680,0,653593629000,,ark4-pc,e601395e-8aa1-4b84-aada-5f59b0c5e09a,./dev1/dump17381.dat,0,8294399, 1530018381077220455,17382,653626878000,,0,653626878000,usb_cam2,1080,3840,yuyv,0,7680,0,653626878000,,ark4-pc,e601395e-8aa1-4b84-aada-5f59b0c5e09a,./dev1/dump17382.dat,0,8294399, 1530018381111059728,17383,653660254000,,0,653660254000,usb_cam2,1080,3840,yuyv,0,7680,0,653660254000,,ark4-pc,e601395e-8aa1-4b84-aada-5f59b0c5e09a,./dev1/dump17383.dat,0,8294399, 1530018381144824659,17384,653693503000,,0,653693503000,usb_cam2,1080,3840,yuyv,0,7680,0,653693503000,,ark4-pc,e601395e-8aa1-4b84-aada-5f59b0c5e09a,./dev1/dump17384.dat,0,8294399,

guest@myserver:~$ rostopic echo -b 1.bag -p /fix | head -n 25 %time,field.header.seq,field.header.stamp,field.header.frame_id,field.status.status,field.status.service,field.latitude,field.longitude,field.altitude,field.position_covariance0,field.position_covariance1,field.position_covariance2,field.position_covariance3,field.position_covariance4,field.position_covariance5,field.position_covariance6,field.position_covariance7,field.position_covariance8,field.position_covariance_type 1530018381073180275,5816,1530018381073010154,gnss,0,0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0 1530018381173269660,5817,1530018381173028392,gnss,0,0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0 1530018381273335629,5818,1530018381273076739,gnss,0,0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0 1530018381373247793,5819,1530018381373011088,gnss,0,0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0 1530018381473243724,5820,1530018381473028055,gnss,0,0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0 1530018381573235767,5821,1530018381573021591,gnss,0,0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0

guest@myserver:~$ rostopic echo -b 1.bag -p /frontNear/camera_info | head -n 25 %time,field.header.seq,field.header.stamp,field.header.frame_id,field.height,field.width,field.distortion_model,field.K0,field.K1,field.K2,field.K3,field.K4,field.K5,field.K6,field.K7,field.K8,field.R0,field.R1,field.R2,field.R3,field.R4,field.R5,field.R6,field.R7,field.R8,field.P0,field.P1,field.P2,field.P3,field.P4,field.P5,field.P6,field.P7,field.P8,field.P9,field.P10,field.P11,field.binning_x,field.binning_y,field.roi.x_offset,field.roi.y_offset,field.roi.height,field.roi.width,field.roi.do_rectify 1530018381010298099,17380,653560256000,usb_cam2,1080,3840,,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0 1530018381043591569,17381,653593629000,usb_cam2,1080,3840,,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0 1530018381077234968,17382,653626878000,usb_cam2,1080,3840,,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0 1530018381111070842,17383,653660254000,usb_cam2,1080,3840,,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0 1530018381144842314,17384,653693503000,usb_cam2,1080,3840,,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0 === END

johnnyjacob commented 5 years ago

The DDRK code base doesn't have a GPS or LIDAR ROS nodes. My guess is that the the nodes are publishing the current system time instead of ros.time which is synchronized across nodes.

johnnyjacob commented 5 years ago

Most likely this line : https://github.com/intel/driving-data-collection-reference-kit/blob/8e544b4e92958835129adb22fd57c6de7d5b0fb3/sensors/cameras/usb/src/usb_cam.cpp#L615

nitheeshkl commented 5 years ago

This timestamp issue in the usb_cam is fixed by https://github.com/intel/driving-data-collection-reference-kit/commit/457bbdb9734edc5b54866b452e01c1b792b39bd1