norlab-ulaval / norlab_icp_mapper

A 2-D/3-D mapping library relying on the "Iterative Closest Point" algorithm
https://norlab-icp-mapper.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
58 stars 15 forks source link

Apply map post filters in different frames #10

Open boxanm opened 1 year ago

boxanm commented 1 year ago

Nowadays, all filters applied to the map point cloud in the post step are in the sensor's frame. Although the coordinate frame does not matter for some filters, there are cases when it could be beneficial to add support for different frames:

I imagine that there could be a frame parameter for each filter in the yaml config file, with default values being the sensor frame for the input filters and the map frame for the map post filters. Other frames could be loaded from another config file, even though I don't see any point in using different frames than the two mentioned.

As for the implementation, the mapper currently relies on libpointmatcher when it comes to loading the yaml files. This would need to be replaced by something that first loads the filter's frame and then passes the description of the filter itself to libpointmatcher. The resulting yaml structure could look something like this:

map_post_filter.yaml

- map:
      - BoundingBoxDataPointsFilter:
              ...
      - SurfaceNormalDataPointsFilter:
              ...
- sensor:  
      - BoundingBoxDataPointsFilter:
              ...
pomerlef commented 1 year ago

I think that would indeed be a good feature to add,