Skip to content

Commit

Permalink
The timestamp of each point in the destaggered point cloud has to be …
Browse files Browse the repository at this point in the history
…destaggered as well (#199)
  • Loading branch information
PhilippSchmaelzle authored Aug 24, 2023
1 parent b4cca33 commit db68f4e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/os_ros.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ void copy_scan_to_cloud_destaggered(
#endif
for (auto u = 0; u < ls.h; u++) {
for (auto v = 0; v < ls.w; v++) {
const auto col_ts = timestamp[v];
const auto ts_src_idx = (v + ls.w - pixel_shift_by_row[u]) % ls.w;
const auto col_ts = timestamp[ts_src_idx];
const auto ts = col_ts > scan_ts ? col_ts - scan_ts : 0UL;
const auto src_idx =
u * ls.w + (v + ls.w - pixel_shift_by_row[u]) % ls.w;
Expand Down

0 comments on commit db68f4e

Please sign in to comment.