cartographer-project / cartographer_ros

Provides ROS integration for Cartographer.
Apache License 2.0
1.66k stars 1.21k forks source link

Error opening/loading generated pbstream file #1771

Closed xXLiLOLIX closed 1 year ago

xXLiLOLIX commented 1 year ago

I have a Problem with opening my generated .pbstream file. I can't open or load it and use it for pure_localisation. Even if I just run:

cartographer_pbstream info <path_to_filename>

I get the following Error:

[libprotobuf ERROR google/protobuf/io/coded_stream.cc:207] A protocol message was rejected because it was too big (more than 67108864 bytes). To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h.

I tried to change the in the Error Message described "CodedInputStream::SetTotalBytesLimit()", but I was not able to find the files. Nor I find realeted hints in the internet for this Error.

Is maybe my Map-file to big (1km x 1km with a resolution of 0.2 in occupancy grid)? My generated .pbstream-file has 510,2MB.

Can I adjust something to come around this Error?

georgflick commented 1 year ago

Have you tried to decrease the occupancy grid resolution to maybe 0.3? That should result in a smaller pbstream.

Another solution would be to generate several maps / pbstream files and somehow switch from one pbstream file to another at the border from one submap, but that doesn't works seamlessly.

Usually, the bottleneck in opening an large pbstream is the amount of memory in your PC. Could it be that you are running out of memory?

xXLiLOLIX commented 1 year ago

It seems like there was an error while saving the pbstream file. After rerun the offline_node and waiting a little bit for saving the pbstream it worked.