Ekumen-OS / beluga

A general implementation of Monte Carlo Localization (MCL) algorithms written in C++17, and a ROS package that can be used in ROS 1 and ROS 2.
https://ekumen-os.github.io/beluga/
Apache License 2.0
181 stars 13 forks source link

Instrument NDT map extraction #310

Closed hidmic closed 6 months ago

hidmic commented 7 months ago

Feature description

Connected to #93. The vast majority of SLAM systems do not provide NDT maps. Whether it's occupancy grids, voxel grids, point clouds, meshes, pose graphs, we need a procedure or tool to turn these (at least one) into something we can populate NDT maps (#309) with.

Implementation considerations

https://github.com/cogsys-tuebingen/cslibs_ndt may be of interest.

hidmic commented 7 months ago

Some relevant notes and ideas.

serraramiro1 commented 6 months ago

@hidmic @nahueespinosa
On the HDF5 format:

I'm currently working on the serialization part of this issue. I personally don't think this format is great for storing maps.

My argument is that the format is meant for flexible datasets, and for maps we want the exact opposite. I think we want a strongly defined format specifically for maps. Whether that's protobuf, ROS messages, etc.

I can see us supporting HDF5 for benchmarking datasets but for maps I just don't see it.

On top of that, just from skimming through this my stomach started to ache :nauseated_face: .

Thoughts?

hidmic commented 6 months ago

My argument is that the format is meant for flexible datasets, and for maps we want the exact opposite.

Hmm, how so? A collection of N-dimensional Gaussian distributions of M size can easily fit in a M (N + N (N + 1) / 2) matrix (i.e. M rows of N columns for the mean vector plus N * (N + 1) / 2 for the covariance matrix, which will always be symmetric). Ultimately, I think the decision goes back to #309 and how we want to deal with this data. It shouldn't be a pain to deserialize into our in-memory data structures.

I think we want a strongly defined format specifically for maps. Whether that's protobuf, ROS messages, etc.

The thing I don't love about those is that they are always painful to integrate. HDF5 (or NetCDF or Parquet or any of those) is easy to work with and well supported by people that is not us :)

What do you think @nahueespinosa?

On top of that, just from skimming through this my stomach started to ache 🤢 .

Oof, yeah, that type erased I/O isn't pretty.

nahueespinosa commented 6 months ago

I think we want a strongly defined format specifically for maps. Whether that's protobuf, ROS messages, etc.

I'm not well versed in storage formats, but HDF5 does seem like a widely-supported format. Also, unlike protobuf and ROS messages, it is self-describing. This isn't something we particularly need today, but it's certainly useful for external tools that don't need/want to create a dependency on our packages.

You probably have more experience than me, but HDF5 also supports data slicing which seems to lend itself well to map slicing for localization in big environments. Although we we're not going to solve that today.

hidmic commented 6 months ago

FWIW we could use HighFive instead of raw libhdf5.