minwoo0611 / HeLiPR-File-Player

This is the repository for HeLiPR file player.
https://sites.google.com/view/heliprdataset
40 stars 5 forks source link

Wrong offset_time type for avia #1

Closed benemer closed 1 year ago

benemer commented 1 year ago

Hey!

Shouldnt' the type for the avia offset_time be uint32_t? This is at least the case just below when reading the serialized data.

diff --git a/src/ROSThread.cpp b/src/ROSThread.cpp
index 0814e44..03e4ef7 100755
--- a/src/ROSThread.cpp
+++ b/src/ROSThread.cpp
@@ -720,7 +720,7 @@ void ROSThread::AviaThread()
                 file.read(reinterpret_cast<char *>(&point.reflectivity), sizeof(uint8_t));
                 file.read(reinterpret_cast<char *>(&point.tag), sizeof(uint8_t));
                 file.read(reinterpret_cast<char *>(&point.line), sizeof(uint8_t));
-                file.read(reinterpret_cast<char *>(&point.offset_time), sizeof(uint16_t));
+                file.read(reinterpret_cast<char *>(&point.offset_time), sizeof(uint32_t));
                 avia_msg.points.push_back(point);
                 i++;
             }
minwoo0611 commented 1 year ago

Hello @benemer,

Firstly, thank you for finding the typographical error in the helipr file player. It is clear that the type for point.offset_time should be uint32_t, not uint16_t. In reality, the section with the error isn't critical as it is only called once. After that call, the section without the error is always used.

However, I really agree with your suggestion since it can confuse users.

I truly appreciate your input, and please continue to pay attention to our work.

Thank you!