Skip to content

Commit 57d0fa0

Browse files
committed
Add timestamp fallback to packet time if no table is available
1 parent 0f2a3bb commit 57d0fa0

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

velodyne_pointcloud/src/lib/rawdata.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,8 @@ void RawData::unpack(
329329
if (timing_offsets_.size()) {
330330
time = timing_offsets_[i][j] + time_diff_start_to_this_packet;
331331
}
332+
else
333+
time = time_diff_start_to_this_packet;
332334

333335
if (tmp.uint == 0) { // no valid laser beam return
334336
// call to addPoint is still required since output could be organized
@@ -547,6 +549,8 @@ void RawData::unpack_vls128(
547549
time = timing_offsets_[block / 4][firing_order + laser_number / 64] +
548550
time_diff_start_to_this_packet;
549551
}
552+
else
553+
time = time_diff_start_to_this_packet;
550554

551555
velodyne_pointcloud::LaserCorrection & corrections =
552556
calibration_->laser_corrections[laser_number];
@@ -812,6 +816,8 @@ void RawData::unpack_vlp16(
812816
if (timing_offsets_.size()) {
813817
time = timing_offsets_[block][firing * 16 + dsr] + time_diff_start_to_this_packet;
814818
}
819+
else
820+
time = time_diff_start_to_this_packet;
815821

816822
data.addPoint(
817823
x_coord, y_coord, z_coord, corrections.laser_ring,

0 commit comments

Comments
 (0)