hku-mars / HBA

[RAL 2023] A globally consistent LiDAR map optimization module
GNU General Public License v2.0
469 stars 66 forks source link

Fix bug of reading "pose.json" #34

Open zax147 opened 7 months ago

zax147 commented 7 months ago

The function of reading pose.json will return one more pose than the actual file contains.

This caused by fstream::eof() in the while statement, which only returns false when your fstream::get() fucntion return false.

In the original code, it will always enter the code block once even your file has come to its end. So, it will append one more pose vector (which is identical to the last pose) every time.