-
Notifications
You must be signed in to change notification settings - Fork 658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Binary read and write of log file is bugged #131
Labels
Comments
Good catch! We really need a unit test for these IO operations, just like the OcTree tests. But I think the types should be fixed size to make it really portable. Just like unsigned int, size_t can be different on different platforms. Reference should be the existing graph files from the homepage (I think they were written with uint). |
Fixed now. |
ahornung
added a commit
that referenced
this issue
Jan 13, 2017
- uint32_t for size, move inttypes.h include into octomap_types.h
ahornung
added a commit
that referenced
this issue
Jan 13, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
thanks for the great tool you made available for the whole community.
I found an issue during the data import of a log file. In the PointCloud.cpp source the binary read and write are not symmetric, and so the reading fails.
I'm referring in particular at:
https://github.com/OctoMap/octomap/blob/devel/octomap/src/Pointcloud.cpp#L287
and
https://github.com/OctoMap/octomap/blob/devel/octomap/src/Pointcloud.cpp#L313
where an unsigned int it is read, while a size_t is written.
I suggest also to fix line
https://github.com/OctoMap/octomap/blob/devel/octomap/src/Pointcloud.cpp#L294 with size_t instead of unsigned int.
Cheers,
Andrea
The text was updated successfully, but these errors were encountered: